set_timer_t0 - ryzom/ryzomcore GitHub Wiki


title: Set Timer T0-3 description: published: true date: 2023-03-12T01:43:29.066Z tags: editor: markdown dateCreated: 2023-03-11T23:54:14.348Z

set_timer_t0

The set_timer_t0 to set_timer_t3 actions set up a timer for the NPC group that can be configured with various options, including duration, Ryzom daytime, day of the week, month, year, and season.

Timer duration is specified in game ticks, which occur 10 times per second.

For more information on Ryzom time and year day numbers, see https://www.nevrax.net/wiki/index.php/Main/HeuresJoursMoisSaisonsAnnees. (Internal Nevrax wiki was lost by Winch Gate not even making backups of the only hard drives containing the production data.)

A timer that has been set triggers a timer_t0_triggered to timer_t3_triggered event only once, after which it needs to be set again.

Parameter Syntax

<timer min>
[<time max>]
daytime <hour>[:<minute>]
week_day <week_day> <hour>[:<minute>]
month_day <month_day> <hour>[:<minute>]
season_day <season_day> <hour>[:<minute>]
year_day <day_number> <hour>[:<minute>]

Parameters

  • <timer min>: The minimum duration of the timer in game ticks.
  • [<time max>]: (Optional) The maximum duration of the timer in game ticks. If specified, the actual duration of the timer will be randomly selected between timer_min and time_max. Otherwise, the timer will only last for the minimum time.
  • <hour>[:<minute>]: The time of day in Ryzom time, specified as an hour and optional minute. If the time is after 23:59, the timer will be set for the next day (e.g. 36h25 means 12h25 the next day).
  • <week_day>: The day of the week in Ryzom time, specified as a day number (0-6). If the week day is after 6, the timer will be set for the next week (e.g. 8 means the 2nd day of the next week).
  • <month_day>: The day of the month in Ryzom time, specified as a day number (0-29). If the month day is after 29, the timer will be set for the next month (e.g. 38 means the 8th day of the next month).
  • <season_day>: The day of the season in Ryzom time, specified as a day number (0-89). If the season day is after 89, the timer will be set for the next season (e.g. 98 means the 8th day of the next season).
  • <year_day>: The day of the year in Ryzom time, specified as a day number (0-359). If the year day is after 359, the timer will be set for the next year (e.g. 400 means the 40th day of the next season).

Events Triggered

Timer Event
set_timer_t0 timer_t0_triggered
set_timer_t1 timer_t1_triggered
set_timer_t2 timer_t2_triggered
set_timer_t3 timer_t3_triggered

See also

  • Set Punctual State Timeout: A timer that triggers the punctual_state_timeout event unless the punctual state is ended or changed before the timer elapses.
  • Set State Timeout: Sets up a timer that triggers the state_timeout event unless the state is changed before the timer elapses.
  • Trigger Event 0-9: Triggers an event handler for one or more specified other NPC groups. These events are user_event_0 through user_event_9.
⚠️ **GitHub.com Fallback** ⚠️