Library Token: Dice Box

These are tools and utilities that make it easier to run games. This includes Lib: macro tokens dropped into MapTool to manage the game, a conversion file for CharacterTool to allow use in MapTool, or just about anything else you can think of -- except graphics with macros and anything specific to a particular campaign framework. Those are already covered by the Tilesets subforum and the Links and External Resources forum.

Moderators: dorpond, trevor, Azhrei, giliath, Gamerdude, jay, Mr.Ice

Ego Archive
Cave Troll
Posts: 26
Joined: Thu Apr 16, 2009 4:12 pm

Re: Library Token: Dice Box

Post by Ego Archive »

Very nice, and this also solves any issues WoD players have, as it easily shows how many successes a roll has without having to hover over. Very cool.

Just as a note, it appears to break if you select d100, not a big issue as you just select 2d10, and it works great, but I thought I would mention it.
Towndale: A user generated fantasy town for any game system.

User avatar
Rumble
Deity
Posts: 6235
Joined: Tue Jul 01, 2008 7:48 pm

Re: Library Token: Dice Box

Post by Rumble »

Ego Archive wrote:Very nice, and this also solves any issues WoD players have, as it easily shows how many successes a roll has without having to hover over. Very cool.

Just as a note, it appears to break if you select d100, not a big issue as you just select 2d10, and it works great, but I thought I would mention it.
Hm. What's the breakage symptom? Giant red X's, or an error message?

Or, oh, wait, I bet it's because there's only one image for d100. I could probably rig it to show 2 d10s. Have to look into it.

User avatar
Daelkyr
Giant
Posts: 165
Joined: Mon May 19, 2008 10:23 pm

Re: Library Token: Dice Box

Post by Daelkyr »

Would it be possible to set the dice roller to accommodate exploding dice rolls? And if so, what would be necessary to make it work so. (I assume a table of some sort, but what would need to be build?)

Wonderful work by the way.

User avatar
RPTroll
TheBard
Posts: 3159
Joined: Tue Mar 21, 2006 7:26 pm
Location: Austin, Tx
Contact:

Re: Library Token: Dice Box

Post by RPTroll »

Daelkyr wrote:Would it be possible to set the dice roller to accommodate exploding dice rolls? And if so, what would be necessary to make it work so. (I assume a table of some sort, but what would need to be build?)

Wonderful work by the way.
There's a check box for exploding dice on the form on the upper right.
ImageImage ImageImageImageImage
Support RPTools by shopping
Image
Image

User avatar
Daelkyr
Giant
Posts: 165
Joined: Mon May 19, 2008 10:23 pm

Re: Library Token: Dice Box

Post by Daelkyr »

And right you are. I actually am wondering what was needed for Shown Dice (left that part out I did) when rolling exploding dice ala v29.1 of the dice roller.

User avatar
Rumble
Deity
Posts: 6235
Joined: Tue Jul 01, 2008 7:48 pm

Re: Library Token: Dice Box

Post by Rumble »

Daelkyr wrote:And right you are. I actually am wondering what was needed for Shown Dice (left that part out I did) when rolling exploding dice ala v29.1 of the dice roller.
The exploding dice roll doesn't give the intermediate results, just the final number, so I can't really think of a way to show dice for exploding rolls (except maybe dice images showing numbers from 1 to, say, 100 or so).

User avatar
Daelkyr
Giant
Posts: 165
Joined: Mon May 19, 2008 10:23 pm

Re: Library Token: Dice Box

Post by Daelkyr »

I'm good with that. What would I need to change to "make it so"? I can handle the images, I just don't know macros well enough to poke this on my own.

[EDIT] As an addendum, if I wanted only the images shown and not the "rolled xdx+xdx+n" part shown, how might I go about that?

User avatar
Rumble
Deity
Posts: 6235
Joined: Tue Jul 01, 2008 7:48 pm

Re: Library Token: Dice Box

Post by Rumble »

Daelkyr wrote:I'm good with that. What would I need to change to "make it so"? I can handle the images, I just don't know macros well enough to poke this on my own.

[EDIT] As an addendum, if I wanted only the images shown and not the "rolled xdx+xdx+n" part shown, how might I go about that?
Lemme think. I believe you'd need to add each die value and image to the dice tables so that you have tables with all 100 values for each die type. After that, you'd have to edit the code (RollDice, I think) to enable display of images when exploding dice are selected. As for displaying only the dice values, somewhere in the RollDice macro you'd just need to remove dice breakdown line.

Zandel
Giant
Posts: 133
Joined: Thu May 13, 2010 1:52 pm

Re: Library Token: Dice Box

Post by Zandel »

OK so I installed this and even though I did the "Select the Dice Box token, and in the selection window (if you don't see that window, go to Window > Selection) and click the button labeled onCampaignLoad. The Dice Box frame will pop up!"

I still seem to have to manually launch it every time, it does not auto load, also, it only appears when I am on on the map I dropped the token on, not on any other maps, any ideas?

Thanks

User avatar
Rumble
Deity
Posts: 6235
Joined: Tue Jul 01, 2008 7:48 pm

Re: Library Token: Dice Box

Post by Rumble »

Um...heh... :oops:

It doesn't work because I seem to have taken out the command in the onCampaignLoad macro that would have launched the dice box. Here's an immediate fix:

1. Select the Dice Box token.
2. Right click on the button for "onCampaignLoad", and select "Edit."
3. Add this as the last line in the macro:

Code: Select all

[h:dbxLaunch()]
4. Click "OK".

Now it should automatically load when you open the campaign.

With regard to it appearing on any map, that should also fix that. It's a dockable frame, so it will stay open all the time.

Zandel
Giant
Posts: 133
Joined: Thu May 13, 2010 1:52 pm

Re: Library Token: Dice Box

Post by Zandel »

Thanks for the assistance Rumble. I added that line, copied it right out of your quote and now I get this
Undefined function: dbxLaunch

User avatar
Rumble
Deity
Posts: 6235
Joined: Tue Jul 01, 2008 7:48 pm

Re: Library Token: Dice Box

Post by Rumble »

Zandel wrote:Thanks for the assistance Rumble. I added that line, copied it right out of your quote and now I get this
Undefined function: dbxLaunch

Weird.

Hang on, let me check it - I thought it defined that function right before use.

Edit: okay, to double-check, your onCampaignLoad macro looks like this, right?

Code: Select all

[h,token("Lib:Play"):d100Asset=getTokenHandout()]
[h,token("Lib:Play"):bgAsset = getTokenPortrait()]
[h,token("Lib:Play"): setLibProperty("D100", d100Asset)]
[h,token("Lib:Play"): setLibProperty("bg",bgAsset)]
[h:defineFunction("dbxOutputTo","dbxOutputTo@this")]
[h:defineFunction("dbxLaunch", "Launch Dice Box@this")]
[h:dbxLaunch()]

Zandel
Giant
Posts: 133
Joined: Thu May 13, 2010 1:52 pm

Re: Library Token: Dice Box

Post by Zandel »

It didn't have any of the stuff before the : it looked like this
[h:status = input(
"SituationalModifier|0|Set SituationalModifier",
"Choice|Will,Fortitude,Reflex|Which Situational Modifier do you want to modify?|RADIO|SELECT=0")]
[h:abort(status)]

[switch(Choice),code:
case 0:
{Will Save [1d20+ WillSave + SitSaveMod + SituationalModifier]};
case 1:
{Fortutude Save [1d20+ FortSave + SitSaveMod + SituationalModifier]};
case 2:
{Ref Save [1d20+ RefSave+ SitSaveMod + SituationalModifier]};
default:{invalid input}]
I pasted your code above in and now it works like a champ thanks!!

AdultbyDay_DMbyNight
Kobold
Posts: 3
Joined: Mon Mar 08, 2010 5:12 pm

Re: Library Token: Dice Box

Post by AdultbyDay_DMbyNight »

I am still a nube when it comes to this, but have been dabbling. I have been trying to make it a bit more system specific and have added a text box to label the roll vs defense of choice or damage type and have it printed out with the results. Success so far but my next goal seems daunting to me as I stare blankly at the more advanced codes for the rolls. I would like to either add a box to place in a reroll value for the dice or replace the target box with it. Any guidance? I know the reroll function I am just not sure where it would be added or if it would be come to bulky to do so. Let me know, if the time permits, any suggestions or even specific code to cut and paste.
Thanks again, these drop in's are great, your work is greatly appreciated.

User avatar
RPTroll
TheBard
Posts: 3159
Joined: Tue Mar 21, 2006 7:26 pm
Location: Austin, Tx
Contact:

Re: Library Token: Dice Box

Post by RPTroll »

Code: Select all

2010-06-06 19:19:08,707 [client.TransferableHelper:112] INFO - Transferable file:///home/rkathey/Games/Anarch.rptok


2010-06-06 19:19:08,730 [client.TransferableHelper:126] INFO - Reading local file:  /home/rkathey/Games/Anarch.rptok
2010-06-06 19:19:08,732 [client.TransferableHelper:137] INFO - URL_FLAVOR didn't work; trying ImageTransferableHandler().getTransferObject()
2010-06-06 19:19:08,777 [client.MapTool:240] ERROR - Error during drag/drop operation<br>java.awt.datatransfer.UnsupportedFlavorException: Group Tool Token List
java.awt.datatransfer.UnsupportedFlavorException: Group Tool Token List
	at sun.awt.dnd.SunDropTargetContextPeer.getTransferData(SunDropTargetContextPeer.java:231)
	at sun.awt.datatransfer.TransferableProxy.getTransferData(TransferableProxy.java:56)
	at java.awt.dnd.DropTargetContext$TransferableProxy.getTransferData(DropTargetContext.java:359)
	at net.rptools.maptool.client.TransferableHelper.getTokens(TransferableHelper.java:189)
	at net.rptools.maptool.client.TransferableHelper.importData(TransferableHelper.java:303)
	at javax.swing.TransferHandler.importData(TransferHandler.java:745)
	at javax.swing.TransferHandler$DropHandler.drop(TransferHandler.java:1468)
	at java.awt.dnd.DropTarget.drop(DropTarget.java:434)
	at javax.swing.TransferHandler$SwingDropTarget.drop(TransferHandler.java:1193)
	at sun.awt.dnd.SunDropTargetContextPeer.processDropMessage(SunDropTargetContextPeer.java:512)
	at sun.awt.X11.XDropTargetContextPeer.processDropMessage(XDropTargetContextPeer.java:165)
	at sun.awt.dnd.SunDropTargetContextPeer$EventDispatcher.dispatchDropEvent(SunDropTargetContextPeer.java:824)
	at sun.awt.dnd.SunDropTargetContextPeer$EventDispatcher.dispatchEvent(SunDropTargetContextPeer.java:748)
	at sun.awt.dnd.SunDropTargetEvent.dispatch(SunDropTargetEvent.java:30)
	at java.awt.Component.dispatchEventImpl(Component.java:4487)
	at java.awt.Container.dispatchEventImpl(Container.java:2099)
	at java.awt.Component.dispatchEvent(Component.java:4460)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574)
	at java.awt.LightweightDispatcher.processDropTargetEvent(Container.java:4309)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4163)
	at java.awt.Container.dispatchEventImpl(Container.java:2085)
	at java.awt.Window.dispatchEventImpl(Window.java:2478)
	at java.awt.Component.dispatchEvent(Component.java:4460)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
	at net.rptools.maptool.client.swing.MapToolEventQueue.dispatchEvent(MapToolEventQueue.java:24)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
urlError.png
urlError.png (10.63 KiB) Viewed 5465 times
ImageImage ImageImageImageImage
Support RPTools by shopping
Image
Image

Post Reply

Return to “Drop-In Macro Resources”