Thread: Saving Throw issue
-
June 28th, 2018, 05:39 #1
Saving Throw issue
Sorry to post another but it seems that in 3.5E when you do a save vs a DC such as in the party sheet or when a spell with a save is cast, it is not counting a roll of 1 or 20 properly. As I recall in 3.5E for Attack rolls and Saving Throws a roll of a 1 on the dice is always a miss or fail and a roll of a 20 on the dice is always a hit or success, but in Fantasy Grounds its purely going off of roll total vs DC. So I can roll a 1 and succeed as long as it was higher then the DC and I can roll a 20 and fail.
-
June 28th, 2018, 08:00 #2
Ok so I think I found how to fix this, its all in manager_action_save.lua in functions handleApplySave, notifyApplySave and applySave. I will post those 3 functions below with the code changes.
Code:function handleApplySave(msgOOB) local rSource = ActorManager.getActor(msgOOB.sSourceType, msgOOB.sSourceNode); local rOrigin = ActorManager.getActor(msgOOB.sTargetType, msgOOB.sTargetNode); local rAction = {}; rAction.bSecret = (tonumber(msgOOB.nSecret) == 1); rAction.sDesc = msgOOB.sDesc; rAction.nTotal = tonumber(msgOOB.nTotal) or 0; rAction.nMod = tonumber(msgOOB.nMod) or 0; -- added rAction.sSaveDesc = msgOOB.sSaveDesc; rAction.nTarget = tonumber(msgOOB.nTarget) or 0; rAction.bRemoveOnMiss = (tonumber(msgOOB.nRemoveOnMiss) == 1); applySave(rSource, rOrigin, rAction); end
Code:function notifyApplySave(rSource, rRoll) local msgOOB = {}; msgOOB.type = OOB_MSGTYPE_APPLYSAVE; if rRoll.bTower then msgOOB.nSecret = 1; else msgOOB.nSecret = 0; end msgOOB.sDesc = rRoll.sDesc; msgOOB.nTotal = ActionsManager.total(rRoll); -- nTotal = nTotal + rRoll.nMod; msgOOB.nMod = rRoll.nMod; -- added msgOOB.sSaveDesc = rRoll.sSaveDesc; msgOOB.nTarget = rRoll.nTarget; if rRoll.bRemoveOnMiss then msgOOB.nRemoveOnMiss = 1; end local sSourceType, sSourceNode = ActorManager.getTypeAndNodeName(rSource); msgOOB.sSourceType = sSourceType; msgOOB.sSourceNode = sSourceNode; if rRoll.sSource ~= "" then msgOOB.sTargetType = "ct"; msgOOB.sTargetNode = rRoll.sSource; else msgOOB.sTargetType = ""; msgOOB.sTargetNode = ""; end Comm.deliverOOBMessage(msgOOB, ""); end
Code:function applySave(rSource, rOrigin, rAction, sUser) local msgShort = {font = "msgfont"}; local msgLong = {font = "msgfont"}; msgShort.text = "Save"; msgLong.text = "Save [" .. rAction.nTotal .. "]"; if rAction.nTarget then msgLong.text = msgLong.text .. "[vs. DC " .. rAction.nTarget .. "]"; end msgShort.text = msgShort.text .. " ->"; msgLong.text = msgLong.text .. " ->"; if rSource then msgShort.text = msgShort.text .. " [for " .. rSource.sName .. "]"; msgLong.text = msgLong.text .. " [for " .. rSource.sName .. "]"; end if rOrigin then msgShort.text = msgShort.text .. " [vs " .. rOrigin.sName .. "]"; msgLong.text = msgLong.text .. " [vs " .. rOrigin.sName .. "]"; end msgShort.icon = "roll_cast"; local sAttack = ""; local bHalfMatch = false; if rAction.sSaveDesc then sAttack = rAction.sSaveDesc:match("%[SAVE VS[^]]*%] ([^[]+)") or ""; bHalfMatch = (rAction.sSaveDesc:match("%[HALF ON SAVE%]") ~= nil); end rAction.sResult = ""; -- added local nDieRoll = rAction.nTotal - rAction.nMod; -- end added if (nDieRoll > 1 and rAction.nTotal >= rAction.nTarget) or nDieRoll == 20 then -- added msgLong.text = msgLong.text .. " [SUCCESS]"; if rSource then local bHalfDamage = bHalfMatch; local bAvoidDamage = false; if bHalfDamage then local sSave = rAction.sDesc:match("%[SAVE%] (%w+)"); if sSave then sSave = sSave:lower(); end if sSave == "reflex" then if EffectManager35E.hasEffectCondition(rSource, "Improved Evasion") then bAvoidDamage = true; msgLong.text = msgLong.text .. " [IMPROVED EVASION]"; elseif EffectManager35E.hasEffectCondition(rSource, "Evasion") then bAvoidDamage = true; msgLong.text = msgLong.text .. " [EVASION]"; end end end if bAvoidDamage then rAction.sResult = "none"; rAction.bRemoveOnMiss = false; elseif bHalfDamage then rAction.sResult = "half_success"; rAction.bRemoveOnMiss = false; end if rOrigin and rAction.bRemoveOnMiss then TargetingManager.removeTarget(ActorManager.getCTNodeName(rOrigin), ActorManager.getCTNodeName(rSource)); end end else msgLong.text = msgLong.text .. " [FAILURE]"; if rSource then local bHalfDamage = false; if bHalfMatch then local sSave = rAction.sDesc:match("%[SAVE%] (%w+)"); if sSave then sSave = sSave:lower(); end if sSave == "reflex" then if EffectManager35E.hasEffectCondition(rSource, "Improved Evasion") then bHalfDamage = true; msgLong.text = msgLong.text .. " [IMPROVED EVASION]"; end end end if bHalfDamage then rAction.sResult = "half_failure"; end end end ActionsManager.outputResult(rAction.bSecret, rSource, rOrigin, msgLong, msgShort); if rSource and rOrigin then ActionDamage.setDamageState(rOrigin, rSource, StringManager.trim(sAttack), rAction.sResult); end end
-
July 4th, 2018, 16:29 #3
- Join Date
- Jan 2014
- Location
- Germany
- Posts
- 404
I guess you have to put it into the Pathfinder Modules Bug Report thread to get noticed, or The House of Healing...
-
July 4th, 2018, 17:55 #4
Is this not fixed? https://www.fantasygrounds.com/forum...l=1#post395248
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
-
July 5th, 2018, 02:24 #5
At the time of my post I didn't know that it was to be fixed in the future release (never looked at the beta) but when I deleted my rule set for 3.5E and updated to Dev version it still wasn't working. Might be they were still working on it at that time and hadn't put it into the "Dev" file.
Last edited by mr900rr; July 5th, 2018 at 02:30.
-
July 5th, 2018, 09:17 #6If 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
-
July 5th, 2018, 17:10 #7
This is a different issue to the one reported as fixed in the current test version.
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!
-
July 6th, 2018, 02:42 #8
Not sure I understand the "Dev is not for you" part in your comment, in the updater there is three options "Live", "Test" and "Dev", am I not supposed to click the "Dev" option which I assume is the beta?
-
July 6th, 2018, 02:45 #9
See the information on testing here: https://www.fantasygrounds.com/forum...public-testing!
The current beta test package is in the "test" channel. "Dev" is reserved for the developers and they can load anything into that channel at anytime, such as custom debug code to try to catch a specific issue - don't use it unless the FG devs ask you specifically to use it. Use "test" to access the current version of FG in test.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!
-
July 6th, 2018, 04:29 #10
Oh, well they need to have a window pop up when you select that option informing of this with a confirm button, I don't think a majority of users would know that and come to the forums to ask before clicking it to try the latest version. I have had the software since like 2013 and never knew this till now.
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks