Changes

→‎Replace a map file: update for SMAPI 3.0
Line 182: Line 182:     
===Replace a map file===
 
===Replace a map file===
You can use <tt>IAssetLoader</tt> to load custom maps too. When you load an unpacked <tt>.tbin</tt> map file, and an unpacked tilesheet is present in the mod folder (relative to the map file), SMAPI will automatically link the map to that file and handle loading it too. If the tilesheet filename starts with a season and underscore, the game will apply its normal seasonal logic to it too.
+
You can use <tt>IAssetLoader</tt> to load custom maps too. When you load a map file, and an unpacked tilesheet is present in the mod folder (relative to the map file), SMAPI will automatically link the map to that file and handle loading it too. If the tilesheet filename starts with a season and underscore, the game will apply its normal seasonal logic to it too.
    
For example, let's say you have a mod with this structure:
 
For example, let's say you have a mod with this structure:
Line 218: Line 218:     
That's it! SMAPI will detect a reference to <tt>spring_customTilesheet.png</tt>, find the file relative to the map file, and load it too. When the season changes in-game, SMAPI will automatically switch it to <tt>summer_customTilesheet.png</tt>, etc. The other tilesheet references will be left untouched (since there's no local file), and use the Content files.
 
That's it! SMAPI will detect a reference to <tt>spring_customTilesheet.png</tt>, find the file relative to the map file, and load it too. When the season changes in-game, SMAPI will automatically switch it to <tt>summer_customTilesheet.png</tt>, etc. The other tilesheet references will be left untouched (since there's no local file), and use the Content files.
  −
{{SMAPI upcoming|3.0|Automatic tilesheet fixes now also apply to maps loaded from <tt>.xnb</tt> files.}}
      
===Add a new asset===
 
===Add a new asset===
translators
8,404

edits