Changes

Jump to navigation Jump to search
→‎Objects: Continue to change field description table based on the work done in Modding:Migrate to Stardew Valley 1.6 (edibility, isDrink, buffs)
Line 535: Line 535:  
|}
 
|}
    +
====Edibility====
 +
{| class="wikitable"
 +
|-
 +
! field
 +
! purpose
 +
|-
 +
| <samp>Edibility</samp>
 +
| ''(Optional)'' A numeric value that determines how much energy (edibility × 2.5) and health (edibility × 1.125) is restored when this item is eaten. An item with an edibility of -300 can't be eaten, values from -299 to -1 reduce health and energy, and zero can be eaten but doesn't change health/energy. Default -300.
 +
|-
 +
| <samp>IsDrink</samp>
 +
| ''(Optional)'' Whether to drink the item instead of eating it. Default false.
 +
|-
 +
| <samp>Buffs</samp>
 +
| ''(Optional)'' The buffs to apply to the player when this item is eaten, if any. Default none.
 +
 +
This consists of a list of models with these fields:
 +
{| class="wikitable"
 +
|-
 +
! field
 +
! purpose
 +
|-
 +
| <samp>Id</samp>
 +
| The [[Modding:Common data field types#Unique string ID|unique string ID]] for this entry within the list.
 +
|-
 +
| <samp>Duration</samp>
 +
| ''(Optional if <samp>BuffId</samp> is set)'' The buff duration measured in in-game minutes. This can be set to <samp>-2</samp> for a buff that should last for the rest of the day.
 +
|-
 +
| <samp>BuffId</samp>
 +
| ''(Optional)'' The unique ID of a buff from [[#Custom buffs|<samp>Data/Buffs</samp>]] to apply, or <samp>null</samp> to ignore <samp>Data/Buffs</samp> and set the ID to <samp>food</samp> or <samp>drink</samp> depending on the item's <samp>IsDrink</samp> field.
 +
 +
If a buff from <samp>Data/Buffs</samp> is applied and you also specify other fields, here's how the buff data is combined:
 +
{| class="wikitable"
 +
|-
 +
! field
 +
! result
 +
|-
 +
| <samp>Duration</samp><br /><samp>IconTexture</samp><br /><samp>SpriteIndex</samp><br /><samp>GlowColor</samp>
 +
| If specified, the value in <samp>Data/Objects</samp> is used instead of the one in <samp>Data/Buffs</samp>. If omitted, defaults to the value from <samp>Data/Buffs</samp>.
 +
|-
 +
| <samp>CustomAttributes</samp>
 +
| The values from both entries are combined (e.g. +1 speed in <samp>Data/Objects</samp> and +1 speed in <samp>Data/Buffs</samp> results in +2 speed).
 +
|-
 +
| <samp>IsDebuff</samp>
 +
| The value in <samp>Data/Objects</samp> is used.
 +
|}
 +
|-
 +
| <samp>IsDebuff</samp>
 +
| ''(Optional)'' Whether this buff counts as a debuff, so its duration should be halved when wearing a Sturdy Ring. Default false.
 +
|-
 +
| <samp>IconTexture</samp>
 +
| ''(Optional)'' The asset name for the icon texture to load. This must contain one or more 16x16 icons in a grid of any size. If omitted, the game will draw a default icon based on the <samp>BuffId</samp> and <samp>CustomAttributes</samp> fields.
 +
|-
 +
| <samp>SpriteIndex</samp>
 +
| ''(Optional)'' The buff's icon index within the <samp>IconTexture</samp>, where 0 is the top-left icon. Default 0.
 +
|-
 +
| <samp>GlowColor</samp>
 +
| ''(Optional)'' The glow color to apply to the player. See [[#Color fields|color format]]. Default none.
 +
|-
 +
| <samp>CustomAttributes</samp>
 +
| The custom buff attributes to apply, if any.
 +
 +
This consists of a model with any combination of these fields:
 +
{| class="wikitable"
 +
|-
 +
! field
 +
! purpose
 +
|-
 +
| <samp>FarmingLevel</samp><br /><samp>FishingLevel</samp><br /><samp>ForagingLevel</samp><br /><samp>LuckLevel</samp><br /><samp>MiningLevel</samp>
 +
| ''(Optional)'' An amount applied to the matching [[Skills|skill level]] while the buff is active. This can be negative for a debuff. Default 0.
 +
|-
 +
| <samp>Attack</samp><br /><samp>Defense</samp><br /><samp>MagneticRadius</samp><br /><samp>MaxStamina</samp><br /><samp>Speed</samp>
 +
| ''(Optional)'' An amount applied to the player's [[attack]], [[defense]], [[Magnetism|magnetic radius]], maximum [[Energy|stamina]], or [[speed]] while the buff is active. This can be negative for a debuff. Default 0.
 +
|}
 +
|-
 +
| <samp>CustomFields</samp>
 +
| ''(Optional)'' The [[#Custom data fields|custom fields]] for this entry.
 +
|}
 +
|}
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
Line 563: Line 641:  
| integer
 
| integer
 
| The gold price of the item when sold by the player. This is not the price when bought from a shop.
 
| The gold price of the item when sold by the player. This is not the price when bought from a shop.
|-
  −
| Edibility
  −
| integer
  −
| A numeric value that determines how much energy (edibility × 2.5) and health
  −
edibility × 1.125) is restored when this item is eaten. An item with an edibility
  −
of -300 can't be eaten, values from -299 to -1 reduce health and energy, and
  −
zero can be eaten but doesn't change health/energy.
  −
  −
This is ignored for Rings.
  −
|-
  −
| IsDrink
  −
| boolean
  −
| Whether to drink the item instead of eating it. Ignored if the item isn't edible per its Edibility.
  −
|-
  −
| Buffs
  −
| <samp>List</samp> of <samp>ObjectBuffData</samp>, stored in the game code in <samp>GameData.Objects.ObjectBuffData</samp>.
  −
| The buffs to apply to the player when this item is eaten, if any. Ignored if the item isn't edible per its Edibility.
   
|-
 
|-
 
| GeodeDropsDefaultItems
 
| GeodeDropsDefaultItems
46

edits

Navigation menu