Refer a Friend
Page 1 of 2 1 2 Last
  1. #1
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    24,754
    Blog Entries
    1

    Traveller Dice Help

    Im trying to add a set of Traveller Dice to MoreCore.

    It currently displays like this:



    Im currently calculating the value of the dice as first dice * 10 + second dice
    and I can output that fine in the Chat Description but I dont know how to tell the Dice Display to be
    11 and not 2, or 26 and not 8 etc.

    I will need this to be able to drag the result and have the drag data be correct.

    function createChatMessage(rSource, rRoll)
    local rMessage = ActionsManager.createActionMessage(rSource, rRoll);

    rMessage.dicedisplay = 0; -- don't display total
    local nVal = rRoll.aDice[1].result *10 + rRoll.aDice[2].result;
    rMessage.text = "[Skill] " .. rMessage.text;
    rMessage.text = rMessage.text .. "\n[Result] "..nVal.." \n[Target] not used yet";
    return rMessage;
    end

    Any pointers please

  2. #2
    Look at chatwindow.onDiceTotal event.
    https://www.fantasygrounds.com/refdo...cp#onDiceTotal

    Regards,
    JPG

  3. #3
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    24,754
    Blog Entries
    1
    Thanks JPG - can you think of an example used anywhere?

  4. #4
    No. I built the feature for something like this, but never needed for a core system. You get to be the guinea pig.

    cheers,
    JPG

  5. #5
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    24,754
    Blog Entries
    1
    Quote Originally Posted by Moon Wizard View Post
    No. I built the feature for something like this, but never needed for a core system. You get to be the guinea pig.
    Thank you! (I think)

  6. #6

    Join Date
    Jun 2013
    Location
    Isanti, MN
    Posts
    2,682
    Skill checks in Traveller don't use that mechanic. It's a straight 2d6, totaled, checked against a target number (usually 8).

  7. #7
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    24,754
    Blog Entries
    1
    Quote Originally Posted by Andraax View Post
    Skill checks in Traveller don't use that mechanic. It's a straight 2d6, totaled, checked against a target number (usually 8).
    So what is d66 used for?

  8. #8
    Quote Originally Posted by damned View Post
    So what is d66 used for?
    Just about anything Traveller needs a larger sample from than 2-12. Examples would be cargoes, patrons, random encounters, etc. Large lots that 2-12 can't handle with enough granularity.

    Now I might be missing something you need to do in the code, but back when I made a Traveller ruleset, I just made a custom d60 and then just called rRoll.aDice = { "d60","d6" };.


  9. #9
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    24,754
    Blog Entries
    1
    Quote Originally Posted by OTG_Wraith View Post
    Just about anything Traveller needs a larger sample from than 2-12. Examples would be cargoes, patrons, random encounters, etc. Large lots that 2-12 can't handle with enough granularity.

    Now I might be missing something you need to do in the code, but back when I made a Traveller ruleset, I just made a custom d60 and then just called rRoll.aDice = { "d60","d6" };.

    Thanks OTG_Wraith. What did you do for rolling the d60?

    Ive got that working but I havent worked out how to grab the number of the real d6 and multiply by 60 in the dice results so Im throwing a 3d dF and generating my number from 10-60 programatically...



    If yours rolls a d6 and the 1s generate 10s etc Id love to see if the code is compatible with what Im doing...

  10. #10
    Maybe I'm not following what you're asking precisely, but I am just doing what you did in the reply above...

    Code:
    	<customdie name="d60">
    		<model>d6</model>
    		<menuicon>customdice</menuicon>
    		<script>
    			function onValue(result)
    				return result*10;
    			end
    		</script>
    	</customdie>
    And then having the internal roll and die calls use the new d60 and an additional d6.

    Are you asking how to trap for the d60 results individually in a d66 roll?

Page 1 of 2 1 2 Last

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