-
November 11th, 2020, 20:56 #11
Like I mentioned - put some debug code into the script to see *exactly* where node CT is pointing to. Savage Worlds has the additional <combatants> structure within the Combat Tracker which other rulesets don't have, so that might be causing an issue for ActorManager.getCTNode returning the actual actor node.
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!
-
November 11th, 2020, 21:02 #12
- Join Date
- Aug 2011
- Posts
- 239
oh god.. how do I put the debug code into the script? I assume I cut and paste this:
Debug.console("nodeCT = ", nodeCT);
into this:
function customizeRoll(rRoll)
local nodeCT = ActorManager.getCTNode(rRoll.actor);
if nodeCT then
local nWildcard = DB.getValue(nodeCT, "reach", 0);
if nWildcard == 7 then
rRoll.custom.maxacing = 0;
end
end
end
So... it should look like this?
function customizeRoll(rRoll)
local nodeCT = ActorManager.getCTNode(rRoll.actor);
Debug.console("nodeCT = ", nodeCT);
if nodeCT then
local nWildcard = DB.getValue(nodeCT, "reach", 0);
if nWildcard == 7 then
rRoll.custom.maxacing = 0;
end
end
end
And then, I open FG, type /console and then try a roll to see if it aces?
Also, here is another picture to show how far into db the reach (and wildcard) variable are.
CropperCapture[2].jpg
-
November 11th, 2020, 21:04 #13Private 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!
-
November 11th, 2020, 21:07 #14
- Join Date
- Aug 2011
- Posts
- 239
I tried the above, rolled three times (one of them aced) and got this
CropperCapture[4].jpg
And by the way, I am totally cool if you want to throw up your hands and tell me to take a coding class at my local college! You've helped me many, many times in the past and I kind of gotta believe it's getting old for you.
-
November 11th, 2020, 21:10 #15Private 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!
-
November 11th, 2020, 21:15 #16
- Join Date
- Aug 2011
- Posts
- 239
I really do appreciate your help in this.
Is there a way I can have that extension work only when the left alt key is pressed or something? It did work when I did the user.ishost thing and I'm not picky. It'd just be nice to be able to have something where I can make extras not ace and wildcards ace even if I have to press a button or change a setting for something.
Anyway, thanks for the help and Curse You, Savage Worlds Ruleset!
-
November 11th, 2020, 21:20 #17
Try this:
Code:function customizeRoll(rRoll) local sActorType, nodeCT = CharacterManager.asCharActor(rRoll.actor); Debug.console("rRoll.actor, sActorType, nodeCT = ", rRoll.actor, sActorType, nodeCT); if nodeCT then local nWildcard = DB.getValue(nodeCT, "wildcard", 0); if nWildcard == 0 then rRoll.custom.maxacing = 0; end end end
Last edited by Trenloe; November 11th, 2020 at 21:22.
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!
-
November 11th, 2020, 21:23 #18Private 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!
-
November 11th, 2020, 21:27 #19
- Join Date
- Aug 2011
- Posts
- 239
I really hope your sitting on your own private island drinking margaritas somewhere.
Your coding worked perfectly. Extras don't ace and wildcards do.
THANKS SO MUCH! I've given you rep (that you hardly need) but I wish there was something more I could do. You should consider a patreon or something! You'd be able to afford a second island.
-
November 11th, 2020, 21:30 #20
Haha - glad that worked.
I'm quite happy with this island thanks. Although the margartia goblins have slowed recently, I'll have to crack the whip a bit...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!
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks