STAR TREK 2d20
  1. #1
    Oberoten's Avatar
    Join Date
    May 2006
    Location
    Älvsbyn, Sweden
    Posts
    2,620

    Sending out Dice-results...

    I am so close I can smell it...

    I finally found how and where to integrate my wild-die mechanics from the old Ars Magica ruleset, BUT as it fires and shows the dice being rolled it still doesn't show my calculated result in the classic dice output message and add in the modifier-stack...

    AKS, how do I trigger the final dice-roll message with my own dielist[nr].result inserted?

    - Obe
    For your Ars Magica needs :
    https://fgrepository.com




    Atque in perpetuum frater, Ave atque vale.

  2. #2
    Valarian's Avatar
    Join Date
    Mar 2007
    Location
    Worcestershire, UK
    Posts
    2,567
    Sounds like you've got as far as I have.
    Using Ultimate license - that means anyone can play.
    Valarian's Fantasy Grounds Rulesets

  3. #3
    Quote Originally Posted by Valarian View Post
    Sounds like you've got as far as I have.
    Me too
    Dulux-Oz

    √(-1) 2^3 Σ Π
    ...And it was Delicious!


    Alpha-Geek
    ICT Professional
    GMing Since 1982
    NSW, Australia, UTC +10
    LinkedIn Profile: www.linkedin.com/in/mjblack

    Watch our games on Twitch: www.twitch.tv/dulux_oz

    Support Me on Patreon: www.patreon.com/duluxoz

    Past Games, etc, on my YouTube Channel: www.youtube.com/c/duluxoz

  4. #4
    Oberoten's Avatar
    Join Date
    May 2006
    Location
    Älvsbyn, Sweden
    Posts
    2,620
    I think the next place to look for me will be in the functions where you can basically send out a number when you give FG the /die 3 Xp line and it outputs it as "XP (3)" draggable.

    - Obe
    For your Ars Magica needs :
    https://fgrepository.com




    Atque in perpetuum frater, Ave atque vale.

  5. #5
    The dice table passed to the message functions (Comm.addChatMessage and chatwindow.Message) is detailed here.

    Basically, the dice value is a table. Within the table, you add one table for each "die". Within the "die" table, there should be a "type" field (string)("d4","d6",...) and a "result" field (actual result of die roll).

    Regards,
    JPG

  6. #6
    Oberoten's Avatar
    Join Date
    May 2006
    Location
    Älvsbyn, Sweden
    Posts
    2,620
    Could you show me an example of a message?

    Like
    local msg = {}
    local msg.type = {}
    local msg.result = {}
    msg.type{"d6"};
    msg.result ={ 120};
    msg.text = "Test";

    Comm.deliverChatMessage(msg);



    ... but how do I add my absurd D6 result into the msg
    For your Ars Magica needs :
    https://fgrepository.com




    Atque in perpetuum frater, Ave atque vale.

  7. #7
    Oberoten's Avatar
    Join Date
    May 2006
    Location
    Älvsbyn, Sweden
    Posts
    2,620
    *blepp*

    OFc I figure it out a few moments after finishing that post..

    local msg = {
    text =" test"
    dice = {
    type={"d6"},
    result={120}
    }

    }
    For your Ars Magica needs :
    https://fgrepository.com




    Atque in perpetuum frater, Ave atque vale.

  8. #8
    Oberoten's Avatar
    Join Date
    May 2006
    Location
    Älvsbyn, Sweden
    Posts
    2,620
    Soo...

    I placed my code such as it is now inside the onDiceLanded in manager_actions.lua ... how do I keep the original code from fiering? Return true or define the d10 as an action?
    For your Ars Magica needs :
    https://fgrepository.com




    Atque in perpetuum frater, Ave atque vale.

  9. #9
    If you are building on CoreRPG, you could just register a handler in the ActionsManager, and output your result from the roll structure. There are lots of examples. Numenera and CoC are probably simplest example.

    Otherwise, you would need to make sure you replace it with your version, and make sure there are no other calls to that script in the ruleset that aren't handled.

    The drawback of replacing is that upgrades to that code will skip your ruleset.

    Regards,
    JPG

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
  •  
DICE PACKS BUNDLE

Log in

Log in