DICE PACKS BUNDLE
Page 2 of 3 First 123 Last
  1. #11
    I'd like to replace this functional but less elegant solution with a single roll that can figure out what to roll and then roll it.

    boonbane.png

  2. #12

  3. #13
    Quote Originally Posted by damned View Post
    I am sure there are ways to do it mozmonar
    I look forward to seeing what you come up with!
    I hope I am not coming across as critical or unappreciative of what you have done. I am very much leaning on you for help and guidance and find looking through your scripts invaluable (though I frequently understand very little of it hehe.)

  4. #14
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    26,684
    Blog Entries
    1
    Quote Originally Posted by mozmonar View Post
    I hope I am not coming across as critical or unappreciative of what you have done. I am very much leaning on you for help and guidance and find looking through your scripts invaluable (though I frequently understand very little of it hehe.)
    Its a community - the more people that contribute the better. The more we help each other the better. I dont understand it all either...!

  5. #15
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,406
    Quote Originally Posted by altepeter View Post
    Has anyone posted a complete example of how you add a new roll? In other words, all the Lua/XML you would need to add a new type of roll to CoreRPG or to MoreCore?
    Yes.

    Find it all here: https://www.fantasygrounds.com/forum...(dice-rolling)
    Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!

  6. #16
    That is all very helpful. Is there documentation about what a roll table (rRoll) should contain? I did not see it on https://www.fantasygrounds.com/refdoc/ and I am not 100% sure what is part of FG and what is part of MoreCore or other rulesets.

    Quote Originally Posted by damned
    Look at the code in /orderresult which should give you some clues on comparing dice results.
    damned suggested I looked at this die within MoreCore and I did and it was very helpful so I thought I would post here since this is about rolling dice and not really MoreCore specific. Maybe it will help others understand when the next person searches for die roll information

    When outputting the contents of what a roll looked like before rolling, this is what came out (rRoll):
    Code:
    { s'sType' = s'orderresult', s'aDice' = { #1 = s'd6', #2 = s'd6', #3 = s'd6' }, s'nMod' = #0, s'sDesc' = s'Testing' }
    After the roll, this is the contents:
    Code:
    { s'aDice' = { #1 = { s'result' = #1, s'type' = s'd6' }, #2 = { s'result' = #4, s'type' = s'd6' }, #3 = { s'result' = #6, s'type' = s'd6' } }, s'nMod' = #0, s'sType' = s'orderresult', s'bSecret' = bFALSE, s'sDesc' = s'Testing' }
    So the result is added (along with bSecret) which can then be manipulated (sorted or checked for doubles) when it calls the function after the initial roll is finished.

    mozmonar, for your situation could you just have a Boon +/- defined as /mod 1 and then Bane +/- as /mod -1 ? Then after you click all the boons and banes and do the /boonbane roll your createRoll can check if the Modifier (nMod in rRoll) is positive or negative or zero (in which case just send a message to chat saying nothing is rolled)? And then based on that it could set the correct number of dice in rRoll (table.insert(rRoll.aDice, "d100"..sSize); for banes), etc?

  7. #17
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,406
    Quote Originally Posted by TriOpticon View Post
    That is all very helpful. Is there documentation about what a roll table (rRoll) should contain?
    It's in the comments of the manager_actions.lua file in CoreRPG. And is also in post #2 of the thread I linked in my previous post.
    Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!

  8. #18
    Typed in wrong window...ignore.
    Last edited by mozmonar; March 10th, 2018 at 22:17. Reason: Wrong window

  9. #19
    Thanks very much damned, delux, and Trenloe --- extremely helpful. If you or others have the time, I'd like to ask a few more questions:

    1) About MoreCore specifically: is there already functionality to change the type of roll based on a flag of some kind? I'm thinking of something like the shadowrun karma mechanics, where normally you'd roll for number of successes with a bunch of d6, but occasionally you'd modify the roll with karma and make the same number of dice explode. Ideally you'd be able to add a karma flag to the character sheet, or modifier stack, or similar, so you didn't need two or more buttons for each skill.
    2) Related --> does the modifier stack accept non-integer values, like the string "karma"?

    Again, many, many thanks for your assistance. This appears to be a great online community!

    Best,
    Joe
    Last edited by altepeter; March 11th, 2018 at 15:36. Reason: Realized some questions were already answered elsewhere.

  10. #20
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,406
    Quote Originally Posted by altepeter View Post
    1) About MoreCore specifically: is there already functionality to change the type of roll based on a flag of some kind? I'm thinking of something like the shadowrun karma mechanics, where normally you'd roll for number of successes with a bunch of d6, but occasionally you'd modify the roll with karma and make the same number of dice explode. Ideally you'd be able to add a karma flag to the character sheet, or modifier stack, or similar, so you didn't need two or more buttons for each skill.
    2) Related --> does the modifier stack accept non-integer values, like the string "karma"?
    1) The easiest way for MoreCore to handle this would be to have a different roll setup, or maybe a flag in the same roll. Either way, it will require the roll handler to be setup to handle it, and the relevant roll added to the character sheet. You'd end up with two separate rolls - one with karma and one without it.
    2) Nope. The modifier box only takes numbers. You could maybe look at applying a "KARMA" effect to a character for one roll, then look for that effect in the dice roller.
    Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!

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
  •  
FG Spreadshirt Swag

Log in

Log in