Bigjoe5 wrote:
Once Xenoarcheological Restoration has been researched, the game will hang on Production and Growth whenever a planet with Ancient Ruins is colonized, due to this effects group:
Code:
EffectsGroup
scope = Source
activation = And [
Random probability = .2
OwnerHasTech "LRN_XENOARCH_RESTORE"
]
stackinggroup = "ANCIENT_RUINS_TECH_UNLOCK"
effects = CreateShip "SD_DRAGON_TOOTH" Source.Owner Source.Planet.Species
The last thing in the freeoriond log was '2010-08-28 07:31:01,143 ERROR Server : Planet::EnvironmentForSpecies couldn't get own species with name ""'
Perhaps the effects group is being passed before the planet is populated, and it can't get the planet's species for the ship that's being created, or something like that?
The effects group has a problem with "Source.Planet.Species". If a special is attached to a planet, then the planet IS the source object, and you shouldn't be using Source.Planet, which probably returns no object, leading to problems. Changing to Source.Species avoids the hang, for me.
Edit: I've added some safety checks in the reference evaluation code that should prevent the crashes and output an error message to the server log when an invalid reference is evaluated. /Edit
The ERROR message you quote is likely unrelated to this effect (there's no need to get the planet environment for a species when creating a ship... and it doesn't) but I've made some changes to get rid of them and some similar error messages that weren't really errors (eg. can't find a species with name "" for planets with no species on them...).
I've also fixed some unrelated problems with CreateShip when using predefined ship designs in loaded games.
Bigjoe5 wrote:
Also, this might already be known, but ships aren't destroyed when structure reaches 0.
Other than combat, effects-related bugs, and effects, there isn't supposed to be any way for ships' structures to fall to zero. So likely the only place there is a check for structure being 0 is at the end of combat.