Changes

Jump to navigation Jump to search
update links for unique string ID
Line 126: Line 126:  
| <samp>ItemId</samp>
 
| <samp>ItemId</samp>
 
| <samp>string</samp>
 
| <samp>string</samp>
| A [[Modding:Modder Guide/Game Fundamentals#Unique string IDs|unique string ID]] for this item which should be globally unique (but may not be for existing vanilla items for backwards compatibility). For example, <samp>128</samp> (vanilla item) or <samp>Example.ModId_Watermelon</samp> (custom item).
+
| A [[Modding:Common data field types#Unique string ID|unique string ID]] for this item which should be globally unique (but may not be for existing vanilla items for backwards compatibility). For example, <samp>128</samp> (vanilla item) or <samp>Example.ModId_Watermelon</samp> (custom item).
 
|-
 
|-
 
| <samp>QualifiedItemId</samp>
 
| <samp>QualifiedItemId</samp>
Line 664: Line 664:  
|-
 
|-
 
| <samp>Id</samp>
 
| <samp>Id</samp>
| The [[Modding:Modder Guide/Game Fundamentals#Unique string IDs|unique string ID]] for this entry within the list.
+
| The [[Modding:Common data field types#Unique string ID|unique string ID]] for this entry within the list.
 
|-
 
|-
 
| <samp>Result</samp>
 
| <samp>Result</samp>
Line 764: Line 764:  
|-
 
|-
 
| <samp>ID</samp>
 
| <samp>ID</samp>
| The [[Modding:Modder Guide/Game Fundamentals#Unique string IDs|unique string ID]] for this floor/path.
+
| The [[Modding:Common data field types#Unique string ID|unique string ID]] for this floor/path.
 
|-
 
|-
 
| <samp>ItemId</samp>
 
| <samp>ItemId</samp>
Line 859: Line 859:  
|-
 
|-
 
| <samp>Id</samp>
 
| <samp>Id</samp>
| The [[Modding:Modder Guide/Game Fundamentals#Unique string IDs|unique string ID]] for this rule within the current machine (it doesn't need to be unique between machines).
+
| The [[Modding:Common data field types#Unique string ID|unique string ID]] for this rule within the current machine (it doesn't need to be unique between machines).
 
|-
 
|-
 
| <samp>Triggers</samp>
 
| <samp>Triggers</samp>
Line 871: Line 871:  
|-
 
|-
 
| <samp>Id</samp>
 
| <samp>Id</samp>
| The [[Modding:Modder Guide/Game Fundamentals#Unique string IDs|unique string ID]] for this trigger within the current rule.
+
| The [[Modding:Common data field types#Unique string ID|unique string ID]] for this trigger within the current rule.
 
|-
 
|-
 
| <samp>Trigger</samp>
 
| <samp>Trigger</samp>
Line 1,105: Line 1,105:  
|-
 
|-
 
| <samp>Id</samp>
 
| <samp>Id</samp>
| The [[Modding:Modder Guide/Game Fundamentals#Unique string IDs|unique string ID]] for this rule within the current machine (it doesn't need to be unique between machines).
+
| The [[Modding:Common data field types#Unique string ID|unique string ID]] for this rule within the current machine (it doesn't need to be unique between machines).
 
|-
 
|-
 
| <samp>Texture</samp>
 
| <samp>Texture</samp>
Line 1,227: Line 1,227:  
|}
 
|}
   −
This can be used to increment both built-in stats (like <samp>GeodesCracked</samp> for the [[Geode Crusher|geode crusher]]) and custom stats. Using a [[Modding:Modder Guide/Game Fundamentals#Unique string IDs|unique string ID]] is strongly recommended for custom stats to avoid conflicts.
+
This can be used to increment both built-in stats (like <samp>GeodesCracked</samp> for the [[Geode Crusher|geode crusher]]) and custom stats. Using a [[Modding:Common data field types#Unique string ID|unique string ID]] is strongly recommended for custom stats to avoid conflicts.
 
|-
 
|-
 
| <samp>CustomFields</samp>
 
| <samp>CustomFields</samp>
Line 1,367: Line 1,367:  
|-
 
|-
 
| <samp>Id</samp>
 
| <samp>Id</samp>
| The [[Modding:Modder Guide/Game Fundamentals#Unique string IDs|unique string ID]] for the projectile within the current weapon's data.
+
| The [[Modding:Common data field types#Unique string ID|unique string ID]] for the projectile within the current weapon's data.
 
|-
 
|-
 
| <samp>Damage</samp>
 
| <samp>Damage</samp>
Line 1,428: Line 1,428:  
Stardew Valley 1.6 addresses that with two changes:
 
Stardew Valley 1.6 addresses that with two changes:
 
<ul>
 
<ul>
<li>The <samp>Id</samp> field is now a [[Modding:Modder Guide/Game Fundamentals#Unique string IDs|unique string ID]].</li>
+
<li>The <samp>Id</samp> field is now a [[Modding:Common data field types#Unique string ID|unique string ID]].</li>
 
<li>You can now use a different texture with two new required fields:
 
<li>You can now use a different texture with two new required fields:
 
{| class="wikitable"
 
{| class="wikitable"
Line 1,472: Line 1,472:  
====Format====
 
====Format====
 
The data asset consists of a string → model lookup, where...
 
The data asset consists of a string → model lookup, where...
* The key is a [[Modding:Modder Guide/Game Fundamentals#Unique string IDs|unique string ID]] for the reward group.
+
* The key is a [[Modding:Common data field types#Unique string ID|unique string ID]] for the reward group.
 
* The value is a model with the fields listed below.
 
* The value is a model with the fields listed below.
   Line 1,629: Line 1,629:  
|-
 
|-
 
| <samp>Id</samp>
 
| <samp>Id</samp>
| The [[Modding:Modder Guide/Game Fundamentals#Unique string IDs|unique string ID]] for this entry within the list.
+
| The [[Modding:Common data field types#Unique string ID|unique string ID]] for this entry within the list.
 
|-
 
|-
 
| <samp>Result</samp>
 
| <samp>Result</samp>
Line 2,234: Line 2,234:     
This consists of a string → model lookup, where...
 
This consists of a string → model lookup, where...
* The asset key is a [[Modding:Modder Guide/Game Fundamentals#Unique string IDs|unique string ID]] for the tree type. The vanilla tree IDs are <samp>1</samp> (oak), <samp>2</samp> (maple), <samp>3</samp> (pine), <samp>6</samp> (palm), <samp>7</samp> (mushroom), and <samp>8</samp> (mahogany).
+
* The asset key is a [[Modding:Common data field types#Unique string ID|unique string ID]] for the tree type. The vanilla tree IDs are <samp>1</samp> (oak), <samp>2</samp> (maple), <samp>3</samp> (pine), <samp>6</samp> (palm), <samp>7</samp> (mushroom), and <samp>8</samp> (mahogany).
 
* The asset value is a model with thee fields listed below.
 
* The asset value is a model with thee fields listed below.
   Line 2,430: Line 2,430:  
|-
 
|-
 
| <samp>Id</samp>
 
| <samp>Id</samp>
| The [[Modding:Modder Guide/Game Fundamentals#Unique string IDs|unique string ID]] for this entry within the list.
+
| The [[Modding:Common data field types#Unique string ID|unique string ID]] for this entry within the list.
 
|-
 
|-
 
| <samp>Result</samp>
 
| <samp>Result</samp>
Line 2,940: Line 2,940:  
|-
 
|-
 
| <samp>Name</samp>
 
| <samp>Name</samp>
| The [[Modding:Modder Guide/Game Fundamentals#Unique string IDs|unique string ID]] for the location context.
+
| The [[Modding:Common data field types#Unique string ID|unique string ID]] for the location context.
 
|}
 
|}
 
</dd>
 
</dd>
Line 3,108: Line 3,108:  
|-
 
|-
 
| <samp>Id</samp>
 
| <samp>Id</samp>
| ''(Optional)'' A [[Modding:Modder Guide/Game Fundamentals#Unique string IDs|unique string ID]] which identifies this entry within the list. Defaults to the <samp>Track</samp> value.
+
| ''(Optional)'' A [[Modding:Common data field types#Unique string ID|unique string ID]] which identifies this entry within the list. Defaults to the <samp>Track</samp> value.
 
|-
 
|-
 
| <samp>Track</samp>
 
| <samp>Track</samp>
Line 3,164: Line 3,164:  
|-
 
|-
 
| ''entry key''
 
| ''entry key''
| The [[Modding:Modder Guide/Game Fundamentals#Unique string IDs|unique string ID]] for this garbage can.
+
| The [[Modding:Common data field types#Unique string ID|unique string ID]] for this garbage can.
 
|-
 
|-
 
| <samp>BaseChance</samp>
 
| <samp>BaseChance</samp>
Line 3,323: Line 3,323:     
This consists of a string → model lookup, where...
 
This consists of a string → model lookup, where...
* The key is a [[Modding:Modder Guide/Game Fundamentals#Unique string IDs|unique string ID]] for the minecart network. When you interact with a minecart, the destinations listed for its network are shown.
+
* The key is a [[Modding:Common data field types#Unique string ID|unique string ID]] for the minecart network. When you interact with a minecart, the destinations listed for its network are shown.
 
* The value is a model with the fields listed below.
 
* The value is a model with the fields listed below.
   Line 3,339: Line 3,339:  
|-
 
|-
 
| <samp>Id</samp>
 
| <samp>Id</samp>
| A [[Modding:Modder Guide/Game Fundamentals#Unique string IDs|unique string ID]] for this destination within the network.
+
| A [[Modding:Common data field types#Unique string ID|unique string ID]] for this destination within the network.
 
|-
 
|-
 
| <samp>DisplayName</samp>
 
| <samp>DisplayName</samp>
Line 3,426: Line 3,426:  
====Data format====
 
====Data format====
 
The <samp>Data/PassiveFestivals</samp> asset consists of a string → model lookup, where...
 
The <samp>Data/PassiveFestivals</samp> asset consists of a string → model lookup, where...
* The key is a [[Modding:Modder Guide/Game Fundamentals#Unique string IDs|unique string ID]] for the festival.
+
* The key is a [[Modding:Common data field types#Unique string ID|unique string ID]] for the festival.
 
* The value is a model with the fields listed below.
 
* The value is a model with the fields listed below.
 
{| class="wikitable"
 
{| class="wikitable"
Line 3,925: Line 3,925:  
===Custom buildings===
 
===Custom buildings===
 
You can now add custom buildings by editing the <samp>Data/Buildings</samp> asset. This consists of a string → model lookup, where...
 
You can now add custom buildings by editing the <samp>Data/Buildings</samp> asset. This consists of a string → model lookup, where...
* The key is a [[Modding:Modder Guide/Game Fundamentals#Unique string IDs|unique string ID]] for the building type.
+
* The key is a [[Modding:Common data field types#Unique string ID|unique string ID]] for the building type.
 
* The value is a model with the fields listed below.
 
* The value is a model with the fields listed below.
   Line 3,961: Line 3,961:  
|-
 
|-
 
| <samp>Id</samp>
 
| <samp>Id</samp>
| ''(Optional)'' The [[Modding:Modder Guide/Game Fundamentals#Unique string IDs|unique string ID]] for this entry within the current list. Defaults to the <samp>ItemId</samp> if not specified.
+
| ''(Optional)'' The [[Modding:Common data field types#Unique string ID|unique string ID]] for this entry within the current list. Defaults to the <samp>ItemId</samp> if not specified.
 
|-
 
|-
 
| <samp>ItemId</samp>
 
| <samp>ItemId</samp>
Line 4,001: Line 4,001:  
|-
 
|-
 
| <samp>Id</samp>
 
| <samp>Id</samp>
| The [[Modding:Modder Guide/Game Fundamentals#Unique string IDs|unique string ID]] for this entry within the current list.
+
| The [[Modding:Common data field types#Unique string ID|unique string ID]] for this entry within the current list.
 
|-
 
|-
 
| <samp>ItemId</samp>
 
| <samp>ItemId</samp>
Line 4,037: Line 4,037:  
|-
 
|-
 
| <samp>Id</samp>
 
| <samp>Id</samp>
| The [[Modding:Modder Guide/Game Fundamentals#Unique string IDs|unique string ID]] for this entry within the current list.
+
| The [[Modding:Common data field types#Unique string ID|unique string ID]] for this entry within the current list.
 
|-
 
|-
 
| <samp>Source</samp>
 
| <samp>Source</samp>
Line 4,114: Line 4,114:  
|-
 
|-
 
| <samp>Id</samp>
 
| <samp>Id</samp>
| The [[Modding:Modder Guide/Game Fundamentals#Unique string IDs|unique string ID]] for the skin.
+
| The [[Modding:Common data field types#Unique string ID|unique string ID]] for the skin.
 
|-
 
|-
 
| <samp>Name</samp><br /><samp>Description</samp>
 
| <samp>Name</samp><br /><samp>Description</samp>
Line 4,155: Line 4,155:  
|-
 
|-
 
| <samp>Id</samp>
 
| <samp>Id</samp>
| The [[Modding:Modder Guide/Game Fundamentals#Unique string IDs|unique string ID]] for this entry within the current list.
+
| The [[Modding:Common data field types#Unique string ID|unique string ID]] for this entry within the current list.
 
|-
 
|-
 
| <samp>SourceRect</samp>
 
| <samp>SourceRect</samp>
Line 4,248: Line 4,248:  
|-
 
|-
 
| <samp>Id</samp>
 
| <samp>Id</samp>
| The [[Modding:Modder Guide/Game Fundamentals#Unique string IDs|unique string ID]] for this rule within the current list.
+
| The [[Modding:Common data field types#Unique string ID|unique string ID]] for this rule within the current list.
 
|-
 
|-
 
| <samp>RequiredTags</samp>
 
| <samp>RequiredTags</samp>
Line 4,290: Line 4,290:  
|-
 
|-
 
| <samp>Id</samp>
 
| <samp>Id</samp>
| The [[Modding:Modder Guide/Game Fundamentals#Unique string IDs|unique string ID]] for this chest within the current list.
+
| The [[Modding:Common data field types#Unique string ID|unique string ID]] for this chest within the current list.
    
This is referenced from the <samp>ItemConversions</samp> field.
 
This is referenced from the <samp>ItemConversions</samp> field.
Line 4,335: Line 4,335:  
|-
 
|-
 
| <samp>Id</samp>
 
| <samp>Id</samp>
| The [[Modding:Modder Guide/Game Fundamentals#Unique string IDs|unique string ID]] for this entry within the current list.
+
| The [[Modding:Common data field types#Unique string ID|unique string ID]] for this entry within the current list.
 
|-
 
|-
 
| <samp>Tile</samp>
 
| <samp>Tile</samp>
Line 4,355: Line 4,355:  
|-
 
|-
 
| <samp>Id</samp>
 
| <samp>Id</samp>
| The [[Modding:Modder Guide/Game Fundamentals#Unique string IDs|unique string ID]] for this entry within the current list.
+
| The [[Modding:Common data field types#Unique string ID|unique string ID]] for this entry within the current list.
 
|-
 
|-
 
| <samp>Name</samp>
 
| <samp>Name</samp>
Line 4,501: Line 4,501:  
====Format====
 
====Format====
 
This consists of a string → model lookup, where...
 
This consists of a string → model lookup, where...
* The key is a [[Modding:Modder Guide/Game Fundamentals#Unique string IDs|unique string ID]] for the NPC like <samp>Example.ModId_NpcName</samp>, which will be used as the internal <samp>Name</samp> (not <samp>DisplayName</samp>).
+
* The key is a [[Modding:Common data field types#Unique string ID|unique string ID]] for the NPC like <samp>Example.ModId_NpcName</samp>, which will be used as the internal <samp>Name</samp> (not <samp>DisplayName</samp>).
 
* The value is a model with the following fields.
 
* The value is a model with the following fields.
   Line 4,800: Line 4,800:  
|-
 
|-
 
| <samp>ID</samp>
 
| <samp>ID</samp>
| The [[Modding:Modder Guide/Game Fundamentals#Unique string IDs|unique string ID]] for this entry within the current list.
+
| The [[Modding:Common data field types#Unique string ID|unique string ID]] for this entry within the current list.
 
|-
 
|-
 
| <samp>Location</samp>
 
| <samp>Location</samp>
Line 4,841: Line 4,841:  
|-
 
|-
 
| <samp>Id</samp>
 
| <samp>Id</samp>
| The [[Modding:Modder Guide/Game Fundamentals#Unique string IDs|unique string ID]] for this entry within the current list.
+
| The [[Modding:Common data field types#Unique string ID|unique string ID]] for this entry within the current list.
 
|-
 
|-
 
| <samp>Season</samp>
 
| <samp>Season</samp>
Line 5,064: Line 5,064:     
This consists of a string → model lookup, where...
 
This consists of a string → model lookup, where...
* The key is a [[Modding:Modder Guide/Game Fundamentals#Unique string IDs|unique string ID]] for the farm animal type.
+
* The key is a [[Modding:Common data field types#Unique string ID|unique string ID]] for the farm animal type.
 
* The value is a model with the fields listed below.
 
* The value is a model with the fields listed below.
   Line 5,318: Line 5,318:  
|-
 
|-
 
| <samp>ID</samp>
 
| <samp>ID</samp>
| The [[Modding:Modder Guide/Game Fundamentals#Unique string IDs|unique string ID]] for the skin within the current list.
+
| The [[Modding:Common data field types#Unique string ID|unique string ID]] for the skin within the current list.
 
|-
 
|-
 
| <samp>Weight</samp>
 
| <samp>Weight</samp>
Line 5,426: Line 5,426:     
This consists of a string → model lookup, where...
 
This consists of a string → model lookup, where...
* The key is a [[Modding:Modder Guide/Game Fundamentals#Unique string IDs|unique string ID]] for the pet (not the pet breed). The vanilla IDs are <samp>Cat</samp> and <samp>Dog</samp>.
+
* The key is a [[Modding:Common data field types#Unique string ID|unique string ID]] for the pet (not the pet breed). The vanilla IDs are <samp>Cat</samp> and <samp>Dog</samp>.
 
* The value is a model with the fields listed below.
 
* The value is a model with the fields listed below.
   Line 5,717: Line 5,717:     
This consists of a string → model lookup, where...
 
This consists of a string → model lookup, where...
* The key is a [[Modding:Modder Guide/Game Fundamentals#Unique string IDs|unique string ID]] for the monster eradication goal.
+
* The key is a [[Modding:Common data field types#Unique string ID|unique string ID]] for the monster eradication goal.
 
* The value is a model with the fields listed below.
 
* The value is a model with the fields listed below.
   Line 5,770: Line 5,770:     
This consists of a string → model lookup, where...
 
This consists of a string → model lookup, where...
* The key is a [[Modding:Modder Guide/Game Fundamentals#Unique string IDs|unique string ID]] for the incoming call data.
+
* The key is a [[Modding:Common data field types#Unique string ID|unique string ID]] for the incoming call data.
 
* The value is a model with the fields listed below.
 
* The value is a model with the fields listed below.
   Line 6,007: Line 6,007:  
<pre>$p 17|18|19#I guess you think nothing would happen, right?$u|Maybe a wicked ghost would appear!</pre>
 
<pre>$p 17|18|19#I guess you think nothing would happen, right?$u|Maybe a wicked ghost would appear!</pre>
 
|}</li>
 
|}</li>
<li>[[Modding:Dialogue#Response IDs|Dialogue response IDs]] are now [[Modding:Modder Guide/Game Fundamentals#Unique string IDs|unique string IDs]].</li>
+
<li>[[Modding:Dialogue#Response IDs|Dialogue response IDs]] are now [[Modding:Common data field types#Unique string ID|unique string IDs]].</li>
 
<li>[[Secrets#Item Spawn Cheat|Item spawn codes]] now use string item IDs. That means you can spawn any item using its [[#Custom items|qualified item ID]] (like <code>[(F)1664]</code> for a [[Mystic Rug]]), but can no longer prepend zeros (e.g. <code>[128]</code> is a pufferfish but <code>[0128]</code> is an error item).</li>
 
<li>[[Secrets#Item Spawn Cheat|Item spawn codes]] now use string item IDs. That means you can spawn any item using its [[#Custom items|qualified item ID]] (like <code>[(F)1664]</code> for a [[Mystic Rug]]), but can no longer prepend zeros (e.g. <code>[128]</code> is a pufferfish but <code>[0128]</code> is an error item).</li>
 
<li>For C# mods, <samp>Dialogue</samp> now tracks the translation key used to build it (when applicable). For example, you can detect when the player is rejected at the [[Flower Dance]] (derived from {{github|spacechase0/StardewValleyMods|Three-Heart Dance Partner}}):
 
<li>For C# mods, <samp>Dialogue</samp> now tracks the translation key used to build it (when applicable). For example, you can detect when the player is rejected at the [[Flower Dance]] (derived from {{github|spacechase0/StardewValleyMods|Three-Heart Dance Partner}}):
Line 6,234: Line 6,234:  
|-
 
|-
 
| <samp>ID</samp>
 
| <samp>ID</samp>
| The [[Modding:Modder Guide/Game Fundamentals#Unique string IDs|unique string ID]] for the audio cue, used when playing the sound in-game.
+
| The [[Modding:Common data field types#Unique string ID|unique string ID]] for the audio cue, used when playing the sound in-game.
 
|-
 
|-
 
| <samp>FilePaths</samp>
 
| <samp>FilePaths</samp>
Line 6,310: Line 6,310:     
This consists of a string → model lookup, where...
 
This consists of a string → model lookup, where...
* The key is a [[Modding:Modder Guide/Game Fundamentals#Unique string IDs|unique string ID]] for the buff.
+
* The key is a [[Modding:Common data field types#Unique string ID|unique string ID]] for the buff.
 
* The value is a model with the fields listed below.
 
* The value is a model with the fields listed below.
   Line 6,416: Line 6,416:     
This consists of a string → model lookup, where...
 
This consists of a string → model lookup, where...
* The key is a [[Modding:Modder Guide/Game Fundamentals#Unique string IDs|unique string ID]] for the giant crop.
+
* The key is a [[Modding:Common data field types#Unique string ID|unique string ID]] for the giant crop.
 
* The value is a model with the fields listed below.
 
* The value is a model with the fields listed below.
   Line 6,706: Line 6,706:  
|-
 
|-
 
| <samp>Id</samp>
 
| <samp>Id</samp>
| The [[Modding:Modder Guide/Game Fundamentals#Unique string IDs|unique string ID]] for this modifier within the current list.
+
| The [[Modding:Common data field types#Unique string ID|unique string ID]] for this modifier within the current list.
 
|-
 
|-
 
| <samp>Modification</samp>
 
| <samp>Modification</samp>
Line 6,787: Line 6,787:  
===[[Modding:Event data|Event]] changes===
 
===[[Modding:Event data|Event]] changes===
 
====High-level changes====
 
====High-level changes====
* Event IDs are now [[Modding:Modder Guide/Game Fundamentals#Unique string IDs|unique string IDs]], so mods can use a unique key instead of hoping no other mod uses the same number. Unconditional events must have an empty precondition in their key (like <samp>"Example.ModId_EventName/"</samp>) to distinguish them from forks.
+
* Event IDs are now [[Modding:Common data field types#Unique string ID|unique string IDs]], so mods can use a unique key instead of hoping no other mod uses the same number. Unconditional events must have an empty precondition in their key (like <samp>"Example.ModId_EventName/"</samp>) to distinguish them from forks.
 
* Event/festival commands with a direction argument now allow both case-insensitive names (like <samp>up</samp>) and numeric values.
 
* Event/festival commands with a direction argument now allow both case-insensitive names (like <samp>up</samp>) and numeric values.
 
* Event script errors are now logged (in addition to being shown in the chatbox like before).
 
* Event script errors are now logged (in addition to being shown in the chatbox like before).
Line 8,937: Line 8,937:  
When updating to Stardew Valley 1.6, replace the synthetic ID (<samp>item_cloth|item_pufferchick</samp>) with a real one:
 
When updating to Stardew Valley 1.6, replace the synthetic ID (<samp>item_cloth|item_pufferchick</samp>) with a real one:
 
* To edit an existing entry, unpack the asset and get its new <samp>Id</samp> value.
 
* To edit an existing entry, unpack the asset and get its new <samp>Id</samp> value.
* To add a custom entry, use a [[Modding:Modder Guide/Game Fundamentals#Unique string IDs|unique string ID]].
+
* To add a custom entry, use a [[Modding:Common data field types#Unique string ID|unique string ID]].
    
For example:
 
For example:
translators
8,438

edits

Navigation menu