ID#s and slots

This is only of concern if you are scripting and writing your own events.

Almost all dataTypes have ID#s and Slot#s. The slot# is the number it has in the list of similar instances of the same dataType. The first instance of a data type is always slot#0. the next slot#1. etc…

If you delete a data instance it means the slot# of all items below it in the list will change.

The Id# is a unique never changing identifier.

It is important to understand the difference, since different Checks and Execs use either slot# or id#. This can be confusing. So pay attention please.

To make it even more complicated most dataTypes also have Library ID#s. But these you only need to reference for a select subset of Checks. A library ID# is present for any data instance that was imported from a library and points to the mirroring ID# of the data instance in the library.

Example 1

For example the people list might look like this:

Slot 0, Abkazians, id# 6, library russian_historicals, library id#1

Slot 1, Kalmukians, id# 11, library russian_historicals, library id#2

Slot 2, Chechens, id# 2, library russian_historicals, library id#3

Slot 3, Texans, id#3, library usa_historicals, library id#1

if you would then delete the Kalmukians the result would be this:

Slot 0, Abkazians, id# 6, library russian_historicals, library id#1

Slot 0, Chechens, id# 2, library russian_historicals, library id#3

Slot 1, Texans, id#3, library usa_historicals, library id#1

Auto updates

Keep in mind that if you use libvars and stringlists and set the appropriate dataType (for example people, sftype) and make any changes to the order of these peoples and sftypes the libvars and stringlists will keep referring to the correct data instances.

Setting the dataType in libvars and stringlists prevents errors and is superior to just using a numeric to set a slot# for example.

 
dcx/ids_and_slots.txt · Last modified: 2016/02/26 18:51 (external edit)
 
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki