Thread: Deathwatch
View Single Post
Aaron
Senior Member
 
Join Date: Oct 2011
Posts: 6,793

Old July 10th, 2012, 02:15 PM
What you need is a sortset which organizes things according to the tags associated. For example, here is the one we use for Races.

<sortset
id="Race"
name="Race">
<sortkey id="RaceType"/>
<sortkey isfield="yes" id="rRacePoint"/>
<sortkey id="_Name_"/>
</sortset>

Things are sorted by the criteria, from top to bottom. So all things with the same RaceType tag are sorted together, and then within those groups they are sorted according to the value of the rRacePoint field, and when that is done any ties are sorted alphabetically by name.

To control the order that the racetype tag groups are listed, you set that when defining the tag group.

<group
id="RaceType"
width="7"
visible="yes"
sequence="explicit">
<value id="Normal" order="10"/>
<value id="Custom" name="Custom Built Race" order="13"/>
<value id="Feature" name="Featured Race" order="15"/>
<value id="Extra" name="Uncommon Race" order="18"/>
<value id="MonstClass" name="Monster Class" order="20"/>
<value id="NPC" name="NPC Race" order="20"/>
<value id="Animal" name="Minion" order="20"/>
<value id="Companion" name="Animal Companion" order="30"/>
<value id="Eidolon" order="35"/>
</group>

sequence="explicit" means we intend to set the order explicitly, which we do with the "order" element for each tag. So you can see those with the RaceType.Normal are listed first at 10, then Custom races at 13, and then Featured Races at 15 and so on.

Can you take it from there?
Aaron is offline   #16 Reply With Quote