I'll start off by saying I don't get yet all the intricacies of the awardExperience script, but
here's the complete documentation from the verbose debug log. At it's most basic, the script will run whenever experience is awarded to your unit, modifying the experience gain by a multiplier, and then returning it. The following example just outputs the experience type and multiplier values to the openxcom.log file, so you can see what's going on:
extended:
scripts:
awardExperience:
- offset: 1
code: |
debug_log 1 experience_multipler;
debug_log 2 experience_type;
return experience_multipler;
And no, "experience_multipler" is not a typo in the script, that's just what the variable is called.
An autoshot from a rifle on an alien looks like this in openxcom.log:
[13-03-2018_12-14-25] [DEBUG] Script debug log at 0x23: 1 100
[13-03-2018_12-14-25] [DEBUG] Script debug log at 0x46: 2 4
[13-03-2018_12-14-26] [DEBUG] Script debug log at 0x23: 1 100
[13-03-2018_12-14-26] [DEBUG] Script debug log at 0x46: 2 4
[13-03-2018_12-14-27] [DEBUG] Script debug log at 0x23: 1 100
[13-03-2018_12-14-27] [DEBUG] Script debug log at 0x46: 2 4
Note that the experience_type variable corresponds to the types Meridian wrote down in the first post of this thread; type 4 is firing accuracy experience, trained at 100% of normal rate.
If you want to simply double experience gain for all actions, that can be done by this:
extended:
scripts:
awardExperience:
- offset: 1
code: |
mul experience_multipler 2;
return experience_multipler;
Or if you wanted to replace 100% firing accuracy training with your request for 67% firing accuracy training, you could do it like this:
extended:
scripts:
awardExperience:
- offset: 1
code: |
if eq experience_mode 4;
muldiv experience_multipler 67 100;
end;
return experience_multipler;
You can write more complex logic based on a large number of variables; I'd recommend looking at some of the
script example Yankes and I have written to get an idea of how to set ruleset tags on an item to influence the logic in scripts.