Dice rolled by moving over map

Discuss macro implementations, ask for macro help (to share your creations, see User Creations, probably either Campaign Frameworks or Drop-in Resources).

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

User avatar
CoveredInFish
Demigod
Posts: 3104
Joined: Mon Jun 29, 2009 10:37 am
Location: Germany
Contact:

Dice rolled by moving over map

Post by CoveredInFish »

CHECK FOR LATEST VERSION (0.3) BELOW!

Okay, I fiddled around with a game where its useful if you have actual dice objects on the game table and if you roll them you really see the result on the dice. (yep, this is what I stitched together for fiasco). After I had done that "onTokenMove" came to my mind.

The result is "CiFs dicebag". Nah, its probably to early to give it a name yet :-) This is currently just a proof of concept .. it works fine I think and maybe its worth to invest more time (but I cannot promise to do that right now - "to many projects" syndrome)

Set up dice:
- drop any empty token on the map
- call setup campaign macro
- enter table name and face count of a table with dice images (default ones do fine)

If you now move this token it asks you if you wanna ROLL the die or just MOVE it around. If you move several die tokens at the same time all will be rolled and sum is calculated. Token names are shown in the chat output so you could name dice tokens "attack dice", "d20" or "wild die" ...

If have some utility macros like "sum selection" and "roll selection".
Attachments
cifd_0_1.cmpgn
(1.06 MiB) Downloaded 212 times
Last edited by CoveredInFish on Thu Jan 12, 2012 11:40 am, edited 3 times in total.

User avatar
wolph42
Deity
Posts: 9852
Joined: Fri Mar 20, 2009 5:40 am
Location: Netherlands
Contact:

Re: Dice rolled by moving over map

Post by wolph42 »

Nice!!

What I can suggest is to create a toggle button with which you can turn on off the question 'Do you want to roll the die' but just roll the die. I've got a couple of these toggle buttons in my framework that also change color and text depending on the setting. It fairly easy to create and in this case quite helpfull.

Here's a copy paste straight from my framework (if you click on a skill in the charsheet of a token you'll either be asked for a modifier or not, depending on the toggle, this toggle works per token, but can ofcourse also be set on a libtoken):

Code: Select all

<!--ModifiersAreONOFF-->
[
h:me = getSelected()]
[
h:assert(listCount(me) == 1,"Make sure only one token is selected",1)]
[
h:switchToken(me)]

[
r,if(checkForModifiers), CODE:{
    [h:checkForModifiers = 0]
    [h:tmp = getMacroIndexes("Modifiers Are ON")]
    [h, if(tmp !=""):removeMacro(tmp)]
    [h, if(tmp !=""):createMacro("Modifiers Are OFF",      "[r:ModifiersAreONOFF()]",               "group=8. Settings; color=default; fontColor=red; sortBy=1; minWidth = 205; playerEditable=0")]
    You will no longer be asked to input any modifiers when using the quicksheet or a skill
};{
    [h:checkForModifiers = 1]
    [h:tmp = getMacroIndexes("Modifiers Are OFF")]
    [h, if(tmp !=""):removeMacro(tmp)]
    [h, if(tmp !=""):createMacro("Modifiers Are ON",      "[r:ModifiersAreONOFF()]",               "group=8. Settings; color=default; fontColor=green; sortBy=1; minWidth = 205; playerEditable=0")]
    You will be asked to input a modifier when using the quicksheet or a skill
}]

[
r:MacroButtonsManagement(1)] 

User avatar
jfrazierjr
Deity
Posts: 5176
Joined: Tue Sep 11, 2007 7:31 pm

Re: Dice rolled by moving over map

Post by jfrazierjr »

Interesting.... It would be interesting to have an on mouseover event for scripting. You move over a token and it "runs" away from you with proper scripting..... :twisted:
I save all my Campaign Files to DropBox. Not only can I access a campaign file from pretty much any OS that will run Maptool(Win,OSX, linux), but each file is versioned, so if something goes crazy wild, I can always roll back to a previous version of the same file.

Get your Dropbox 2GB via my referral link, and as a bonus, I get an extra 250 MB of space. Even if you don't don't use my link, I still enthusiastically recommend Dropbox..

User avatar
aliasmask
Deity
Posts: 8667
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: Dice rolled by moving over map

Post by aliasmask »

jfrazierjr wrote:Interesting.... It would be interesting to have an on mouseover event for scripting. You move over a token and it "runs" away from you with proper scripting..... :twisted:

Actually you can do that with the stat sheet.

I was thinking of a somewhat similar dice roller, but have it animated for the roller (since animation doesn't work so well to networked clients). Where you decide to drag the die is where the animation ends. I was also thinking of using a dice cup and you just define the dice ahead of time. Drag the dice cup to target location and the dice roll from cup starting position, cup image is changed to make it look like it rolled dice in that direction. Throw in some random physics stuff and wala, animated dice. But like CiF, too much on my plate now to wander down that road. I did mess around and create a new 3d die 20 along with some additional rolling angles. It was going to be more of a can-I-do-it project more than anything though. At the same time, I was working on an animated fireball effect too with the same drag and drop mechanic :)

I like the functionality you have in the campaign too. This would be good for non-standard dice, like runebound's movement dice.

User avatar
wolph42
Deity
Posts: 9852
Joined: Fri Mar 20, 2009 5:40 am
Location: Netherlands
Contact:

Re: Dice rolled by moving over map

Post by wolph42 »

aliasmask wrote:
jfrazierjr wrote:Interesting.... It would be interesting to have an on mouseover event for scripting. You move over a token and it "runs" away from you with proper scripting..... :twisted:

Actually you can do that with the stat sheet.


actually its even quite simple, it does however require you to change the properties of the campaign so the property shows up in the mouse over sheet. In that property you can just enter the function call, something like:

Code: Select all

 *dieRoller:[r:rollDie()]

User avatar
CoveredInFish
Demigod
Posts: 3104
Joined: Mon Jun 29, 2009 10:37 am
Location: Germany
Contact:

Re: Dice rolled by moving over map

Post by CoveredInFish »

aliasmask wrote:This would be good for non-standard dice, like runebound's movement dice.


When I think of scatter dice and stuff like that it might be good to rotate the facing randomly on throw. It didnt do that because it would be harder to read .. maybe a on-dice-setting.

@wolph:
Yup, toggling that annoying question would be a good thing. The toggle button mechanism you showed is probably only for on-token macros, right? I dont think I can create campaign macros?
That wouldnt be that bad, giving the dice itself a macro interface would keep the campaign macros clean and it would be better for drop-in.

User avatar
wolph42
Deity
Posts: 9852
Joined: Fri Mar 20, 2009 5:40 am
Location: Netherlands
Contact:

Re: Dice rolled by moving over map

Post by wolph42 »

CoveredInFish wrote:@wolph:
Yup, toggling that annoying question would be a good thing. The toggle button mechanism you showed is probably only for on-token macros, right? I dont think I can create campaign macros?
That wouldnt be that bad, giving the dice itself a macro interface would keep the campaign macros clean and it would be better for drop-in.


Yup, obviously you can use a lib variable instead of a token variable as I did in my example (so it works for all die), but no AFAIK you can't put something like that in the campaign panel.

User avatar
CoveredInFish
Demigod
Posts: 3104
Joined: Mon Jun 29, 2009 10:37 am
Location: Germany
Contact:

Re: Dice rolled by moving over map

Post by CoveredInFish »

Okay fiddled a but more with it.

I added options for
a) roll/move question
b) rotating the dice when rolled
c) playing the dice randomly when multiple are rolled
(placed neatly in a rectangular area and avoids stacking)
d) dice rolling on move

This are currently all global (as not per die) options and you can toggle them from the lib-token. No eye-candy involved yet ;)



I'd like to implement a better chat result and having that better configurable.
Like: "I want just a sum but a tooltip with all dice and their names" or "show em all in chat, no names and just count the highest" and the many more stuff ...

I wonder what options would be useful with this type of rolling. Exploding dice eg would be somehow difficult. I mean, yes, I can spawn even a new die...
Attachments
cifd_0_2.cmpgn
(1.07 MiB) Downloaded 94 times

User avatar
CoveredInFish
Demigod
Posts: 3104
Joined: Mon Jun 29, 2009 10:37 am
Location: Germany
Contact:

Re: Dice rolled by moving over map

Post by CoveredInFish »

I have a version 0.3. Better configurable output & locking individual dice in regards to rolling and rotation (rotating d4 was a bad idea e.g.).

EDIT: here it is.
Attachments
cifd_0_3.cmpgn
(1.15 MiB) Downloaded 143 times

User avatar
CoveredInFish
Demigod
Posts: 3104
Joined: Mon Jun 29, 2009 10:37 am
Location: Germany
Contact:

Re: Dice rolled by moving over map

Post by CoveredInFish »

I just had an idea... the dice should automatically get locked after you rolled them (again this behaviour could be made optional) so you could roll them and then move them around. To reroll them again they have to be unlocked first. This could be even made gm-only, although not like the way individual dice locking works right now (since I use states and they would remain settable via maptool UI). Probably better anyway to switch to a property-based mechanism since this would be easier to "dropin"

This workflow sound better to me than "if i wanna move the dice i have to lock them first"

User avatar
aliasmask
Deity
Posts: 8667
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: Dice rolled by moving over map

Post by aliasmask »

What's the difference between toggle lock and toggle roll? Moving them when on doesn't roll dice, but the lock has a state to show that.

I see what you mean about the d4 and rotation. This probably isn't worth doing, but you could just have a state that circles the number at each angle.

You ever hear of a high/low die? This is a method I use when I do table top games. I'm convinced all d20s are cursed for me, so I always roll 1d6 as a high/low die and a d10. So, if I roll 4(1d6) and a 3(1d10) that is 13. Basically the high/low die adds the die side to the result of it's companion die when high. So, if I were to make a high/low die, I would configure it with a die side value and the result will be either 0 or the die side value based on the high/low result. It is only meant to be rolled with 1 companion die. BTW, this isn't a request, so no need to appease me by creating it :D, just all this talk about rolling dice got me thinking about how I use dice.

User avatar
Hawke
Great Wyrm
Posts: 2261
Joined: Sat Apr 21, 2007 12:12 am
Location: Albuquerque, NM
Contact:

Re: Dice rolled by moving over map

Post by Hawke »

Looks good, though I think having a roll macro on the individual dice is nice if you don't want to roll them via movement.

Other "nice" feature requests might be to allow locking of dice after rolling so you don't reroll them. Maybe change the aura color (like the sw wild die?) Also might be neat to show a configurable crit with a different color (i.e. exploding die in SW or the 6 in Mouse Guard).

I think some nice sets of easily readable dice will make this pretty nice. The fiasco "fw" dice images were nice and readable.

User avatar
CoveredInFish
Demigod
Posts: 3104
Joined: Mon Jun 29, 2009 10:37 am
Location: Germany
Contact:

Re: Dice rolled by moving over map

Post by CoveredInFish »

Thanks for the feedback. I'll probably find some time over next week so I plan to redesign this a bit.

@low/high
this is something like (1d2 - 1)*10+1d10, or am I completly wrong?

@lock
I sure have to revisit the "user interface" and my naming conventions. Locking a single die stops rerolling this single die - so its marked (with a a visible state). You can also toggle rolling dice at all - regardless of them being locked.

@crit
my latest campaign file has tables that have green 20's and red 1's for a d20 (example, i made these for all) - a nice idea i leached from this forum somewhere (sorry, i forgot from whom). Sure thing this is not very configurable. Highlighting in chat or highlighting with a halo would be no biggie though.

@exploding
I'm really not sure how to address this. would creating new dice be irritating?

User avatar
aliasmask
Deity
Posts: 8667
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: Dice rolled by moving over map

Post by aliasmask »

CoveredInFish wrote:@low/high
this is something like (1d2 - 1)*10+1d10, or am I completly wrong?

Basically, yeah. You just use a d6 and d10 to roll a d20 result. I like it for the anticipation, where the d6 often stops rolling first, but I doubt I would ever use such a thing in a maptool application.

User avatar
Hawke
Great Wyrm
Posts: 2261
Joined: Sat Apr 21, 2007 12:12 am
Location: Albuquerque, NM
Contact:

Re: Dice rolled by moving over map

Post by Hawke »

CoveredInFish wrote:@exploding
I'm really not sure how to address this. would creating new dice be irritating?


I can't remember how savage worlds exploding works, though in Mouse Guard you ONLY get that additional die if you spend a point... so it isn't automatic. Highlighted six though would be enough to be obvious. Not that a "6" isn't obvious :)

Post Reply

Return to “Macros”