Here's a simple example to set your custom TU increase after a mission:
extended:
scripts:
returnFromMissionUnit:
- offset: 10
code: |
var int statFromGame;
var int statFromGameDiff;
var int statByModder;
soldier.Stats.getTimeUnits statFromGame; # new soldier TU
statChange.getTimeUnits statFromGameDiff; # how much TU was gained this mission
set statByModder statFromGame; # let's take the new soldier TU
sub statByModder statFromGameDiff; # and remove the gain to get the old soldier TU
add statByModder 42; # add whatever custom amount you want
soldier.Stats.setTimeUnits statByModder; # set the newly calculated amount
return;
This is just for illustration, in a real script, you will need to consider stat caps, whether any experience was gained or not, etc.