All new promotions added to every unit?

I suspect they have an array with a fixed size of 200, so going over that gives an out of bounds error and breaks the code. It also runs into the problem of how they did promotion prerequisites. Instead of using a table of variable size, they set a fixed limit of 6 prerequisites, forcing them to split up the extra-attack effect into multiple identical promotions, which brings us closer to the limit. :undecide:
And there is the 256 unit types or building types limit that create an assert error when loading WB maps, but not when loading script maps...

I think the credit is lemmy for that one
Yep, I've learned it from lemmy


On a side note, I'm a bit discouraged like everyone else by the lack of support for the modding community, the promise made 2 years ago when the game was released are still to be fulfilled and the complete radio silence while they are working on their other projects is frustrating... Well not as frustrating as knowing that civ5 has the potential to really be the most moddable of the civs game so far if only the modding tools were finished/working, but almost.
 
I think the credit is lemmy for that one (the guy who was doing the 3D leaderhead art) but he's long gone so it's not an issue now.


And ID numbers are vvvvvveeeeeeeerrrrrryyyyyyyyy important, especially when completely editing the social policies! If you're off by one ID number, the whole thing doesn't work!

This is just because the SocialPolicyPopup.xml/lua has all of the policy branches coded individually, with explicit references to Types, IDs (!) and texts, rather than doing it with instances as it should be. But at least this one is exposed to us so we can patch it up as needed.

My mod does extensive re-IDing (using lemmy's sql snippet) of perhaps half of the game tables: techs, policies, policy branches, units, builds, promotions, improvements, etc. All of the problems I've encountered so far could be tracked to explicit references in UI files. (I probably don't see some problems because of all of my stripping. For example, my mod has none of the base Traits or Techs, so any hard-coded link between these two doesn't arise for me.)
 
Social Policy Popup is just awful. :/ The amount of things you have to do to add one policy branch is just amazing.
 
The statement below resets the AutoIncriment counter to the new end of the table (after deleting rows & changing IDs). This allows future insert statements to automatically assign IDs to emptied-out slots without manually specifying an ID number for each new entry.
Code:
UPDATE sqlite_sequence
SET seq = (SELECT COUNT(ID) FROM UnitPromotions)-1
WHERE name = 'UnitPromotions';
 
@Thalassicus,

I added your code snippet to my tutorial on deleting stuff. An alternative is to just run lemmy's code block again at the end of everything, but your solution is a nice way to do it.

@Others, lemmy's block works great except you need a specific ordering on Techs (must order by GridX to display properly). Find altered block at my link above.
 
Back
Top Bottom