View Full Version : CoreRPG descending list sorts

March 11th, 2014, 23:37
Is it possible to do a descending sort in a list in the new structure?
I want to be able to sort the skills by skill level (highest first) and then by name.

<template name="list_charskill">
<columns width="230" filldown="true"/>
<control>bonus</control> <!-- Descending -->
<control>label</control> <!-- Ascending -->
<script file="campaign/scripts/char_skilllist.lua"/>

Moon Wizard
March 12th, 2014, 01:08
There's a desc attribute that can be used with sortby tag. Not sure of exact usage, since I am away from machine. You can check in CoreRPG or 3.5E rulesets for example. If that doesn't work, you can fall back to onSortCompare event for windowlists.


March 12th, 2014, 01:37
Based off record_char_main.xml in the 3.5E ruleset you could use:

<control desc="true">bonus</control>

March 12th, 2014, 07:35
Thank you both. I was searching through the 3.5e ruleset files but didn't see that one. Glad the new syntax has the option. I'll have to give it a go tonight.