Difference between revisions of "Checkpoints"

From Wolfire Games Wiki
Jump to: navigation, search
m (overgrowth_level_checkpoint)
(Using the checkpoint system)
 
(55 intermediate revisions by 3 users not shown)
Line 3: Line 3:
 
With them you can move the player spawn point upon death and allow defeated enemies to remain dead.
 
With them you can move the player spawn point upon death and allow defeated enemies to remain dead.
  
When the player advances progress, you can do nothing, play a dialog, spawn new enemies, or trigger a level win (load the next level).
+
When the player advances progress, you can do nothing, play a dialogue, spawn new enemies, or trigger a level win (load the next level).
  
 
You can make some of the checkpoints optional, so player progress is saved, but the player does not have to touch them to complete the level.
 
You can make some of the checkpoints optional, so player progress is saved, but the player does not have to touch them to complete the level.
Line 9: Line 9:
 
== Using the checkpoint system ==
 
== Using the checkpoint system ==
  
Start by creating a new level, or opening an existing level, and activating the editor by hitting "F1".
+
Start by creating a new level, or opening an existing level, and activating the editor by hitting <kbd>'''F1'''</kbd>.
  
You might want to enable debug text (Settings -> Debug -> Enable "Draw In-Game Debug Window").
+
You might want to enable the debug window <code>'''Windows → Debug Window'''</code> so you can see which is the current checkpoint, shown as <code>'''progress: #'''</code>.
  
 
'''Debug keys (these will work once a level has checkpoints):'''
 
'''Debug keys (these will work once a level has checkpoints):'''
Line 21: Line 21:
 
|-
 
|-
 
|K
 
|K
|swap to the next checkpoint, or wrap around to the first (remember to hit "L" after to reset)
+
|swap to the next checkpoint, or wrap around to the first (remember to hit <kbd>'''L'''</kbd> after to reset)
 
|}
 
|}
  
 
'''To add the checkpoint system to a level:'''
 
'''To add the checkpoint system to a level:'''
  
Load -> Load Item... -> Data/Objects/Hotspots/overgrowth_level.xml
+
'''Load''' -> '''Load Item...''' -> <code>'''Data/Objects/Hotspots/overgrowth_level.xml'''</code>
 +
 
 +
After this, set goals, and possibly pre/post goal actions.
 +
 
 +
== Goals ==
 +
 
 +
Goals must be accomplished by the player, in order.
 +
 
 +
Some goals are optional, in which case the player may defeat later goals, and these goals will be considered "accomplished".
  
 
The table below shows the types of goals that can be used as checkpoints. Below the table are instructions for how to use each goal.
 
The table below shows the types of goals that can be used as checkpoints. Below the table are instructions for how to use each goal.
Line 32: Line 40:
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
|reach
+
|[[#reach goal|reach]]
 
|when touched, moves the player spawn point and saves defeated enemies. must touch it to complete the level/advance progress
 
|when touched, moves the player spawn point and saves defeated enemies. must touch it to complete the level/advance progress
 
|-
 
|-
|reach_skippable
+
|[[#reach_skippable goal|reach_skippable]]
|same as "reach" checkpoint but the player never has to reach it to complete the level/advance progress
+
|same as "reach" goal but the player never has to reach it to complete the level/advance progress
 
|-
 
|-
|defeat
+
|[[#defeat goal|defeat]]
 
|the player must defeat a list of enemies to complete the level/advance progress
 
|the player must defeat a list of enemies to complete the level/advance progress
 
|-
 
|-
|spawn_defeat
+
|[[#defeat_optional goal|defeat_optional]]
|same as "defeat" checkpoint but the enemies to defeat are spawned at the beginning of that checkpoint
+
|the player may defeat a list of enemies to advance progress. If a further goal is accomplished first, these enemies are considered "defeated" when the character respawns
 +
|-
 +
|[[#spawn_defeat goal|spawn_defeat]]
 +
|same as "defeat" goal but the enemies to defeat are spawned when that becomes the current goal (or on reset)
 +
|-
 +
|[[#no_delay_modifier|no_delay]]
 +
|this is a modifier that reduces the time of the current goal_post or next goal_pre being triggered.
 
|}
 
|}
  
=== "reach" checkpoint ===
+
=== reach goal ===
  
# Add the checkpoint hotspot to the scene. This is the trigger for the checkpoint. Load -> Load Item... -> Data/Objects/Hotspots/overgrowth_level_checkpoint.xml
+
# Add the checkpoint hotspot to the scene. This is the trigger for the checkpoint. '''Load''' -> '''Load Item...''' -> <code>'''Data/Objects/Hotspots/overgrowth_level_checkpoint.xml'''</code>
# Add the placeholder object to the scene. This is the player spawn. Load -> Utility -> Placeholder  
+
# Add the placeholder object to the scene. This is the player spawn. '''Load''' -> '''Utility''' -> '''Placeholder'''
# Set the checkpoint hotspot "checkpoint_id" parameter to a value starting at 0 and increasing for each checkpoint you add
+
# Set the checkpoint hotspot <code>'''checkpoint_id'''</code> parameter to a value starting at <code>'''0'''</code> and ''increasing by 1'' for each checkpoint you add
# Set the checkpoint hotspot "level_hotspot_id" parameter to the object id of the overgrowth_level hotspot
+
# Set the checkpoint hotspot <code>'''level_hotspot_id'''</code> parameter to the ''object id'' of the overgrowth_level hotspot
# Add a "goal_<number>" parameter to the overgrowth_level hotspot and set the value to "reach <number>", with the number from step 3
+
# Add a <code>'''goal_<number>'''</code> parameter to the overgrowth_level hotspot and set the value to <code>'''reach <number>'''</code>, with the number from step 3
# Add a value to the overgrowth_level hotspot "player_spawn" parameter, delimited with spaces, with the id of the placeholder object from step 2 ("437 243 121"). The order matters, and the id for checkpoint 0 should go in the first spot, checkpoint 1 in the second spot, etc. You can see that you've written the correct ID if a transparent character model appears in the placeholder hotspot.
+
# Add a value to the overgrowth_level hotspot <code>'''player_spawn'''</code> parameter, delimited with spaces, with the id of the placeholder object from step 2 (<code>437 243 121</code>). The order matters, and the id for checkpoint 0 should go in the first spot, checkpoint 1 in the second spot, etc. You can see that you've written the correct ID if a transparent character model appears in the placeholder hotspot.
  
 
The numbers in checkpoints are tricky to get right. To add an additional checkpoint:
 
The numbers in checkpoints are tricky to get right. To add an additional checkpoint:
  
# Add another goal param to the overgrowth_level hotspot, and give it a number one higher than the previous goal. So if your previous goal was <code>goal_0</code>, you would add another one with the name <code>goal_1</code>
+
# Add another goal param to the overgrowth_level hotspot, and give it a number one higher than the previous goal. So if your previous goal was <code>goal_0</code>, you would add another one with the name <code>'''goal_1'''</code>
# Set the goal param's value to one higher than the previous goal. So if the previous one was <code>reach 5</code>, this new param's value would be <code>reach 6</code>
+
# Set the goal param's value to one higher than the previous goal. So if the previous one was <code>'''reach 5'''</code>, this new param's value would be <code>'''reach 6'''</code>
# Load a checkpoint object, and set its <code>checkpoint_id</code> parameter to a value that matches the reach goal in step #2. So, if the goal is <code>reach 6</code>, then this would just be <code>6</code>
+
# Load a checkpoint object, and set its <code>'''checkpoint_id'''</code> parameter to a value that matches the reach goal in step #2. So, if the goal is <code>'''reach 6'''</code>, then this would just be <code>'''6'''</code>
# Set the checkpoint object's <code>level_hotspot_id</code> param
+
# Set the checkpoint object's <code>'''level_hotspot_id'''</code> param
 
# Load a placeholder object for the player to spawn at
 
# Load a placeholder object for the player to spawn at
# Add the id of the placeholder object to the end of the overgrowth_level's <code>player_spawn</code> param. So if it was previously <code>123 456</code> then it would now be something like <code>123 456 784</code>
+
# Add the id of the placeholder object to the end of the overgrowth_level's <code>'''player_spawn'''</code> param. So if it was previously <code>'''123 456'''</code> then it would now be something like <code>'''123 456 784'''</code>
  
=== "reach_skippable" checkpoint ===
+
=== reach_skippable goal ===
  
Do all the same as a "reach" hotspot, but in step 5 set the value to "reach_skippable <number>" instead of "reach <number>"
+
Do all the same as a "reach" hotspot, but in step 5 set the value to <code>'''reach_skippable <number>'''</code> instead of <code>'''reach <number>'''</code>
  
=== "defeat" checkpoint ===
+
=== defeat goal ===
  
 
# Add an enemy to the level
 
# Add an enemy to the level
# Add a "goal_<number>" parameter to the overgrowth_level hotspot and set the value to "defeat <number>", with the object id of the enemy from step 1
+
# Add a <code>'''goal_<number>'''</code> parameter to the overgrowth_level hotspot and set the value to <code>'''defeat <number>'''</code>, with the object id of the enemy from step 1
# Add additional enemy ids in the form of "defeat <some_enemy_id> <other_enemy_id>", just like in step two (e.g. "defeat 4 72 8")
+
# Add additional enemy ids in the form of <code>'''defeat <some_enemy_id> <other_enemy_id>'''</code>, just like in step two (e.g. <code>defeat 4 72 8</code>)
 +
 
 +
=== defeat_optional goal ===
 +
 
 +
Do all the same as a [[#defeat goal|defeat goal]], but in step 2 set the value to <code>'''defeat_optional <numbers...>'''</code> instead of <code>'''defeat <numbers...>'''</code>
 +
 
 +
=== spawn_defeat goal ===
 +
 
 +
Do all the same as a [[#defeat goal|defeat goal]], but in step 2 set the value to <code>'''spawn_defeat <numbers...>'''</code> instead of <code>'''defeat <numbers...>'''</code>
 +
 
 +
=== no_delay modifier ===
 +
Removes some of the delay between when an objective is completed and when the next step is started. '''TODO: How/when is this useful?'''
 +
 
 +
# Add a <code>'''goal_<number>'''</code> action to the overgrowth_level hotspot
 +
# Add <code>'''no_delay'''</code> to the <code>'''goal_<number>'''</code> Script Param's value slot, after the specified goal and a space.
 +
'''Example:'''
 +
{| class = wikitable
 +
! Script Param !! Value
 +
|-
 +
|goal_2 || defeat 363 '''no_delay'''
 +
|}
 +
'''Note:''' If you don't specify a <code>'''goal_<number>_post'''</code> action, the modifier will shorten the time to the next <code>'''goal_<number>_pre'''</code> action instead.
 +
 
 +
== Pre/post goal actions ==
 +
 
 +
You can trigger an action to happen, either when a goal is set as the "current" goal, or after a goal has been accomplished.
 +
 
 +
Goal actions can be combined with each other. Just put a space between them (e.g. <code>'''activate 537 dialogue ShopkeeperBanter'''</code>). Make sure to put them in the order you want them to happen (if that's important).
 +
 
 +
Here's a list of actions that can be triggered:
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
|[[#activate action|activate]]
 +
|make a character with the given id active. This removes the "static" flag from the character. Useful for reducing CPU utilization for characters you haven't reached yet
 +
|-
 +
|[[#enable.2Fdisable_actions|enable]]
 +
|enable a game object with the given id. This can be any object type, not just a character. This will make it appear in game and activate its behavior
 +
|-
 +
|[[#enable.2Fdisable_actions|disable]]
 +
|disable a game object with the given id. This can be any object type, not just a character. This will make it disappear in game and deactivate its behavior
 +
|-
 +
|[[#dialogue action|dialogue]]
 +
|play a dialogue with the given dialogue name
 +
|-
 +
|[[#dialogue_fade_.26_dialogue_fade_if_not_hostile_actions|dialogue_fade]]
 +
|same as <code>'''dialogue'''</code> action but the dialogue is faded in/out at the beginning and end (except on reset). Useful to make dialogue "teleportation" feel less jarring
 +
|-
 +
|[[#dialogue_fade_.26_dialogue_fade_if_not_hostile_actions|dialogue_fade_if_not_hostile]]
 +
|same as <code>'''dialogue_fade'''</code> action but the dialogue is not triggered at all if you're currently still in combat. Useful to prevent enemys from attacking the player while in dialogue
 +
|-
 +
|[[#play_success_sting_action|play_success_sting]]
 +
|play the success music track, since this was a particularly challenging goal. Usually done on a <code>'''goal_N_post'''</code> action
 +
|-
 +
|[[#music_layer_override_action|music_layer_override]]
 +
|force play of the given music track layer
 +
|}
 +
 
 +
=== activate action ===
 +
 
 +
This action is mostly useful for <code>'''goal_<number>_pre'''</code> actions, so you can activate static characters right before you come to them and interact with them. It is best used to conserve CPU power when more than 3 or 4 characters are in level.
 +
 
 +
You can use these both for both enemies and allies, so you don't have to have this character in a [[#defeat goal|defeat goal]] in order to use it.
 +
 
 +
You can combine this with other actions.
 +
 
 +
'''Instructions:'''
 +
 
 +
# Add an NPC to the level (friend or enemy)
 +
# Set up the NPC with a [[#defeat goal|defeat goal]] (optional, if this is an enemy you want to have to defeat this goal)
 +
# Add a <code>'''goal_<number>_pre'''</code> parameter to the overgrowth_level hotspot and set the value to <code>'''activate <number>'''</code>, with the object id of the NPC from step 1. The character will be activated just a this goal as set as the active goal.
 +
# Repeat 1 and 3 for as many characters as you want, separated with spaces, with a new <code>activate</code> action for each (i.e. <code>'''goal_3_pre'''</code>: <code>'''activate 127 activate 543'''</code>)
 +
 
 +
=== enable/disable actions ===
 +
 
 +
These actions are useful for <code>'''goal_<number>_pre'''</code> and <code>'''goal_<number>_post'''</code> actions, so you can enable objects (or characters) right before you come to them, or disable them at the end of a dialogue.
 +
 
 +
(You could use them as <code>'''goal_<number>_post'''</code> actions, if it makes sense to, but I'm not sure if that's going to be useful as frequently)
 +
 
 +
You can use these for any type of object, so you don't need any particular goal type (e.g. a [[#defeat goal|defeat goal]]) in order to use this.
 +
 
 +
You can combine these with other actions.
 +
 
 +
'''Instructions:'''
 +
 
 +
# Spawn an object to the level (any kind)
 +
# Set up the goal that you want to this object to be "enabled/disabled" by (it appears/disappears in level as soon as the goal is set to be active)
 +
# Add a <code>'''goal_<number>_pre'''</code> parameter to the overgrowth_level hotspot and set the value to <code>'''enable <number>'''</code> or <code>'''disable <number>'''</code>, with the object id from step 1. The object will be enabled/disabled (appear/disappear in level) just a this goal is set as the active goal.
 +
# Repeat 1 and 3 for as many objects as you want, separated with spaces, with a new <code>enable</code> or <code>disable</code> action for each (i.e. <code>'''goal_3_pre'''</code>: <code>'''enable 127 enable 543 disable 443'''</code>)
 +
 
 +
=== dialogue action ===
 +
 
 +
This action is useful for both <code>'''goal_<number>_pre'''</code> and <code>'''goal_<number>_post'''</code> actions, so you can activate dialogues both to describe a goal when you get to it, and when a goal is completed.
 +
 
 +
'''Note:''' For a <code>'''goal_<goalnumber>_pre'''</code> action, the last two lines of dialogue will be started again if you die and respawn. The player will also be placed wherever the dialogue placed them, rather than at their spawn point.
 +
 
 +
You can combine this with other actions.
  
=== "spawn_defeat" checkpoint ===
+
'''Instructions:'''
  
Do all the same as a "defeat" hotspot, but in step 2 set the value to "spawn_defeat <numbers...>" instead of "defeat <numbers...>"
+
# Add a dialogue to the level and get it working with the dialogue editor. Note that the dialogue can affect the player's spawn point, so put the character where you want them to be after the dialogue finishes
 +
# Set up the goal that you want this dialogue to be triggered by
 +
# Add a <code>'''goal_<goalnumber>_pre'''</code> (or <code>'''goal_<number>_post'''</code>) parameter to the overgrowth_level hotspot and set the value to <code>'''dialogue <dialoguename>'''</code>.<br>The dialoguename parameter should be set to dialogue name from step 1. The goalnumber parameter is goal from step 2 that you want the dialogue to be triggered before (or after).
  
== Triggering dialogs ==
+
'''To trigger a dialogue just after achieving a checkpoint goal (whether a "reach" or "defeat" checkpoint):'''
  
'''To trigger a dialog just before starting on a new goal (whether a "reach" or "defeat" goal):'''
+
Do all the same as a dialogue triggered before progressing to a given checkpoint, but name the parameter <code>'''goal_<number>_post'''</code> (e.g. <code>'''goal_5_post'''</code>)
  
# Add a dialog to the level and get it working with the dialog editor
+
==== dialogue_fade & dialogue_fade_if_not_hostile actions====
# Add a "goal_<number>_pre" parameter to the overgrowth_level hotspot and set the value to "dialog <dialogname>", with the dialog name from step 1, and the number of the goal you want the dialog to be triggered before. (e.g. "goal_5_pre")
 
# Note that the dialog will be started again if you die and respawn, and the dialog can be used to set a new spawn point for the player
 
  
'''To trigger a dialog just after achieving a checkpoint goal (whether a "reach" or "defeat" checkpoint):'''
+
Do all the same steps as for the [[#dialogue_action|dialogue action]], but at step 3 add <code>'''dialogue_fade <dialoguename>'''</code> or <code>'''dialogue_fade_if_not_hostile <dialoguename>'''</code> to the value slot of the <code>'''goal_<number>_pre/post'''</code> script parameter instead of <code>'''dialogue <dialoguename>'''</code>.
  
Do all the same as a dialog triggered before progressing to a given checkpoint, but name the parameter "goal_<number>_post" (e.g. "goal_5_post")
+
===play_success_sting action===
  
 +
This action is useful as a <code>'''goal_<number>_post'''</code> action if the goal was particulary difficult to accomplish. It will play music that indicates success to the player.
 +
 +
'''Note:''' The success sting is different depending on the music specified in the overgrowth_level hotspot.
 +
 +
You can combine this with other actions.
 +
 +
'''Instructions:'''
 +
 +
# Set up the goal that you want this action to be triggered by
 +
# Add a <code>'''goal_<number>_post'''</code> parameter to the overgrowth_level hotspot for the goal you want to add the success sting to and set the value to <code>'''play_success_sting'''</code>.
 +
 +
=== music_layer_override action ===
 +
 +
With this action you can set the music layer, tell the game to decide the layer based on activity in the level (is the player in combat or not?) or mute the music.
 +
 +
'''Note:''' You can't change the music track specified with the <code>music</code> script parameter in the overgrowth_level hotspot with this acton unless you add layers to a given track. '''TODO: Should this be written here?'''
 +
 +
You can combine this with other actions.
 +
 +
'''possible <code>music_layer_override <layer></code> values:'''
 +
{| class = wikitable
 +
!0, 1, 2, 3, 4
 +
| Sets the music layer (higher means more intense)
 +
|-
 +
! -1
 +
| Tells the game to set the music layer based on activity in the level
 +
|-
 +
! -2
 +
| Mutes the music
 +
|}
 +
 +
'''Instructions:'''
 +
 +
# Set up the goal that you want this action to be triggered by
 +
# Add a <code>'''goal_<number>_<post or pre>'''</code> parameter to the overgrowth_level hotspot for the goal you want to add the success sting to and set the value to <code>'''music_layer_override <layer>'''</code>, where <code>'''<layer>'''</code> is the number of the music layer you want to be played (see table above).
  
 
== Troubleshooting ==
 
== Troubleshooting ==
Line 100: Line 245:
 
=== overgrowth_level_checkpoint ===
 
=== overgrowth_level_checkpoint ===
  
* Open up all of your <code>overgrowth_level_checkpoint</code> instances, and look at the script parameters for them.
+
Open up all of your <code>overgrowth_level_checkpoint</code> instances, and look at the script parameters for them.
 +
 
 
* Make sure that <code>checkpoint_id</code> starts at zero, and increases by 1 (''and only by 1'') for each subsequent checkpoint. This will be true even if the first <code>reach</code> goal isn't <code>goal_0</code>!
 
* Make sure that <code>checkpoint_id</code> starts at zero, and increases by 1 (''and only by 1'') for each subsequent checkpoint. This will be true even if the first <code>reach</code> goal isn't <code>goal_0</code>!
 
* Make sure that <code>reach '''N'''</code> values match the values for <code>checkpoint_id</code>.
 
* Make sure that <code>reach '''N'''</code> values match the values for <code>checkpoint_id</code>.
Line 108: Line 254:
 
=== overgrowth_level ===
 
=== overgrowth_level ===
  
up the script parameters for the <code>overgrowth_level</code> instance.
+
Open up the script parameters for the <code>overgrowth_level</code> instance, and look at the script parameters.
  
 
* The goals should start at <code>goal_0</code>, not at <code>goal_1</code>.
 
* The goals should start at <code>goal_0</code>, not at <code>goal_1</code>.
Line 115: Line 261:
  
 
[[File:Example_player_spawn_for_checkpoints.jpg|400px|thumb|none|Example of matching up <code>player_spawn</code> and placeholder object id values]]
 
[[File:Example_player_spawn_for_checkpoints.jpg|400px|thumb|none|Example of matching up <code>player_spawn</code> and placeholder object id values]]
 +
 +
[[Category: Tutorials]]
 +
[[Category: Modding]]
 +
[[Category: Overgrowth]]

Latest revision as of 22:40, 30 March 2018

Checkpoints allow you to set up goals that the player can achieve to advance progress in a level.

With them you can move the player spawn point upon death and allow defeated enemies to remain dead.

When the player advances progress, you can do nothing, play a dialogue, spawn new enemies, or trigger a level win (load the next level).

You can make some of the checkpoints optional, so player progress is saved, but the player does not have to touch them to complete the level.

Using the checkpoint system

Start by creating a new level, or opening an existing level, and activating the editor by hitting F1.

You might want to enable the debug window Windows → Debug Window so you can see which is the current checkpoint, shown as progress: #.

Debug keys (these will work once a level has checkpoints):

L reset the level to the currently achieved checkpoint
K swap to the next checkpoint, or wrap around to the first (remember to hit L after to reset)

To add the checkpoint system to a level:

Load -> Load Item... -> Data/Objects/Hotspots/overgrowth_level.xml

After this, set goals, and possibly pre/post goal actions.

Goals

Goals must be accomplished by the player, in order.

Some goals are optional, in which case the player may defeat later goals, and these goals will be considered "accomplished".

The table below shows the types of goals that can be used as checkpoints. Below the table are instructions for how to use each goal.

reach when touched, moves the player spawn point and saves defeated enemies. must touch it to complete the level/advance progress
reach_skippable same as "reach" goal but the player never has to reach it to complete the level/advance progress
defeat the player must defeat a list of enemies to complete the level/advance progress
defeat_optional the player may defeat a list of enemies to advance progress. If a further goal is accomplished first, these enemies are considered "defeated" when the character respawns
spawn_defeat same as "defeat" goal but the enemies to defeat are spawned when that becomes the current goal (or on reset)
no_delay this is a modifier that reduces the time of the current goal_post or next goal_pre being triggered.

reach goal

  1. Add the checkpoint hotspot to the scene. This is the trigger for the checkpoint. Load -> Load Item... -> Data/Objects/Hotspots/overgrowth_level_checkpoint.xml
  2. Add the placeholder object to the scene. This is the player spawn. Load -> Utility -> Placeholder
  3. Set the checkpoint hotspot checkpoint_id parameter to a value starting at 0 and increasing by 1 for each checkpoint you add
  4. Set the checkpoint hotspot level_hotspot_id parameter to the object id of the overgrowth_level hotspot
  5. Add a goal_<number> parameter to the overgrowth_level hotspot and set the value to reach <number>, with the number from step 3
  6. Add a value to the overgrowth_level hotspot player_spawn parameter, delimited with spaces, with the id of the placeholder object from step 2 (437 243 121). The order matters, and the id for checkpoint 0 should go in the first spot, checkpoint 1 in the second spot, etc. You can see that you've written the correct ID if a transparent character model appears in the placeholder hotspot.

The numbers in checkpoints are tricky to get right. To add an additional checkpoint:

  1. Add another goal param to the overgrowth_level hotspot, and give it a number one higher than the previous goal. So if your previous goal was goal_0, you would add another one with the name goal_1
  2. Set the goal param's value to one higher than the previous goal. So if the previous one was reach 5, this new param's value would be reach 6
  3. Load a checkpoint object, and set its checkpoint_id parameter to a value that matches the reach goal in step #2. So, if the goal is reach 6, then this would just be 6
  4. Set the checkpoint object's level_hotspot_id param
  5. Load a placeholder object for the player to spawn at
  6. Add the id of the placeholder object to the end of the overgrowth_level's player_spawn param. So if it was previously 123 456 then it would now be something like 123 456 784

reach_skippable goal

Do all the same as a "reach" hotspot, but in step 5 set the value to reach_skippable <number> instead of reach <number>

defeat goal

  1. Add an enemy to the level
  2. Add a goal_<number> parameter to the overgrowth_level hotspot and set the value to defeat <number>, with the object id of the enemy from step 1
  3. Add additional enemy ids in the form of defeat <some_enemy_id> <other_enemy_id>, just like in step two (e.g. defeat 4 72 8)

defeat_optional goal

Do all the same as a defeat goal, but in step 2 set the value to defeat_optional <numbers...> instead of defeat <numbers...>

spawn_defeat goal

Do all the same as a defeat goal, but in step 2 set the value to spawn_defeat <numbers...> instead of defeat <numbers...>

no_delay modifier

Removes some of the delay between when an objective is completed and when the next step is started. TODO: How/when is this useful?

  1. Add a goal_<number> action to the overgrowth_level hotspot
  2. Add no_delay to the goal_<number> Script Param's value slot, after the specified goal and a space.

Example:

Script Param Value
goal_2 defeat 363 no_delay

Note: If you don't specify a goal_<number>_post action, the modifier will shorten the time to the next goal_<number>_pre action instead.

Pre/post goal actions

You can trigger an action to happen, either when a goal is set as the "current" goal, or after a goal has been accomplished.

Goal actions can be combined with each other. Just put a space between them (e.g. activate 537 dialogue ShopkeeperBanter). Make sure to put them in the order you want them to happen (if that's important).

Here's a list of actions that can be triggered:

activate make a character with the given id active. This removes the "static" flag from the character. Useful for reducing CPU utilization for characters you haven't reached yet
enable enable a game object with the given id. This can be any object type, not just a character. This will make it appear in game and activate its behavior
disable disable a game object with the given id. This can be any object type, not just a character. This will make it disappear in game and deactivate its behavior
dialogue play a dialogue with the given dialogue name
dialogue_fade same as dialogue action but the dialogue is faded in/out at the beginning and end (except on reset). Useful to make dialogue "teleportation" feel less jarring
dialogue_fade_if_not_hostile same as dialogue_fade action but the dialogue is not triggered at all if you're currently still in combat. Useful to prevent enemys from attacking the player while in dialogue
play_success_sting play the success music track, since this was a particularly challenging goal. Usually done on a goal_N_post action
music_layer_override force play of the given music track layer

activate action

This action is mostly useful for goal_<number>_pre actions, so you can activate static characters right before you come to them and interact with them. It is best used to conserve CPU power when more than 3 or 4 characters are in level.

You can use these both for both enemies and allies, so you don't have to have this character in a defeat goal in order to use it.

You can combine this with other actions.

Instructions:

  1. Add an NPC to the level (friend or enemy)
  2. Set up the NPC with a defeat goal (optional, if this is an enemy you want to have to defeat this goal)
  3. Add a goal_<number>_pre parameter to the overgrowth_level hotspot and set the value to activate <number>, with the object id of the NPC from step 1. The character will be activated just a this goal as set as the active goal.
  4. Repeat 1 and 3 for as many characters as you want, separated with spaces, with a new activate action for each (i.e. goal_3_pre: activate 127 activate 543)

enable/disable actions

These actions are useful for goal_<number>_pre and goal_<number>_post actions, so you can enable objects (or characters) right before you come to them, or disable them at the end of a dialogue.

(You could use them as goal_<number>_post actions, if it makes sense to, but I'm not sure if that's going to be useful as frequently)

You can use these for any type of object, so you don't need any particular goal type (e.g. a defeat goal) in order to use this.

You can combine these with other actions.

Instructions:

  1. Spawn an object to the level (any kind)
  2. Set up the goal that you want to this object to be "enabled/disabled" by (it appears/disappears in level as soon as the goal is set to be active)
  3. Add a goal_<number>_pre parameter to the overgrowth_level hotspot and set the value to enable <number> or disable <number>, with the object id from step 1. The object will be enabled/disabled (appear/disappear in level) just a this goal is set as the active goal.
  4. Repeat 1 and 3 for as many objects as you want, separated with spaces, with a new enable or disable action for each (i.e. goal_3_pre: enable 127 enable 543 disable 443)

dialogue action

This action is useful for both goal_<number>_pre and goal_<number>_post actions, so you can activate dialogues both to describe a goal when you get to it, and when a goal is completed.

Note: For a goal_<goalnumber>_pre action, the last two lines of dialogue will be started again if you die and respawn. The player will also be placed wherever the dialogue placed them, rather than at their spawn point.

You can combine this with other actions.

Instructions:

  1. Add a dialogue to the level and get it working with the dialogue editor. Note that the dialogue can affect the player's spawn point, so put the character where you want them to be after the dialogue finishes
  2. Set up the goal that you want this dialogue to be triggered by
  3. Add a goal_<goalnumber>_pre (or goal_<number>_post) parameter to the overgrowth_level hotspot and set the value to dialogue <dialoguename>.
    The dialoguename parameter should be set to dialogue name from step 1. The goalnumber parameter is goal from step 2 that you want the dialogue to be triggered before (or after).

To trigger a dialogue just after achieving a checkpoint goal (whether a "reach" or "defeat" checkpoint):

Do all the same as a dialogue triggered before progressing to a given checkpoint, but name the parameter goal_<number>_post (e.g. goal_5_post)

dialogue_fade & dialogue_fade_if_not_hostile actions

Do all the same steps as for the dialogue action, but at step 3 add dialogue_fade <dialoguename> or dialogue_fade_if_not_hostile <dialoguename> to the value slot of the goal_<number>_pre/post script parameter instead of dialogue <dialoguename>.

play_success_sting action

This action is useful as a goal_<number>_post action if the goal was particulary difficult to accomplish. It will play music that indicates success to the player.

Note: The success sting is different depending on the music specified in the overgrowth_level hotspot.

You can combine this with other actions.

Instructions:

  1. Set up the goal that you want this action to be triggered by
  2. Add a goal_<number>_post parameter to the overgrowth_level hotspot for the goal you want to add the success sting to and set the value to play_success_sting.

music_layer_override action

With this action you can set the music layer, tell the game to decide the layer based on activity in the level (is the player in combat or not?) or mute the music.

Note: You can't change the music track specified with the music script parameter in the overgrowth_level hotspot with this acton unless you add layers to a given track. TODO: Should this be written here?

You can combine this with other actions.

possible music_layer_override <layer> values:

0, 1, 2, 3, 4 Sets the music layer (higher means more intense)
-1 Tells the game to set the music layer based on activity in the level
-2 Mutes the music

Instructions:

  1. Set up the goal that you want this action to be triggered by
  2. Add a goal_<number>_<post or pre> parameter to the overgrowth_level hotspot for the goal you want to add the success sting to and set the value to music_layer_override <layer>, where <layer> is the number of the music layer you want to be played (see table above).

Troubleshooting

General

Make sure you don't use a start_dialogue hotspot on top of the player's spawn. Doing this will likely break the checkpoint system.

If you need to start a dialogue at the beginning of the level, use a goal_0_pre instead, with a value of dialogue "dialogue name here". Make sure you're setting the dialogue's name in the dialogue editor, and not in the script params or "Selected" window.

overgrowth_level_checkpoint

Open up all of your overgrowth_level_checkpoint instances, and look at the script parameters for them.

  • Make sure that checkpoint_id starts at zero, and increases by 1 (and only by 1) for each subsequent checkpoint. This will be true even if the first reach goal isn't goal_0!
  • Make sure that reach N values match the values for checkpoint_id.
Example of matching up "reach" and "hotspot_id" values

overgrowth_level

Open up the script parameters for the overgrowth_level instance, and look at the script parameters.

  • The goals should start at goal_0, not at goal_1.
  • Look at the player_spawn property. Count up the number of Ids in there (separated with spaces), and count up the number of reach goals you have. Those should be the same count.
  • Make sure that each player_spawn id corresponds to a placeholder object in the world, and that you see a turner in a T-Pose inside each of them (which means that you typed them correctly in the player_spawn field).
Example of matching up player_spawn and placeholder object id values