Line 113: |
Line 113: |
| | | |
| ==Map== | | ==Map== |
− | Most festivals use a separate [[Modding:Maps|map file]] located in the <tt>Content/Maps</tt> folder. The map to use is specified in the [[#Data file|data file]]'s <tt>set-up</tt> field using the <tt>changeToTemporaryMap</tt> command.
| + | Many festivals use a separate [[Modding:Maps|map file]] located in the <tt>Content/Maps</tt> folder. The map to use is specified in the [[#Data file|data file]]'s <tt>set-up</tt> field using the <tt>changeToTemporaryMap</tt> command. |
| + | |
| + | ===Spawned NPCs=== |
| + | {{note box|'''This is fragile and not recommended for custom NPCs or festivals.'''<br />Consider using the [[#Data file|data file]]'s <tt>Set-Up_additionalCharacters</tt> field instead.}} |
| + | |
| + | NPCs can be added to festivals using map tile indexes on a specific layer. This is enabled in the [[#Data file|data file]]'s <tt>set-up</tt> field using the <tt>loadActors {{t|layer name}}</tt> command. For each tile which exists on the layer, the tile index is mapped to the NPC's index in the <tt>Data\NPCDispositions</tt> asset multiplied by four, with an offset which determines the facing direction (0 = up, 1 = right, 2 = down, or 3 = left). |
| + | |
| + | For example, let's say the layer has a tile with tilesheet index 61. That's the NPC at index <tt>61 / 4 = 15</tt> in <tt>Data\NPCDispositions</tt>, i.e. the 16th NPC, i.e. Leah. The offset is <tt>61 % 4 = 1</tt>, so she's facing up. When the festival is loaded, Leah will be added to that tile position facing up. |
| | | |
| ==Hardcoded logic== | | ==Hardcoded logic== |