-
January 4th, 2022, 13:39 #741
-
January 4th, 2022, 13:39 #742
-
January 4th, 2022, 14:15 #743
The issue is not with this line:
for k,v in pairs (nodeInventory.getChildren())
it is with this line:
do if v.getChild("equipped").getValue() == 1 then
the field is carried not equipped
the next issue is that these fields do not exist on the charsheet
nodeChar.getChild("bskull").setValue(nbskull);
nodeChar.getChild("eskull").setValue(neskull);
nodeChar.getChild("pskull").setValue(npskull);
nodeChar.getChild("fskull").setValue(nfskull);
nodeChar.getChild("bface").setValue(nbface);
nodeChar.getChild("eface").setValue(neface);
nodeChar.getChild("pface").setValue(npface);
nodeChar.getChild("fface").setValue(nfface);
they occur in the weapon but not on the charsheet where you are setting them.
-
January 4th, 2022, 14:34 #744
Also if you want to check if equipped then its carried == 2
you need to look in the db.xml and see the data that is being captured.
-
January 4th, 2022, 16:09 #745
- Join Date
- Nov 2017
- Location
- North Carolina, USA
- Posts
- 266
That was the problem. Works well now. Still a few issues with some fields not being populated but I can troubleshoot those. The fields you mentioned are on the Notes tab. See image.
It Works!.png
-
January 4th, 2022, 16:46 #746
- Join Date
- Nov 2017
- Location
- North Carolina, USA
- Posts
- 266
Back to nodeWin and nodeChar. Is nodeWin restricted to the window the control is on? In other words, I can't reference a value on another window in the CS using nodeWin, I need to use nodeChar? For example, I want the Initiative EML (roll) on the Notes tab, but the skill data is on the Abilities tab. The script wouldn't work until I moved the Initiative EML roll to the Abilities tab.
Disregard, sometimes I forget I have to change a number or two to get the onValueChanged scripts to work correctly.Last edited by greybeardgunner70; January 4th, 2022 at 17:33.
-
January 4th, 2022, 19:59 #747
- Join Date
- Nov 2017
- Location
- North Carolina, USA
- Posts
- 266
I really appreciate all the help Ive gotten with this project, its been a learning experience. I am about 99% done with the CS, I'll move on to some of the other elements (mostly theme and graphics) next. However, I do have one more Q re the CS. Below is the script I have in managerRolls. When I apply modifiers through the modifiers box, it doesnt change the nResult. See image. Is it possible to script that in?
rolls.png
function Skill(rSource, rTarget, rRoll)
local nSkillScore = tonumber(rRoll.SkillScore);
local nResult = rRoll.aDice[1].result;
local sResult = '';
if nResult > nSkillScore then
if nResult % 5 == 0 then
sResult = ' (' .. nResult .. " vs EML " .. nSkillScore .. ") = Critical Failure ";
else
sResult = ' (' .. nResult .. " vs EML " .. nSkillScore .. ") = Marginal Failure ";
end
else
if nResult % 5 == 0 then
sResult = ' (' .. nResult .. " vs EML " .. nSkillScore .. ") = Critical Success ";
else
sResult = ' (' .. nResult .. " vs EML " .. nSkillScore .. ") = Marginal Success ";
end
end
local rMessage = ActionsManager.createActionMessage(rSource, rRoll);
rMessage.text = rMessage.text .. sResult;
Comm.deliverChatMessage(rMessage);
return true
endLast edited by greybeardgunner70; January 4th, 2022 at 20:02.
-
January 4th, 2022, 20:43 #748
-
January 4th, 2022, 20:44 #749
-
January 4th, 2022, 22:11 #750
- Join Date
- Nov 2017
- Location
- North Carolina, USA
- Posts
- 266
What do you mean by "capture them"?
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks