5E Product Walkthrough Playlist
Page 1 of 5 123 ... Last
  1. #1

    Dice without numbers.

    Not to be confused with SWN.... but my goal is dice that don't have numbers shown, but do calculate numbers for a result as seen here:

    https://www.twitch.tv/videos/241248808

    The dice images were changed and the results add up for each type of die rolled the correct number of faces for the type of die roll. However the phantom 1 and 0 are appearing on the dice.

    getting the dice image changed and rolling to show the different faces was "easy" enough, but for the life of me i can't figure out how to not put a number on the actual dice as is done with the Fudge die.


    #2
    also, when trying to roll the dice in the tower i get yelled at for:

    Script Error: [string "scripts/manager_actions.lua"]:628: attempt to index field '?' (a nil value)
    and 628 is fine outside of the tower, and is how it all runs to begin with.

    i only added some comments to tell myself where i added things and what things are doing, so it goes as follows from line 608~628 of coreRPG modified
    Code:
    function createActionMessage(rSource, rRoll)
    	local sDesc = rRoll.sDesc;
    
    	-- Build the basic message to deliver
    	local rMessage = ChatManager.createBaseMessage(rSource, rRoll.sUser);
    	rMessage.type = rRoll.sType;
    	rMessage.text = rMessage.text .. sDesc;
    --the die roll
    	rMessage.dice = rRoll.aDice;
    --need 3 different dice
    --anyone attacks
    --hero defends
    --monster defends
    --show only total of correct die faces
    --show only the die faces no numbers on them
    --deal with dice modifiers later
    	rMessage.diemodifier = rRoll.nMod;
    
    -- HeroQuest dice
    --your edit here dummy
    	if rMessage.dice[1].type == "HQ Attack" then
    doesnt matter which of the three methods i try to roll as in the video, it always hangs on that line 628 when attempting to use the tower. has no problem just throw the dice into chat.

    the only other way to reproduce is to change dice[0].type, then i get that error both trying to roll in tower and in chat.
    Last edited by shadzar; November 15th, 2018 at 21:26.

  2. #2
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    26,686
    Blog Entries
    1
    Hi shadzar you cannot manipulate the actual 3d dice.
    The fate dice is an actual dice coded that way in the engine.
    Access to these is not available in this engine.

    In the unmodified manager_actions.lua lines 619-626 are dealing with dice tower rolls...
    Is it possible you havent closed a statement or have an extra/missing end etc?

    Nice job on the Hero Quest rolls.

  3. #3
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,416
    #1 - you can't change the actual 3D dice - these are built into the FG client application code.

    #2 - put some debug code in the LUA before the error - something like Debug.console("rMessage = ", rMessage); This will output the whole of the rMessage record and it might give you an idea what data is missing when you roll in the tower. It looks like at least dice[1].type is missing, but there might be more data missing that might give you an idea of what is causing the issue.
    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!

  4. #4
    not the 3d dice, as you can see in the video, how i changed the d6 model to act as the HQ dice, and give the same faces in chat, but only added the successful rolls for the type of roll being made. If anything, i would want to completely DISABLE the 3d dice animations, not change them as they serve no function in FG or the other VTTs except for nostalgia.

    nothing is unclosed, else the dice wouldn't be rolling via the chat drag&drop.

    dice[1].type is the first die in the table of rolls and the way it figures out which type of custom die is being rolled, so that can't be the cause. i will try throwing that debug into it just prior to line 628.

    it is faint in the video, but you can still see the 0 and 1 displaying on the die faces in chat. that is what i want to remove. only show the faces, not the corresponding numbers, and then show the results. so far that all works, except it is still showing the number over the die face for each rolled dice.

    EDIT: nope, debug didn't help, everything is the same except...

    Code:
    s'dice' = { #1 = { s'result' = #1, s'type' = s'd6' } }
    becomes...
    Code:
    s'dice' = { #1 = { s'result' = #4, s'type' = s'HQ Attack' } }
    so the d6 result was a 1, the HQ result was a 4. and dice[1].type is d6 for the normal d6, and HQ Attack for the HQ Attack die as expected.
    Last edited by shadzar; April 8th, 2018 at 16:19.

  5. #5
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,416
    Don't use "HQ Attack" as a die type name. Start with a lower case "d" and don't use any spaces to define your <customdie>

    Re not rolling the actual die - see the info here: https://www.fantasygrounds.com/refdoc/customdie.xcp If you don't have a physical die model to roll, then you can only access the custom die through code. You can't drag/drop etc..
    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. #6
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,416
    Additionally, if you want to use the chat command /die with your customdie make sure you use dX.. for the customdie name - where X.. is a unique numerical value that doesn't match with any other dice. e.g. d611 or something similar.
    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!

  7. #7
    Quote Originally Posted by Trenloe View Post
    Don't use "HQ Attack" as a die type name. Start with a lower case "d" and don't use any spaces to define your <customdie>

    Re not rolling the actual die - see the info here: https://www.fantasygrounds.com/refdoc/customdie.xcp If you don't have a physical die model to roll, then you can only access the custom die through code. You can't drag/drop etc..
    dHQ_Attack then?

    and they do drag and drop into chat currently, just not in the tower, but that may be fixed if i am understanding you.

    about the /die command, not interested as the dice will be rolled via a click on the character sheet if i can ever figure out that part AFTER there is proper dice to roll

    EDIT: no change in the dice command name. starting with d and no paces resulted in the same previous error form the dice tower... oh well i can leave the tower permanently disabled in data_options_core so it isnt that big a deal since it wont be fully automated as it wont include the rules to play as that would not be legal... someone will have to own the game to use it... mostly myself since demo FG can't have more than one connected player


    so back to #1... how to make the die result NOT show on the dice, while still having a result total? [B]dicedisplay=1[/B shows the result of the die rolls, but how do you get rid of the numbers on the die in chat?
    Last edited by shadzar; April 8th, 2018 at 17:14.

  8. #8
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    26,686
    Blog Entries
    1
    Do you mean the numbers on the faces of the dice when they stop rolling?
    If so you cant get rid of them.
    You could instead of using dice just use a math.random function and skip all the dice bouncing around the screen alltogether?

  9. #9
    ok, if you load coreRPG and the die on the far right, roll about 10 of them, they will either give you a +, -, or nothing on the die face in chat

    not the 3d junk, not the animation, in chat. what i want is the nothing to show on that square that represents the face of the d6.

    i want the fac of the die in chat for each die rolled, but i do NOT want a number displayed on it. again it is faint in the video if you look at the chat . but ANY dice you roll yo will see the result on the dice icon.

    i want the dice face in chat, and the result of counting the dice faces. i do NOT want the numbers on the faces of dice in chat.
    Last edited by shadzar; April 9th, 2018 at 02:59.

  10. #10
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    26,686
    Blog Entries
    1
    The Fate Dice has - 2 pluses, 2 minuses and 2 blanks. Its a 3d dice that is built with 2 blank faces. On average, one in 3 fate dice will land with no number showing. The rest of the time a symbol will display.

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