Ambreville
Deity
You can try higher numbers and they may work, the problme would be when you exceed a value of 65535 you'll 'flip' the counter and start again at -65535 or 0 depending on the data type (I don't have the source in front of me to look, sorry). Anyway, if a unit has a base value of 65 and you give it a weight of 1000 you'll be fine, but if the unit's base value is 130 your weight of 1000 would break it.
That's quite possible, if you figure in the leaderhead's unit weight x unit's own weight x unit's Flavor settings. Do both leaderhead and unit Flavor settings actually count against the 65535 count in this case?
The shame is that to get them to do what you want would only involve changes to maybe 5-10 lines of code in the SDK rather than tweaking weights and flavors on every unit and leader![]()
Looks like you addressed that again in your following post. I'll skip to that...
Here's another question for you, what else can the AI build? Do you have wealth/research processes for them to convert production? Do you have a bunch of 'filler' buildings and units that aren't absolutely necessary? You may want to considering removing the research/wealth/culture processes and as many buildings as you can pull out. If your AA units have the city defense unitAI setting (and only that unitAI) there is already code in place to limit how many they'll build based on a preferred number of defenders per city although there is no guarantee that they won't just build a ton of those if they have nothing other than AA or air units to build.
The AI can build pretty much everything else that would be expected of a WWII era Civ -- as far as standard CIV4 buildings are concerned. A lot of these are already built at the start of the scenario. I have new buildings added in the scenario, including 4 different aircraft assembly plants for each Civ involved (only two playable Civs), plus IIRC two production type buildings (generating Rubber and Oil resources), one engineering center (research), a flight school (air unit experience bonus + Trained Pilots resource), a rocket launch base (requirement to build rockets + extra air unit capacity), and a "local resistance hideout" giving one of the Civs a series of big penalties in foreign cities under occupation. Which buildings are the ones that should be removed?
I have a hard limit on Flak units (40 total for the larger Civ, 20 for the smaller one) with a +5 gold instance cost added, which doesn't seem to bother the AI. Its UnitAI are Air_Defense, Counter, & City_Counter. Sounds like you're suggesting I add the City_Defense tag as well -- right? Right now it doesn't look like the AI is going nuts trying to build AA units. Generally, although it tries to build a good number of them, It also builds things like granaries, universities, jails, coal plants, and even naval units -- which in this scenario can take more than a hundred turns to construct (another thing that doesn't seem to bother the AI either).
