Individual and total scores on Dice Rolls

I want to include dice roll buttons in my module but I want the individual results AND the total reported. I can’t find any way of doing this on the form as provided. There is an option to report the total but, if I select this, the individual scores are not reported. Can anyone tell me how to get the reporting I want, please?

I guess you need to make everything yourself instead of using dice roll buttons. A control piece on a board that outputs exactly what you set it up to report, using calculated properties and reporting.

For an example of how to do this, look at the Merchant of Venus module. The 4 Dice, 3 Dice, 2 Dice Global Key Commands (in the Roll Dice menu) trigger the same named pieces in the Die Roll At-Start Stack on the Setup_Files map board, which is where all the work is actually done. Note that this module was originally written for an old version of VASSAL, and so everything is triggered with keystrokes (no Named Key Commands), which can make it difficult to follow.

1 Like

Thanks, Benkyo - I think. That sounds a bit like building a car from scratch to go down to the post office and post a letter! If the dice system can achieve either objective, whay can’t it achieve both? I’m by no means sure my capabilities in Vassal are up to the DIY without detailed instructions. I realise that’s nobody’s fault but mine, but it is a fact of life :roll_eyes:. I see jrwatts has posted a response and I must check that out to see whether it overcomes my issues but I appreciate your help.

Hi JR:
Thank you for your response. I have downloaded the MoV module and looked at the coding. Sadly, I am unable to see how the designer has achieved the desired result. Certainly what he has done is exactly what I want to do but (almost certainly my bad) I can see nothing that gives me a clue to how the process works or is coded. I’m sure I’m being dense but that’s the situation. Can you help a little further, please?

Hi again Jonathan:
Sorry about this but I’m trying to save your time. I’ve managed to locate some single piece forms which look like they are the guts of what I need. I’ll persevere with them and ask you to hold fire on responding again while I see if I can adapt this to what I want.
Regards,
Mike

Right, I’ve spent some time trying to analyse what is going on. I think one of my main difficulties is in determining what is part of the dice rolling process and what is specific to the MoV game (e.g. the “autopilot”). It also seems to be a somewhat long-winded way of going about what should be a fairly simple process. I’m not sure that I’m going to be able to resolve the matter and I may just tell the players of the module I’m writing to add the individual die scores together at the appropriate time.

I feel Vassal are missing something here and all it would need is a simple tweak to the existing dice rolling facility.

I know it sounds involved, but depending on the game and dice involved, I personally prefer to actually implement a dice tray on the board, with dice that are possible to manipulate and arrange with a “physical” presence, so for me the extra work is necessary regardless.

For example, in one module I made its possible to roll up to 35 dice, so I made a 7x5 grid on a dice tray, allowed players to click on the grid to select X dice, then click roll. X dice appear in place of the grid on random faces, sorted from highest to lowest, and a report of the total appears in chat. Each die can be further manipulated individually, and they can all be deleted and replaced by the grid by clicking reset.

That sounds awesome to me - I wouldn’t know where to start :roll_eyes:. I dread to think what is involved in the coding. My abilities with module design are based on my old Basic programming days with an Atari ST. I never graduated to languages like Java (although I did get quite good at Visual Basic when I got my first PC).

For my module, I have arrived at a work-around. I plan to put two 2d6 dice buttons on the bar and have one set to report individual die rolls and the other a total. Not the most elegant solution but it will work and means I can get the job done relatively quickly.

I may well go back to trying to get Jon Watts’ suggestions to work; I’ve already found a couple of routines that I don’t really know much about, e.g. placing an At Start Stack on the Main Board and including various traits cribbed from the Merchant of Venice module. Obviously, I haven’t got this right because it doesn’t appear to do anything and I probably need to have other controls in place to make it work - but I don’t know what. It’s something I probably need guidance on but I don’t want to waste the valuable time of the Vassal helpers when I have a routine that does what I want.

I continue to learn with each project I try and you guys are always there with guidance - thank you.

I found an old thread that might help… Report Dice Results

It does seem that the plain old dice button is unable to report a total. However, the not much more complicated symbolic dice button is able to do this … it generates a report property numericalTotal

I built a demo module for you… there’s a test roll button. If that gives you what you’re after, take a look at the symbolic dice component in the module.

Hi Mark:
Bingo! Pretty well exactly what I want. I did try to change the reporting code in the dice button form but never got the result I wanted. Thank you for taking this trouble. I have never consciously been aware of the SDB component. I also have to admit that I haven’t found the time to study or run a tutorial on the Vassal system and, each time somebody like yourself comes along and gives me the benefit of their knowledge, I blush and think how I should take the time to do so.

My next vassal project will not be coding a game but learning the system properly. Once again, my thanks.

1 Like

Mark:
I’ve successfully incorporated your Symbolic Dice concept into my module and adjusted the report format to get what I wanted on the display. Then I suddenly realised I needed a facility to apply dice roll modifiers to the total score and, of course, that isn’t available on the SDB component. Is there some quick work around you can think of? I can always use a 2d6 Dice Button to get what I want - but that sort of makes the SDB superfluous and doesn’t tell me the individual die scores.

I would encourage this–it will redound to your benefit if you plan to continue doing VASSAL projects in the long-term.

It’s not that people aren’t generally willing to be helpful, but sometimes due to the nature of the system it’s arduous and challenging to convey the knowledge of how to achieve a logically simple effect using all the interlocking VASSAL components. If you spend the time to understand each part in its own right, you will learn to leverage multiple parts together in concert. Having someone else give you the shortcut to just get it done like following a recipe probably means you aren’t learning the “why” along the way.

You can still probably do quite a bit this way, but it’ll always be limiting–beyond a certain point (very hand-wavey, I know) it may become unreasonable to hope that people will devote their own time to laying out the approach or throw together a demo module to crib from. And as above, if you aren’t solid on the fundamentals, a demo module may be its own kind of detour if you don’t know where to find the bits that achieve the outcome.

2 Likes

I see you’ve joined the conversation on getting the feature gaps filled. Apart from that, I am not sure there is an answer that doesn’t involve layering more module components on top (which has already been mentioned). If you end up needing this, the C&C modules such as C&C Ancients give further examples of relatively simple customised dice functionality that you might adapt.

I completely agree with you, Joel. I only hope I have the time left. I’m over 80 and use writing modules to keep my brain active whilst providing things that other board gamers can use. I shall start learning Vassal in a more orderly manner now and hope I reach a point of understanding before time runs out :wink:

As well as exercising my brain, it gives me a great deal of pleasure during the process and satisfaction when a module comes to completion. I’ve completed four or five so far and know that a dozen or so BGG members are using them. I haven’t yet fathomed how to upload them to the Vassal site but I shall investigate further when the current module is complete.

Hi Mark:
I play C&C:Napoleonics a lot and use miniature figures occasionally in place of the blocks. I have the module in my library and will investigate it further. My specific current issue is one the players can easily resolve themselves without my providing a mechanic within the module but it would be nice to offer them one.

As you will see from my communications with Joel (who has come to my aid on numerous occasions) I plan to go through some Vassal tutorials to learn the ropes in a more orderly and complete manner. Hopefully, this will reduce the number of times I have to pester good people like you and him for help.

Wish me luck :slightly_smiling_face:

1 Like