Changes

m
→‎Year variants: Minor wording change on the coordination problem warning.
Line 70: Line 70:  
| <samp>conditions</samp>
 
| <samp>conditions</samp>
 
| When and where the festival takes place. The format is <samp>{{t|location}}/{{t|start time}} {{t|end time}}</samp>, where {{t|location}} is the internal location name and the times are specified in 26-hour format (''i.e.,'' 600 for 6am to 2600 for 2am).
 
| When and where the festival takes place. The format is <samp>{{t|location}}/{{t|start time}} {{t|end time}}</samp>, where {{t|location}} is the internal location name and the times are specified in 26-hour format (''i.e.,'' 600 for 6am to 2600 for 2am).
 +
|-
 +
| <samp>mainEvent</samp>
 +
| The main event script. This is triggered when the player asks the festival host (usually Lewis) to begin the festival. This is absent for events that do not have a prompt or where speaking to Lewis does not trigger a new scene.
 
|-
 
|-
 
| <samp>shop</samp>
 
| <samp>shop</samp>
Line 78: Line 81:  
|-
 
|-
 
| <samp>Set-Up_additionalCharacters</samp>
 
| <samp>Set-Up_additionalCharacters</samp>
| NPCs to spawn when the festival loads. This is specified as four space-delimited fields in the form <samp>{{t|NPC name}} {{t|tile X}} {{t|tile Y}} {{t|facing direction}}</samp>, repeated for each NPC to add with a <code>/</code> between each NPC. The {{t|facing direction}}</samp> can be one of <samp>up</samp> or <samp>0</samp>, <samp>down</samp> or <samp>2</samp>, <samp>left</samp> or <samp>3</samp>, and <samp>right</samp> or <samp>1</samp>. These are additional to the NPCs spawned via the [[#Map|map file]]. For example, this adds Abigail and Leah side-by-side facing down: <syntaxhighlight lang="javascript">"Set-Up_additionalCharacters": "Abigail 15 6 down/Leah 16 6 down"</syntaxhighlight>
+
| NPCs to spawn when the festival loads. This is specified as four space-delimited fields in the form <samp>{{t|NPC name}} {{t|tile X}} {{t|tile Y}} {{t|facing direction}}</samp>, repeated for each NPC to add with a <code>/</code> between each NPC. The {{t|facing direction}}</samp> can be one of <samp>up</samp> or <samp>0</samp>, <samp>down</samp> or <samp>2</samp>, <samp>left</samp> or <samp>3</samp>, and <samp>right</samp> or <samp>1</samp>. These are additional to the NPCs spawned via the [[#Map|map file]]. For example, this adds Abigail and Leah side-by-side facing down: <syntaxhighlight lang="javascript">"Set-Up_additionalCharacters": "Abigail 15 6 down/Leah 16 6 down"</syntaxhighlight>This field supports [[#Year variants|year variants]].
 +
|-
 +
| <samp>MainEvent_additionalCharacters</samp>, or<br><samp>Main-Event_additionalCharacters</samp> for the [[Festival of Ice|Festival of Ice]]
 +
| NPCs to spawn when the festival's <code>mainEvent</code> script is run. Just like <code>mainEvent</code>, this is absent for events that do not have a prompt to start a new scene. The format is identical to <code>Set-Up_additionalCharacters</code>, above.<br>This field supports [[#Year variants|year variants]].
 +
|-
 +
| <samp>{{t|NPC name}}_roommate</samp>
 +
| The [[Modding:Dialogue#Format|dialog line]] the named NPC will say when the player talks to them, if they're roommates with the player. This field supports [[#Year variants|year variants]], doesn't work on the Flower Dance festival, and doesn't support <samp>#$e#</samp> breaks. If not specified, the <samp>{{t|NPC name}}_spouse</samp> will be used next.
 
|-
 
|-
 
| <samp>{{t|NPC name}}_spouse</samp>
 
| <samp>{{t|NPC name}}_spouse</samp>
| The [[Modding:Dialogue#Format|dialog line]] the named NPC will say when the player talks to them, if they're married to the player. This field supports [[#Year variants|year variants]].
+
| The [[Modding:Dialogue#Format|dialog line]] the named NPC will say when the player talks to them, if they're married to the player. This field supports [[#Year variants|year variants]], doesn't work on the Flower Dance festival, and doesn't support <samp>#$e#</samp> breaks.
 
|-
 
|-
 
| <samp>{{t|NPC name}}</samp>
 
| <samp>{{t|NPC name}}</samp>
Line 90: Line 99:     
===Year variants===
 
===Year variants===
Several fields allow annual variants (documented in the table above). These work by prefixing <samp>_y{{t|year variant}}</samp> to the key, where the {{t|year variant}} is an incrementing number starting at 1 with no upper limit. For example, two entries <samp>set-up_y1</samp> and <samp>set-up_y2</samp> will alternate (<samp>set-up_y1</samp> in year 1, <samp>set-up_y2</samp> in year 2, <samp>set-up_y1</samp> in year 3, etc). If year variants are defined for a key, the original key is ignored (''e.g.,'' <samp>set-up</samp> will never be used if <samp>set-up_y*</samp> entries are defined).
+
Several fields allow annual variants (documented in the table above). These work by adding <samp>_y{{t|year variant}}</samp> to the end of key, where the {{t|year variant}} is an incrementing number starting at 1 with no upper limit. For example, two entries <samp>set-up_y1</samp> and <samp>set-up_y2</samp> will alternate (<samp>set-up_y1</samp> in year 1, <samp>set-up_y2</samp> in year 2, <samp>set-up_y1</samp> in year 3, etc). If year variants are defined for a key, the original key is ignored (''e.g.,'' <samp>set-up</samp> will never be used if <samp>set-up_y*</samp> entries are defined).
 +
{{note box|'''It is recommended to use the year variants for the <samp>Set-Up_additionalCharacters</samp> and <samp>MainEvent_additionalCharacters</samp> fields, even if you don't wish to spawn your custom NPC in different locations on odd and even years.'''<br>These keys are global to the festival data, and if <strong>any</strong> mod appends to them, the game will use those keys instead of the non-variant keys. This will cause any NPCs not using the year variant keys to fail to spawn.}}
    
===Shop format===
 
===Shop format===
16

edits