-
December 9th, 2021, 02:05 #541
- Join Date
- Nov 2017
- Location
- North Carolina, USA
- Posts
- 266
Is there a specific way you have to add multiple functions to a window? Harn uses an average of three attributes to establish the skill base for a skill. Below you can see the script I added for endurance, acrobatics, and climbing. But it will only display in one (climbing, the last one), which makes me think it will only do one function without some added text. These work individually, so I know the scripts are correct. I just dont how to get them to all run at once.
function onValueChanged()
local nodeWin = window.getDatabaseNode();
local nstrength = DB.getValue(nodeWin,"strength_attribute",0);
local nstamina = DB.getValue(nodeWin,"stamina_attribute",0);
local nwill = DB.getValue(nodeWin,"will_attribute",0);
local nendurance = math.ceil((nstrength+nstamina+nwill)/3);
nodeWin.getChild("endurance").setValue(nendurance) ;
end
function onValueChanged()
local nodeWin = window.getDatabaseNode();
local nstrength = DB.getValue(nodeWin,"str_attribute",0);
local nagility = DB.getValue(nodeWin,"agl_attribute",0);
local nagilitytotal = math.ceil(nagility*2);
local nacrobaticstotal = math.ceil(nstrength+nagilitytotal);
local nacrobaticsaverage = math.ceil(nacrobaticstotal/3);
nodeWin.getChild("acrobatics_average").setValue(na crobaticsaverage);
end
function onValueChanged()
local nodeWin = window.getDatabaseNode();
local nstrength = DB.getValue(nodeWin,"strength_attribute",0);
local ndexterity = DB.getValue(nodeWin,"dexterity_attribute",0);
local nagility = DB.getValue(nodeWin,"agility_attribute",0);
local nclimbingaverage = math.ceil((nstrength+ndexterity+nagility)/3);
nodeWin.getChild("climbing_average").setValue(ncli mbingaverage);
endLast edited by greybeardgunner70; December 9th, 2021 at 02:20.
-
December 9th, 2021, 02:18 #542
- Join Date
- Nov 2017
- Location
- North Carolina, USA
- Posts
- 266
What dice do you roll? d100 with a modifier acquired from another part of the sheet (encumbrance penalty, for example) or the modifier dice roll box.
What do you click to roll? buttons and number fields depending on type of roll (button for attack rolls, number fields for skill rolls). Though I could make them all the same.
Then what do you do with the dice result? It just needs to display in the chat, nothing else.
What are you comparing it to? If dice roll result ends in a 5 or 0 it is a crit. Every other result is marginal. (Crit Success, Marginal Success, Marginal Failure, Crit Failure)
What other factors come into play (modifiers, attributes etc)? For skills its just a single penalty (usually encumbrance), but need to be able to add modifier from dice modifier window in FGU. Attack rolls can have multiple modifiers, most off the weapon table on the CS (attack modifier for the weapon, 1 or 2 handed modifier, etc), but again, need to be able to add a modifier to the modifier dice roll box.
-
December 9th, 2021, 02:32 #543
-
December 9th, 2021, 02:49 #544
- Join Date
- Nov 2017
- Location
- North Carolina, USA
- Posts
- 266
Ok thanks.
-
December 9th, 2021, 03:16 #545
Start with something like this:
click on the field that will be rollable and enter the dice string in the bottom right (sorry not at my PC)
enter something like 1d100+{encumbrace_penalty}
tell it to use modifiers
tell it to clear modifier stack
publish and test rolls
do they work to that point?
rolling d100+penalty+modifiers?
if so then we work on the next bit
-
December 9th, 2021, 13:54 #546
hi greybeardgunner70
I made a video for you that will hopefully explain a few things for you and show you how you can break the tasks down into small bite sized chunks and work your way through it. It has examples of your current crop of questions.
https://youtu.be/COl8-_mRRHs
Also see the .pak file and a .zip of teh rulesetwizard project fileLast edited by damned; December 9th, 2021 at 13:56.
-
December 9th, 2021, 15:44 #547
- Join Date
- Nov 2017
- Location
- North Carolina, USA
- Posts
- 266
Damned, great stuff, thank you! I was able to get the attribute calculations for Skill Base to work, so that's solved.
The vid and attached files are immensely helpful as well. I am not ready to tackle the actions (Notes) tab, so I tried to edit your managerRolls.Attack and create a managerRolls.Skillcheck. Note I took out the bit about subtracting encumbrance penalty, because the character sheet does that before the roll is made (the target number is pre-determined when the rollable field is populated). Please see below my script attempt and a screen shot of the error I received.
function Skillcheck(rSource, rTarget, rRoll)
Debug.chat("rSource: ", rSource);
Debug.chat("rTarget: ", rTarget);
Debug.chat("rRoll: ", rRoll);
Debug.chat("nSkilllevel: ", nSkilllevel);
local nResult = rRoll.aDice[1].result;
local sResult = '';
if nResult > nskilllevel then
Debug.chat("miss: ", nResult);
if nResult % 5 == 0 then
sResult = ' - Critical Failure ' .. nResult;
else
sResult = ' - Marginal Failure ' .. nResult;
end
else
Debug.chat("hit: ", nResult);
if nResult % 5 == 0 then
sResult = ' - Critical Success ' .. nResult;
else
sResult = ' - Marginal Success ' .. nResult;
end
end
Debug.chat("Result: ", sResult);
local rMessage = ActionsManager.createActionMessage(rSource, rRoll);
rMessage.text = rMessage.text .. sResult;
Comm.deliverChatMessage(rMessage);
return true
end
Screenshot 2021-12-09 110001.pngLast edited by greybeardgunner70; December 9th, 2021 at 16:02.
-
December 9th, 2021, 22:29 #548
My example using the penalty was just an example and not necessarily your furnishings as in unfamiliar with it
Please spell out your skill check in plain English in detail and also provide a list of skills and also what dB fields you already have eg
Skill
Skill_mod
-
December 9th, 2021, 23:02 #549
- Join Date
- Nov 2017
- Location
- North Carolina, USA
- Posts
- 266
Do images not work? Do you need me to paste in the actual text from the numberfields? Are you wanting to re-create it? I can send my rwp file if that works.
Three images: 1-3 are the three number fields that make up the Acrobatics skill. 1. skill base, 2. skill mastery level, 3. effective skill level (derived when physical and other penalties are applied to #1 x #2.)
Image 4 is the skillcheck script I wrote based on your attack script. I think, based on the error message I received, I am missing a command that points the function to #3.
Acrobatics001.PNG
Acrobatics002.PNG
Acrobatics003.PNG
Acrobatics004.PNGLast edited by greybeardgunner70; December 9th, 2021 at 23:05.
-
December 10th, 2021, 02:47 #550
- Join Date
- Nov 2017
- Location
- North Carolina, USA
- Posts
- 266
Is there a significant difference between these two lines? Is one more preferable? Seems I remember one of them won't cause you to get an error when its looking for a value (say an attribute) that hasn't been filled yet.
DB.setValue(nodeWin, "jog_range", "number", nJogtotal);
nodeWin.getChild("acrobatics_average").setValue(na crobaticsaverage);
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks