Q: Any of the mods removing units Upgrade restrictions only in own area ?

FlashXAron

Warlord
Joined
Sep 24, 2010
Messages
144
Okay, searching for that code line but wasn't able to find it !
Anyone so nice and share it, best would be an SQL code, as I want to use it in the gameplay.sql file from YNAMP mod.

After removing the strategic resources need for vanilla units , the AI already behaves better, but as long as it has enough outdated units, which it isn't able to upgrade, because AI never returns units back to its homeland to do that, it didn't built new ones. So AI is still broken, as he always moves some armies far away from his homeland and because when they arrive they are most of the time already outdated ... special when you play normal or faster paced games ! Even in Epic games it happens too often ...

so that would help a lot !

Thanks ...

PS: if someone is interested here the code to remove strategic resources from vanilla units :


-- Vanilla Units no longer require strategic resources, because this destroys the AI !
UPDATE Units SET StrategicResource=NULL WHERE UnitType='UNIT_SWORDSMAN' ;
UPDATE Units SET StrategicResource=NULL WHERE UnitType='UNIT_MUSKETMAN' ;
UPDATE Units SET StrategicResource=NULL WHERE UnitType='UNIT_KNIGHT' ;
UPDATE Units SET StrategicResource=NULL WHERE UnitType='UNIT_TANK' ;
UPDATE Units SET StrategicResource=NULL WHERE UnitType='UNIT_BOMBARD' ;
UPDATE Units SET StrategicResource=NULL WHERE UnitType='UNIT_MODERN_ARMOR' ;
UPDATE Units SET StrategicResource=NULL WHERE UnitType='UNIT_FIGHTER' ;
UPDATE Units SET StrategicResource=NULL WHERE UnitType='UNIT_JET_FIGHTER' ;
UPDATE Units SET StrategicResource=NULL WHERE UnitType='UNIT_BOMBER' ;
UPDATE Units SET StrategicResource=NULL WHERE UnitType='UNIT_JET_BOMBER' ;
UPDATE Units SET StrategicResource=NULL WHERE UnitType='UNIT_IRONCLAD' ;
UPDATE Units SET StrategicResource=NULL WHERE UnitType='UNIT_BATTLESHIP' ;
UPDATE Units SET StrategicResource=NULL WHERE UnitType='UNIT_AIRCRAFT_CARRIER' ;
UPDATE Units SET StrategicResource=NULL WHERE UnitType='UNIT_NUCLEAR_SUBMARINE' ;
 
If it helps the AI it will be something I look into, but it is a bit too early to do for me, sorry I could be of more help. I am removing the resource requirements and adding bonuses to units when the civ has the specific resources.
 
I don't have an answer to the main question yet, but as a small tip, if your goal is to remove strategic resources from all units you can just use an UPDATE statement with no WHERE clause:


UPDATE Units SET StrategicResource=NULL ;


The upside to doing it that way is it also affects any units acquired through DLC. (It may or may not affect any units added from other mods, depending on luck of the draw in terms of whether your mod runs first or theirs. The load order of multiple mods is something I'm still trying to figure out.)

If the intent was to remove the resource from some units but not all then you do have to list them one at a time.
 
@FlashXAron: I'm sorry I won't be able to help on the upgrade outside friendly territory thing (I'm not sure but this may be hardcoded ATM), but two small notes:

- since the last update you can now create a custom.xml or custom.sql in YnAMP folder to add your changes without them being overwritten by the next update

- you may want to have a look at the sql in CSO to give strategic resources a new usage, I have the same approach as Elucidus to replace the requirement by bonuses.
 
Back
Top Bottom