Changes

2,157 bytes added ,  22:08, 26 June 2022
Line 1,487: Line 1,487:     
==Format==
 
==Format==
   
===Basic Fields===
 
===Basic Fields===
Each special order has a few basic fields, as well as some more complex fields (which are explained below). TODO: Finish filling in this table.
+
Each special order has a few basic fields, as well as some more complex fields (which are explained below).
    
{| class="wikitable"
 
{| class="wikitable"
Line 1,547: Line 1,546:  
===Randomized Elements===
 
===Randomized Elements===
   −
TODO: This is important to explain!
+
This field, if not null, is a collection of blocks, each representing a random element. The format for each one is as follows:
 +
 
 +
{| class="wikitable"
 +
|-
 +
! Field Name
 +
! Description
 +
|-
 +
| <samp>Name</samp>
 +
| The name of the random element, used within the special order data and in the order's strings in <samp>Strings/SpecialOrderStrings</samp>.
 +
|-
 +
| <samp>Values</samp>
 +
| A list of blocks, each containing required tags and a value to set the random element to if the tags are met. <samp>RequiredTags</samp> here follows the same format as the field of the same name in the main block. (See above.)
 +
 
 +
<samp>Value</samp> is a text string in the following format:
 +
* If randomly selecting items, the format is: <samp>PICK_ITEM, {{t|item name}}, {{t|item name}}, {{t|item name}}...</samp>. Items are given as their internal names, i.e. field 0 in <samp>Data/ObjectInformation</samp>.
 +
* If randomly selecting groups of items by context tag, the format is: <samp>Text|[{{t|string key}}]|Tags|{{t|context tags}}</samp>.
 +
* If randomly selecting a monster, the format is: <samp>Target|{{t|monster name}}|LocalizedName|[{{t|string key}}]</samp>
 +
* If simply setting the value of the random element to a string in <samp>Strings/SpecialOrderStrings</samp>, the format is simply: <samp>[{{t|string key}}]</samp>.
 +
|-
 +
|}
 +
 
 +
Random elements can then be called in the following ways, depending on what the format of their <samp>Value</samp> field is:
 +
* <samp>{{{t|element name}}}</samp>: If the random element is simply a string, just the random element name surrounded by single curly braces will return the string.
 +
* <samp>{{{t|element name}}:Text}</samp>: If the random element is an item, returns its name.
 +
* <samp>{{{t|element name}}:TextPlural}</samp>: If the random element is an item, returns its name in plural form.
 +
* <samp>{{{t|element name}}:TextPluralCapitalized}</samp>: If the random element is an item, returns its name in plural form, capitalized.
 +
* <samp>{{{t|element name}}:Tags}</samp>: If the random element is an item, returns its tags.
 +
* <samp>{{{t|element name}}:Price}</samp>: If the random element is an item, returns its price.
 +
* <samp>{{{t|element name}}:Target}</samp>: If the random element is a monster, returns its name.
    
===Objectives===
 
===Objectives===
118

edits