Changes

→‎Custom objects: update for build 23267 (added ContextTags)
Line 1,619: Line 1,619:  
* support for custom textures;
 
* support for custom textures;
 
* revamped geode drops with support for conditions, probabilities, and item queries;
 
* revamped geode drops with support for conditions, probabilities, and item queries;
* expanded food/drink buffs (e.g. set a custom buff ID, add a custom buff icon, etc).
+
* expanded food/drink buffs (e.g. set a custom buff ID, add a custom buff icon, etc);
 +
* context tags (moved from the former <samp>Data/ObjectContextTags</samp> asset).
    
This consists of a string → model lookup, where...
 
This consists of a string → model lookup, where...
Line 1,645: Line 1,646:  
| <samp>Price</samp>
 
| <samp>Price</samp>
 
| ''(Optional)'' The price when sold by the player. This is not the price when bought from a shop. Default 0.
 
| ''(Optional)'' The price when sold by the player. This is not the price when bought from a shop. Default 0.
 +
|}
 +
 +
====Appearance====
 +
{| class="wikitable"
 +
|-
 +
! field
 +
! purpose
 +
|-
 +
| <samp>Texture</samp>
 +
| The asset name for the texture containing the item's sprite. Defaults to <samp>Maps/springobjects</samp>.
 +
|-
 +
| <samp>SpriteIndex</samp>
 +
| The sprite's index within the <samp>Texture</samp>, where 0 is the top-left sprite.
 
|}
 
|}
   Line 1,747: Line 1,761:  
|}
 
|}
   −
====Appearance====
+
====Context tags====
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
Line 1,753: Line 1,767:  
! purpose
 
! purpose
 
|-
 
|-
| <samp>Texture</samp>
+
| <samp>ContextTags</samp>
| The asset name for the texture containing the item's sprite. Defaults to <samp>Maps/springobjects</samp>.
+
| ''(Optional)'' The custom [[Modding:Items#Context tags|context tags]] to add for this item (in addition to the automatic tags based on other object data). This is formatted as a list; for example:
|-
+
<syntaxhighlight lang="json">
| <samp>SpriteIndex</samp>
+
"ContextTags": [ "color_yellow", "fish_ocean", "fish_upright", "season_summer" ]
| The sprite's index within the <samp>Texture</samp>, where 0 is the top-left sprite.
+
</syntaxhighlight>
 
|}
 
|}
  
translators
8,404

edits