Lone Wolf Development Forums

Lone Wolf Development Forums (http://forums.wolflair.com/index.php)
-   HL - Authoring Kit (http://forums.wolflair.com/forumdisplay.php?f=58)
-   -   Weapon Sorting - By Tag Value or Name? (http://forums.wolflair.com/showthread.php?t=59918)

Duggan January 10th, 2018 06:03 PM

Weapon Sorting - By Tag Value or Name?
 
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?

Mathias January 10th, 2018 07:48 PM

In the definition of the WeaponType and WeapClass groups, you have not set sequence="explicit", so it's going with the default sequence="", which is "ascii" (alphabetical).

http://hlkitwiki.wolflair.com/index....Element_(Data)

Duggan January 10th, 2018 08:21 PM

Thank you. That indeed did the trick.


All times are GMT -8. The time now is 07:19 PM.

Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.