Keeps the current trigger functionality, while adding the ability to use comparators (<, >) for numerical values, and to and/or multiple conditions together for more complex triggers. This required adding random-range-min-max resolution to roll_triggers. random/random-range-low/high are not included in this resolution.
If the new option "option_advanced" is not included, triggers will work exactly as before, with the exception of resolving random-range-min-max.
For multiple option comparison, And takes priority, so if you look for options: A & B & C | B & D | A & E & F it will logically group them as: (A & B & C) | (B & D) | (A & E & F)
Format is as follows in the trigger options, replace list dots with - :
option_advanced:
the comparator accepts '<', '=', '!=', '>' and defaults to '=' if only two entries are given.
&/0/and/And/AND all represent an AND operation, while |/1/or/Or/OR both represent and OR operation.
option_name/option_result are un-needed when option_advanced is present.
Example:
triggers:
option_category: 'A Link to the Past'
option_advanced:
['crystals_needed_for_gt', '>', 2]
0
['crystals_needed_for_gt', '<', 6]
'&'
['crystals_needed_for_ganon', '=', 4]
'|'
['goal', 'triforce_hunt]
'&'
['triforce_pieces_mode', '=', 'percentage']]
options:
A Link to the Past:
swordless: true
This says that if crystals needed for gt is more than 2 and less than 6, and crystals needed for ganon is 4 OR if goal is triforce hunt and triforce pieces mode is set to percentage, then swordless will be set to true.
How was this tested?
Unit tests were run to see if anything outside triggers had broken, and I tried old trigger styles to ensure they still worked, and then tried each new feature separately, and in multiple combinations while checking that the resulting settings were as expected, including making sure random-range-min-max permanently resolved to a constant value for that game's generation.
Finally, I ran a generation with every supported game that A: Does not require you to possess a copy of, or B: That I possess a copy of. including both old and new triggers in two of them.
The generation was successful with no errors, and all the game's settings were as expected, including merged values for start_inventory.
If this makes graphical changes, please attach screenshots.
What is this fixing or adding?
Keeps the current trigger functionality, while adding the ability to use comparators (<, >) for numerical values, and to and/or multiple conditions together for more complex triggers. This required adding random-range-min-max resolution to roll_triggers. random/random-range-low/high are not included in this resolution. If the new option "option_advanced" is not included, triggers will work exactly as before, with the exception of resolving random-range-min-max. For multiple option comparison, And takes priority, so if you look for options: A & B & C | B & D | A & E & F it will logically group them as: (A & B & C) | (B & D) | (A & E & F)
Format is as follows in the trigger options, replace list dots with - : option_advanced:
the comparator accepts '<', '=', '!=', '>' and defaults to '=' if only two entries are given. &/0/and/And/AND all represent an AND operation, while |/1/or/Or/OR both represent and OR operation.
option_name/option_result are un-needed when option_advanced is present.
Example: triggers:
This says that if crystals needed for gt is more than 2 and less than 6, and crystals needed for ganon is 4 OR if goal is triforce hunt and triforce pieces mode is set to percentage, then swordless will be set to true.
How was this tested?
Unit tests were run to see if anything outside triggers had broken, and I tried old trigger styles to ensure they still worked, and then tried each new feature separately, and in multiple combinations while checking that the resulting settings were as expected, including making sure random-range-min-max permanently resolved to a constant value for that game's generation. Finally, I ran a generation with every supported game that A: Does not require you to possess a copy of, or B: That I possess a copy of. including both old and new triggers in two of them. The generation was successful with no errors, and all the game's settings were as expected, including merged values for start_inventory.
If this makes graphical changes, please attach screenshots.
No graphical changes were made.