PDA

View Full Version : Need help filtering or excluding table data



dellanx
February 22nd, 2021, 10:20
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.

44124

Splitting the tables works, but the sort does not filter out unlisted NPCs.


<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>

dellanx
February 23rd, 2021, 02:16
The question is, how do I handle empty string:


<alibastercharacter type="string"></alibastercharacter>


That relates to:



<groups>
<group2>
<field type="string">nayoscharacter</field>
</group2>
</groups>
<grouporder type="string">01|02|03</grouporder>



Because I don't won't this NPC to show up.

Thanks

Trenloe
February 23rd, 2021, 22:35
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:


<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>

And the npclists.npc-by-type data is a big long list of each creature:


<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>
...
...

dellanx
February 24th, 2021, 01:00
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.

I see, thank you.

dellanx
February 25th, 2021, 00:28
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.

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.

44244



<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>




</npc0>
.
.
</npc0>
<npc1>
.
.
</npc1>




<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>

dellanx
April 14th, 2021, 12:48
Morning,

Getting closer to completion. This will be a large module over 250+ NPC types in multiple districts in Magnimar. Almost all the NPCs are in. I discovered that I may have forgotten about Grump and Wald and perhaps one or two of the Sandpoint NPCs mentioned early on during the second module of the ROTRL AP. After I finish making all my tokens and re-link them and QC each module I will add those NPCs.

Then coding and removal of the token images from the module, which will be replaced by blanks. This module may be useful in ROTRL or Shattered Star APs.

As I dive into ROTRL 3 module I may have to make a small Village of NPCs from that is mentioned in that module.