Changes

→‎Custom NPCs: update for build 24075 (added BreathChestRect, BreathChestPosition, Shadow, and EmoteOffset)
Line 5,038: Line 5,038:  
| <samp>Breather</samp>
 
| <samp>Breather</samp>
 
| ''(Optional)'' Whether the chest on the NPC's overworld sprite puffs in and out as they breathe. Default true</samp>.
 
| ''(Optional)'' Whether the chest on the NPC's overworld sprite puffs in and out as they breathe. Default true</samp>.
 +
|-
 +
| <samp>BreathChestRect</samp>
 +
| ''(Optional)'' A [[Modding:Common data field types#Rectangle|rectangle]] pixel area within the spritesheet which expands and contracts to simulate breathing, relative to the top-left corner of the source rectangle for their current sprite. Omit to calculate it automatically. This should be omitted for most NPCs, unless they have a non-standard size.
 +
|-
 +
| <samp>BreathChestPosition</samp>
 +
| ''(Optional)'' A [[Modding:Common data field types#Point|point]] pixel offset to apply to the NPC's <samp>BreathChestPosition</samp> when drawn over the NPC. Omit to calculate it automatically. This should be omitted for most NPCs, unless they have a non-standard size.
 +
|-
 +
| <samp>Shadow</samp>
 +
| ''(Optional)'' The options for the shadow to draw under the NPC, or omit to apply the default shadow behavior.
 +
 +
This consists of a model with these fields:
 +
 +
{| class="wikitable"
 +
|-
 +
! field
 +
! effect
 +
|-
 +
| <samp>Visible</samp>
 +
| ''(Optional)'' Whether the shadow should be drawn. Default true.
 +
|-
 +
| <samp>Offset</samp>
 +
| ''(Optional)'' A [[Modding:Common data field types#Point|point]] pixel offset applied to the shadow position. Default zero.
 +
|-
 +
| <samp>Scale</samp>
 +
| ''(Optional)'' The scale at which to draw the shadow. Default 1.
 +
 +
This is a multiplier applied to the default shadow scale, which can change based on factors like whether the NPC is jumping. For example, <samp>0.5</samp> means half the size it'd be drawn if you didn't specify a scale.
 +
|}
 +
|-
 +
| <samp>EmoteOffset</samp>
 +
| ''(Optional)'' A [[Modding:Common data field types#Point|point]] pixel offset applied to emote drawn over the NPC. Default zero.
 
|-
 
|-
 
| <samp>ShakePortraits</samp>
 
| <samp>ShakePortraits</samp>
translators
8,404

edits