Persistent changes to ini files

Post Reply
Gilbert
Posts: 8
Joined: Mon Jan 23, 2017 1:14 pm

Persistent changes to ini files

Post by Gilbert »

I saw a comment by Amineri in another thread, regarding creating a separate mod to change soldier aim, rather than changing the CharacterStats.ini in the LW mod, so that future updates to LW will not overwrite the changes. I posted a question there about roughly how to do this, but then experimented a bit, and discovered it may be more complicated than I thought. Apologies if creating a new thread is inappropriate, but thought it a better way to focus discussion on this specific topic.

I was able to create a simple mod that overwrites character stats, and without long war enabled, starting a new game, it indeed changed all the attributes of the soldiers I was attempting to. I then tried to load that mod alongside LW, and the changes to stats that LW does not change, like Aim, still worked. The changes that LW also sets, like HP, used the values from the LW mod.

I then tried to force it to my values by changing my ini file slightly:
[Soldier_Diff_1 X2CharacterTemplate]
CharacterBaseStats[eStat_HP]=15 -> works on its own, but alongside LW, soldiers got 4hp like LW says they should.

So I changed my file to:
[Soldier_Diff_1 X2CharacterTemplate]
-CharacterBaseStats[eStat_HP]=4
+CharacterBaseStats[eStat_HP]=15 -> this did not work, either alongside LW, or by itself.

So the question is, can I use a separate ini file that will overwrite only those lines from the LW characterstats file I want to overwrite? Do I need to put a pointer somehow from my mod to LW mod? And, if this is possible, can the same thing be done with other LW ini files, like for weapondamage, gamedata, etc? Can the same method be used to tweak a non-default template, like LW_Overhaul.ini or only base game files?

I'm not a programmer, but I think I have a basic understanding of how some of this stuff works. If what I'm trying to do is very complicated though, it may be over my head.

Thanks for any help
Post Reply