Persistent Data

Data and Tempdata values for data persistence (even over reboot!)

Mobs, rooms, and zones now have options for both permanent and temporary/ephemeral storage of numerical data!

Zones:

At a zone level, you can have 5 data values, accessed via ANY room object in the game. This data persists over reboot.

local myroom = getroom("myzone-0")
myroom.zone.data1 = 25
myroom.zone.data2 = 50

Rooms:

Each room can have 5 data values. This data persists over reboot.

local myroom = getroom("myzone-0")
myroom.data1 = 100000
myroom.data2 = 0

Mobs:

Mobs have two types of values that are quite different from each other.

  • Each mob KEY has 5 'data' values that persist over reboot. It is important to note that if you have 5 of the same mob, they share the same data value!
  • Each mob INSTANCE (while alive) has 5 'tempdata' values that are good only until the mob dies/is purged, or the MUD reboots.
local mymob = getmob("myzone-0")
myrmob.data1 = 100 -- Saved over reboot, available on all instances of myzone-0 mob.
myroom.tempdata1 = 50 -- Only around for this instance of the mob.