Hello, I’ve looked all over the place and thought I’d try asking.
I’m working on a module and I would like money to be represented numerically instead of with paper money or tokens, so that it can be modified with the keyboard (faster that way, and opens up some automation options, I think?). I’ve figured out that it should be a Global Property, so I have GPs named “P1Money”, “BankMoney”, etc. I’ve also created a piece with a TextLabel in each Private Board that shows that player’s money value, and a Bank board that does the same.
Now, what I would like to do is have a button of some sort, either as a right-click on the “money” piece or in the toolbar of the private boards, that performs an action of “send money to Bank” and prompts for the amount. It would then subtract that amount from the player, and add that amount to the Bank. Likewise, button(s) on the bank board for “send money to player X” that subtracts from the bank and adds to the player.
Is there a module out there that does something like this that I could look at, or some other trick to it? I see lots of things for setting a GP or incrementing a GP, but I haven’t found anything for this kind of math logic. All ideas appreciated!
As soon as the new For The People 3.0 module clears moderation (just uploaded it tonight), it has scads of this stuff in it.
Meanwhile if you want you can pull it from my personal website – www.brianreynolds.com/files/For_The_People_3.0.vmod
Or you’re welcome to wait until the one on here clears moderation.
- The armies (e.g. “Army of Northern Virginia”) all have strength point values stored in Global Properties, and when you have the army selected you can use NUMPAD+ and NUMPAD- to raise and lower the value, OR hit Ctrl+S to type the value. OR you can move the “Army SP” marker over on the left side of the board and it will keep the one in the army updated (and the Army SP marker ALSO accepts all the keyboard commands just like the Army).
- There are simpler tokens - look at the “Blockade Marker” prototype to see a Global Property that also has a token that tracks it up and down a scale w/ keyboard commands to move it up and down (or you’re allowed to just drag the token).
- The Strategic Will counters track numbers that range from 0 to 199 (one each for Confederate and Union), and accept input from keyboard, dragging-the-markers, or receiving Global Key Commands from other game events.
- Another simple one – the “Rail” markers on the left side, one each for CSA and USA, track a number from 0-15, and up on the toolbar I have set up a set of Global hotkeys, so that no matter what you have selected in the game you can always do Ctrl+Numpad+Plus and Ctrl+Numpad+Minus to raise and lower the Confederate rail level, and Alt+Numpad+Plus and Alt+Numpad+Minus to raise and lower the Union rail level (so that as you’re dragging units around my rail it is easy to mark the rail points off without having to go all the way over to the edge of the map and move the marker).
Anyway lots of that stuff is pretty analogous to what you describe. If you want to see the most elaborate implementation, look for the “Army” prototype which includes “SP Dropoff”. If you want to see the simplest implementation, look at “ChooChoo”
Thanks Brian, this has certainly given me some good ideas!
What I ended up doing was to create an additional GP called TempMoney, and then a piece with a Trigger action that calls 4 things: 1) Prompt for how much to send and store in TempMoney 2) Add TempMoney to RecipientMoney 3) Subtract TempMoney from SenderMoney 4) Reset TempMoney to 0. It works and does what I want it to, but I think with some of your ideas I can make it a bit more elegant