Advertisement
Civilization Fanatics' Center  

Go Back   Civilization Fanatics' Forums > CIVILIZATION V > Civ5 - Creation & Customization

Reply
 
Thread Tools
Old Feb 27, 2012, 10:56 AM   #1
Hulfgar
Emperor
 
Hulfgar's Avatar
 
Join Date: Mar 2008
Location: France
Posts: 1,162
Question about unit upgrades

Hello all,

is it possible to give a unit more than 1 upgrade option ?

more important : how can I adjust the cost of an upgrade ?

thanks
__________________
My Mods :
Hulfgar's Modpack for Gods and Kings
Hulfgar is offline   Reply With Quote
Old Feb 27, 2012, 11:13 AM   #2
PawelS
Ancient Druid
 
PawelS's Avatar
 
Join Date: Dec 2003
Location: Poland
Posts: 2,208
1. AFAIK it's not possible. You can add more upgrades in the XML, but it won't work.

2. BASE_UNIT_UPGRADE_COST and UNIT_UPGRADE_COST_PER_PRODUCTION (in GlobalDefines.xml)

(Also UNIT_UPGRADE_COST_MULTIPLIER_PER_ERA*, UNIT_UPGRADE_COST_EXPONENT*, UNIT_UPGRADE_COST_VISIBLE_DIVISOR, UNIT_UPGRADE_COST_DISCOUNT_MAX)

* I don't know if/how these 2 defines work.

For adjusting upgrade cost of individual units, you can try using a promotion with UpgradeDiscount, but I haven't checked if it works.
PawelS is offline   Reply With Quote
Old Feb 27, 2012, 11:16 AM   #3
Hulfgar
Emperor
 
Hulfgar's Avatar
 
Join Date: Mar 2008
Location: France
Posts: 1,162
Thanks PawelS
__________________
My Mods :
Hulfgar's Modpack for Gods and Kings
Hulfgar is offline   Reply With Quote
Old Feb 27, 2012, 12:57 PM   #4
Spatzimaus
Mad Scientist
 
Spatzimaus's Avatar
 
Join Date: Sep 2005
Location: Los Angeles, CA
Posts: 3,063
Quote:
Originally Posted by PawelS View Post
1. AFAIK it's not possible. You can add more upgrades in the XML, but it won't work.
If you modify the UnitPanel Lua/xml then it should be possible to intercept the player's upgrade command and add a new UI window that allows the player to pick which unit type to upgrade to. You wouldn't need anything in the XML for that, unless you wanted to for bookkeeping purposes, and your only real headache would be ensuring the promotions of the old unit are compatible with the new unit type. (Not that the existing game has any of that, of course.)

However, this wouldn't help the AI, which'd still use the old linear upgrade methods unless you also added some sort of "sideways" upgrade mechanism (not difficult with Lua, except for ensuring that type-specific promotions of the other unit type aren't transferred over) and code up an AI logic on when to use it (much harder). In theory it could be done, but in practice it probably wouldn't be worth the headaches unless your mod was entirely designed around the idea of branching upgrade chains.
__________________
Once upon a time there was the Ages of Man mod set. Then Firaxis broke it. But thanks to the DLL efforts of the community, the mods shall rise again!
Spatzimaus is offline   Reply With Quote
Old Feb 28, 2012, 02:08 AM   #5
Hulfgar
Emperor
 
Hulfgar's Avatar
 
Join Date: Mar 2008
Location: France
Posts: 1,162
Thanks as well Spatzimaus.

I will drop the idea of multiple upgrades, as you say it's not worth the headache, especially if the AI has to learn how to use it!
__________________
My Mods :
Hulfgar's Modpack for Gods and Kings
Hulfgar is offline   Reply With Quote
Reply

Bookmarks

Go Back Civilization Fanatics' Forums > CIVILIZATION V > Civ5 - Creation & Customization > Question about unit upgrades

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Advertisement

All times are GMT -6. The time now is 11:49 AM.


Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
This site is copyright Civilization Fanatics' Center.
Support CFC: Amazon.com | Amazon UK | Amazon DE | Amazon CA | Amazon FR