Changes

m
→‎Format: Line about possible portrait restriction, to confirm by code diving if possible?
Line 1: Line 1: −
{{upcoming|1.6}}
  −
   
← [[Modding:Index|Index]]
 
← [[Modding:Index|Index]]
   Line 84: Line 82:  
| <samp>PerItemCondition</samp>
 
| <samp>PerItemCondition</samp>
 
| ''(Optional)'' A [[Modding:Game state queries|game state query]] which indicates whether an item produced from the other fields should be added (e.g. to filter results from item queries like <samp>ALL_ITEMS</samp>). Defaults to always added.
 
| ''(Optional)'' A [[Modding:Game state queries|game state query]] which indicates whether an item produced from the other fields should be added (e.g. to filter results from item queries like <samp>ALL_ITEMS</samp>). Defaults to always added.
 +
|-
 +
| <samp>ActionsOnPurchase</samp>
 +
| ''(Optional)'' A list of [[Modding:Trigger actions|actions]] to run when the player purchases this item. These are run once per purchase click. Default none.
 +
 +
For example, this can be used to start a [[Modding:Dialogue#Conversation topics|conversation topic]] when it's purchased:
 +
<syntaxhighlight lang="js">
 +
"ActionsOnPurchase": [
 +
    "AddConversationTopic {{ModId}}_PurchasedItem 5"
 +
]
 +
</syntaxhighlight>
 
|}
 
|}
 
|-
 
|-
Line 122: Line 130:     
If drawn, it'll use the 64x64 pixel area in the top-left corner of the texture.
 
If drawn, it'll use the 64x64 pixel area in the top-left corner of the texture.
 +
Note : it is possible that name of "none" prevents any portrait to be used.
 
|-
 
|-
 
| <samp>Dialogues</samp>
 
| <samp>Dialogues</samp>
Line 156: Line 165:  
| <samp>ClosedMessage</samp>
 
| <samp>ClosedMessage</samp>
 
| ''(Optional)'' If set, a [[Modding:Tokenizable strings|tokenizable string]] for a 'shop is closed'-style message to show instead of opening the shop.
 
| ''(Optional)'' If set, a [[Modding:Tokenizable strings|tokenizable string]] for a 'shop is closed'-style message to show instead of opening the shop.
 +
 +
'''This should not be set except in a separate entry'''. Adding it to an owner entry will prevent it from being used.
 
|-
 
|-
 
| <samp>RandomizeDialogueOnOpen</samp>
 
| <samp>RandomizeDialogueOnOpen</samp>
38

edits