PDA

View Full Version : Item Sorting in the default referenceindex of corerpg



meathome
February 18th, 2014, 05:04
I am using the standard reference index for some items. For some reason the the list is sorted in a strange way

The order I get is:
Appraise
Arcane Scholar
Arcane Assassin
Arcane Engineer
Arcane Defenses

etc. This is definitely not an alphabetical order. Whats the logic behind the sorting? I think I will simply rewrite it, but I would like to know why it sorts this way: :)
Thanks!

valeros
February 18th, 2014, 06:16
My experience has been that it sorts by the XML Tag, not by the contents of the entry.That is:
<Tag2>Content 3</Tag2>
<Tag3>Content 1</Tag3>
<Tag1>Content 2</Tag1>

Will sort as:
Content 2
Content 3
Content 1

Nickademus
February 18th, 2014, 06:34
Valeros is right. The base <library> nodes will sort by <name> but all other lists will sort by tag.

As an example, I use this to sort my armors by AC bonus for the equipment list by using tag like the following:

<ac1padded>
<ac2leather>
<ac3studdedleatherarmor>
<ac4chainshirt>
and so on.

It ensures the armors appear in the order I want them to.

meathome
February 18th, 2014, 06:55
Good to know, very nice thank you!

Moon Wizard
February 18th, 2014, 19:34
Currently, the right hand side of the Library sorts by the "name" field in all CoreRPG derived rulesets, except for Castles and Crusades. This has been one of the unexpected minor conflicts in merging all the ruleset code.

The sorting of the reference windows linked from the library are sorted by the internal database node name.

Regards,
JPG