Coding a Unit Limit: Land, Sea, & Air

tried it out now on immortal, and the gold bonus for the AI is too large here. The 1st time i see those millions of warriors .... yes, what to build when nothing else is reasonable.
 
Hello, everyone
For now i'm trying to create something similar to past solutions by NameArleadyUsed and Gleb Bazov
The idea behind my variant of mod - implement new strategic resource for each type of units:
  1. land melee (including anti-cavalry) - 3 units per city + 1 per barrack
  2. ranged - 2 per city + 1 per archery range (new encampment lvl1 building, inspired by JNR's Encampment Expansion)
  3. cavalry - 2 per city + 1 per stables (light cavalry cost 1 slot, heavy - 2 slots)
  4. siege - 1 per city + 1 per armory
  5. naval - 1 per harbor district + 1 per building in the district
  6. air - no changes for existing limits
  7. recon - 10 overall
So, city centers would add 3 land melee "resource", 2 range "resource", etc, and warriors would cost 1 melee maintenance
It's not hard to add this resources and maintenance cost to units and resource generating to city/building, but for now i have two main troubles:
  1. resource cost or maintenance cost can only have one resource, not two or more. For example, i can't add to ironclad both coal maintenance and naval "resource". It can be tweaked by just adding to all units maintenance cost in unit type "resource" with raising production resource cost in basic resources up to 20 or 30.
  2. i cant' find how to increase cap of just one particular strategic resource. Seems like it cannot be done only with sql/xml, and needs additional lua coding
If you can give me some advises or ideas, it would be great!
Current version of mod - https://drive.google.com/open?id=1g9Jgw4eut3HGBQX9UHeoT-xUDpC6YH_L
It's still much to be done, but main concept is working, just need to resolve 2nd main trouble.
 
Back
Top Bottom