arx-insanity / ArxLibertatis

Cross-platform port of Arx Fatalis, a first-person role-playing game
https://arx-libertatis.org/
GNU General Public License v3.0
3 stars 0 forks source link

add system variables to get the real life year, month and day as numbers #14

Closed meszaros-lajos-gyorgy closed 1 year ago

meszaros-lajos-gyorgy commented 1 year ago

Adds the following 3 system variables to the game:

^realtime_year - the current year in real life ^realtime_month - the current month in real life ^realtime_day - the current day in real life

The idea: replace apples with pumpkins and apple pies with pumpkin pies on halloween or adding any other holiday events based on date values.

// provisions/food_apple/food_apple.asl

ON INIT {
  // ...
  IF (^#realtime_month == 10) {
    IF (^#realtime_day == 31) {
      SETNAME "pumpkin"
      SETSCALE 300
      TWEAK SKIN "item_fruits" "item_pumpkin"
    }
  }
  ACCEPT
}

solves #13