DICE PACKS BUNDLE
  1. #1

    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

  2. #2
    Zacchaeus's Avatar
    Join Date
    Dec 2014
    Location
    Scotland
    Posts
    20,735
    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+Dice
    If 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

  3. #3
    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

  4. #4
    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.

  5. #5
    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

  6. #6
    Thats really great!
    Thanks a lot.

    BR,
    Fenloh

  7. #7
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    26,649
    Blog Entries
    1
    Ive just got this working in MoreCore using ActionsManager.performAction
    Just a basic implementation so far without any targeting.

  8. #8
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Starfinder Playlist

Log in

Log in