Line 23: |
Line 23: |
| * 'NPC name' means their internal English name, not the translatable display name. | | * 'NPC name' means their internal English name, not the translatable display name. |
| * Most text is case-sensitive (e.g. <tt>Mon</tt> is not the same as <tt>mon</tt>). | | * Most text is case-sensitive (e.g. <tt>Mon</tt> is not the same as <tt>mon</tt>). |
− | * The 'char code' column is for convenience when looking at the decompiled code in <tt>GameLocation::checkEventPrecondition</tt>. | + | * The game's logic for these codes is in <tt>GameLocation::checkEventPrecondition</tt>. |
| | | |
| ===Context=== | | ===Context=== |
Line 30: |
Line 30: |
| {| class="wikitable" | | {| class="wikitable" |
| |- | | |- |
− | ! char code
| |
| ! syntax | | ! syntax |
| ! precondition | | ! precondition |
| |- | | |- |
− | | 65
| |
| | <tt>A {{t|dialogue ID}}</tt> | | | <tt>A {{t|dialogue ID}}</tt> |
| | {{upcoming|1.3 beta|The special dialogue event with the given ID is ''not'' in progress. This can be a custom event ID, but these are the in-game IDs: <tt>cc_Boulder</tt>, <tt>cc_Bridge</tt>, <tt>cc_Bus</tt>, <tt>cc_Greenhouse</tt>, <tt>cc_Minecart</tt>, <tt>dumped_Girls</tt>, <tt>dumped_Guys</tt>, <tt>Introduction</tt>, <tt>joja_Begin</tt>, <tt>pamHouseUpgrade</tt>, <tt>pamHouseUpgradeAnonymous</tt>, <tt>secondChance_Girls</tt>, <tt>secondChance_Guys</tt>, <tt>willyCrabs</tt>.}} | | | {{upcoming|1.3 beta|The special dialogue event with the given ID is ''not'' in progress. This can be a custom event ID, but these are the in-game IDs: <tt>cc_Boulder</tt>, <tt>cc_Bridge</tt>, <tt>cc_Bus</tt>, <tt>cc_Greenhouse</tt>, <tt>cc_Minecart</tt>, <tt>dumped_Girls</tt>, <tt>dumped_Guys</tt>, <tt>Introduction</tt>, <tt>joja_Begin</tt>, <tt>pamHouseUpgrade</tt>, <tt>pamHouseUpgradeAnonymous</tt>, <tt>secondChance_Girls</tt>, <tt>secondChance_Guys</tt>, <tt>willyCrabs</tt>.}} |
| |- | | |- |
− | | 70
| |
| | <tt>F</tt> | | | <tt>F</tt> |
| | Today is ''not'' a festival day. | | | Today is ''not'' a festival day. |
| |- | | |- |
− | | 100
| |
| | <tt>d {{t|day of week}}</tt> | | | <tt>d {{t|day of week}}</tt> |
| | Today is ''not'' one of the specified days (may specify multiple days). Valid values: Mon, Tue, Wed, Thu, Fri, Sat, Sun. | | | Today is ''not'' one of the specified days (may specify multiple days). Valid values: Mon, Tue, Wed, Thu, Fri, Sat, Sun. |
| |- | | |- |
− | | 114
| |
| | <tt>r {{t|number}}</tt> | | | <tt>r {{t|number}}</tt> |
| | A random probability check, where {{t|number}} is the probability between 0 and 1 (e.g. 0.2 for 20% chance). | | | A random probability check, where {{t|number}} is the probability between 0 and 1 (e.g. 0.2 for 20% chance). |
| |- | | |- |
− | | 118
| |
| | <tt>v {{t|name}}</tt> | | | <tt>v {{t|name}}</tt> |
| | The specified NPC is not invisible (regardless of whether they're on-screen). | | | The specified NPC is not invisible (regardless of whether they're on-screen). |
| |- | | |- |
− | | 119
| |
| | <tt>w {{t|weather}}</tt> | | | <tt>w {{t|weather}}</tt> |
| | Current weather matches {{t|weather}}. Valid values: rainy, sunny. | | | Current weather matches {{t|weather}}. Valid values: rainy, sunny. |
| |- | | |- |
− | | 121
| |
| | <tt>y {{t|year}}</tt> | | | <tt>y {{t|year}}</tt> |
| | If {{t|year}} is 1, must be in the first year. Otherwise, year must be at least this value. | | | If {{t|year}} is 1, must be in the first year. Otherwise, year must be at least this value. |
| |- | | |- |
− | | 122
| |
| | <tt>z {{t|season}}</tt> | | | <tt>z {{t|season}}</tt> |
| | Current season is ''not'' {{t|season}}. | | | Current season is ''not'' {{t|season}}. |
Line 72: |
Line 63: |
| {| class="wikitable" | | {| class="wikitable" |
| |- | | |- |
− | ! char code
| |
| ! syntax | | ! syntax |
| ! precondition | | ! precondition |
| |- | | |- |
− | | 68
| |
| | <tt>D {{t|name}}</tt> | | | <tt>D {{t|name}}</tt> |
| | Current player is dating the given NPC name. | | | Current player is dating the given NPC name. |
| |- | | |- |
− | | 74
| |
| | <tt>J</tt> | | | <tt>J</tt> |
| | Current player has finished the [[Joja Warehouse]]. | | | Current player has finished the [[Joja Warehouse]]. |
| |- | | |- |
− | | 77
| |
| | <tt>M {{t|number}}</tt> | | | <tt>M {{t|number}}</tt> |
| | Current player has at least this much money. | | | Current player has at least this much money. |
| |- | | |- |
− | | 83
| |
| | <tt>S {{t|secret note ID}}</tt> | | | <tt>S {{t|secret note ID}}</tt> |
| | {{upcoming|1.3 beta|Current player has seen the [[Secret Notes|Secret Note]] with the given ID.}} | | | {{upcoming|1.3 beta|Current player has seen the [[Secret Notes|Secret Note]] with the given ID.}} |
| |- | | |- |
− | | 97
| |
| | <tt>a {{t|x}} {{t|y}}</tt> | | | <tt>a {{t|x}} {{t|y}}</tt> |
| | Current player is on that tile position. | | | Current player is on that tile position. |
| |- | | |- |
− | | 98
| |
| | <tt>b {{t|number}}</tt> | | | <tt>b {{t|number}}</tt> |
| | Current player has reached the bottom floor of the [[Mines]] at least that many times. | | | Current player has reached the bottom floor of the [[Mines]] at least that many times. |
| |- | | |- |
− | | 99
| |
| | <tt>c {{t|number}}</tt> | | | <tt>c {{t|number}}</tt> |
| | Current player has at least that many free inventory slots. | | | Current player has at least that many free inventory slots. |
| |- | | |- |
− | | 101
| |
| | <tt>e {{t|event ID}}</tt> | | | <tt>e {{t|event ID}}</tt> |
| | Current player has seen the specified event (may contain multiple event IDs). | | | Current player has seen the specified event (may contain multiple event IDs). |
| |- | | |- |
− | | 102
| |
| | <tt>f {{t|name}} {{t|number}}</tt> | | | <tt>f {{t|name}} {{t|number}}</tt> |
| | Current player has at least {{t|number}} [[friendship|friendship points]] with the {{t|name}} NPC. Can specify multiple name and number pairs, in which case the player must meet all of them. | | | Current player has at least {{t|number}} [[friendship|friendship points]] with the {{t|name}} NPC. Can specify multiple name and number pairs, in which case the player must meet all of them. |
| |- | | |- |
− | | 103
| |
| | <tt>g {{t|gender}}</tt> | | | <tt>g {{t|gender}}</tt> |
| | Current player is ''not'' the specified gender (<tt>male</tt> or <tt>female</tt>). | | | Current player is ''not'' the specified gender (<tt>male</tt> or <tt>female</tt>). |
| |- | | |- |
− | | 104
| |
| | <tt>h {{t|pet}}</tt> | | | <tt>h {{t|pet}}</tt> |
| | Current player does not already have a pet, and their preference matches {{t|pet}} ("cat" or "dog"). | | | Current player does not already have a pet, and their preference matches {{t|pet}} ("cat" or "dog"). |
| |- | | |- |
− | | 105
| |
| | <tt>i {{t|item ID}}</tt> | | | <tt>i {{t|item ID}}</tt> |
| | Current player has specified item in their inventory. | | | Current player has specified item in their inventory. |
| |- | | |- |
− | | 106
| |
| | <tt>j {{t|number}}</tt> | | | <tt>j {{t|number}}</tt> |
| | Current player has played ''more'' than {{t|number}} days. | | | Current player has played ''more'' than {{t|number}} days. |
| |- | | |- |
− | | 107
| |
| | <tt>k {{t|event ID}}</tt> | | | <tt>k {{t|event ID}}</tt> |
| | Current player has ''not'' seen that event (may contain multiple event IDs). | | | Current player has ''not'' seen that event (may contain multiple event IDs). |
| |- | | |- |
− | | 108
| |
| | <tt>l {{t|letter ID}}</tt> | | | <tt>l {{t|letter ID}}</tt> |
| | Current player has received that mail letter. This is often overloaded as a general flag, by specifying an invalid mail letter and marking it read when an arbitrary condition is met. | | | Current player has received that mail letter. This is often overloaded as a general flag, by specifying an invalid mail letter and marking it read when an arbitrary condition is met. |
| |- | | |- |
− | | 109
| |
| | <tt>m {{t|number}}</tt> | | | <tt>m {{t|number}}</tt> |
| | Current player has earned at least this much money (regardless of how much they currently have). | | | Current player has earned at least this much money (regardless of how much they currently have). |
| |- | | |- |
− | | 110
| |
| | <tt>n {{t|letter ID}}</tt> | | | <tt>n {{t|letter ID}}</tt> |
| | Same as #108. | | | Same as #108. |
| |- | | |- |
− | | 111
| |
| | <tt>o {{t|name}}</tt> | | | <tt>o {{t|name}}</tt> |
| | Current player is ''not'' married to that NPC. | | | Current player is ''not'' married to that NPC. |
| |- | | |- |
− | | 112
| |
| | <tt>p {{t|name}}</tt> | | | <tt>p {{t|name}}</tt> |
| | Specified NPC is in the current player's location. | | | Specified NPC is in the current player's location. |
| |- | | |- |
− | | 113
| |
| | <tt>q {{t|dialogue ID}}</tt> | | | <tt>q {{t|dialogue ID}}</tt> |
| | Current player has chosen the given answer in a dialogue. May contain multiple dialogue IDs, in which case they must all have been selected. | | | Current player has chosen the given answer in a dialogue. May contain multiple dialogue IDs, in which case they must all have been selected. |
| |- | | |- |
− | | 115
| |
| | <tt>s {{t|item ID}} {{t|number}}</tt> | | | <tt>s {{t|item ID}} {{t|number}}</tt> |
| | Current player has shipped at least {{t|number}} of the specified item. Can specify multiple item and number pairs, in which case all of them must be met. | | | Current player has shipped at least {{t|number}} of the specified item. Can specify multiple item and number pairs, in which case all of them must be met. |
| |- | | |- |
− | | 116
| |
| | <tt>t {{t|min time}} {{t|max time}}</tt> | | | <tt>t {{t|min time}} {{t|max time}}</tt> |
| | Current time is between between the specified times. | | | Current time is between between the specified times. |
| |- | | |- |
− | | 117
| |
| | <tt>u {{t|day of month}}</tt> | | | <tt>u {{t|day of month}}</tt> |
| | Current day of month is one of the specified values (may contain multiple days). | | | Current day of month is one of the specified values (may contain multiple days). |
| |- | | |- |
− | | 120
| |
| | <tt>x {{t|event ID}} {{t|letter ID}}</tt> | | | <tt>x {{t|event ID}} {{t|letter ID}}</tt> |
| | For the current player: mark the specified ID as seen, add the specified letter to tomorrow's mail, then return false (so the event doesn't trigger). | | | For the current player: mark the specified ID as seen, add the specified letter to tomorrow's mail, then return false (so the event doesn't trigger). |
Line 178: |
Line 144: |
| {| class="wikitable" | | {| class="wikitable" |
| |- | | |- |
− | ! char code
| |
| ! syntax | | ! syntax |
| ! precondition | | ! precondition |
| |- | | |- |
− | | 67
| |
| | <tt>C</tt> | | | <tt>C</tt> |
| | Host player has not finished the [[community center]], or has not seen the grand reopening yet. | | | Host player has not finished the [[community center]], or has not seen the grand reopening yet. |
| |- | | |- |
− | | 72
| |
| | <tt>H</tt> | | | <tt>H</tt> |
| | {{upcoming|1.3 beta|Current player is the host player.}} | | | {{upcoming|1.3 beta|Current player is the host player.}} |
| |- | | |- |
− | | 72
| |
| | <tt>Hn {{t|letter ID}}</tt> | | | <tt>Hn {{t|letter ID}}</tt> |
| | {{upcoming|1.3 beta|Same as #108 (letter), but check the host player.}} | | | {{upcoming|1.3 beta|Same as #108 (letter), but check the host player.}} |
| |- | | |- |
− | | 72
| |
| | <tt>Hl {{t|letter ID}}</tt> | | | <tt>Hl {{t|letter ID}}</tt> |
| | {{upcoming|1.3 beta|Same as #108 (letter), but check the host player.}} | | | {{upcoming|1.3 beta|Same as #108 (letter), but check the host player.}} |