-
February 22nd, 2021, 11:20 #1
Need help filtering or excluding table data
Morning,
I am trying to create multiple tables to sort NPCs in by location. Lets say Location A in Table A: 01, 02..etc. Location B in Table B: 01, 02, 03, etc.
Untitled.jpg
Splitting the tables works, but the sort does not filter out unlisted NPCs.
Code:<lists static="true"> <npcs_byalibasterlocation > <recordtype type="string">npc</recordtype> <source type="string">npc</source> <columns> <column1> <name type="string">name</name> <width type="number">200</width> </column1> </columns> <groups> <group1> <field type="string">alibastercharacter</field> </group1> </groups> <grouporder type="string">01|02</grouporder> <notes type="formattedtext"> <p><b>*</b> These NPCs and their companions are to augment 'The Rise of the Runelords Adventure Path Module 1 - Burnt Offerings' and may be used for the entire campaign as deemed by the GM.</p> </notes> </npcs_byalibasterlocation > <npcs_bynayoslocation > <recordtype type="string">npc</recordtype> <source type="string">npc</source> <columns> <column1> <name type="string">name</name> <width type="number">200</width> </column1> </columns> <groups> <group2> <field type="string">nayoscharacter</field> </group2> </groups> <grouporder type="string">01|02|03</grouporder> <notes type="formattedtext"> <p><b>*</b> These NPCs and their companions are to augment 'The Rise of the Runelords Adventure Path Module 1 - Burnt Offerings' and may be used for the entire campaign as deemed by the GM.</p> </notes> </npcs_bynayoslocation > </lists>
-
February 23rd, 2021, 03:16 #2
The question is, how do I handle empty string:
<alibastercharacter type="string"></alibastercharacter>
<groups>
<group2>
<field type="string">nayoscharacter</field>
</group2>
</groups>
<grouporder type="string">01|02|03</grouporder>
Thanks
-
February 23rd, 2021, 23:35 #3
You can't do that using the grouped list fields - not without writing an extension to create a custom grouped list that has a custom filter to not display NPC records with blank fields.
The best you can do is hard code all of the creatures in the list. This is how it's done in the PF Bestiary 1.
For example, the "Monsters by Type" are setup as:
Code:<npcs-by-type> <listlink type="windowreference"> <class>reference_colindex</class> <recordname>npclists.npc-by-type</recordname> </listlink> <name type="string">Monsters by Type</name> </npcs-by-type>
Code:<npc-by-type> <description type="string">Monsters by Type</description> <groups> <typeaberration> <description type="string">Aberration</description> <index> <aboleth> <link type="windowreference"> <class>npc</class> <recordname>reference.npcdata.aboleth</recordname> </link> <name type="string">Aboleth</name> </aboleth> <choker> <link type="windowreference"> <class>npc</class> <recordname>reference.npcdata.choker</recordname> </link> <name type="string">Choker</name> </choker> <chuul> <link type="windowreference"> <class>npc</class> <recordname>reference.npcdata.chuul</recordname> </link> <name type="string">Chuul</name> </chuul> ... ...
FG Con 16 – FG Online RPG Convention - Friday April 16th – Sunday 18th, 2021.
FG Con 17: October 15th – 17th, 2021.
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!
-
February 24th, 2021, 02:00 #4
-
February 25th, 2021, 01:28 #5
I was able to solve it. Looking at the the PF Bestiary 1 module gave me a clue. The problem was that both Table were sharing the same Source npc. When I changed the source to npc0 and npc1 that fixed it.
Fixed.jpg
Code:<library> <rtesttest static="true"> <categoryname type="string"></categoryname> <name type="string">rtesttest</name> <entries> <npc0> <librarylink type="windowreference"> <class>reference_groupedlist</class> <recordname>lists.npcs_byalibasterlocation</recordname> </librarylink> <name type="string">NPCs by Alibaster District Location</name> <recordtype type="string">npc</recordtype> </npc0> <npc1> <librarylink type="windowreference"> <class>reference_groupedlist</class> <recordname>lists.npcs_bynayoslocation</recordname> </librarylink> <name type="string">NPCs by Nayos District Location</name> <recordtype type="string">npc</recordtype> </npc1> </entries> </rtesttest> </library>
Code:</npc0> . . </npc0> <npc1> . . </npc1>
Code:<lists static="true"> <npcs_byalibasterlocation > <recordtype type="string">npc</recordtype> <source type="string">npc0</source> <columns> <column1> <name type="string">name</name> <width type="number">200</width> </column1> </columns> <groups> <group1> <field type="string">alibastercharacter</field> </group1> </groups> <grouporder type="string">01|02</grouporder> <notes type="formattedtext"> <p><b>*</b> These NPCs and their companions are to augment 'The Rise of the Runelords Adventure Path Module 2 - Magnimar - Alibaster District and may be used for the entire campaign as deemed by the GM.</p> </notes> </npcs_byalibasterlocation > <npcs_bynayoslocation > <recordtype type="string">npc</recordtype> <source type="string">npc1</source> <columns> <column1> <name type="string">name</name> <width type="number">200</width> </column1> </columns> <groups> <group2> <field type="string">nayoscharacter</field> </group2> </groups> <grouporder type="string">01|02|03</grouporder> <notes type="formattedtext"> <p><b>*</b> These NPCs and their companions are to augment 'The Rise of the Runelords Adventure Path Module 2 - Magnimar - Nayos District and may be used for the entire campaign as deemed by the GM.</p> </notes> </npcs_bynayoslocation > </lists>
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks