\where do you need LastChild?\
For an example, if I have just created a new object inside a list (Party.Add (TCreature.Init)) and want to do something with it, that goes beyond the scope of default creature initialization\set up.
\Return Random child also suffers from the above -- also it's a equally weighted pick, which in most cases is useless\
Example use: I have a list of unassigned Warlords; when a new army emerges, random Warlord gets chosen from the list. Or display randomly chosen rumour from a pack.
\DestroyAllChildren -- what would you need that for?\
Example use: Global Loot list, which is filled with dead creature's posessions, called by Looter, who takes whatever he wants from it, then purged; there's no reason to FreeAndNil and then re-Create it, as it's used all the time.
\remember that you can just inherit TNode, and extend it with all the functionality listed above WITHOUT touching TNode :)\
...even though I use inheritance heavily, that one somehow missed me. My bad.
Lots of overrides would be needed to include working ChildCount, though, so that one would preferably be included anyway.
\Curiosity -- why do you use the number of nodes so often?\
It's very convenient. This way I need not to manually monitor how many Heroes are in party (for them not to exceed Leadership-allowed limit), how many items in a pack etc.
\\\
\...Is definitively not the way to go.\
Hey, I'm not THAT pathetic! I use "official and optimized" way for iterations; ExactChild has some other uses, like returning requested Event from a EventList (which has constant position, as only new events are added with time). And it's faster than manual
repeat
...
until Node.ID=RequestedID
since no checks are performed. Of course using arrays is a fine method just as well, but it requires additional coding...
It is not used frequently and I can get rid of it completely if necessary; mostly it's called from ReturnRandomChild, which is used more commonly; thus those two can be merged.
I'll check TArrayNode and TWeightedList; never tried those.
p. s. Why are you using conversion between pointers and ordinals in vini.pas so widely? It doesn't compile under Linux.