Logo Platform
logo amplifiers simplified

Looking for some guidance on XML files for a bit of experimental modding

Reply
Copied to clipboard!
10 years ago
Sep 27, 2014, 2:19:00 AM
I'm looking to do a bit of experimenting with game files and I'm wondering if anyone here could point me in the right direction (to the right XML files) to do some of the following things:



* Reduce or eliminate the maintenance cost on military units

* Allow some stockpiles to be built from game start

* Change the number of technologies and/or tier of technologies needed to advance to a new era



I'm not sure if all of these things are possible via modding the XML files but any guidance is appreciated.
0Send private message
10 years ago
Sep 27, 2014, 2:49:30 AM
MedicineMan wrote:
* Reduce or eliminate the maintenance cost on military units


Here is the descriptor for "Cannon Fodder" (Researchable tech that does something similar to your need.):

[CODE]











[/CODE]



It's in: ./Simulation/SimulationDescriptors[Technology].xml





The quickest way to get no upkeep is to make a new trait and tailor it to match. What follows is a tutorial of sorts but it's also a finished copy that should do exactly what you need.



Add to ./Simulation/FactionTraits[Custom].xml (This file contains the entry for the trait, its cost, level, etc.)

[CODE]





[/CODE]



An entry in ./Simulation/SimulationDescriptors[FactionTrait].xml (Name needs to match what's in 'SimulationDescriptorReference' above. This file will contain most effect of the trait.)

[CODE]











[/CODE]



Add a localization pair in "./Localization//EF_Localization_Assets_Locales.xml"

[CODE]

No Military Upkeep

Completely negates military upkeep.[/CODE]



An entry in ./Gui/GuiElements[FactionTraits].xml (Name needs to match the name of the trait.)

[CODE]



%FactionTraitNoMilitaryUpkeepTitle

%FactionTraitNoMilitaryUpkeepDescription

[/CODE]



MedicineMan wrote:
* Allow some stockpiles to be built from game start


Have a look at the traits that unlock technology early. Make one to unlock the stockpile tech.



MedicineMan wrote:
* Change the number of technologies and/or tier of technologies needed to advance to a new era


I don't know. I'll let you know if I find anything.
0Send private message
10 years ago
Sep 27, 2014, 4:21:07 AM
Master_of_Da_Skies:



Thank you for the information. Some very useful stuff.



I wonder though... looking at the code for a custom faction trait, it looks like it is modifying the contents of SimulationDescriptors[Garrison].xml. Do you think it would be possible to achieve a similar result by modifying the following lines in that file?



[CODE]

[/CODE]



Maybe setting Left="1" to Left="0"?



Obviously that won't do anything about hero upkeep but maybe it would take care of units in cities and field armies?
0Send private message
10 years ago
Sep 27, 2014, 4:34:20 AM
MedicineMan wrote:
Maybe setting Left="1" to Left="0"?


It looks like binary left-shift addition of two ints. See here.

Either that or left & right are two sides/variables for multiplication. I don't know enough about how the engine works to be definitive here. However, you don't have to keep the same descriptors there, you can replace them with your own.



If your goal is still '0' upkeep try changing this:

[CODE]







[/CODE]



Into this:

[CODE]

[/CODE]

This might only work for units in the garrison though. (Not sure if that's any army or only units within the city garrison. And by that I mean I don't know if the moveable army 'unit' itself is technically considered a garrison.)
0Send private message
10 years ago
Sep 27, 2014, 7:20:59 AM
Master_of_Da_Skies:



I did a little experimentation and want share what I've found with you.



The two MilitaryUpkeep lines in SimulationDescriptors[Garrison].xml seem to affect the maintenance cost of units in field armies and garrisons respectively. I fiddled with the numbers in the XML files and loaded a save game to test this. While the tooltips on the units weren't reliable for telling the difference, the military ledger and the financial summary both reflected the reduction or elimination of the relevant maintenance.



I'm hoping that between this and a large reduction in the unit build cost the AI will be a bit more resilient.
0Send private message
?

Click here to login

Reply
Comment