-
December 11th, 2020, 18:00 #1
Adding custom feat metadata to filters
I'm trying to figure out what the logic is for populating the four filter drop-down controls in the Feats window with custom archetypes and traits. I'm creating a module that will contain new custom feats that have new archetypes and traits, and I would like the players to be able to filter on the archetypes and traits in those new feats. Just creating the feats and then exporting the feats doesn't seem to do the trick by itself.
-
December 11th, 2020, 18:18 #2
From the data_library_pfrpg2.lua feats record setup:
Code:aCustomFilters = { ["Trait"] = { sField = "traits", fGetValue = getFeatTraitValue }, ["Class Level"] = { sField = "level", sType = "number", fGetValue = getFeatLevelValue }, ["Feat Level"] = { sField = "level", sType = "number" }, ["Archetype"] = { sField = "archetype", sType = "string" },
"Trait" uses custom code to setup the trait filters - these are set in GameSystem.traitTypeFilter and also have the names of ancestry and class records added at the start of the campaign or when a module is opened/closed. Basically, any custom ancestries or classes manually added won't be in the filter until a campaign restart or a module is loaded (which triggers the trait filter refresh code).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!
-
December 11th, 2020, 18:27 #3
So here's what the start of my feats section looks like in my module's client.xml after exporting:
Code:<feat> <category name="Zeitgeist Player's Guide" baseicon="0" decalicon="0"> <id-00001> <effectsbenefits type="formattedtext"> <p>You gain negative resistance equal to half your level (minimum 1) and you gain a +1 circumstance bonus to saves against death, fear and negative effects.</p> </effectsbenefits> <level type="number">1</level> <level_applied type="number">0</level_applied> <locked type="number">0</locked> <name type="string">Deathless Calm</name> <shortbenefits type="string">Negative resistance and bonus to saves</shortbenefits> <special type="formattedtext"> <p></p> </special> <traits type="string">DEVA</traits> </id-00001>
-
December 11th, 2020, 18:32 #4
Does my module need to actually modify GameSystem.traitTypeFilter? I didn't think modules could execute scripts.
-
December 11th, 2020, 18:36 #5
More info, in this case Deva is a heritage only, it is not an ancestry. So there isn't a corresponding entry under <race> or <reference.races>. That's probably the issue? Let me try creating a new race and see if that fixes things.
-
December 11th, 2020, 18:38 #6
The ruleset is specifically coded *not* to display every single possible trait in the trait filter, this would take forever and no one would use it because the list would be too long.
Last edited by Trenloe; December 11th, 2020 at 18:46.
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!
-
December 11th, 2020, 18:46 #7Private 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!
-
December 11th, 2020, 18:54 #8
It is a versatile heritage which probably doesn't merit an extension for just that little bit of functionality.
Filling in the archetype field for all the archetype feats was what was missing there, so problems (mostly) solved. Thanks.
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks