Changes

Jump to navigation Jump to search
→‎Available queries: update for build 24005 (reworked ALL_ITEMS and RANDOM_ITEMS)
Line 6,310: Line 6,310:  
! effect
 
! effect
 
|-
 
|-
| <samp>ALL_ITEMS {{o|type ID}}</samp>
+
| <samp>ALL_ITEMS {{o|type ID}} {{o|flags}}</samp>
 
| Every item provided by the [[#Custom items|item data definitions]]. If {{o|type ID}} is set to an item type identifier (like <samp>(O)</samp> for object), only returns items from the matching item data definition.
 
| Every item provided by the [[#Custom items|item data definitions]]. If {{o|type ID}} is set to an item type identifier (like <samp>(O)</samp> for object), only returns items from the matching item data definition.
 +
 +
The {{o|flags}} specify options to apply. If specified, they must be at the end of the argument list (with or without {{o|type ID}}). The flags can be any combination of:
 +
{| class="wikitable"
 +
|-
 +
! flag
 +
! effect
 +
|-
 +
| <samp>@isRandomSale</samp>
 +
| Don't return items marked 'exclude from random sale' in <samp>Data/Furniture</samp> or <samp>Data/Objects</samp>.
 +
|-
 +
| <samp>@requirePrice</samp>
 +
| Don't return items with a sell-to-player price below {{price|1}}.
 +
|}
 +
 +
For example:
 +
* <code>ALL_ITEMS</code> will return every item in the game.
 +
* <code>ALL_ITEMS @isRandomSale</code> will return every item in the game that's not excluded from random sale.
 +
* <code>ALL_ITEMS (F) @isRandomSale</code> will return every furniture item in the game that's not excluded from random sale.
 
|-
 
|-
 
| <samp>DISH_OF_THE_DAY</samp>
 
| <samp>DISH_OF_THE_DAY</samp>
Line 6,340: Line 6,358:  
| A random seasonal vanilla item which can be found by searching garbage cans, breaking containers in the mines, etc.
 
| A random seasonal vanilla item which can be found by searching garbage cans, breaking containers in the mines, etc.
 
|-
 
|-
| <samp>RANDOM_ITEMS {{t|type definition ID}} {{o|min ID}} {{o|max ID}} {{o|require price}}</samp>
+
| <samp>RANDOM_ITEMS {{t|type definition ID}} {{o|min ID}} {{o|max ID}} {{o|flags}}</samp>
| All items from the given [[#Item types|type definition ID]] in randomized order, optionally filtered to those with a numeric ID in the given {{o|min ID}} and {{o|max ID}} range (inclusive). If {{o|require price}} is <samp>true</samp>, items with a sell-to-shop price below {{price|1}} won't be returned.
+
| All items from the given [[#Item types|type definition ID]] in randomized order, optionally filtered to those with a numeric ID in the given {{o|min ID}} and {{o|max ID}} range (inclusive).
 +
 
 +
The {{o|flags}} specify options to apply. If specified, they must be at the end of the argument list (with or without {{o|min ID}} and/or {{o|max ID}}). The flags can be any combination of:
 +
 
 +
The flags can be any combination of:
 +
{| class="wikitable"
 +
|-
 +
! flag
 +
! effect
 +
|-
 +
| <samp>@isRandomSale</samp>
 +
| Don't return items marked 'exclude from random sale' in <samp>Data/Furniture</samp> or <samp>Data/Objects</samp>.
 +
|-
 +
| <samp>@requirePrice</samp>
 +
| Don't return items with a sell-to-player price below {{price|1}}.
 +
|}
    
For example, you can sell a random [[wallpaper]] for {{price|200}} in <samp>Data/Shops</samp>:
 
For example, you can sell a random [[wallpaper]] for {{price|200}} in <samp>Data/Shops</samp>:
translators
8,404

edits

Navigation menu