I was told that I need to write a sub mod.
Mods have master ruleset (assigned in the metadata file), so yes. You could just test it on something in xcom1 vanilla, then change base item to whatever you want and edit master to x-piratez
#*** Stat boosting ***
code: |
There should be something like
extended:
scripts:
healUnit:
at the start.
But I don't understand where should I start? Can you give me step by step instructions on what to do?
1. Create dummy ruleset: directory structure + metadata. …/
MyMod/metadata.yml, …/
MyMod/Ruleset, etc.
2. Edit your
metadata.yml.
3. Create …/
MyMod/Ruleset/scripts_item.rul or something, and write your script in there.
4. Enable your mod in mods menu.
5. It’s debug time! Since YAML based script is sensitive to things like number of spaces or where and how you commented out a line, the most likely result at this point is: OXCE terminated with a complain about some error in your ruleset. So look at the log, edit your mod, re-enable it (or just keep
options.cfg open in another tab and keep saving it to overwrite)… repeat until it works. Then repeat until it works the way you want.
As to scripting as such… I did not find anything non-opaque on scripts, but
over there Yankes pointed at
“Script (OpenXcom)” Ufopaedia page. There’s a reference for things like data formats. Even better, it has links to the threads with actual script examples on this forum (at the bottom).