SilentRuin
June 21st, 2020, 06:11
To use an "old folks" TV reference, "missed it by 'that' much", a tiny amount.
I was in the final testing run of an extension when I discovered my target charsheet skilllist lookup, which had always worked in all my previous tests - from host or player - suddenly started "not" finding things on the player side. It turns out I had been testing the player side with a set of characters that were all owned by the player. Once I made it where only one character was owned the other combat tracker players no longer worked in the skilllist modification lookup I was doing.
Now I know I can OOB my way out of it - its just a matter of how expensive in rewrite that will be. My previous OOB have all been one way to the host for processing where I don't actually need a result back. In this case I need a number back. So my question is really three fold...
1) I'm hoping I'm just being a novice and don't realize there is magic code out there like what I put below - only for "athletics" where it goes to the host to grab it and comes back with the values. Is there some nice magic out there?
nMod, bADV, bDIS, sAddText = ActorManager2.getCheck(rSourceActor, "dexterity");
2) If not, is there a way to simply do my charsheet lookup - then the skill sheet lookup (as shown below) in an OOB messages where i can some how communicate back the nmod value?
local sCharSheetIdentity = "";
for _,vCharSheet in pairs(DB.getChildren("charsheet")) do
--Debug.console("manager_generic_actions:performGenericActionRoll; sCharSheetIdentity = " .. tostring(vCharSheet.getNodeName()));
if DB.getValue(vCharSheet, "name", "") == sCTName then
sCharSheetIdentity = vCharSheet.getNodeName();
break;
end
end
for _,vSkill in pairs(DB.getChildren(sCharSheetIdentity .. ".skilllist")) do
-- check athletics vs current highest modification
if DB.getValue(vSkill, "name", "") == Interface.getString("skill_value_stealth") then
nMod = DB.getValue(vSkill, "total", 0);
end
end
3) Am I totally screwed and going to have push my dice rolls to the host like a drag/drop on the dice tower does (code is already set for handling this switch over once I found out it happened from players side)?
Hopefully, all my novice questions are not a problem. But as Maxwell Smart used to say...
"missed it by 'that' much"
I was in the final testing run of an extension when I discovered my target charsheet skilllist lookup, which had always worked in all my previous tests - from host or player - suddenly started "not" finding things on the player side. It turns out I had been testing the player side with a set of characters that were all owned by the player. Once I made it where only one character was owned the other combat tracker players no longer worked in the skilllist modification lookup I was doing.
Now I know I can OOB my way out of it - its just a matter of how expensive in rewrite that will be. My previous OOB have all been one way to the host for processing where I don't actually need a result back. In this case I need a number back. So my question is really three fold...
1) I'm hoping I'm just being a novice and don't realize there is magic code out there like what I put below - only for "athletics" where it goes to the host to grab it and comes back with the values. Is there some nice magic out there?
nMod, bADV, bDIS, sAddText = ActorManager2.getCheck(rSourceActor, "dexterity");
2) If not, is there a way to simply do my charsheet lookup - then the skill sheet lookup (as shown below) in an OOB messages where i can some how communicate back the nmod value?
local sCharSheetIdentity = "";
for _,vCharSheet in pairs(DB.getChildren("charsheet")) do
--Debug.console("manager_generic_actions:performGenericActionRoll; sCharSheetIdentity = " .. tostring(vCharSheet.getNodeName()));
if DB.getValue(vCharSheet, "name", "") == sCTName then
sCharSheetIdentity = vCharSheet.getNodeName();
break;
end
end
for _,vSkill in pairs(DB.getChildren(sCharSheetIdentity .. ".skilllist")) do
-- check athletics vs current highest modification
if DB.getValue(vSkill, "name", "") == Interface.getString("skill_value_stealth") then
nMod = DB.getValue(vSkill, "total", 0);
end
end
3) Am I totally screwed and going to have push my dice rolls to the host like a drag/drop on the dice tower does (code is already set for handling this switch over once I found out it happened from players side)?
Hopefully, all my novice questions are not a problem. But as Maxwell Smart used to say...
"missed it by 'that' much"