One die result causing another die roll

Hi, in my game, if you roll a six on the first die, you roll again and try to get another six. How do I get the second roll done automatically?

You would need a pair of Trigger Actions: the first would roll the die, then call the 2nd. The 2nd would have a condition (“Trigger when properties match”), checking if the result of the first was a 6. If so, roll the die again. If you can keep rolling until you don’t get a 6, the 2nd trigger action can then call itself again.

OK, thanks, I’ll give it a try. so I have an events die roll that finishes and gives a result if you roll a 1-5, but if you roll a 6, you roll again. There’s just one problem, though, as a trigger action is applied to a game piece but my die roll is a toolbar menu button - do I create a game piece then hide it or something like that?

Yes, you can create a game piece with no image attached and stick it in an At-Start Stack somewhere. If you still want to trigger the die roll from a toolbar button, you can add a Global Key Command button that calls the Trigger Action on the hidden piece.

This has me slightly confused. So do you basically just ignore sixes and roll again, so the only valid results are 1-5? Or does a 6 indicate something special plus a roll again?

yes, if you roll a six you roll again on a special event table, with six further possibilities. I also have a prospecting table that says if you roll a three, you find a trace and you also have a chance of finding something special if you then roll a six.

Well there are 70 asteroids to prospect, I think it would take a long time to mark every hex so you could click on it and roll the prospecting dice. Much simpler to put a prospecting button on the toolbar. I’ve worked out how to roll the prospecting dice except for the special case where if you roll a 3 you detect a “trace” and can roll again to find some so-called “CT” that is worth a huge amount of money, if you then roll a six.

Can you suggest a module that I should download so I can see how features like the one you suggest can be added to my module? There’s a lot of if-then-else type programming possible, on individual hexes, and also a lot of finances, which at the moment I have got a spreadsheet handling. It would be nice if there was some way to link the spreadsheet directly

Sorry, I’m not aware of any modules actually using this method. The closest you can come to a spreadsheet in VASSAL is to create a look-up table with Global Properties; search the forums for an example.

I believe you can simulate a spreadsheet by using a bunch of Global Properties, each representing one cell of the sheet. With Set Global Property traits you can effectively have formulas for these “cells”.

I’m working on a module for an 18xx prototype. In case you don’t know, 18xx games involve a lot of financial transactions with simple math. I have chosen to abstract the money with Global Properties and Text Labels displaying their values rather than having pieces representing money tokens to move about. Here is a sample module with my “proof of concept” for abstracting the money and making purchases between entities with reports to the chat log:

This concept can be used with any resource. Hopefully this helps.

By the way @jrwatts gave me the expression to imbed commas as thousands separators in the display of the “Cash” Global Property. Please be aware that this expression only works for numbers with an absolute value less than one million. This expression is in the CashBoxPrototype in the Common folder in the Game Piece Prototype Definitions.

Ok, thanks, this is my first mod so I’m not sure if I should go into such detail yet, I don’t have any Global Properties or know how to use them. Perhaps my next step should be to go to each of the 70 asteroid hexes and make it possible to right-click on them and roll dice to prospect them. Working out how to record the costs of moving multiple space ships around while mining ore, loading it onto ships, moving it to a sales location, and selling it/ buying more equipment/paying maintenance etc, is a real head-spinner! I haven’t been able to properly match the grid to the map so I’m wary of letting the game count hexes and so forth.

You can also a lesser number of GPs to simulate a spreadsheet. The GPs represent either the rows or columns. Each GP then has a string of ‘values’ that are the values in the each column/row.
Eg, (GP) Row1=“0102030405060708091011121314”
(GP) Row2=“similar”
Use the substring command to extract the desired data.

Thanks! Wow, I might as well be programming in assembler, there’s a lot of lines in my spreadsheet!