This is script that will be executed at end of mission for each soldier that survive battle.
It call after normal stats grain from experience is assigned.
Now you have access in that script to:
statPrevious - original stats before mission (read only)
statChange - stats change from exp (read only)
soldier.Stats - current stats of geoscape soldier, if you change it it will permanently change stats of soldier
unit.Stats - stats of battle soldier, changed by armor. Only affect current battle.
unit.Exp - exp grain during battle (read only)
In each of this there is named function that get or set proper stat:
#boost to current exp
statChange.getStrength incStrength; #`getStrength ` is function that will write current strength change to local variable `incStrength`
soldier.Stats.getStrength currStrength; #get current strength
add currStrength incStrength; #we add both value (this line do `currStrength = currStrength + incStrength`)
soldier.Stats.setStrength currStrength; #we set new value of strength to geoscape soldier
If you want know bit more about scripts in
https://openxcom.org/forum/index.php/topic,2915.msg31641.html#msg31641 is Extended readme where I add some other script examples.