Modding the toolbox

For requests, ideas and general mod talk
Post Reply
kairoradeus
Posts: 6
Joined: Sat Jul 09, 2016 4:32 am

Modding the toolbox

Post by kairoradeus » Sat Jul 09, 2016 4:40 am

So, I finally decided to try the toolbox because I have mods that already do what I wanted before and stuck with those for a while... what I liked alot from the first long war mod was that I could tweak it to my liking very simply since im no coder (yet). Changing the range of not created equal stats was my favorite thing to do, costumising my experience to how I liked it, even if it meant lesseing the challenge a bit.

So right now I am trying to do that with the toolbox but its just -not- working, if I leave the stats how they are, works just fine and all but if I change a single number, stop working? I... dont get it, I'd like some help if possible.

The changes I did for exemple was for the aim stat, changing the -10 --- 15 to 0 --- 15 and that spawned soldiers with 65 aim all around in a new campaign. (I always try my changes in a new campaign) While the rest of the stats changed adequately to what the numbers were giving. Not sure why my changes are being ignored? Is it a formula that works only with the -10 to 15 range?

Amineri
Long War Dev
Posts: 221
Joined: Wed Nov 11, 2015 7:34 pm

Re: Modding the toolbox

Post by Amineri » Sat Jul 09, 2016 8:52 pm

So the new system works fairly differently compared to the old system in LW EW (if you were aware of that), which was a sort of "point-buy" system.

The new system works on the concept of "Stat Swaps". If you want to customize it, you basically define what you think is "fair" in terms of what stats you would trade.

So the line :

Code: Select all

+STAT_SWAPS=(StatUp=eStat_Offense,	StatUp_Amount=1,	StatDown=eStat_Defense,	StatDown_Amount=2, Weight=1.0f)
That means that you are will to trade 1 point of Aim for 2 points of defense. The up and down are sort of old names... the swap can go in either direction. So it's 50/50 whether soldier gets -2 Defense for +1 Aim, or -1 Aim for +2 Defense.

The section you are looking at is :

Code: Select all

+STAT_CAPS=(Stat=eStat_Offense, Min=-10, Max=15)
After the system rolls each possible swap, it checks to see if applying that would make the stat go beyond the defined limit caps. So for offense, with default base of 65 Aim, that would be in a range of 55 to 80. If you change it to 0, 15, it would be in the range from 65 to 80. However, any increase in Aim has to come at the expense of other stats.

Generally this is a "zero sum" operation -- there are tradeoffs. However, if you want to just "randomize", you can use a config line such as :

Code: Select all

+STAT_SWAPS=(StatUp=eStat_Offense,	StatUp_Amount=1,	Weight=1.0f)
This just applies a +/- 1 to the Aim if it is rolled with no other tradeoff. However, on average your soldiers would tend to still get around 65. Unless of course you set the caps as you did above. However, if you want to change the average starting stat values it's generally simpler to adjust the Soldier character stats.

Post Reply