Snippets are pieces of logic which are executed based on a conversation's script parameters. There are two different types of scripts: 'appears' and 'action' which go on a conversation node's 'Text Appears When' and 'Actions Taken' script events respectively. These scripts MUST be set, otherwise snippets will not function correctly.
Once the scripts are set, you can add as many snippets as you like as parameter values. The name of the parameter must match the snippet name and the value must match the expected arguments. Refer to the tables below for what to put into these.
Here is an example of a configured snippet on the 'Appears When' event.
Here is an example of a configured snippet on the 'Actions Taken' event.
These commands will show or a hide a node based on the outcome of the snippet. For example, if you use condition-has-quest and the player does NOT have that quest, the node will be hidden.
Name | Value | Description | Value Example |
---|---|---|---|
condition-has-quest | QuestId | Displays the node if player has a quest. | myQuestId |
condition-on-quest-state | QuestId, StateNumber | Displays the node if player is on any of the specified state numbers. At least one one state number must be specified. | myQuestId 1 3 4 5 |
condition-completed-quest | QuestId | Displays the node if player has completed a quest. | myQuestId |
condition-all-key-items | KeyItemId | Displays the node if player has all of the specified key item Ids | 3 43 123 |
condition-has-completed-tutorial | Displays the node if player has completed Selan's Request quest in CZ-220. | ||
condition-all-skills | skillId requiredRank | Displays the node if player has the minimum rank in all of the specified skills. | OneHanded 20 Force 10 FirstAid 40 |
condition-any-skill | skillId requiredRank | Displays the node if player has the minimum rank in ANY of the specified skills. | OneHanded 20 Force 10 FirstAid 40 |
condition-has-faction-standing | factionId amount | Displays the node if player has standing greater than or equal to an amount with a particular faction. | 4 100 |
condition-has-faction-points | factionId amount | Displays the node if a player has faction points greater than or equal with a particular faction. | 2 2000 |
These commands will be run when a player clicks on a conversation node. For example, if you use action-accept-quest, the player will receive the specified quest.
Name | Value | Description | Value Example |
action-accept-quest | QuestId | Accepts the specified quest for a player. | myQuestId |
action-advance-quest | QuestId | Advances the specified quest to the next state for a player. | myQuestId |
action-request-quest-items | QuestId | Forces player to open a container in which they can place required quest items. | myQuestId |
action-card-game | DeckLevels | Starts the Triple Triad dialog. Arguments must be numbers between 1 and 10. At least one number must be defined. | 1 5 10 8 |
action-open-store | StoreTag | Opens the nearest store matching the specified StoreTag. If StoreTag is not provided, the nearest store will be opened. | myStoreTag |
action-give-key-items | KeyItemId | Gives one or more key items to the player. | 32 123 955 |
action-teleport | WaypointTag | Teleports the player to a waypoint with the specified tag. | myWaypointTag |
action-give-faction-points | factionId amount | Gives faction points toward a particular faction to a player. | 2 30 |
action-take-faction-points | factionId amount | Takes faction points toward a particular faction from a player. | 5 3 |
action-give-faction-standing | factionId amount | Gives faction standing toward a particular faction to a player. | 1 15 |
action-take-faction-standing | factionId amount | Takes faction standing toward a particular faction from a player. | 6 300 |