Home » MODDING HQ 1.13 » v1.13 Idea Incubation Lab  » Update to Merc Stat Growths
Update to Merc Stat Growths[message #365629] Thu, 10 August 2023 04:36 Go to next message
rftr is currently offline rftr

 
Messages:32
Registered:August 2020
Hi everyone!

I've made a bunch of changes around merc stat growth recently, and while I'll provide a bullet point list of what's changed, I'll also provide some context around how that whole system works. So in short, here's what's changed:
- New options to reduce stat growth at 80+ and 90+ have been added
- <bEvolution> tag has been REMOVED from MercProfiles.xml
- Replacing the above tag are a new set of <GrowthModifier> tags, allowing each merc to have customisable and unique stat growths

Before I can explain what the above mean, I have to first (briefly) explain how stat growth works in 1.13.

Each stat (STR, DEX, AGI, etc) has its own progress bar that needs to be filled up before it increases by 1. The size of this progress bar is always constant - it's set by {StatName}_SUBPOINTS_TO_IMPROVE in JA2_Options.ini. By default, physical stats (Health, STR, DEX, AGI, WIS) require 50 subpoints, skills (MRK, MEC, MED, EXP, LDR) require 25, and experience levels require 350. So whether a merc has 50 STR or 90 STR, they still need the same 50 subpoints to increase STR by 1.

So why do mercs gain stats slower as the stat increases? Whenever a merc does something that would improve a stat, rather than immediately contributing to the stat's progress bar, the merc instead gets that many *chances* to contribute to the progress bar. The chance linearly drops as a merc's stat rises, following a simple (100 - statValue) chance. For example, let's say Ira has a Leadership value of 15 and "gains" 2 Leadership subpoints (the source doesn't really matter). Each subpoint has a 100-15 = 85% chance to actually contribute to her Leadership progress bar. On the other hand, if you've created an IMP with 75 leadership, the exact same scenario would only provide a 100-75 = 25% chance to actually contribute to that progress bar. There are a couple more mechanisms at work here that can slightly modify the chance (physical stat vs skill, traits, etc), but this is the general mechanism of how stat growth works.

With that out of the way, I can explain what's new!
There are two new settings in JA2_Options.ini - MAX_GROWTH_CHANCE_AT_80 and MAX_GROWTH_CHANCE_AT_90. These put a cap on the chance that a stat at 80+ and 90+ can contribute to the progress bar. More specifically, rather than a skill at 80 having a 20% chance to contribute, you can lower it to something like 5-10%. Similarly, a skill at 90 normally has a 10% chance to contribute, but you can lower it all the way down to 1%. If these seems specifically like a hindrance, it is! It was added specifically to increase the value of mercs that start with high stats by making it harder for newbies to catch up.

I've removed the <bEvolution> tag from all mercs in MercProfiles.xml. Previously, this value rigidly controlled whether a merc learned at a normal speed, half speed, quarter speed, not at all, or even negatively (lose stats)! It's been replaced with a bunch of new tags. The first is <fRegresses> which is a simple boolean flag that, if enabled, causes a merc to lose stats in exactly the same way as the old negative evolution tag value. Secondly...

Each merc now has <GrowthModifier{StatName}> tags (eg <GrowthModifierLife>, <GrowthModifierAgility>, etc). By default, each merc's growth modifiers match their old Evolution tag (which for most mercs, is 0). Each <GrowthModifier> is added to your {StatName}_SUBPOINTS_TO_IMPROVE setting in JA2_Options.ini, changing the size of the stat progress bar for each stat, for each merc! Negative values shorten the bar (faster growths), and positive values increase it (slower growths). In short, this allows you (or modders) to fine-tune how quickly each stat grows on a merc by merc basis. I've taken the liberty of slowing down Wally's marksmanship growth to match his bio description.

Each merc's rough growth rate (compared to the baseline "0" growth modifier) can be seen in the Personnel screen, under "More Stats".
https://i.imgur.com/mP2QS2N.png

As a result of these changes I've removed the DISABLE_EVOLUTIONS option from JA2_Options.ini and replaced it with 3 new ones:
- MERCS_GROWTH_MODIFIERS_ENABLED: if TRUE, growth modifiers are used for all mercs. If FALSE, a growth modifier of 0 is used for all mercs
- MERCS_RANDOM_GROWTH_MODIFIERS = if TRUE, growth modifiers are randomised based off of the merc's value in MercProfiles.xml
- MERCS_RANDOM_GROWTH_MODIFIERS_RANGE = the +/- range to randomly offset a merc's growth modifier. For example, a range of 5 here on a merc with a growth modifier of -2 would result in a random growth modifier between -7 and +3. Only done if the above value is TRUE

There's one caveat - I wasn't able to 100% replicate the "no growth" evolution, so instead I've set a very high value for the progress bar for those mercs (default subpoints = 50, their stat growth modifier = 30000, meaning they need 600x the stat points as a regular merc to grow by 1 point).

This change won't break existing saves, but since merc profiles are part of your save games, you won't see any effect until you start a new campaign.

Report message to a moderator

Private 1st Class
Re: Update to Merc Stat Growths[message #365668 is a reply to message #365629] Fri, 18 August 2023 13:26 Go to previous messageGo to next message
Colt .45 Peacemaker is currently offline Colt .45 Peacemaker

 
Messages:416
Registered:June 2016
Location: Norway
What about mercs that are old dogs and can't evolve ? Do they get to evolve in your system ? Never mind, it is explained at the bottom. Why make these changes though ? It was working fine for us, the non educated villagers who just want to enjoy the game in our ignorance of bliss. I don't like non evolving mercs, they wouldn't have been accepted by their employers in the first place. Reminds me of my time in the military. There was even a platoon, consisting of people with special needs. They were pretty useless overall, as soldiers, but getting their honorable recharge paper would help them significantly, in getting a job back in civilian life, however simple that job would be. That platoon was called "The Smurfs".

Mercenaries however, are not regular military. So, i don't think that their employers would accept to hire and pay old dogs that cannot evolve and adjust. Regular soldiers are getting paid a fraction of what mercenaries get.

[Updated on: Fri, 18 August 2023 13:50]




Nipson anomimata mi monan opsin

Report message to a moderator

Master Sergeant
Re: Update to Merc Stat Growths[message #365670 is a reply to message #365668] Fri, 18 August 2023 21:04 Go to previous message
rftr is currently offline rftr

 
Messages:32
Registered:August 2020
The main drive behind this change is to allow mercs to have some additional differentiation between them. Between this update and the old system, you should notice no difference as the default values are meant to mirror the old system/values. But now there's flexibility for modders or people interested in customising settings to have finer control over how mercs grow in their own games.

Report message to a moderator

Private 1st Class
Previous Topic: Split extended ear
Next Topic: New: Extra Items - sector specific and difficulty based xml
Goto Forum:
  


Current Time: Fri Jun 27 03:48:18 GMT+3 2025

Total time taken to generate the page: 0.00458 seconds