Changes

Jump to navigation Jump to search
m
Additional RequiredTags info
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,497: Line 1,496:  
|-
 
|-
 
| <samp>Name</samp>
 
| <samp>Name</samp>
| Name of the special order
+
| Name of the special order. This is in brackets, referring to a string in <samp>Strings/SpecialOrderStrings</samp>.
 
|-
 
|-
 +
| <samp>Requester</samp>
 +
| The name of the NPC the order is for. Can take the form of non-friendable NPCs such as Qi or Gunther.
 +
|-
 +
| <samp>Duration</samp>
 +
| How long you have to complete the order before it auto-fails. Can be one of the following: <samp>Day</samp>, <samp>ThreeDays</samp>, <samp>Week</samp>, <samp>TwoWeeks</samp>, or <samp>Month</samp>.
 +
|-
 +
| <samp>Repeatable</samp>
 +
| Whether or not the order can be repeated. Either <samp>true</samp> or <samp>false</samp>.
 +
|-
 +
| <samp>RequiredTags</samp>
 +
| Defines conditions for the order appearing. Can be one or several of the following in a comma-delimited list:
 +
* <samp>season_{{t|season}}</samp>: must currently be the specified season.
 +
* <samp>event_{{t|ID}}</samp>: the host player has seen the event with the specified ID.
 +
* <samp>mail_{{t|ID}}</samp>: the host player has the specified mail key.
 +
* <samp>rule_{{t|name}}</samp>: the specified rule is in effect. (See below.)
 +
* <samp>dropbox_{{t|name}}</samp>: the specified dropbox is currently in use by another quest or special order. (See below.)
 +
* <samp>island</samp>: Ginger Island has been unlocked. This also adds an island motif to the note.
 +
* <samp>knows_{{t|NPCname}}</samp>: Returns true if any farmer knows the specified NPC.
 +
* <samp>NOT_IMPLEMENTED</samp>: Always returns false.
 +
Additionally, requirements may be prefixed with <samp>!</samp> to invert the condition. For example, <samp>!dropbox_{{t|name}}</samp> returns true only if the specified dropbox is ''not'' in use.
 +
|-
 +
| <samp>OrderType</samp>
 +
| Is either blank or <samp>Qi</samp>.
 +
|-
 +
| <samp>SpecialRule</samp>
 +
| A comma-delimited list of [[#Special rules|special rules]] that apply while this special order is active.
 +
|-
 +
| <samp>Text</samp>
 +
| Put in brackets, refers to a string in <samp>Strings/SpecialOrderStrings</samp>.
 +
|-
 +
| <samp>ItemToRemoveOnEnd</samp>
 +
| Removes all instances of the specified item ID from all inventories and containers. Used to prevent keeping hold of quest items.
 +
|-
 +
| <samp>MailToRemoveOnEnd</samp>
 +
| Sets the specified mail as unread.
 
|}
 
|}
    
===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:
 +
* 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===
Line 1,532: Line 1,594:  
|-
 
|-
 
| <samp>Ship</samp>
 
| <samp>Ship</samp>
| The player must ship items through their [[Shipping|shipping bin]] which match the [[#Context tags|<samp>AcceptedContextTags</samp> field]]. The quest objective progresses when the items are collected, not when they're put in the bin. Player still get money for the shipped items as they would normally.
+
| The player must ship items through their [[Shipping|shipping bin]] which match the [[#Context tags|<samp>AcceptedContextTags</samp> field]]. The quest objective progresses when the items are collected, not when they're put in the bin. Player still get money for the shipped items as they would normally. The <samp>UseShipmentValue</samp> field (<samp>"false"</samp> by default) can be set to <samp>"true"</samp> to require shipping a certain amount of money worth of items, instead of a certain number of items.
 
|-
 
|-
 
| <samp>Donate</samp>
 
| <samp>Donate</samp>
Line 1,618: Line 1,680:     
For example, <code>!forage_item, category_vegetable/category_fruit, quality_gold</code> would match non-forage gold-quality items which are either fruits or vegetables.
 
For example, <code>!forage_item, category_vegetable/category_fruit, quality_gold</code> would match non-forage gold-quality items which are either fruits or vegetables.
 +
 +
==Special rules==
 +
Special rules are [[Modding:Common data field types#Unique string ID|unique string IDs]] that can be used to apply logic while the special order is active.
 +
 +
The game has some predefined rules:
 +
{| class="wikitable"
 +
|-
 +
! rule ID
 +
! effect
 +
|-
 +
| <samp>DROP_QI_BEANS</samp>
 +
| The player can find [[Qi Beans]] for the ''Qi's Crop'' order.
 +
|-
 +
| <samp>LEGENDARY_FAMILY</samp>
 +
| The player can catch the new legendary fish for the ''Extended Family'' order.
 +
|-
 +
| <samp>MINE_HARD</samp><br /><samp>SC_HARD</samp>
 +
| Raises the difficulty level of the mines or [[Skull Cavern]].
 +
|-
 +
| <samp>SC_NO_FOOD</samp>
 +
| The player can't eat food in the [[Skull Cavern]].
 +
|-
 +
| <samp>QI_BEANS</samp><br /><samp>QI_COOKING</samp><br /><samp>QI_DOUBLE</samp>
 +
| TODO: document what these do.
 +
|}
 +
 +
Special orders can also have arbitrary rule IDs, which can be checked using [[Modding:Game state queries|game state queries]] (via <samp>PLAYER_SPECIAL_ORDER_RULE_ACTIVE</samp>) or in C# (via <code>Game1.player.team.SpecialOrderRuleActive</code>).
    
==See also==
 
==See also==
5

edits

Navigation menu