Line 176: |
Line 176: |
| To view and edit map properties in Tiled, click ''Map'' on the toolbar and choose ''Map Properties''. | | To view and edit map properties in Tiled, click ''Map'' on the toolbar and choose ''Map Properties''. |
| | | |
− | Known map properties<sup>1</sup>: | + | Known map properties¹: |
| | | |
| {| class="wikitable" | | {| class="wikitable" |
Line 195: |
Line 195: |
| | Adds a door. The {{t|x}} {{t|y}} fields are the tile coordinates, {{t|sheetID}} is the name of the sheet containing the door sprite, and {{t|tileID}} is the tile index in the spritesheet. | | | Adds a door. The {{t|x}} {{t|y}} fields are the tile coordinates, {{t|sheetID}} is the name of the sheet containing the door sprite, and {{t|tileID}} is the tile index in the spritesheet. |
| |- | | |- |
− | | <tt>Fall_Objects T</tt><sup>2</sup><br /><tt>Spring_Objects T</tt><sup>2</sup><br /><tt>Summer_Objects T</tt><sup>2</sup><br /><tt>Winter_Objects T</tt><sup>2</sup> | + | | <tt>Fall_Objects T</tt>²<br /><tt>Spring_Objects T</tt>²<br /><tt>Summer_Objects T</tt>²<br /><tt>Winter_Objects T</tt>² |
| | Whether to spawn seasonal objects on spawnable tiles based on the data in <tt>Data\Locations.xnb</tt>.<br />''Example: <tt>Fall_Objects</tt>.'' | | | Whether to spawn seasonal objects on spawnable tiles based on the data in <tt>Data\Locations.xnb</tt>.<br />''Example: <tt>Fall_Objects</tt>.'' |
| |- | | |- |
Line 207: |
Line 207: |
| | Like <tt>DayTiles</tt>, but for moonlight at night. | | | Like <tt>DayTiles</tt>, but for moonlight at night. |
| |- | | |- |
− | | <tt>Outdoors T</tt><sup>2</sup> | + | | <tt>Outdoors T</tt>² |
| | Sets whether the location is outdoors.<br />''Example: <tt>Outdoors true</tt>.'' | | | Sets whether the location is outdoors.<br />''Example: <tt>Outdoors true</tt>.'' |
| |- | | |- |
− | | <tt>TreatAsOutdoors T</tt><sup>2</sup> | + | | <tt>TreatAsOutdoors T</tt>² |
| | ? | | | ? |
| |- | | |- |
Line 222: |
Line 222: |
| | ? | | | ? |
| |- | | |- |
− | | <tt>ViewportFollowPlayer T</tt><sup>2</sup> | + | | <tt>ViewportFollowPlayer T</tt>² |
| | Forces the viewport to stay centered on the player.<br />''Example: <tt>ViewportFollowPlayer</tt>.'' | | | Forces the viewport to stay centered on the player.<br />''Example: <tt>ViewportFollowPlayer</tt>.'' |
| |- | | |- |
Line 235: |
Line 235: |
| * <tt>Fish</tt> | | * <tt>Fish</tt> |
| | | |
− | <small><sup>1</sup> Map properties are handled in <tt>GameLocation::resetForPlayerEntry</tt> and <tt>GameLocation::loadObjects</tt>.</small> | + | <small>¹ Map properties are handled in <tt>GameLocation::resetForPlayerEntry</tt> and <tt>GameLocation::loadObjects</tt>.</small> |
− | <small><sup>2</sup> The <tt>T</tt> value (short for ''true'') is conventional, but any non-empty value will work too.</small> | + | <small>² The <tt>T</tt> value (short for ''true'') is conventional, but any non-empty value will work too.</small> |
| | | |
| ===Tile properties=== | | ===Tile properties=== |
Line 260: |
Line 260: |
| # Select the object layer in the ''Layers'' pane.<br />''There should be one object layer for each tile layer. If the object layer is missing, create one with the same name as the right tile layer.'' | | # Select the object layer in the ''Layers'' pane.<br />''There should be one object layer for each tile layer. If the object layer is missing, create one with the same name as the right tile layer.'' |
| # Choose the [[File:Modding - creating an XNB mod - Tiled 'insert rectangle' button.png]] ''insert rectangle'' tool from the toolbar. | | # Choose the [[File:Modding - creating an XNB mod - Tiled 'insert rectangle' button.png]] ''insert rectangle'' tool from the toolbar. |
− | # Click and drag the rectangle over the tile you want to edit. Make sure it snaps to the tile grid (see [[#Recommended settings]]), and only one tile is selected. | + | # Click and drag the rectangle over the tile you want to edit. Make sure it snaps to the tile grid (see [[#Recommended Tiled settings]]), and only one tile is selected. |
| ## See previous for how to edit its properties. | | ## See previous for how to edit its properties. |
| | | |
| ====Known properties==== | | ====Known properties==== |
− | Known tile properties (excluding specialised properties like <tt>TouchAction WomensLocker</tt>):<sup>1</sup> | + | Known tile properties (excluding specialised properties like <tt>TouchAction WomensLocker</tt>):¹ |
| | | |
| {| class="wikitable" | | {| class="wikitable" |
Line 273: |
Line 273: |
| |- | | |- |
| | <tt>Back</tt> | | | <tt>Back</tt> |
− | | <tt>Diggable T</tt><sup>2</sup> | + | | <tt>Diggable T</tt>² |
| | Marks the tile as diggable with the hoe and enables planting crops. | | | Marks the tile as diggable with the hoe and enables planting crops. |
| |- | | |- |
| | <tt>Back</tt> | | | <tt>Back</tt> |
− | | <tt>NoFurniture T</tt><sup>2</sup> | + | | <tt>NoFurniture T</tt>² |
| | Prevents the player from placing furniture on this tile. | | | Prevents the player from placing furniture on this tile. |
| |- | | |- |
Line 293: |
Line 293: |
| |- | | |- |
| | <tt>Back</tt> | | | <tt>Back</tt> |
− | | <tt>NPCBarrier T</tt><sup>2</sup> | + | | <tt>NPCBarrier T</tt>² |
| | Prevents NPCs from crossing this tile. | | | Prevents NPCs from crossing this tile. |
| |- | | |- |
Line 301: |
Line 301: |
| |- | | |- |
| | <tt>Back</tt> | | | <tt>Back</tt> |
− | | <tt>Water T</tt><sup>2</sup> | + | | <tt>Water T</tt>² |
| | Marks the tile as a water tile for various game logic (e.g. items splash into it, can refill watering can from it, can't walk on it, etc). | | | Marks the tile as a water tile for various game logic (e.g. items splash into it, can refill watering can from it, can't walk on it, etc). |
| |- | | |- |
| | <tt>Back</tt> | | | <tt>Back</tt> |
− | | <tt>WaterSource T</tt><sup>2</sup> | + | | <tt>WaterSource T</tt>² |
| | Lets the player refill the watering can from this tile. | | | Lets the player refill the watering can from this tile. |
| |} | | |} |
Line 439: |
Line 439: |
| |} | | |} |
| | | |
− | <small><sup>1</sup> Tile properties are handled throughout the codebase using <tt>GameLocation::doesTileHaveProperty</tt>. Actions and touch actions are handled by <tt>GameLocation::performAction</tt> and <tt>GameLocation::performTouchAction</tt> respectively. Emote IDs are listed as <tt>Character</tt> constants.</small> | + | <small>¹ Tile properties are handled throughout the codebase using <tt>GameLocation::doesTileHaveProperty</tt>. Actions and touch actions are handled by <tt>GameLocation::performAction</tt> and <tt>GameLocation::performTouchAction</tt> respectively. Emote IDs are listed as <tt>Character</tt> constants.</small><br /> |
− | <small><sup>2</sup> The <tt>T</tt> value (short for ''true'') is conventional, but any non-empty value will work too.</small> | + | <small>² The <tt>T</tt> value (short for ''true'') is conventional, but any non-empty value will work too.</small> |
| | | |
| ===Animating tiles=== | | ===Animating tiles=== |
Line 490: |
Line 490: |
| // add tile | | // add tile |
| var layer = location.map.GetLayer("Back"); | | var layer = location.map.GetLayer("Back"); |
− | layer.Tiles[tileX, tileY] = new StaticTile(layer, "tilesheet name", BlendMode.Alpha, tileID); | + | var tilesheet = location.map.GetTilesheet("tilesheet name"); |
| + | layer.Tiles[tileX, tileY] = new StaticTile(layer, tilesheet, BlendMode.Alpha, tileID); |
| </source> | | </source> |
| | | |
| [[Category:Modding]] | | [[Category:Modding]] |