Thread: NPC autoparsing from spells
-
March 29th, 2018, 19:56 #1
NPC autoparsing from spells
Hi guys!
As I'm working on Incarnate-Battles and getting it ready for release.
Where I am stuck right now, is that things like spellcasting npcs can pull from spells in my campaign data located at <root><spell><spellname> but when I export to a module that it no longer works.
Any ideas?
PS. by spell name I mean all lowercase no special sign names like:
acidarrow
enlargereduce
etc.
-
March 29th, 2018, 21:21 #2
When you say it no longer works what do you mean? Do you mean that the spells don't populate on the NPC? As far as I am aware spells will get pulled from whatever module is open but there may also be a hierarchy in that it takes them from the PHB first, then SRD, then anything else. I'm not sure on that point. At any rate if the NPC stat block is correctly worded then the spells should be found in whatever source you have open.
If there is something that you would like to see in Fantasy Grounds that isn't currently part of the software or if there is something you think would improve a ruleset then add your idea here https://www.fantasygrounds.com/featu...rerequests.php
-
March 29th, 2018, 21:28 #3
Perhaps he is packaging the adventure as a separate module which when the user opens it without the “campaign” open it can no longer find the spell?
Sounds like you need to copy the spells to the adventure mod or create a campaign spell mod?
-
March 29th, 2018, 21:42 #4
No it should find the spells whatever way you do it since the NPC stat block uses anonymous linking (sort of). As long as the trait in the NPC stat block is correctly worded FG should find the spells. I'm assuming he is using standard spells given the examples he gave above. If not then the names of the spells in the stat block would have to be the same as the spells that are in the module.
If there is something that you would like to see in Fantasy Grounds that isn't currently part of the software or if there is something you think would improve a ruleset then add your idea here https://www.fantasygrounds.com/featu...rerequests.php
-
March 29th, 2018, 21:52 #5
The NPC spell code looks for reference.spelldata." .. sSanitized .. "@*" wildcard module database search.
sSanitized is converted from the spell name as follows (from the comments in the 5E manager_campaigndata2.lua file):
Then convert spell name using algorithm used by Par5E to create valid XML tags for spells. (Remove all whitespace, converts to lowercase and replaces punctuation with _ char)
If spells are created in a FG campaign through the interface then exported they do not have XML tags with the sanitized spell name, it will be id-000001 etc.. So just exporting spells from a campaign won't work. Each spell XML tag at the reference.spelldata. level needs to be edited to be what FG is expecting - the sanitized spell name, not id-XXXXX.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 29th, 2018, 23:01 #6
Thank you Trenloe! I had already "sanitized" the spell names (hence why it worked in the campaign). thank you so much for the reference.spelldata, I am pretty sure that the spelldata instead of my spell was the problem. In a game will check it once we are done.
-
March 29th, 2018, 23:29 #7
And I managed to get Enlarge/Reduce to parse correctly as enlargereduce so I think it allows for punctuation to be omitted, but I will take _ under advisement in case it proves to be wrong.
-
June 9th, 2018, 01:01 #8Private 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!
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks