-
March 19th, 2022, 16:03 #831
{self} is pulling from the current field, the field you are clicking on to roll - it might be Strength or Athletics for example.
{modstack} is pulling from the modifier stack bottom left of the screen.
You can use something like:
ModifierStack.addSlot(sName, nValue);
to add data to the Modifier Stack - eg on Cyberware or Masterwork Sword
-
March 19th, 2022, 16:03 #832
You might also pop into the discord channel on the FG official server
-
March 20th, 2022, 13:39 #833
- Join Date
- Mar 2018
- Location
- Norway
- Posts
- 104
Hi,
Thanks for making this software. It is a real timesaver, and it also makes the work alot more fun.
My question is regarding the string cycler.
It is possible to add a default label, but is it also possible to add a default value?
-
March 27th, 2022, 14:40 #834
- Join Date
- Aug 2014
- Posts
- 8
Hello,
i'm having a problem with the rswcombobox. In a campaign i get the following error:
[3/27/2022 11:32:52 AM] [ERROR] Script execution error: [string "rulesetwizard/rswcombobox.lua"]:101: attempt to index a nil value
What does the combobox in the onInit function with this?
valueFieldNode = window.getDatabaseNode().createChild(valueFieldNam e, "string");
Where is this string created? DB.xml?
Many thanks for the ruleset wizard. It's a great tool!
Ingo
-
March 27th, 2022, 15:23 #835
Ruleset Wizard
The Ruleset Development Environment
www.rulesetwizard.com
Ruleset Wizard Tutorials
Damned's Ruleset Wizard Tutorials
-
March 27th, 2022, 15:29 #836
since a few updates ago RSW uses its own improved version of the combobox template, named rswcombobox. The files of this template are located in the rulesetwizard folder of the .pak or .ext file. Check if this folder exists. You may have the option to exclude RSW scripts from compilation selected in the options window.
if you don't want to use the standard CoreRPG template you have to set the Advanced Template property of your combobox control to: comboboxRuleset Wizard
The Ruleset Development Environment
www.rulesetwizard.com
Ruleset Wizard Tutorials
Damned's Ruleset Wizard Tutorials
-
March 29th, 2022, 12:38 #837
- Join Date
- Dec 2018
- Location
- England, UK
- Posts
- 198
I have been looking into this a bit more and come up with a partial solution as shown in the code below:
function AttributeCheck(rSource, rTarget, rRoll)
local rMessage = ActionsManager.createActionMessage(rSource, rRoll);
-- Debug.chat(rRoll,rRoll.total);
local nDiceRoll = ActionsManager.total(rRoll);
local nTotal = nDiceRoll + rRoll.nBonuses;
-- get the Dice Roll + Modifiers total
-- Debug.chat(nTotal);
local nCriticalSuccess = 0;
local nBonusRoll = 0;
if nDiceRoll == 12 then
-- Test if BOTH DICE are a 6
repeat
nBonusRoll = math.random(6);
-- Generate a random nunber between 1 and 6
nCriticalSuccess = nCriticalSuccess + nBonusRoll;
until nBonusRoll < 6
sSaveResult = "\n[CRITICAL SUCCESS] (12 + " .. nCriticalSuccess .. ")";
-- Append a Critical Success Message
nTotal = nTotal + nCriticalSuccess;
-- update the roll result for a Critical Success (result - d6)
sMargin = "\nMargin of Success = " .. tostring(nTotal-12);
elseif nDiceRoll == 2 then
sSaveResult = "\n[FUMBLE]";
sMargin = "\nAutomatic Failure";
elseif nTotal >= 12 and nCriticalSuccess == 0 then
sSaveResult = "\n[SUCCESS]";
sMargin = "\nMargin of Success = " .. tostring(nTotal-12);
else
sSaveResult = "\n[FAILURE]";
sMargin = "\nMargin of Failure = " .. tostring(12-nTotal);
end
rMessage.text = rMessage.text .. sSaveResult .. sMargin;
Comm.deliverChatMessage(rMessage);
end
I have used a repeat until loop to add the exploding dice result to the score. I report this in the Chat window as shown in the attached file (last roll shown has an additional d6 value generated resulting in +5 being added to the Margin of success shown). However, what I would really like is to have the extra dice 'rolled' on the screen as with a standard exploding dice roll.
Do you have any suggestions on how I get get the additional dice rolled? Failing that how can I add the bonus number generated by the repeat until loop into the chat window dice result shown?
-
March 29th, 2022, 13:39 #838
See if you get any clues form this post:
https://www.fantasygrounds.com/forum...l=1#post644637
-
March 29th, 2022, 15:20 #839
- Join Date
- Dec 2018
- Location
- England, UK
- Posts
- 198
Thanks Damned, a quick scan through this post fills me with hope I can sort my issue out.
I will let you know how I get on.
EDIT: Have applied the code and it does the trick, with only a minor issue. I have posted in the above thread about the issue I have seen.Last edited by Brotherkelly; March 30th, 2022 at 08:20.
-
May 8th, 2022, 15:04 #840
- Join Date
- Mar 2018
- Location
- Norway
- Posts
- 104
Hi again,
Is it possible to center the text in the "Formatted Text"?
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks