Line 87: |
Line 87: |
| # [[Modding:Modder Guide/Get Started|Create a SMAPI mod]]. | | # [[Modding:Modder Guide/Get Started|Create a SMAPI mod]]. |
| # See instructions below for map changes. | | # See instructions below for map changes. |
| + | |
| + | Note that this doesn't preclude using Tiled too. You can create/edit maps in Tiled, then load/edit them in SMAPI. |
| | | |
| ===Using Tiled=== | | ===Using Tiled=== |
Line 112: |
Line 114: |
| <li>See instructions below for map changes.</li> | | <li>See instructions below for map changes.</li> |
| </ol> | | </ol> |
| + | |
| + | (You'll likely need the <tt>.tbin</tt> plugin even if you plan to use <tt>.tmx</tt>, since the original game maps are <tt>.tbin</tt> files.) |
| | | |
| ==Map edits== | | ==Map edits== |
Line 120: |
Line 124: |
| # [[Modding:Editing XNB files|Unpack]] the game's <tt>Content/Maps</tt> folder and create a copy to edit your maps in. Use this copy of the folder to edit any maps in before moving them to your mod release folder. | | # [[Modding:Editing XNB files|Unpack]] the game's <tt>Content/Maps</tt> folder and create a copy to edit your maps in. Use this copy of the folder to edit any maps in before moving them to your mod release folder. |
| # Use the same method to unpack the map you want to edit if it is not a vanilla one, then place the map in your editing folder. | | # Use the same method to unpack the map you want to edit if it is not a vanilla one, then place the map in your editing folder. |
− | # Open the <tt>.tbin</tt> file via Tiled. | + | # Open the <tt>.tbin</tt> or <tt>.tmx</tt> file via Tiled. |
| # Make your changes. | | # Make your changes. |
− | # Save the <tt>.tbin</tt>. Do not use <tt>Save as</tt>, as it can corrupt the map. | + | # Save the file. Don't use <tt>Save as</tt>, as it can corrupt the map. |
− | # Move the <tt>.tbin</tt> and any custom tilesheets to your mod release folder. Place them in the <tt>assets</tt> folder. | + | # Move the <tt>.tbin</tt> or <tt>.tmx</tt> file, and any custom tilesheets it needs, to your mod release folder. Place them in the <tt>assets</tt> folder. |
| # Load your map via SMAPI or Content Patcher (or another framework mod). | | # Load your map via SMAPI or Content Patcher (or another framework mod). |
| | | |
Line 140: |
Line 144: |
| { | | { |
| // get the internal asset key for the map file | | // get the internal asset key for the map file |
− | string mapAssetKey = this.Helper.Content.GetActualAssetKey("assets/map.tbin", ContentSource.ModFolder); | + | string mapAssetKey = this.Helper.Content.GetActualAssetKey("assets/map.tmx", ContentSource.ModFolder); |
| | | |
| // add the location | | // add the location |
Line 189: |
Line 193: |
| | | |
| If you're using Tiled: | | If you're using Tiled: |
− | :# Create your spritesheet and place it in the same folder as your tbin. This should be a PNG image with images divided into 16x16 tiles (see [[Modding:Editing XNB files#Intro]] for examples). | + | :# Create your spritesheet and place it in the same folder as your <tt>.tbin</tt> or <tt>.tmx</tt> map file. This should be a PNG image with images divided into 16x16 tiles (see [[Modding:Editing XNB files#Intro]] for examples). |
| :# Open the map in Tiled. | | :# Open the map in Tiled. |
| :# Add the custom spritesheet: | | :# Add the custom spritesheet: |