Changes

Jump to navigation Jump to search
→‎Custom machines: update for build 24014 (added temp sprite ID + Condition, combined Sound + DelayedSounds, replaced effect RequiredItemId/RequiredTags with Condition)
Line 1,061: Line 1,061:  
! effect
 
! effect
 
|-
 
|-
| <samp>RequiredItemId</samp>
+
| <samp>Condition</samp>
| ''(Optional)'' If set, only apply this effect if the main input item has this qualified or unqualified item ID.
+
| ''(Optional)'' A [[Modding:Game state queries|game state query]] which indicates whether this effect should be played. For item queries, you can check the input item (<samp>Input</samp) or output item (<samp>Target</samp>). Defaults to always true.
 
|-
 
|-
| <samp>RequiredTags</samp>
+
| <samp>Sounds</samp>
| ''(Optional)'' If set, only apply this effect if the main input item has ''all'' of these [[Modding:Context tags|context tags]]. You can negate a tag with <samp>!</samp> (like <code>"RequiredTags": [ "bone_item", "!fossil_item" ]</code> for bone items that aren't fossils).
+
| ''(Optional)'' The audio to play. This consists of a list of models with these fields:
|-
  −
| <samp>Sound</samp>
  −
| ''(Optional)'' An [[#Custom audio|audio cue ID]] to play. Defaults to no sound.
  −
|-
  −
| <samp>DelayedSounds</samp>
  −
| ''(Optional)'' The audio to play after a short delay. This consists of a list of models with these fields:
   
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
Line 1,077: Line 1,071:  
! effect
 
! effect
 
|-
 
|-
| <samp>Sound</samp>
+
| <samp>Id</samp>
 
| The [[#Custom audio|audio cue ID]] to play.
 
| The [[#Custom audio|audio cue ID]] to play.
 
|-
 
|-
 
| <samp>Delay</samp>
 
| <samp>Delay</samp>
| The number of milliseconds until the sound should play.
+
| ''(Optional)'' The number of milliseconds until the sound should play. Default 0.
 
|}
 
|}
 +
 +
Defaults to no sound.
 
|-
 
|-
 
| <samp>ShakeDuration</samp>
 
| <samp>ShakeDuration</samp>
Line 1,099: Line 1,095:  
! field
 
! field
 
! effect
 
! effect
 +
|-
 +
| <samp>Id</samp>
 +
| The [[Modding:Modder Guide/Game Fundamentals#Unique string IDs|unique string ID]] for this rule within the current machine (it doesn't need to be unique between machines).
 
|-
 
|-
 
| <samp>Texture</samp>
 
| <samp>Texture</samp>
Line 1,105: Line 1,104:  
| <samp>SourceRect</samp>
 
| <samp>SourceRect</samp>
 
| The pixel area for the first animated frame within the <samp>Texture</samp>, specified as an object with <samp>X</samp>, <samp>Y</samp>, <samp>Width</samp>, and <samp>Height</samp> fields.
 
| The pixel area for the first animated frame within the <samp>Texture</samp>, specified as an object with <samp>X</samp>, <samp>Y</samp>, <samp>Width</samp>, and <samp>Height</samp> fields.
 +
|-
 +
| <samp>Condition</samp>
 +
| ''(Optional)'' A [[Modding:Game state queries|game state query]] which indicates whether to add this temporary sprite.
 
|-
 
|-
 
| <samp>PositionOffset</samp>
 
| <samp>PositionOffset</samp>
translators
8,445

edits

Navigation menu