Changes

Jump to navigation Jump to search
→‎Custom shops: update for build 22296: remove shop ID and ItemGroups fields, add Id field for item + owners + dialogue
Line 3,699: Line 3,699:  
===Custom shops===
 
===Custom shops===
 
====Format====
 
====Format====
You can now create and edit shops via the new <samp>Data/Shops</samp> asset. This consists of a string → model lookup, where the key matches the <samp>ID</samp> field and the value is a model with these fields:
+
You can now create and edit shops via the new <samp>Data/Shops</samp> asset. This consists of a string → model lookup, where the key is a unique ID for the shop (using a globally unique ID which includes your mod ID like <samp>ExampleMod.Id_ShopName</samp> for custom shops), and the value is a model with these fields:
    
{| class="wikitable"
 
{| class="wikitable"
Line 3,706: Line 3,706:  
! effect
 
! effect
 
|-
 
|-
| <samp>ID</samp>
+
| <samp>Items</samp>
| A unique ID for the shop. For a custom shop, you should use a globally unique ID which includes your mod ID like <samp>ExampleMod.Id_ShopName</samp>.
+
| The items to add to the shop inventory. This consists of a list of values with these fields:
|-
  −
| <samp>ItemGroups</samp>
  −
| The items to list in the shop inventory. This consists of a list of models with these fields:
   
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
Line 3,716: Line 3,713:  
! effect
 
! effect
 
|-
 
|-
| <samp>Items</samp>
+
| <samp>Id</samp>
| The items to add to the shop inventory if the <samp>Condition</samp> matches. This costs of a list of values with these fields:
+
| An ID for this entry within the shop (not the item itself, which is <samp>ItemId</samp>). This only needs to be unique within the current shop's item list. For a custom entry, you should use a unique ID which includes your mod ID like <samp>ExampleMod.Id_ItemName</samp>.
{| class="wikitable"
  −
|-
  −
! field
  −
! effect
   
|-
 
|-
 
| <samp>ItemId</samp>
 
| <samp>ItemId</samp>
Line 3,796: Line 3,789:  
| <samp>Condition</samp>
 
| <samp>Condition</samp>
 
| ''(Optional)'' A [[#Game state queries|game state query]] which indicates whether this item should be added. <!--Item-only tokens are valid for this check.--> Defaults to always true.
 
| ''(Optional)'' A [[#Game state queries|game state query]] which indicates whether this item should be added. <!--Item-only tokens are valid for this check.--> Defaults to always true.
|}
  −
|-
  −
| <samp>Condition</samp>
  −
| ''(Optional)'' A [[#Game state queries|game state query]] which indicates whether the item should be added. If omitted, the item is always added.
      
Special case: if the player found [[Pierre's Missing Stocklist]], season conditions are ignored in [[Pierre's General Store]].
 
Special case: if the player found [[Pierre's Missing Stocklist]], season conditions are ignored in [[Pierre's General Store]].
Line 3,824: Line 3,813:  
* <samp>Any</samp> to use this entry if ''any'' NPC is within the shop area;
 
* <samp>Any</samp> to use this entry if ''any'' NPC is within the shop area;
 
* <samp>None</samp> to use this entry if ''no'' NPC is within the shop area.
 
* <samp>None</samp> to use this entry if ''no'' NPC is within the shop area.
 +
|-
 +
| <samp>Id</samp>
 +
| ''(Optional)'' An ID for this entry within the shop. This only needs to be unique within the current shop's owner list. Defaults to the <samp>Name</samp> value.
 
|-
 
|-
 
| <samp>Condition</samp>
 
| <samp>Condition</samp>
Line 3,841: Line 3,833:  
! field
 
! field
 
! effect
 
! effect
 +
|-
 +
| <samp>Id</samp>
 +
| An ID for this dialogue. This only needs to be unique within the current dialogue list. For a custom entry, you should use a unique ID which includes your mod ID like <samo>ExampleMod.Id_DialogueName</samp>.
 
|-
 
|-
 
| <samp>Dialogue</samp>
 
| <samp>Dialogue</samp>
translators
8,447

edits

Navigation menu