Thread: NPC User Guide
-
February 17th, 2018, 22:04 #21
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 20,668
dradams,
I always like to use a concrete example of something that should work. (i.e. a creature from a core bestiary with the example text)
In this case, I found the "Demon, Vrock" in the 3.5E Bestiary module (OGL data) that has the special quality field text of
"Damage reduction 10/good, darkvision 60 ft., immunity to electricity and poison, resistance to acid 10, cold 10, and fire 10, spell resistance 17, telepathy 100 ft."
This seems to match your example.
I tested dropping this creature into the combat tracker, and it successfully parsed the special qualities (and other fields) to produce the following effect:
"DR: 10 good; IMMUNE: electricity; IMMUNE: poison; RESIST: 10 acid; RESIST: 10 cold; RESIST: 10 fire; DMGTYPE: chaotic,evil"
Regards,
JPG
-
February 18th, 2018, 04:29 #22
- Join Date
- Aug 2011
- Posts
- 18
NPC User Guide
Hi Moon Wizard,
Thanks for the post. I'm glad to see that your example worked--that is always a good reality check. However, that means that my analysis of the code is flawed somehow. Could you look and see if you could see what my error was? I can't make an exhaustive guide until I understand how the script works and I'm clearly missing something.
Also, your example seems to have lost the spell resistance?
-D
-
February 18th, 2018, 06:06 #23
- Join Date
- Jun 2013
- Location
- Isanti, MN
- Posts
- 2,922
Bit of a hint. Go to the base.xml of the ruleset you're using, and look for where "StringManager" is defined - it should point to a LUA script. This script should contain the "parseWords" function. You can then look at how it parses words. If you don't find it in the ruleset you're looking at (3.5 or Pathfinder, I assume) then you need to go look at the base.xml file in the ruleset that it's derived from (CoreRPG in many cases). You should find a line like:
Code:<script name="StringManager" file="scripts/manager_string.lua" />
Also, it's easier to dig through the code locally rather than visiting someone's github repository. Just copy the ruleset ".pak" file to a ".zip" file and unzip it.
-
February 18th, 2018, 06:24 #24
This code: https://github.com/joshuha/Fantasy-G...master/scripts
belongs to an old ruleset Foundations Core which has little relation to the CoreRPG and 3.5e/PFRG rulesets which you are documenting.
Do as Andraax suggests and unpack these rulesets and examine them.
-
February 18th, 2018, 13:01 #25Private 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 18th, 2018, 22:18 #26
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 20,668
dradams,
You asked for why your analysis was incorrect. I'm not sure exactly which example you are referring to, so I'll respond to this one:
https://www.fantasygrounds.com/forum...l=1#post377181
If the special qualities field is "Damage reduction 10/good", then aSQWords = { "damage", "reduction", "10", "good" }.
The following code sequence follows, and produces an effect of "DR: 10 good". Note: I only include the relevant lines where conditionals match. If I didn't list that code, it's not triggered and thus not relevant.
Code:local i = 1; while aSQWords[i] do ... elseif StringManager.isWord(aSQWords[i], "dr") or (StringManager.isWord(aSQWords[i], "damage") and StringManager.isWord(aSQWords[i+1], "reduction")) then if aSQWords[i] ~= "dr" then i = i + 1; end if StringManager.isNumberString(aSQWords[i+1]) then i = i + 1; local sDRAmount = aSQWords[i]; local aDRTypes = {}; while aSQWords[i+1] do ... elseif StringManager.isWord(aSQWords[i+1], DataCommon.dmgtypes) then table.insert(aDRTypes, aSQWords[i+1]); ... i = i + 1; end local sDREffect = "DR: " .. sDRAmount; if #aDRTypes > 0 then sDREffect = sDREffect .. " " .. table.concat(aDRTypes, " "); end table.insert(aEffects, sDREffect); end ... i = i + 1; end if #aEffects > 0 then EffectManager.addEffect("", "", nodeEntry, { sName = table.concat(aEffects, "; "), nDuration = 0, nGMOnly = 1 }, false); end
-
October 31st, 2020, 22:34 #27
- Join Date
- Aug 2011
- Posts
- 18
I haven't had a chance to work on this for a while, but I was just wondering if any effort is being made to update the pathfinder 1.0 ruleset now that the Unity version of FG is being developed. For instance, is there an effect that will prevent critical hits on a monster that is immune to them?
-
October 31st, 2020, 23:47 #28My extensions for 3.5e and Pathfinder
Bug reports please here
-
November 1st, 2020, 01:06 #29
-
November 1st, 2020, 01:29 #30
https://fantasygroundsunity.atlassia...d+3.5E+Effects
There is a list of effects (but I just saw that this piece of information is not there, but that effect exists Besides immunity against crits, there is also immunity against sneak attacks by IMMUNE: precision (make sure that sneak attacks have the precision damage type then) )My extensions for 3.5e and Pathfinder
Bug reports please here
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks