Talk:AddForm - FormList

From the CreationKit Wiki
Jump to navigation Jump to search

Stable Ordering[edit source]

Has it ever been determined conclusively whether FormLists have stable ordering or not? There are two conflicting notes on this page about the ordering of FormList elements.

My understanding is that a FormList is actually two lists internally, the first being the base items (added in Creation Kit) which can never be removed, and should always appear first, in the order as given in the CK FormList editor. The second list contains the added forms, which are added by script while the game is running, and can be freely added to, removed from and reverted.

As far as I've been able to find, the exact internal workings of a FormList are still unknown, so we don't know for sure if base and added items are stored as arrays, or linked lists or similar.

In my own tests I can't replicate the instability mentioned in some of the notes; items seem to be added in the order that I expect, and I'd really like to take advantage of that behaviour if I can. However, if there is proven instability then I will need to find another way to handle things like queues of items to be processed, and parallel structures based around FormLists (e.g- use one list as an index to lookup items in a second).

So, does anyone know for sure if FormList ordering is actually stable or not? -- Haravikk (talk) 2020-02-24T07:10:16 (EST)