dcx:ids_and_slots
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| dcx:ids_and_slots [2015/11/13 10:38] – vic | dcx:ids_and_slots [2026/11/29 13:20] (current) – removed - external edit (Unknown date) 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====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, | ||
| - | |||
| - | Slot 1, Kalmukians, id# 11, library russian_historicals, | ||
| - | |||
| - | Slot 2, Chechens, id# 2, library russian_historicals, | ||
| - | |||
| - | Slot 3, Texans, id#3, library usa_historicals, | ||
| - | |||
| - | |||
| - | if you would then delete the Kalmukians the result would be this: | ||
| - | |||
| - | Slot 0, Abkazians, id# 6, library russian_historicals, | ||
| - | |||
| - | Slot 0, Chechens, id# 2, library russian_historicals, | ||
| - | |||
| - | Slot 1, Texans, id#3, library usa_historicals, | ||
| - | |||
| - | ===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 them they' | ||
| - | |||
| - | 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.1447411085.txt.gz · Last modified: (external edit)
