Thread: CoreRPG descending list sorts
-
March 11th, 2014, 23:37 #1
CoreRPG descending list sorts
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.
Code:<template name="list_charskill"> <list_text> <datasource>.skilllist</datasource> <class>char_skill</class> <columns width="230" filldown="true"/> <sortby> <control>bonus</control> <!-- Descending --> <control>label</control> <!-- Ascending --> </sortby> <newfocus>label</newfocus> <script file="campaign/scripts/char_skilllist.lua"/> </list_text> </template>
Using Ultimate license - that means anyone can play.
Valarian's Fantasy Grounds Rulesets
-
March 12th, 2014, 01:08 #2
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 20,426
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.
Cheers,
JPG
-
March 12th, 2014, 01:37 #3
Based off record_char_main.xml in the 3.5E ruleset you could use:
Code:<sortby> <control desc="true">bonus</control> <control>label</control> </sortby>
Last edited by Trenloe; March 12th, 2014 at 15:29.
Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!
-
March 12th, 2014, 07:35 #4
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.
Using Ultimate license - that means anyone can play.
Valarian's Fantasy Grounds Rulesets
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks