• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Weapon Sorting - By Tag Value or Name?

Duggan

Well-known member
I've set my weapons to sort by Type, then Class, then Name:
Code:
<sortset
    id="Weapon"
    name="Weapon By Type and Class and Name">
    <sortkey isfield="no" id="WeaponType"/>
    <sortkey isfield="no" id="WeapClass"/>
    <sortkey isfield="no" id="_Name_"/>
    </sortset>

The Type and Class are defined as follows:
Code:
<group
    id="WeaponType">
    <value id="rngPistol" name="Pistol" order="5"/>
    <value id="rngScatter" name="Scattergun" order="10"/>
    <value id="rngCarbine" name="Carbine" order="15"/>
    <value id="rngLongGun" name="Long Gun" order="20"/>
    <value id="rngHvyWeap" name="Heavy Weapon" order="25"/>
    <value id="rngStaWeap" name="Stationary Weapon"/>
    <value id="MelCommon" name="Common Melee" order="30"/>
    <value id="MelExotic" name="Exotic Melee" order="35"/>
    <value id="MelUnarmed" name="Unarmed / Natural"/>
    </group>

<group
    id="WeapClass">
    <value id="Beam" name="Beam" order="5"/>
    <value id="NonLethal" name="Non-Lethal" order="10"/>
    <value id="Projectile" name="Projectile" order="15"/>
    </group>

I've set up the Choose table for ranged weapons to use the Weapon sort.
Code:
<portal
    id="arRange"
    style="tblNormal">
    <table_dynamic
      component="Gear"
      showtemplate="arWpnPick"
      choosetemplate="arWpnThing"
      buytemplate="BuyCash"
      selltemplate="SellCash"
      choosesortset="Weapon">
      <list>component.WeapRange</list>
      <candidate inheritlist="yes">!Equipment.Natural</candidate>
      <titlebar><![CDATA[
        @text = "Select Ranged Weapons to Purchase from the List Below"
        ]]></titlebar>
      <headertitle><![CDATA[
        @text = "Ranged Weapons"
        ]]></headertitle>
      <additem><![CDATA[
        @text = "Add New Ranged Weapons"
        ]]></additem>
      </table_dynamic>
    </portal>

When I go to purchase a ranged item, it is sorting them by weapon type, and then class, and then name, but it's doing so alphabetically (Carbines, then Heavy Weapons, then Long Guns, and so on) rather than using tag order (on a side note, I don't know why "_name_" gets "isfield="no"", but that seems to be the standard). What am I missing here?
 
Back
Top