LackeyCCG

LackeyCCG Forum => Plugins & Plugin Creation Forum => Topic started by: Jynks on January 07, 2012, 12:34:49 AM

Title: Custom Dice?
Post by: Jynks on January 07, 2012, 12:34:49 AM
How can I make custom dice? As in a die that dose not role numbers but instead rolls symbols? Or a mix of Symbols and numbers?
Title: Re: Custom Dice?
Post by: Trevor on January 07, 2012, 12:43:55 AM
I can add that pretty easily, but at this moment it isn't in. Until then, I suggest you use a regular die (of how ever many sides you want) and interpret it as you see fit. Like a "1" could be a "skull" or whatever you want.
Title: Re: Custom Dice?
Post by: Jynks on January 07, 2012, 12:50:56 AM
Problem is that the die is mixed.. so it means 1 and a symbol. Depending on game state you use the symbols or the numbers, also the die are coloured and they have different combinations of symbols and numbers... So 1 is also a skull, but on another die that you throw at the same time 1 = target
Title: Re: Custom Dice?
Post by: Trevor on January 07, 2012, 01:46:02 AM
Quote from: Jynks on January 07, 2012, 12:50:56 AM
Problem is that the die is mixed.. so it means 1 and a symbol. Depending on game state you use the symbols or the numbers, also the die are coloured and they have different combinations of symbols and numbers... So 1 is also a skull, but on another die that you throw at the same time 1 = target
You don't need to throw the dice at the same time if they results in confusion.
Title: Re: Custom Dice?
Post by: Jynks on January 10, 2012, 09:06:34 AM
I think this game will have to be put on hold until there is a custom dice system is all. using dice proxies just will not work I do not think.
Title: Re: Custom Dice?
Post by: Trevor on January 11, 2012, 11:38:17 AM
Quote from: Jynks on January 10, 2012, 09:06:34 AM
I think this game will have to be put on hold until there is a custom dice system is all. using dice proxies just will not work I do not think.
Even when you can use custom dice, I think if you'd want to roll 2 different kinds of dice at the same time that wouldn't be feasible from an interface perspective. There would be a button to roll one kind of dice, and a button to roll the other kind of dice. The only bad thing right now is you need to do the conversion of X=Y for the special dice. That's an inconvenience, but not something that would derail a project imo.
Title: Re: Custom Dice?
Post by: Jynks on January 11, 2012, 04:02:34 PM
i think it is... I'll just switch to another game that dose not have such problems.. it is hard enough to get board game mates to use a computer game as is, and impossible if they do not "feel" it is like the original.
Title: Re: Custom Dice?
Post by: Trevor on January 12, 2012, 12:39:02 PM
How exactly would you WANT this to work?

I assume a real game has you roll something like 1 normal die and 1 special die at a time. How would you want that to be implemented exactly? Would you want to roll them both at the same time? How? Would you be ok with roll 1 die with a button, and the other kind of die with a different button?

Would you want a log message like:
Trevor rolls a Skull on a DIENAME die.
Title: Re: Custom Dice?
Post by: r0cknes on January 12, 2012, 12:58:30 PM
That would be a cool feature, if I may add my 2 cents.
Title: Re: Custom Dice?
Post by: innuendo on January 13, 2012, 08:34:48 AM
Can we steal the format for chat commands?

![name of dice]!,{[face 1],[face 2],...,[face n]}

Is an n sided dace with faces named as comma separated strings. For example a d4 would look like this: !d4!,{1,2,3,4}

Then the game can track "/roll ![name of dice]" as a command, probably using "/roll !*" as the flag (* being wild card).

If you pull that out further we can combine them into grouped actions using the chat window: !attack roll!,/roll ![name of dice];/roll d6

That would give you a button "attack roll" that rolls name of dice and a d6 together.

Just thoughts on execution. Hooking into the existing architecture lets us combine them with lots of things.
Title: Re: Custom Dice?
Post by: Picks-at-Flies on January 19, 2012, 04:53:19 PM
This was possible on CCG Workshop; effectively you could create dice objects within your plugin which defined each side (both text and image).  To imagine how this works, imagine a multi-dimensional card with a "roll" option. When you roll it, it randomly picks one side to reveal (and announces the result in chat). You can then select multiples and get them all to roll.  This was really designed for games like Dragon Dice.

On the other hand, Wheel of Time uses four different custom dice with, from memory, 8 custom symbols between them which you roll variable numbers of, so ideally you would need an option "/roll [n] diplomacy" etc. For extra confusion, when you are rolling 40 dice, you would also want it to total the symbols rolled.

My opinion is that it's a lot of effort for a fairly niche area, but at least this gives you some explanation.
Title: Re: Custom Dice?
Post by: Trevor on January 19, 2012, 05:46:02 PM
I know how I can implement code-wise, and how a plugin maker can add it to a plugin. I was wondering how I should implement from the user's perspective. Jynks had mentioned a desire to roll both a normal die and also a special die at the same time. At least, I think that's what he wanted. Anywho, I don't think there is a way to do that better than rolling them one at a time, from an interface point of view. Ya, people (or even the plugin maker) can make canned messages for specific dice rolling combinations, but that's not exactly the same.
Title: Re: Custom Dice?
Post by: Jynks on January 19, 2012, 07:31:25 PM
Well I was thinking the best way (apart form copying how battlegrounds dose its dice) would be to just allow the plugin maker to set custom dice commands. So to be able to add a button to roll, in the same way you can add "draw" button using general function.

Something simple like this...

<dicefunction>
   <label>HitDice</label>
   <kind>D6</kind>
   <1>Skull</1>
   <2>Skull / Block</1>
   <3>Miss</1>
   <4>Miss / Block</1>
   <5>Skull</1>
   <6>Skull 2</1>
</dicefunction>

Just as an example.. it probably will not work correctly but you get the idea as in you can press the button and the plugin maker can control what the text result would be from any "side"... also "/roll HitDice-2" would roll 2 of them. and some way to strong the commands might be needed. like... "/roll D6-2 HitDice-2" rolls 4 custom dice, 2 normal D6 and two custom D6.

Battlegrounds VT has the best dice system I have seen in a app. It has 2 modes.. one is a full "modual" in for rolling dice that are shown in a pop up. You can even on the fly custom the dice rolls with modifiers and all sorts of cool stuff (the app was originality written as a VT for pen and paper RPG). Though it has a cool other function that were the plugin maker builds a dice out of GFX. So a D6 is 6 images, one of each side. Then the "roll" is that dice fast scrolling though those images, till it stops.

Title: Re: Custom Dice?
Post by: Trevor on January 19, 2012, 07:57:27 PM
Well, as far as user interface goes, they can click a button that says something like "Roll HitDie", and they see the result in the log.

Or they can do something like "/ra" or "/ra 4" which would roll 1 or 4 of the special dice, respectively. You may be wondering why I chose "ra". Well, "/r" is already used for rolling a regular dice. "/rd8" is used for rolling an 8-sided die (and "/rd10" and "/rd20" and so on.) I could enable a command like "/roll HitDie 5", but that would be a long thing to write out, and also it could be confusing depending on the name of the function. So I think the best solution is to use "/rollA" (or "/ra" for short) with the A indicating it refers to a special die, and not one with just N sides. A second special die, if one was needed would be "/rollB". Similar to "/roll 5", you could also do "/rollA 5" to roll a special die 5 times.
As far as a canned message button that can chain multiple rolls (like if you always rolled one d6 with one special die) you can always use multiple scripts in a canned message. Like: "/roll 5;/rollA 3"

I can always add a graphical component to rolling a die, if people wanted that. That would be pretty easy.

So you folks think that sounds good, or you have a better idea?
Title: Re: Custom Dice?
Post by: Jynks on January 19, 2012, 08:57:10 PM
this all sounds pretty good to me. I think a text output is fine, the only advantage of the gfx one (besides looking cool) is that there is no need to code anything, as the images themselves make the dice custom, you only need a way to name the dice and then roll that dice using those images.

As long as you can roll a mix of different dice in one roll, custom and normal... then I think it is all good though.
Title: Re: Custom Dice?
Post by: Trevor on January 19, 2012, 09:34:19 PM
If I do graphics for dice, the result will also appear in the log.

With the graphics for the dice, I'm not sure how that should work exactly. If I have a 3D die land on the table, where should it land? How long should it stay there? Maybe it could leave the board when markings are erased?
Title: Re: Custom Dice?
Post by: Jynks on January 19, 2012, 10:03:12 PM
have it as a token.. you just drag it onto the table, place were ever you want it... right click to roll it, or drag select a few tokens and right click to roll, or have a roll button. Players can ever right click to remove them, or drag to remove after, or just pull them off the table for next time?
Title: Re: Custom Dice?
Post by: innuendo on January 20, 2012, 04:17:55 PM
Can I suggest a small change to the format?

/ra, /rb, /rc limits me to 3 custom dice before I need to skip /rd because /rd is taken.

Can we change it to /rd[alpha]? That way it's clear it's rolling (r) a dice (d) and then the alpha after that specifies what special, a through z, dice is used.

so roll the attack dice would be /rda and roll the 2nd customer dice is /rdb. Rolling 3 attack dice is /rda 3, etc.

Just a small change that I think might make it easier if you have more than 3 custom dice.

Thanks for looking into this change trevor.
Title: Re: Custom Dice?
Post by: Trevor on January 20, 2012, 04:45:49 PM
Quote from: innuendo on January 20, 2012, 04:17:55 PM
Can I suggest a small change to the format?

/ra, /rb, /rc limits me to 3 custom dice before I need to skip /rd because /rd is taken.

Can we change it to /rd[alpha]? That way it's clear it's rolling (r) a dice (d) and then the alpha after that specifies what special, a through z, dice is used.

so roll the attack dice would be /rda and roll the 2nd customer dice is /rdb. Rolling 3 attack dice is /rda 3, etc.

Just a small change that I think might make it easier if you have more than 3 custom dice.

Thanks for looking into this change trevor.
Well, I think a better solution would be to just use a different letter besides "r", or at least a different letter for the shortcut.

It's kind of hard to choose. A lot are already taken.
See: http://lackeyccg.com/tutoriallogcommands.html
Title: Re: Custom Dice?
Post by: Trevor on January 20, 2012, 04:49:37 PM
Quote from: Jynks on January 19, 2012, 10:03:12 PM
have it as a token.. you just drag it onto the table, place were ever you want it... right click to roll it, or drag select a few tokens and right click to roll, or have a roll button. Players can ever right click to remove them, or drag to remove after, or just pull them off the table for next time?
A token is an interesting idea, but I don't think it would be better than a proper function. I think tokens would get in the way, and they could interfere with real cards.

People will be able to do a log command or a button (canned or General), and also right click the table and use that menu, or use the General function menu above the table.

As far as graphics, which are really not needed at all, I think I'll just show a 3D animated die falling close to the center of the table (but on the side of the table of the person who rolled it), and it will stay there until drawing on the table is gone, although it's result will remain in the log indefinitely.
Title: Re: Custom Dice?
Post by: innuendo on January 20, 2012, 07:06:59 PM
/uniquedice[alpha] [roll count]
/udice[alpha] [roll count]
/ud[alpha] [roll count]

With alpha being the letter designation of the unique dice.  If you prefer /cd for custom dice that's fine, but unique dice sounds better in context I think.

Also, please let that animation be disable-able :)
Title: Re: Custom Dice?
Post by: Jynks on January 21, 2012, 10:23:50 PM
yea animation is not needed it was just a idea to be thrown out there... all that is needed, imo, is the ability for a plugin creator to make custom dice by assigning a different text value to a side of a face, so it appears in the log as "elder sign" instead of "6" or something. Then also you need to be able to roll in a single roll, a certain amount of mixed dice, custom and normal.
Title: Re: Custom Dice?
Post by: Trevor on January 21, 2012, 10:45:39 PM
Quote from: Jynks on January 21, 2012, 10:23:50 PM
yea animation is not needed it was just a idea to be thrown out there... all that is needed, imo, is the ability for a plugin creator to make custom dice by assigning a different text value to a side of a face, so it appears in the log as "elder sign" instead of "6" or something. Then also you need to be able to roll in a single roll, a certain amount of mixed dice, custom and normal.
Being able to roll a random set of mixed dice at a time will be a problem, from purely an interface point of view. Anything that could be done wouldn't be as good as just rolling them one kind of die at a time.
Title: Re: Custom Dice?
Post by: Jynks on January 23, 2012, 07:04:50 PM
well I disagree, rolling one dice at a time is a very different "feeling" to rolling a handful. In teh real world it also greatly affects the ods as the dice interact with each other.. now I know that don't happen in a computer roll, as each one is rolled by itself and then just displayed together. Still people "expect" to roll the dice together.. like in a board game were it says "roll 5x D6" you want to do just that not roll a D6 5 times. The fact that technically it is not different isn't the point, it is about the game experience.

IMO, having custom dice, being able to roll multipul dice, being able to mix dice types and custom types are all must have.

Example roll: "/rm 1xd6, 2xd12, 1xAttack, 2xBlock"
Roll macro output - "5,8,7,hit,deflect,block"

Title: Re: Custom Dice?
Post by: innuendo on January 23, 2012, 09:42:12 PM
At that point jynx you need to just use a custom canned message, which you already can do.

The only difference is it wont be plugin level. Which is something we've discussed with trevor before (macro functions in the plugin definition) but hasn't been done.
Title: Re: Custom Dice?
Post by: Jynks on January 24, 2012, 01:31:39 AM
Quote from: innuendo on January 23, 2012, 09:42:12 PM
At that point jynx you need to just use a custom canned message, which you already can do.

The only difference is it wont be plugin level. Which is something we've discussed with trevor before (macro functions in the plugin definition) but hasn't been done.

how can you do this? Would you explain?
Title: Re: Custom Dice?
Post by: Trevor on January 24, 2012, 06:32:13 AM
Quote from: Jynks on January 23, 2012, 07:04:50 PM
well I disagree, rolling one dice at a time is a very different "feeling" to rolling a handful. In teh real world it also greatly affects the ods as the dice interact with each other.. now I know that don't happen in a computer roll, as each one is rolled by itself and then just displayed together. Still people "expect" to roll the dice together.. like in a board game were it says "roll 5x D6" you want to do just that not roll a D6 5 times. The fact that technically it is not different isn't the point, it is about the game experience.

IMO, having custom dice, being able to roll multipul dice, being able to mix dice types and custom types are all must have.

Example roll: "/rm 1xd6, 2xd12, 1xAttack, 2xBlock"
Roll macro output - "5,8,7,hit,deflect,block"
Would you seriously expect people to type /rm 1xd6, 2xd12, 1xAttack, 2xBlock (or something similar) every time they roll a handful of dice? Or if they are putting things into a canned message button, would you seriously expect them to make a different canned button for every permutation they would likely roll?

That's what I'm talking about when I say, from an interface point of view, it's simpler to just roll all one kind of dice at a time, and then do that for each kind of dice.

When I look at /rm 1xd6, 2xd12, 1xAttack, 2xBlock it looks far too complicated for people to use regularly. It would be even more frustration when a single typo renders the whole thing invalid if you were typing it.

The closest thing I can think of to having a bunch of different dice rolled at once is something like this: Have a window pop up (and stay up until closed). This dice window will let you add kinds of dice to roll, and for each kind, also a quantity. At the bottom of the window it would have a "Roll These Dice" button. This window could even have a save/restore slots so you can load frequent configurations. This, I think, is the best method to do what Jynks seems to want to do, but I still don't think it's worth the complexity. Even if it was easy for me to implement, I think it would be one more thing to confuse people.

Right now, there is a menu for "Roll X Dice", and you can add one of those for each kind of special dice. So you could Roll X 6-sided dice, then roll X Special dice. That seems as intuitive as possible. I'm not convinced that there is a better solution than that.
Title: Re: Custom Dice?
Post by: Trevor on January 24, 2012, 06:34:12 AM
Quote from: innuendo on January 23, 2012, 09:42:12 PM
At that point jynx you need to just use a custom canned message, which you already can do.

The only difference is it wont be plugin level. Which is something we've discussed with trevor before (macro functions in the plugin definition) but hasn't been done.
You can include them in the plugin, but that still uses the canned button system. The plugin maker can define a set of default canned messages.
Title: Re: Custom Dice?
Post by: innuendo on January 24, 2012, 09:16:53 AM
Yeah trevor, I meant it wasn't defined as a specific function like the roll unique dice function would be.

But yes.
Title: Re: Custom Dice?
Post by: Jynks on January 25, 2012, 12:14:03 AM
no, lol... that was just some text so you could see what I was talking about. Using text input for rolling dice will never work.. I mean it works fine for rolling 1 die or multipul die of the same type.. but when you mix dice the command gets clunky... what about a game were you have to roll 20 mixed die at a time or something.

What I was thinking is pretty much exactly what you just said, a popup of some kind with the dice and a spinner to select the quantity. Maybe even with some buttons you can right click once you set it up so you can store "dice macros" the way you can store canned messages. mabey you could call the dice macros with /dm 1 or something as in "/dice macro 1"


"Right now, there is a menu for "Roll X Dice", and you can add one of those for each kind of special dice. So you could Roll X 6-sided dice, then roll X Special dice. That seems as intuitive as possible. I'm not convinced that there is a better solution than that."

what do you mean? I do not know of this function?
Title: Re: Custom Dice?
Post by: Picks-at-Flies on January 25, 2012, 05:11:59 AM
Is there a game you are thinking of?  There are so many potential features for rolling dice that I strongly suggest we only ask Trevor for what is reasonable for plugins-in-progress.
Title: Re: Custom Dice?
Post by: Trevor on January 25, 2012, 08:28:46 AM
Quote from: Jynks on January 25, 2012, 12:14:03 AM
no, lol... that was just some text so you could see what I was talking about. Using text input for rolling dice will never work.. I mean it works fine for rolling 1 die or multipul die of the same type.. but when you mix dice the command gets clunky... what about a game were you have to roll 20 mixed die at a time or something.

What I was thinking is pretty much exactly what you just said, a popup of some kind with the dice and a spinner to select the quantity. Maybe even with some buttons you can right click once you set it up so you can store "dice macros" the way you can store canned messages. mabey you could call the dice macros with /dm 1 or something as in "/dice macro 1"


"Right now, there is a menu for "Roll X Dice", and you can add one of those for each kind of special dice. So you could Roll X 6-sided dice, then roll X Special dice. That seems as intuitive as possible. I'm not convinced that there is a better solution than that."

what do you mean? I do not know of this function?
Right click the table (not on a card). There is a menu option for Roll X dice.
Title: Re: Custom Dice?
Post by: innuendo on January 25, 2012, 09:13:29 PM
I will say, we've discussed macro functions before and I think what you want is not specific to dice. Because if we could macro game functions in general it would cover this case you want.

I know I would love a macro function option and even discussed it before. But until that happens what you want isn't possible outside of canned messages, which are honestly a pretty good short term solution.
Title: Re: Custom Dice?
Post by: jorch72 on March 02, 2012, 12:30:45 PM
Quote from: Picks-at-Flies on January 19, 2012, 04:53:19 PM
so ideally you would need an option "/roll [n] diplomacy" etc. For extra confusion, when you are rolling 40 dice, you would also want it to total the symbols rolled.
Just some useless information, in the Dragon Ball Z RPG when you got to a certain power level it was easy to roll over 1,000 dice!!!
This just came to me when you wrote rolling 40 dice.
Title: Re: Custom Dice?
Post by: Trevor on March 04, 2012, 01:24:08 AM
Quote from: jorch72 on March 02, 2012, 12:30:45 PM
Quote from: Picks-at-Flies on January 19, 2012, 04:53:19 PM
so ideally you would need an option "/roll [n] diplomacy" etc. For extra confusion, when you are rolling 40 dice, you would also want it to total the symbols rolled.
Just some useless information, in the Dragon Ball Z RPG when you got to a certain power level it was easy to roll over 1,000 dice!!!
This just came to me when you wrote rolling 40 dice.
Any situation where you roll a thousand dice is absurd. That would take I'm guessing about 15 minutes to do at least.
Title: Re: Custom Dice?
Post by: Saethori on March 04, 2012, 07:26:04 AM
I honestly can't tell if that "one thousand dice" thing is meant to be serious, or a joke based on the related DBZ meme.

One thing's for sure; if a game actually gets to such a point where it's actively requiring that many dice, it should have started including shortcut rules.