Line 241: |
Line 241: |
| A ''context tag'' is an arbitrary data label attached to items. These can produce various effects in-game, or may be informational only. | | A ''context tag'' is an arbitrary data label attached to items. These can produce various effects in-game, or may be informational only. |
| | | |
− | The game generates some tags based on the game data (like the item quality), and others are defined in the <samp>Data/ObjectContextTags</samp> data asset (which consists of a string→string dictionary, where the key is the item's internal name, and the value is a comma-delimited list of tags to add). | + | The game generates some tags based on the game data (like the item quality), and others are defined in the <samp>Data/ObjectContextTags</samp> data asset (which consists of a string→string dictionary, where the key is the item's internal name ''or'' the alternative ID matching the <samp>id_{{t|type}}_{{t|identifier}}</samp> tag, and the value is a comma-delimited list of tags to add). |
| | | |
| Here's an ''incomplete'' list of context tags added or used in the base game. Mods can add custom context tags, which aren't listed here. | | Here's an ''incomplete'' list of context tags added or used in the base game. Mods can add custom context tags, which aren't listed here. |
Line 249: |
Line 249: |
| ! context tag | | ! context tag |
| ! effect | | ! effect |
| + | |- |
| + | | <samp>category_{{t|category}}</samp> |
| + | | Added automatically based on the item category. See the 'context tag' column in the [[#Categories|item category list]] for possible values. |
| |- | | |- |
| | <samp>color_*</samp> | | | <samp>color_*</samp> |
Line 276: |
Line 279: |
| | <samp>color_purple</samp>, <samp>color_dark_purple</samp>, <samp>color_dark_pink</samp>, <samp>color_pale_violet_red</samp>, <samp>color_poppyseed</samp>, <samp>color_iridium</samp> | | | <samp>color_purple</samp>, <samp>color_dark_purple</samp>, <samp>color_dark_pink</samp>, <samp>color_pale_violet_red</samp>, <samp>color_poppyseed</samp>, <samp>color_iridium</samp> |
| |} | | |} |
| + | |- |
| + | | <samp>fish_{{t|metadata}}</samp> |
| + | | Added automatically for a fish item based on [[Modding:Fish data|its metadata in <samp>Data/Fish</samp>]]. |
| + | |
| + | For [[Crab Pot|crab pot]] fish (''i.e.'' those with type <samp>trap</samp>): |
| + | |
| + | {| class="wikitable" |
| + | |- |
| + | ! context tag |
| + | ! notes |
| + | |- |
| + | | <samp>fish_trap_location_{{t|water type}}</samp> |
| + | | Based on field 2 ('darting randomness'). For example, <samp>fish_trap_location_ocean</samp>. |
| + | |} |
| + | |
| + | For fishing rod fish (''i.e.'' those whose type is ''not'' <samp>trap</samp>): |
| + | {| class="wikitable" |
| + | |- |
| + | ! context tag |
| + | ! notes |
| + | |- |
| + | | <samp>fish_difficulty_{{t|difficulty}}</samp> |
| + | | Based on field 1 ('chance to dart'), where {{t|difficulty}} is one of <samp>easy</samp> (0–33), <samp>medium</samp> (34–66), <samp>hard</samp> (67–100), or <samp>extremely_hard</samp> (101+). For example, <samp>fish_difficulty_hard</samp>. |
| + | |- |
| + | | <samp>fish_motion_{{t|motion}}</samp> |
| + | | Based on field 4 ('location'). For example, <samp>fish_motion_floater</samp>. |
| + | |- |
| + | | <samp>fish_favor_weather_{{t|weather}}</samp> |
| + | | Based on field 7 ('weather'). For example, <samp>fish_favor_weather_sunny</samp>. |
| + | |} |
| + | |- |
| + | | <samp>id_{{t|type}}_{{t|identifier}}</samp> |
| + | | Added automatically as an alternative ID. The {{t|type}} is one of <samp>B</samp> (boots), <samp>BBL</samp> (big craftable recipe), <samp>BL</samp> (object recipe), <samp>BO</samp> (big craftable), <samp>C</samp> (clothing), <samp>F</samp> (furniture), <samp>H</samp> (hat), <samp>O</samp> (object), <samp>R</samp> (ring), <samp>W</samp> (melee weapon), else blank. The {{t|identifier}} is the item's parent sheet index. For example, [[pufferfish]] has value <samp>id_o_128</samp> (object #128). |
| + | |- |
| + | | <samp>item_{{t|name}}</samp> |
| + | | Added automatically based on the item name. The name is trimmed, lowercase, with spaces replaced with underscores, and with single quotes removed. For example, [['1000 Years From Now']] has context tag <samp>item_1000_years_from_now</samp>. |
| |- | | |- |
| | <samp>quality_none</samp><br /><samp>quality_silver</samp><br /><samp>quality_gold</samp><br /><samp>quality_iridium</samp> | | | <samp>quality_none</samp><br /><samp>quality_silver</samp><br /><samp>quality_gold</samp><br /><samp>quality_iridium</samp> |