-
October 10th, 2020, 10:28 #1
Grand Templar
- Join Date
- Sep 2008
- Posts
- 274
dice rolls with /die - What exactly happens
Hello everyone,
maybe one of you knows this.
In the FGU CoreRPG, when you use the chat window with "/die 3d6k2", what exactly happens. Which functions are used in what Order to produce the correct result.
I am asking this, because for a Campaign, I would like to have Mathematical Rolls, like the one above, in the Charactersheet and the NPC Sheet. Unfortunatly it is not working with the NPC Rolls (seems it has a problem with the Mathematical Expressions. This issue will be taken care of somewhen in the Future), but in the meantime I like to see if it can be solved manually, and it has to be integreated to the Characterheet. I would like to use as much of the standard functionality as possible.
LG
Fenloh
-
October 10th, 2020, 12:35 #2
I'm assuming you are talking about Unity?
The dice roller hasn't been integrated into any of the rulesets as yet. All such rolls are made using the /die command in the chat window
In your example above that means roll 3d6 and keep the two highest results. More on the dice roller here https://fantasygroundsunity.atlassia...0/Rolling+DiceIf there is something that you would like to see in Fantasy Grounds that isn't currently part of the software or if there is something you think would improve a ruleset then add your idea here https://www.fantasygrounds.com/featu...rerequests.php
-
October 11th, 2020, 04:29 #3
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 20,564
It's interpreted internally by the FGU client as a slash command; not something handled by the ruleset (for FGU only). To use the FGU dice rolling, the best way is to submit a roll using the Comm.throwDice API (just like the ActionsManager in CoreRPG does), or you could use the Comm.activateSlashCommand API to call the /die command directly. The ActionsManager does a few more things in FGU (i.e. integrates with modifier box and manual roll option); but hasn't needed to be updated to support complex roll schemes directly.
Regards,
JPG
-
October 11th, 2020, 09:55 #4
Grand Templar
- Join Date
- Sep 2008
- Posts
- 274
Thanks a lot for the fast reply.
I am playing around with it, but I cant get it to work as I want it to . It seems I cant get the dragdata right for it to work properly.
How does the dragdata has to look like if I want the formula "3d6k2" to work with the throwdice API?
rRoll = {
sType = "dice",
aDice = {"d6", "d6", "d6", "d6" } ,
nMod = 0,
sDesc = "Attack with Sword"
};
rThrow = ActionsManager.buildThrow(nil , nil , rRoll, false);
Comm.thowDice(rThrow);
would result in a 4d6 Diceroll with no Modifiers and the modifier Stack would not be touched.
I have not yet understood how you actually make the "/die 4d6k2" to work from the Chat window O_O.
Sorry for asking such dumb questions. Havent done anything in FG(U) for a long time.
-
October 11th, 2020, 22:19 #5
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 20,564
You can't currently use the API or CoreRPG ActionsManager script to trigger the FGU die handling yet.
I'll look into adding the first part for the next version update. After the update, it would look something like this:
rRoll = {
sType = "dice",
aDice = { expr = "4d6k2" } ,
nMod = 0,
sDesc = "Attack with Sword"
};
ActionsManager.performAction(nil, nil, rRoll);
Regards,
JPG
-
October 12th, 2020, 04:12 #6
Grand Templar
- Join Date
- Sep 2008
- Posts
- 274
Thats really great!
Thanks a lot.
BR,
Fenloh
-
October 18th, 2020, 06:58 #7
Ive just got this working in MoreCore using ActionsManager.performAction
Just a basic implementation so far without any targeting.
-
October 23rd, 2020, 12:33 #8
Grand Templar
- Join Date
- Sep 2008
- Posts
- 274
Hey damned, thanks.
Also there was an update on FGU that covered it.
LG
Fenloh
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks