Changes

Jump to navigation Jump to search
→‎Game state queries: + TIME, TRUE, FALSE
Line 2,173: Line 2,173:     
====Conditions====
 
====Conditions====
; Date
+
; Date & time
 
:{| class="wikitable"
 
:{| class="wikitable"
 
|-
 
|-
Line 2,190: Line 2,190:  
| <samp>SEASON {{t|season}}</samp>
 
| <samp>SEASON {{t|season}}</samp>
 
| Check the season (one of <samp>spring</samp>, <samp>summer</samp>, <samp>fall</samp>, or <samp>winter</samp>).
 
| Check the season (one of <samp>spring</samp>, <samp>summer</samp>, <samp>fall</samp>, or <samp>winter</samp>).
 +
|-
 +
| <samp>TIME {{t|min}} {{t|max}}</samp>
 +
| Get whether the current time is between {{t|min}} and {{t|max}} inclusively, specified in [[Modding:Modder Guide/Game Fundamentals#Time format|26-hour time]]. Each value can be set to 0 or less to ignore it (''e.g.'' <samp>TIME 900 -1</samp> for 9am or later).
 
|-
 
|-
 
| <samp>YEAR</samp>
 
| <samp>YEAR</samp>
Line 2,368: Line 2,371:  
| <samp>PICKED_VALUE {{t|min}} {{t|max}} {{t|value}}</samp><br /><samp>PICKED_VALUE_CHANCE {{t|chance}}</samp><br /><samp>PICKED_VALUE_SUMMER_RAIN_CHANCE {{t|chance}}</samp>
 
| <samp>PICKED_VALUE {{t|min}} {{t|max}} {{t|value}}</samp><br /><samp>PICKED_VALUE_CHANCE {{t|chance}}</samp><br /><samp>PICKED_VALUE_SUMMER_RAIN_CHANCE {{t|chance}}</samp>
 
| '''Not recommended for mods, except in shop dialogue and weather conditions.'''<br />These are specialized to to replicate older vanilla behavior, and depend on <code>GameStateQuery.PickRandomValue(random)</code> being called first. The game only calls that method when opening a shop menu for [[#Custom shops|shop data with dialogue]] or when checking [[#Custom weather|weather conditions]].
 
| '''Not recommended for mods, except in shop dialogue and weather conditions.'''<br />These are specialized to to replicate older vanilla behavior, and depend on <code>GameStateQuery.PickRandomValue(random)</code> being called first. The game only calls that method when opening a shop menu for [[#Custom shops|shop data with dialogue]] or when checking [[#Custom weather|weather conditions]].
 +
|}
 +
 +
; Immutable
 +
:{| class="wikitable"
 +
|-
 +
! Condition
 +
! effect
 +
|-
 +
| <samp>TRUE</samp>
 +
| A condition which always matches.
 +
|-
 +
| <samp>FALSE</samp>
 +
| A condition which never matches.
 
|}
 
|}
  
translators
8,446

edits

Navigation menu