Changing district cost

Leyrann

Deity
Joined
Jan 11, 2015
Messages
4,395
Location
Netherlands
I want to change district cost progression so that, instead of being based on tech and civic progression, it is instead based on two factors, namely 1) amount of districts present in city and 2) amount of districts of this type present in your empire.

I found the modifier for district cost progression in the xml-file, as well as the line that tells the game what kind of cost progression the district has. However, I don't know where I can change this, and what I have to change it to.

Also, I do not know wheter it is even possible to have two different modifiers for district cost, but I guess that's to figure out after.
 
I just had the same idea. It's kind of stupid how long it takes to build a district on standard speed

can you point me to the xml file?
 
I want to change district cost progression so that, instead of being based on tech and civic progression, it is instead based on two factors, namely 1) amount of districts present in city and 2) amount of districts of this type present in your empire.

I found the modifier for district cost progression in the xml-file, as well as the line that tells the game what kind of cost progression the district has. However, I don't know where I can change this, and what I have to change it to.

Also, I do not know wheter it is even possible to have two different modifiers for district cost, but I guess that's to figure out after.


AFAIk you have to use a single metric. I don't believe code exists for 1), but for 2) you want to look at the code for builder and use the same COST_PROGRESSION_PREVIOUS_COPIES
 
Maybe I'll just keep it at that then.

@Flak153: Program Files (or Program Files (x86))/Steam/steamapps/common/Sid Meier's Civilization VI/Base/Assets/Gameplay/Data and then the "Districts.xml" file. I don't know if you have any programming knowledge, but this is what you should do: First it defines district types, then unique districts, then districts civilizations can't build (only Kongo) and then it defines a lot of stuff about districts in general (row 43-63). These are the longest lines in the file, so you'll need to do quite a bit of scrolling, but luckily the names are very straightforward. "Cost" is the base production cost on standard speed (in tooltips when you want to build them it also shows this), after which the game speed modifier and other modifier(s) are added. Directly after "Cost" comes "CostProgressionModel", which defines how cost increases. The standard here (which I am looking to change) is "COST_PROGRESSION_NUM_UNDER_AVG_PLUS_TECH". After it defines "CostProgressionParam1", which dfines how much cost increases. These three should be all that's needed to change district starting costs (if required; I think they might need to be a little bit more expensive at the start) and district cost scaling. Note that you should change the parameters seperately for every single district. One more thing, in case you've never done this before: MAKE A BACKUP! You're tinkering in the base game's files now (I have no idea how to make a mod, so I can't explain that), so if you break stuff, you can't play the game anymore. If you have a backup, however, you can simply copy/paste the backup file and it is back to original.

EDIT: It might also be good to warn you that some districts have cost progression based on game by themselves (aquaduct, neighborhood and their unique variants), and this cost progression starts at 1000. So that's not a bug, and well, they have a different base scaling (and imo also shouldn't scale on previous copies), so maybe they're allright. Also, I do not know wheter it automatically adjusts for reduced district costs, like Japan building Encampment, Theather Square and Holy Site (iirc) in half time. This info is not in the Civilizations xml file, and I am going to just try it out and see if it works correctly before looking for it anymore. Anyways, I think that's in general going to be everything for this thread, as I got my answer. If I find out that the reduced district time does not work properly, I'll make one more post here.
 
Last edited:
Top Bottom