Cannot build planetary improvements

CainStar

Warlord
Joined
Aug 15, 2007
Messages
230
This is my 3-4 game and I'm playing as Cardassians. So I had a random event 'Nuclear meltdown' in one of my systems and thus the planet which the improvement was build on is destroyed(goes 0/0 population). But now for some reason I cannot build any planetary improvements in any of my systems, and the ones that had improvements under construction stop also. Is there away fix this? :confused: :confused: :confused:
 
This was reported by deanej over in the Final Frontier Plus bug thread. I have verified that there is indeed a bug in the meltdown related stuff (and still a bug in the general nuke effects). A fix will be posted over there later tonight.

There is no easy in-game fix for an existing game at this point - if you have a save from before it happened (like an autosave) then you should be able to continue from there after a fix is made to the Python and XML.

What has happened in your game is that due to the meltdown some random selection of buildings may have been destroyed by the DLL for the "city" (as far as the DLL is concerned it is a city, not a star system) across the entire system (not just on one planet, since the DLL knows nothing about planets) which is not reflected in the planet data (stored in Python), and buildings of the type that had the meltdown were also destroyed in the DLL but not necessarily in the Python planet data. Ont he Python side, only the buildings on one planet int he system are destroyed (with luck this can make the data match, but evidently not in this case). Having a mismatch between what buildings the DLL things there are and what the Python thinks there are is what causes the "can't build any buildings" problem.

Currently, this issue can be avoided only by luck: if no building has ever been built in the system except on the one planet that starts with free buildings then it would not happen (since that planet would be the one wiped out, which removes the buildings on the planet from both the Python and DLL's data), otherwise it is would require pure luck that no building of a type built anywhere else in the system but not on that first planet is wiped out by the random chance used by the DLL.

The fix will stop the DLL from destroying any buildings itself when this happens - it will all be done in the Python code, which can deal with the planets and won't have this problem.
 
Ok thanks for the reply.....btw if somebody is experiencing the same problem as I was, and it seems even thou you reload your savegame and the "random" event keeps happening, simply use WB and remove both power improvements for few turns and then add again with WB.
 
I have posted a re-fix of the meltdown code over in FFP/Bug Thread.

New and improved! Now with at least two fewer circumstances under which it will fail to solve the "can no longer build buildings" issue. (With a little luck that will bring it down to 0 such circumstances.)

I also implemented the same fixes in the onNukeExplosion event handler, which also had them (which is why the onMeltdown callback did since I copied that code from there).

And, as an added bonus, I made the posted onMeltdown code compatible with pre-BUG versions of FPP and related mods - the code I posted yesterday had a compatibility issue.
 
Yes, I have just posted a re-re-fix of the meltdown code.

Advantage to this version: it should, I hope, actually work as intended. No failure due to an undefined variable if the there is a resource on the planet. No applying damage to every ship the player owns instead of just the ones on the star system's plot. Plus an adjusted cannotConstruct function to stop buildings from being built on disabled planets unless they are set to be nuke immune.

I really really hope this is the last time I have to fix this code. Really.
 
I apologize God-Emperor, but is there an 'easy' way to manage the files in the Civ IV Star Trek mod to integrate the changes? Thank you!
 
Wait for me to get around to repackaging the installer might be the best bet. The easiest changed I had was changing the buildings... since Star Trek doesn't have any buildings not tied to a planet, I was able to use a fine and replace tool. Python took a bit longer (and I had to tweak the onNukeExplosion one).
 
Ah. I didn't check the Star Trek code for mod-specific things, so missing that doesn't surprise me. (Amongst other things, there are just so many Star Trek mods to check so I didn't even try.)

I was hoping it wasn't some bug I missed.
 
Back
Top Bottom