Changes

Jump to navigation Jump to search
→‎Custom locations: update for builds 22298 and 22299: now a data model asset, remove ID field
Line 1,540: Line 1,540:  
You can now add/edit locations by editing the new <samp>Data/AdditionalLocationsData</samp> asset.
 
You can now add/edit locations by editing the new <samp>Data/AdditionalLocationsData</samp> asset.
   −
The asset consists of a string → model lookup, where the key matches the <samp>ID</samp> field and the value is a model with these fields:
+
The asset consists of a model with these fields:
    
{| class="wikitable"
 
{| class="wikitable"
Line 1,547: Line 1,547:  
! effect
 
! effect
 
|-
 
|-
| <samp>ID</samp>
+
| <samp>Locations</samp>
| A key which uniquely identifies this location, which will be used as the location's <samp>Name</samp> (not <samp>DisplayName</samp>) field. The ID should only contain alphanumeric/underscore/dot characters. For custom locations, this should be prefixed with your mod ID like <samp>Example.ModId_LocationName</samp>.
+
| The locations to add to the game.
 +
 
 +
This consists of a string → model lookup, where...
 +
* The key is a unique identifier for this location, which will be used as the location's <samp>Name</samp> (not <samp>DisplayName</samp>) field. The ID should only contain alphanumeric/underscore/dot characters. For custom locations, this should be prefixed with your mod ID like <samp>Example.ModId_LocationName</samp>.
 +
* The value is a model with the fields listed below.
 +
 
 +
{| class="wikitable"
 +
|-
 +
! field
 +
! effect
 
|-
 
|-
 
| <samp>MapPath</samp>
 
| <samp>MapPath</samp>
Line 1,561: Line 1,570:  
| <samp>Type</samp>
 
| <samp>Type</samp>
 
| ''(Optional)'' The full name of the C# location class to create. This must be one of the vanilla types to avoid a crash when saving. There are too many to list here, but the most useful types are likely <samp>StardewValley.GameLocation</samp> (default value) and <samp>StardewValley.Locations.DecoratableLocation</samp>.
 
| ''(Optional)'' The full name of the C# location class to create. This must be one of the vanilla types to avoid a crash when saving. There are too many to list here, but the most useful types are likely <samp>StardewValley.GameLocation</samp> (default value) and <samp>StardewValley.Locations.DecoratableLocation</samp>.
 +
|}
 
|}
 
|}
  
translators
8,447

edits

Navigation menu