How to mod unit cost?

hellagrant

Chieftain
Joined
Mar 28, 2010
Messages
57
Can someone please provide a template on unit cost editing, for a particular unit like settlers? Maybe even upload a generic file that I can customize. Thank you!!!!
 
Last edited:
<GameInfo>
<Units>
<Update>
<Where UnitType="UNIT_SETTLER"/>
<Set Cost="60"/>
</Update>
</Units>
</GameInfo>

here's an example of an update for the cost of an existing unit like the settler, if you want to ''update'' another thing from the settler you just have to add a space with the text needed like this:

<GameInfo>
<Units>
<Update>
<Where UnitType="UNIT_SETTLER"/>
<Set Cost="60" BaseMoves="3"/>
</Update>
</Units>
</GameInfo>

And the other way to write a correct text is like this:
<GameInfo>
<Units>
<Update>
<Where UnitType="UNIT_SETTLER"/>
<Set>
<Cost>60</Cost>
<BaseMoves>3</BaseMoves>
</Set>
</Update>
</Units>
</GameInfo>

hope it helps you
 
Be aware that Settlers have a cost progression model tied to them. Their cost increases each time you build one. This can also be modified, its exact name is CostProgressionModel.
 
hi, can u pls advise how can i change the base cost of units? for example,charriot is 1 gpt, lets say i want it to be 2 gpt, from where do i do it ?
 
If you give me a little time, I am working on exactly what you are looking for, you can just type in the new cost and copy and paste the code. Might have it ready tonight, if not it will be tomorrow.
 
Here is a spreadsheet I use. It has all of the units listed in two separate sheets. One for cost one for maintenance.

EDIT: You do need microsoft excel or similar product to use this. I believe Open Office would work as well.

See the attached for instructions, this is made for the sql method of mod loading, not xml, but it is pretty simple and lets you change only what you want and makes most of the code for you. I am using it and it works fine so far, you can use these sheets for any table in the game, just change the info in the blue areas of the spreadsheet, they change all of the rows appropriately. Sorry, I don't know how familiar you are with things, so I tried to explain it as best I could if you need more information or anything. Let me know.
 

Attachments

  • modder2.xlsx
    47.4 KB · Views: 362
  • instruct2.png
    instruct2.png
    59.6 KB · Views: 650
  • instructs.png
    instructs.png
    45.4 KB · Views: 864
Here is a spreadsheet I use. It has all of the units listed in two separate sheets. One for cost one for maintenance.

EDIT: You do need microsoft excel or similar product to use this. I believe Open Office would work as well.

See the attached for instructions, this is made for the sql method of mod loading, not xml, but it is pretty simple and lets you change only what you want and makes most of the code for you. I am using it and it works fine so far, you can use these sheets for any table in the game, just change the info in the blue areas of the spreadsheet, they change all of the rows appropriately. Sorry, I don't know how familiar you are with things, so I tried to explain it as best I could if you need more information or anything. Let me know.
great man, just what i needed..since i play on big maps and stretch the eras, and all these chariots are basically free if u use the policy of reduce by 1 gold...caused the map to explode with units that i couldnt move :))
but now i'll try it,will set maint cost to 2 pt,will see,thanx.
 
No problem its what I use, and I will probably include it when I release the mod with all of the tables i used it on, hopefully before the weekend hits.

I have included something similar in the mod, though it is to get rid of much of the 0 maintenance units, but with a similar purpose in mind.

Let me know if you have any questions.
 
changing the cost for that particulat unit also applies to AI? it means they also benefit the changes?
 
Hi! In Sid Meier's Civilization VI\Base\Assets\Gameplay\Data\Units, why there is no Panzer and Hussar?
I'm trying to tweak the germany civilizatioon for my advantage but I only found hanza district and u boat. Can you help me where are those units location?
 
Top Bottom