Quick Question.....

krasny

Prince
Joined
Jul 19, 2002
Messages
578
One of the things I dislike about Civ 4 are endgame wars. There are way too many units, and it's just a grind.

How do I adust the cost to build and maintainance costs of certain units?

Thanks!
 
This is not a quick question AT ALL. This would involve creating a mod and learning XML. I am not sure how unit maintenance works, but it might be in the SDK.
 
I guess he doesn't want to have an easy way to scale that (which would indeed be very difficult), but I think he really asks only where to change the production cost ;).

If so, in Assets\XML\Units\UnitInfos.xml the value iCost is essentially the number of hammers which the unit requires (on normal speed, IIRC).
If you want to make some unit more expensive, then make the value higher.

But attention: Never edit the original files, always create a mod.
 
Thanks. My next question was how to create a mod, but I'll have a root around first.
 
In general: You go to your BtS\Mods folder, create a new folder in there, e.g. "myNewMod", and then you copy the files which you want to change into that folder (with the needed subfolders; e.g. the mentioned UnitInfos.xml is in Assets\XML\Units, so you'd copy that file into myNewMod\Assets\XML\Units).
 
You can increase the maintenance cost of a unit in the same XML file that The_J mentioned. You just need to change the value of iExtraCost. For example, a value of 1 will make the unit cost 1 more gold/turn than it would normally. I only know this because of this page in the modiki: http://modiki.civfanatics.com/index.php/Civ4UnitInfos
You can find a lot of info on the modiki so check it out.
 
Thanks for the replies :)
 
The problem here with Civ4 is that while build cost scale with the units, maintenance costs do not; therefore I worked up a quick chart of a proposal to adjust maintenance
costs based on two factors: Era of the unit and its unit combat info. These base costs can be adjusted for particular units:

Base Maintainence Cost Adjustment proposal (iExtraCost)
--------------+-------+--------+---------+-------+-------+-----+-------+------------+-------+-----+
Era/UntCmbt | Recon | Archer | Mounted | Melee | Siege | Gun | Armor | Helicopter | Naval | Air |
--------------+-------+--------+---------+-------+-------+-----+-------+------------+-------+-----+
Ancient | 0 | 0 | +1 | 0 | +1 | N | N | N | +1 | N |
--------------+-------+--------+---------+-------+-------+-----+-------+------------+-------+-----+
Classical | 0 | 0 | +1 | 0 | +1 | N | N | N | +1 | N |
--------------+-------+--------+---------+-------+-------+-----+-------+------------+-------+-----+
Medevial | 0 | 0 | +1 | 0 | +1 | N | N | N | +1 | N |
--------------+-------+--------+---------+-------+-------+-----+-------+------------+-------+-----+
Renaissance | +1 | N | +2 | +1 | +2 | +1 | N | N | +2 | N |
--------------+-------+--------+---------+-------+-------+-----+-------+------------+-------+-----+
Industrial | +1 | N | +2 | N | +2 | +1 | +2 | N | +2 | +2 |
--------------+-------+--------+---------+-------+-------+-----+-------+------------+-------+-----+
Modern | +1 | N | +2 | N | +2 | +1 | +2 | +2 | +2 | +3 |
--------------+-------+--------+---------+-------+-------+-----+-------+------------+-------+-----+
Future | +2 | N | N | N | +3 | +2 | +3 | +3 | +3 | +3 |
--------------+-------+--------+---------+-------+-------+-----+-------+------------+-------+-----+

Era-Unit Era/UntCmbt-Unit Combat/ #- iExtraCost base adjustment

N-Not applicable

Note: These are base adjustments to be adjusted for the actual unit; for example a Frigate may
have an iExtraCost value of +2 while a Ship of the line may have an iExtraCost of +3
 
I've done something similar in my mod.

Divisions cost 1, Tank Divisions cost 3, Corps cost 3, Tank Corps cost 9, etc.
 
It seems editing XML files isn't as easy as I thought it would be.

I've tried using Notepad and Excel. Both just produce reams of nonsense.

Any easier way of doing this?
 
I was expecting a Civ3 like unit editor.

Anyway of reading the file into a database or spreadsheet?
 
I use Notepad++ to edit XML,
this is going to take you some time to do, like any project it will need planning.
Whats the cost structure, inflationary costs over effects like civics for example, number of free units and so on.
I would set it down in excel or something before editing the XML.
Myself I started with civics, whichever way the effects of increasing costs needs to be tested properly to ensure the right balance.
 
Anyway of reading the file into a database or spreadsheet?

Probably doable, but imho not really practicable.
You should just try it with the text editor. Most people here get used to it, and it's really not that bad ;).
 
I'm thinking of doing an XML only mod based on my proposal and submit it for testing by the community. I think if it is properly done it will reduce unit spam.

Here are the assumptions underlying my proposal:
  • More technologically advanced units will incur higher costs to sustain them.
  • Certain units will have inherently higher costs to sustain than others...these include Mounted, Armor, Naval, Seige and Air.
  • Within an era and a Unit Combat Class, there will be fine distinctions on ExtraCost; for example in the industrial era, a transport would be cheaper to Maintain than a Destroyer, which in turn is cheaper than a Battleship.
 
Back
Top Bottom