From 821f98eb46d65986d492f1bc0a85cb6890c9a713 Mon Sep 17 00:00:00 2001 From: alwaysintreble Date: Sun, 9 Jan 2022 14:13:00 -0600 Subject: [PATCH] Add a new multi trigger example and explain use of "imaginary" options --- .../tutorial/archipelago/triggers_en.md | 90 ++++++++++++++++--- 1 file changed, 78 insertions(+), 12 deletions(-) diff --git a/WebHostLib/static/assets/tutorial/archipelago/triggers_en.md b/WebHostLib/static/assets/tutorial/archipelago/triggers_en.md index 2e59d827..46d5cd1f 100644 --- a/WebHostLib/static/assets/tutorial/archipelago/triggers_en.md +++ b/WebHostLib/static/assets/tutorial/archipelago/triggers_en.md @@ -9,23 +9,19 @@ that was created using entirely triggers and plando. For more information on pla [this guide](/tutorial/archipelago/plando/en) or [this guide](/tutorial/zelda3/plando/en). ## Trigger use -Triggers have to be defined in the root of the yaml file meaning it must be outside of a game section. -The best place to do this is the bottom of the yaml. -- Triggers comprise of the trigger section and then each trigger must have an `option_category`, `option_name`, and -`option_result` from which it will react to and then an `options` section where the definition of what will happen. +Triggers may be defined in either the root or in the relevant game sections. Generally, The best place to do this is the bottom of the yaml for clear organization. +- Triggers comprise the trigger section and then each trigger must have an `option_category`, `option_name`, and +`option_result` from which it will react to and then an `options` section for the definition of what will happen. - `option_category` is the defining section from which the option is defined in. - Example: `A Link to the Past` - - This is the root category the option is located in. If the option you're triggering off of is in root then you -would use `null`, otherwise this is the game for which you want this option trigger to activate. + - This is the root category the option is located in. If the option you're triggering off of is in root then you would use `null`, otherwise this is the game for which you want this option trigger to activate. - `option_name` is the option setting from which the triggered choice is going to react to. - Example: `shop_item_slots` - - This can be any option from any category defined in the yaml file in either root or a game section except for `game`. + - This can be any option from any category defined in the yaml file in either root or a game section. - `option_result` is the result of this option setting from which you would like to react. - Example: `15` - - Each trigger must be used for exactly one option result. If you would like the same thing to occur with multiple -results you would need multiple triggers for this. -- `options` is where you define what will happen when this is detected. This can be something as simple as ensuring -another option also gets selected or placing an item in a certain location. + - Each trigger must be used for exactly one option result. If you would like the same thing to occur with multiple results you would need multiple triggers for this. +- `options` is where you define what will happen when this is detected. This can be something as simple as ensuring another option also gets selected or placing an item in a certain location. It is possible to have multiple things happen in this section. - Example: ```yaml A Link to the Past: @@ -66,4 +62,74 @@ For example: Timespinner: Inverted: true ``` -In this example if your world happens to roll SpecificKeycards then your game will also start in inverted. \ No newline at end of file +In this example if your world happens to roll SpecificKeycards then your game will also start in inverted. + +It is also possible to use imaginary names in options to trigger specific settings. You can use these made up names in either your main options or to trigger from another trigger. Currently, this is the only way to trigger on "setting 1 AND setting 2". + +For example: + ```yaml + triggers: + - option_category: Secret of Evermore + option_name: doggomizer + option_result: pupdunk + options: + Secret of Evermore: + difficulty: + normal: 50 + pupdunk_hard: 25 + pupdunk_mystery: 25 + exp_modifier: + 150: 50 + 200: 50 + - option_category: Secret of Evermore + option_name: difficulty + option_result: pupdunk_hard + options: + Secret of Evermore: + fix_wings_glitch: false + difficulty: hard + - option_category: Secret of Evermore + option_name: difficulty + option_result: pupdunk_mystery + options: + Secret of Evermore: + fix_wings_glitch: false + difficulty: mystery + ``` + +In this example if the `pupdunk` option is rolled then the difficulty values will be rolled again using the new options `normal`, `pupdunk_hard`, and `pupdunk_mystery`, and the exp modifier will be rerolled using new weights for 150 and 200. This allows for two more triggers that will only be used for the new `pupdunk_hard` and `pupdunk_mystery` options so that they will only be triggered on "pupdunk AND hard/mystery". + +It is also possible to use imaginary names in options to trigger specific settings. You can use these made up names in either your main options or to trigger from another trigger. Currently this is the only way to trigger on "setting 1 AND setting 2". + +For example: + ```yaml + triggers: + - option_category: Secret of Evermore + option_name: doggomizer + option_result: pupdunk + options: + Secret of Evermore: + difficulty: + normal: 50 + pupdunk_hard: 25 + pupdunk_mystery: 25 + exp_modifier: + 150: 50 + 200: 50 + - option_category: Secret of Evermore + option_name: difficulty + option_result: pupdunk_hard + options: + Secret of Evermore: + fix_wings_glitch: false + difficulty: hard + - option_category: Secret of Evermore + option_name: difficulty + option_result: pupdunk_mystery + options: + Secret of Evermore: + fix_wings_glitch: false + difficulty: mystery + ``` + +In this example if the `pupdunk` option is rolled then the difficulty values will be rolled again using the new options `normal`, `pupdunk_hard`, and `pupdunk_mystery`, and the exp modifier will be rerolled using new weights for 150 and 200. This allows for two more triggers that will only be used for the new `pupdunk_hard` and `pupdunk_mystery` options so that they will only be triggered on "pupdunk AND hard/mystery". \ No newline at end of file