Changes

Jump to navigation Jump to search
1,770 bytes added ,  16:15, 29 May 2021
+ troubleshooting directory-climbing tilesheet path error
Line 1,043: Line 1,043:  
===Locating tilesheets in Tiled===
 
===Locating tilesheets in Tiled===
 
When a map tilesheet is missing, never use the locate option to use a tilesheet from a different folder. That will add a complex tilesheet path which won't work in-game. Instead copy the tilesheets into the same folder as the map, and reference them from there.
 
When a map tilesheet is missing, never use the locate option to use a tilesheet from a different folder. That will add a complex tilesheet path which won't work in-game. Instead copy the tilesheets into the same folder as the map, and reference them from there.
 +
 +
==Troubleshooting==
 +
See also [[#Potential issues|''potential issues'']] above for common issues.
 +
 +
==="Tilesheet paths must be a relative path without directory climbing (../)"===
 +
; What does this mean?
 +
: Your map uses a tilesheet that's outside its folder root. That might happen if you [[#'Save as' in Tiled|used 'save as' in Tile to save into a different folder]], copied & pasted tiles between maps in different folders, or manually added a tilesheet from a different folder.
 +
 +
: For example:
 +
<pre style="margin-left: 2em;">
 +
📁 Stardew Valley/
 +
  📁 Content/
 +
      📁 Maps/
 +
        🗎 townInterior    <──┐
 +
  📁 Mods/                    │
 +
      📁 YourModName/          │ ../../../Content/Maps/townInterior
 +
        📁 assets/            │
 +
            🗎 your-map.tmx  ───┘
 +
</pre>
 +
 +
: This isn't allowed since it's very fragile (e.g. players might install your mod in a different folder path). To fix it:
 +
 +
; How do I fix it?
 +
:# Copy the tilesheets you're using into the same folder as the map.
 +
:# For unchanged vanilla tilesheets, rename them to start with a dot (like <tt>.townInterior.png</tt>). This tells SMAPI to ignore the file when loading the map in-game, and load the one in the <tt>Content</tt> folder instead.
 +
:# In Tiled, click the edit icon under the tilesheet.
 +
:# In the tab that opens, click ''Tileset > Tileset Properties''.
 +
:# Click the 'Image' field, then the 'Edit' button to locate the tilesheet in the same folder.
 +
 +
: After fixing it, the above example would look like this:
 +
<pre style="margin-left: 2em;">
 +
📁 Stardew Valley/
 +
  📁 Mods/
 +
      📁 YourModName/
 +
        📁 assets/
 +
            🗎 your-map.tmx      ───┐
 +
            🗎 .townInterior.png  <──┘ .townInterior.png
 +
</pre>
    
[[Category:Modding]]
 
[[Category:Modding]]
translators
8,447

edits

Navigation menu