FreeOrion

Forums for the FreeOrion project
It is currently Wed May 22, 2013 9:46 pm

All times are UTC




Post new topic Reply to topic  [ 46 posts ]  Go to page Previous  1, 2, 3, 4  Next
Author Message
 Post subject: Re: Bugs
PostPosted: Tue Aug 03, 2010 4:59 am 
Offline
Designer and Programmer
User avatar

Joined: Tue Aug 14, 2007 6:33 pm
Posts: 1772
Location: Orion
Geoff the Medio wrote:
Quote:
Geoff the Medio wrote:
This sounds more like it's a problem with the Building condition. Does using another effect with the same effects group work? (eg. Destroy, MoveTo...)
The same problem occurs with other effects as well, but it works fine if I try to use an effect on a specific type of building, for example, destroying the Imperial Palace.

These should be fixed.
They are.

Geoff the Medio wrote:
Edit:

Bigjoe5 wrote:
Clicking on a BuildingType link in the encyclopedia panel either does nothing, or causes the game to crash.

The crashing has been stopped by catching the exception and doing nothing when it happens. There's an underlying problem I still need to investigate, though.


Edit2:

The building links in unlocked items for a tech should work now, and take you to the production screen. (Unless I didn't test any that would still cause a crash, since you mentioned that different results sometimes happened with different buildings...)

Tech links, should any be present in unlocks items, should also work.

There are also now links for ship parts and hulls, but clicking these does nothing.


Edit4:

Clicking ship part and hull links should now open up the design screen with the encyclopedia panel showing the appropriate item. If there was some sitrep or encyclopedia text that had a link to a particular ship design, clicking that should also work, but I don't think any such text exists. (Ship produced messages don't state the design of the new ship.)
Seems to work fine.


Geoff the Medio wrote:
Edit3:
Bigjoe5 wrote:
- Ships defined in premade_ship_designs.txt will only exist as ship designs in-game if they have been defined as part of a starting fleet in starting_fleets.txt. Otherwise, they will not appear on the list of buildable items in the production screen.

This should be fixed.
Yeah, it's fine now.

Geoff the Medio wrote:
Quote:
When CreateShip is used to attempt to create such a ship, the game hangs on "Production and Growth..."

I haven't tested this and don't know whether the previous fix will also fix it. Could you check?
CreateShip still doesn't work. The freeoriond.log says something about looking up the environment types for species "", which seems to indicate that the problem is that the newly created ship doesn't have a species associated with it.

Also, food consumption is working properly now.

_________________
Warning: Antarans in dimensional portal are closer than they appear.


Top
 Profile  
 
 Post subject: Re: Bugs
PostPosted: Tue Aug 03, 2010 5:38 am 
Offline
Programming, Design, and De Facto Lead
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 7891
Location: Vancouver, BC
Bigjoe5 wrote:
Geoff the Medio wrote:
Quote:
When CreateShip is used to attempt to create such a ship, the game hangs on "Production and Growth..."

I haven't tested this and don't know whether the previous fix will also fix it. Could you check?
CreateShip still doesn't work. The freeoriond.log says something about looking up the environment types for species "", which seems to indicate that the problem is that the newly created ship doesn't have a species associated with it.

I'm going to delay the fix of this until after v0.3.15, if it's not a huge major big problem...


Top
 Profile  
 
 Post subject: Re: Bugs
PostPosted: Tue Aug 03, 2010 5:45 am 
Offline
Designer and Programmer
User avatar

Joined: Tue Aug 14, 2007 6:33 pm
Posts: 1772
Location: Orion
Geoff the Medio wrote:
I'm going to delay the fix of this until after v0.3.15, if it's not a huge major big problem...

If ships can't be created, the colony base doesn't work, and expansion becomes brutally slow. I can "fix" this for now by just cutting the cost of the colony ship parts to make actual colony ships less expensive, though.

_________________
Warning: Antarans in dimensional portal are closer than they appear.


Top
 Profile  
 
 Post subject: Re: Bugs
PostPosted: Tue Aug 03, 2010 5:49 am 
Offline
Programming, Design, and De Facto Lead
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 7891
Location: Vancouver, BC
*sigh* OK. Can you post a save to test with? Immediately before the CreateShip effect would be used. Edit2: nevermind, it's easy to replicate.

Edit: I don't know if it's the cause of the problem, but the planned logic for created ships' species is:
* If the source is a planet, use that planet's species.
* Else, if the source is a building, use that building's planet's species.
* Else, if the target is a planet, use that planet's species.
* Else, if the target is a building, use that building's planet's species.
* Else, if the empire id that is to own the ship has a capitol planet, use that planet's species.
* Else, abort.

Sound reasonable for what you're trying to do?

Eventually I'll probably add a species parameter to the effect, but not for v0.3.15.

Edit3: The problem is unrelated to species. It seems to have been due to me changing from "health" to track ship damage, to "structure". Ship now don't have a health meter, but I was trying to set it when creating the new ship.

Edit4: Should be fixed.


Top
 Profile  
 
 Post subject: Re: Bugs
PostPosted: Tue Aug 03, 2010 8:41 am 
Offline
Designer and Programmer
User avatar

Joined: Tue Aug 14, 2007 6:33 pm
Posts: 1772
Location: Orion
- Selecting a colony ship, then opening the system sidepanel doesn't make the colonize planet button appear. The ship must be deselected, then reselected before the colonize order can be given.

- Food consumption predictions for the next turn assume that the population is not starving and will continue to grow, which causes them to be wrong when there's actually not enough food.

- Increasing the decay of meters when they're above target via content files works fine, but the predicted meter value for the next turn doesn't take it into account. As a result, meters say they're decreasing at a rate of 1 per turn when they're actually decreasing at 2 per turn.

- Ship design descriptions don't take into account additional/optional effects groups when calculating stats. I've changed stealth and detection parts so that the bonus comes from these effects groups, so that they can be put in a stacking group, which means that stealth and detection values in design descriptions are off whenever one of these parts are present.

Of course, none of these can really be considered huge major big problems...

_________________
Warning: Antarans in dimensional portal are closer than they appear.


Top
 Profile  
 
 Post subject: Re: Bugs
PostPosted: Tue Aug 03, 2010 8:53 am 
Offline
Programming, Design, and De Facto Lead
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 7891
Location: Vancouver, BC
Bigjoe5 wrote:
- Ship design descriptions don't take into account additional/optional effects groups when calculating stats.

There's no really any way to fix that easily. Since effects on parts could have arbitrary conditions or refer to arbitrary meter values, it's in general not possible to assign a single value to a meter due to a custom meter effect. As such, the "stats" that are used for autogenerated design descriptions are only the stuff that's specified in the list of name = value lines in part or hull descriptions.

I think tzlaine and I discussed adding an optional stacking group string to stats, though, which would resolve that specific issue. But in general, if you want accurate descriptions with complicated effectsgroups, you'll need to write your own custom description.


Top
 Profile  
 
 Post subject: Re: Bugs
PostPosted: Tue Aug 03, 2010 8:59 am 
Offline
Designer and Programmer
User avatar

Joined: Tue Aug 14, 2007 6:33 pm
Posts: 1772
Location: Orion
- planets with a target population of 0.1 (or presumably anything less than 1) continue growing until they reach a stable population of 1.

_________________
Warning: Antarans in dimensional portal are closer than they appear.


Top
 Profile  
 
 Post subject: Re: Bugs
PostPosted: Tue Aug 03, 2010 5:25 pm 
Offline
Programming, Design, and De Facto Lead
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 7891
Location: Vancouver, BC
Bigjoe5 wrote:
- planets with a target population of 0.1 (or presumably anything less than 1) continue growing until they reach a stable population of 1.

I think this has been fixed.


Top
 Profile  
 
 Post subject: Re: Bugs
PostPosted: Tue Aug 03, 2010 11:05 pm 
Offline
Designer and Programmer
User avatar

Joined: Tue Aug 14, 2007 6:33 pm
Posts: 1772
Location: Orion
- after a colony ship has been ordered to cancel colonization, it can't be re-ordered to colonize on that turn.

_________________
Warning: Antarans in dimensional portal are closer than they appear.


Top
 Profile  
 
 Post subject: Re: Bugs
PostPosted: Wed Aug 04, 2010 2:52 am 
Offline
Designer and Programmer
User avatar

Joined: Tue Aug 14, 2007 6:33 pm
Posts: 1772
Location: Orion
-Effects groups altering Health appear to be working 4 times per turn. The following effects groups from species.txt, meant to increase health growth to 3 per turn, end up increasing it to 9 per turn:

Code:
EffectsGroup
            scope = Source
            activation = Health low = 0 high = Target.TargetHealth - 3
            effects = SetHealth Value + 2

        EffectsGroup
            scope = Source
            activation = Health low = Target.TargetHealth - 3 high = Target.TargetHealth
            effects = SetHealth Target.TargetHealth

_________________
Warning: Antarans in dimensional portal are closer than they appear.


Top
 Profile  
 
 Post subject: Re: Bugs
PostPosted: Wed Aug 04, 2010 7:37 am 
Offline
Programming, Design, and De Facto Lead
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 7891
Location: Vancouver, BC
Bigjoe5 wrote:
-Effects groups altering Health appear to be working 4 times per turn.

Does that really only affect just health meters, and not all non-max non-target meters that have associated max or target meters? (Which are the current population, health, farming, mining, industry, trade, research, construction, fuel, shield, structure and defense meters.)


Top
 Profile  
 
 Post subject: Re: Bugs
PostPosted: Wed Aug 04, 2010 1:31 pm 
Offline
Designer and Programmer
User avatar

Joined: Tue Aug 14, 2007 6:33 pm
Posts: 1772
Location: Orion
Geoff the Medio wrote:
Does that really only affect just health meters, and not all non-max non-target meters that have associated max or target meters? (Which are the current population, health, farming, mining, industry, trade, research, construction, fuel, shield, structure and defense meters.)
I haven't checked construction, fuel, shield, structure or defense yet, but the resource meters are definitely fine for this, and work as predicted with a tech designed to increase growth to 3 and decay to 5.

_________________
Warning: Antarans in dimensional portal are closer than they appear.


Top
 Profile  
 
 Post subject: Re: Bugs
PostPosted: Tue Aug 10, 2010 9:00 pm 
Offline
Programming, Design, and De Facto Lead
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 7891
Location: Vancouver, BC
Geoff the Medio wrote:
Eventually I'll probably add a species parameter to the effect, but not for v0.3.15

This is now done. CreateShip requires a species parameter. The species can be hard coded, "SP_HUMAN", or reference the source or target objects: eg. Source.Planet.Species or Target.Species

CreateBuilding can also now reference objects for its building type name: Target.BuildingType (assuming the target is a building). You could also reference the Source object, though I don't imagine that would have much use when you could just hard-code the building type name in that case.


Top
 Profile  
 
 Post subject: Re: Bugs
PostPosted: Sat Aug 14, 2010 3:41 am 
Offline
Programming, Design, and De Facto Lead
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 7891
Location: Vancouver, BC
Bigjoe5 wrote:
- Food consumption predictions for the next turn assume that the population is not starving and will continue to grow, which causes them to be wrong when there's actually not enough food.

This should be fixed.


Top
 Profile  
 
 Post subject: Re: Bugs
PostPosted: Sat Aug 14, 2010 3:51 pm 
Offline
Designer and Programmer
User avatar

Joined: Tue Aug 14, 2007 6:33 pm
Posts: 1772
Location: Orion
This effects group in species.txt:
Code:
        EffectsGroup
            scope = Source
            activation = And [
                WithinStarlaneJumps 1 Building name = "BLD_PLANET_BEACON"
                Not WithinDistance 200 Building name = "BLD_LIGHTHOUSE"
                Random probability = 0.5
                Focus "FOCUS_PLANET_DRIVE"
            ]
            effects = Destroy
causes the game to hang on Production and Growth, with "Universe::Destroy called for nonexistant object with id: 249283"

_________________
Warning: Antarans in dimensional portal are closer than they appear.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 46 posts ]  Go to page Previous  1, 2, 3, 4  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group