-
July 21st, 2024, 20:48 #1101Dominic Morta
Ruleset Developer
Smiteworks
How to zip up your campaign if the Developers ask for it-How to zip up your campaign if the Developers ask for it
How to provide an Unity Connection issue?-Connection Issues and What to Provide
Unity Updater issue?-Updater Issues
Classic and Unity Port Forwarding?-Fantasy Grounds Connections Explained
Comcast or Cox ISP User?-Comcast XFinity and Cox Users
Have a suggestion?-Feature Request
-
July 21st, 2024, 21:01 #1102
- Join Date
- Dec 2018
- Location
- England, UK
- Posts
- 215
Thanks.
-
July 22nd, 2024, 07:53 #1103
Hi, sorry, I've been on vacation for a few days with almost no access to a computer.
Indeed the demo version does not allow to load or save projects, but it should not produce any crash. Could you tell me how to reproduce this error?
On the other hand, creating an extension can be simple or very complex, what do you want to achieve?Ruleset Wizard
The Ruleset Development Environment
www.rulesetwizard.com
Ruleset Wizard Tutorials
Damned's Ruleset Wizard Tutorials
-
September 15th, 2024, 17:36 #1104
- Join Date
- Jul 2017
- Posts
- 8
Hi, i really need some help... I got some homemade rules and want to make a ruleset with Ruleset Wizard. But i got stuck. In my ruleset success of throwing dices - 6. In one throw can be 1 or 10+ dices. I want FG to check the result and massage in chat how much you got. But it always says "0 success"
code:
function resultHandler(rRoll)
local successes = 0
for _, diceResult in ipairs(rRoll.aDice or {}) do
if diceResult.result == 6 then
successes = successes + 1
end
end
local message = string.format("successes: %d", successes)
Comm.addChatMessage({text = message, sender = rRoll.sUser or ""})
endLast edited by Koshaker; September 15th, 2024 at 20:21.
-
September 15th, 2024, 22:29 #1105
use the inbuilt diceroller string - and roll something like 2d6s6 and it will do the successes for you.
-
September 15th, 2024, 23:55 #1106
- Join Date
- Jul 2017
- Posts
- 8
Thanks! its was so easy, i feel myself a little shame... well, gonna try make next step by myself) its like take result of previous roll, take all dice exept 1 and 6 result, reroll it, count 1 and 6 from bouth rolls and decide wich of them more)
p.s. Your tutorials are amazing!
-
September 16th, 2024, 00:02 #1107
Building auto-rerolling of a smaller set of dice is harder.
What I would do is:
1. Perform first roll
2. Count 1s and 6s and remaining dice and store them on a field on char/npc sheet
3. Make the remaining dice field rollable
4. it will roll remaining dice and add to 1s and 6s, declare result and then clear 1s, 6s and remaining from the character sheet
-
September 16th, 2024, 01:17 #1108
Have a look at the reroll mechanic implementation in Tales from the Loop for a rough idea how Ive set this up.
-
September 17th, 2024, 07:03 #1109
note that the signature of the handler function is not as you have used it, but like this
function onRollResult(rSource, rTarget, rRoll)
probably that's why it didn't work, because instead of processing the roll you were processing the source.Ruleset Wizard
The Ruleset Development Environment
www.rulesetwizard.com
Ruleset Wizard Tutorials
Damned's Ruleset Wizard Tutorials
-
September 17th, 2024, 19:56 #1110
- Join Date
- Jul 2017
- Posts
- 8
I was trying to use the built-in FGButton function on the constitution parameter, so that after the roll " {body_current} + d6s6 " it would trigger the script from "Result handler function name"
function onRollResult(rSource, rTarget, rRoll)
local playerNode = DB.findNode(rSource.sCTNode)
if playerNode then
playerNode.getChild("lastRoll").setValue(rRoll.nTo tal)
end
end
i used GPT to find out, what can i do to solve this problem, but it was useless.
biggest part of time, i spend by trying use "rRoll.aDice" and save result by this function.Last edited by Koshaker; September 17th, 2024 at 22:34.
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks