Changes

→‎Custom wedding event: update for build 23088 (added per-spouse wedding scripts, replaced spouseFarmer with [SpouseActor])
Line 5,679: Line 5,679:  
|-
 
|-
 
| <samp>EventScript</samp>
 
| <samp>EventScript</samp>
| A [[#Tokenizable string format|tokenizable string]] for the [[Modding:Event data|event script]] which plays the wedding. The default script automatically handles marrying either an NPC or player, but mods can edit it conditionally to run a custom script (e.g. if the player is marrying their custom NPC).
+
| The [[Modding:Event data|event scripts]] which play the wedding. The game will use the script for the spouse NPC/player if it exists, otherwise it'll use the default script.
   −
The script can contain three custom tokens:
+
This consists of a string → string dictionary, where...
 +
* The key is an NPC internal name (like <samp>Abigail</samp>), unique player ID, or <samp>default</samp> for the default script (which handles marrying either an NPC or player);
 +
* The value is a [[#Tokenizable string format|tokenizable strings]] for the event script to play.
 +
 
 +
The event scripts also have access to three extra tokens:
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
Line 5,693: Line 5,697:  
| The concatenated <samp>Celebration</samp> values for each of the <samp>Attendees</samp> present in the wedding.
 
| The concatenated <samp>Celebration</samp> values for each of the <samp>Attendees</samp> present in the wedding.
 
|-
 
|-
| <samp>spouseFarmer</samp><br /><small>(no square brackets)</samp>
+
| <samp>[SpouseActor]</samp>
| When marrying another player, their event actor ID (like <samp>farmer2</samp>) which can be used in event commands.
+
| The actor ID for the NPC or other player being married (like <samp>Abigail</samp> for an NPC or <samp>farmer2</samp> for a player). This can be used in event commands like <code>faceDirection [SpouseActor] 1</code>.
 +
 
 +
(You can also use <samp>spouse</samp> as an actor ID, but that will only work when marrying an NPC.)
 
|}
 
|}
 
|-
 
|-
translators
8,404

edits