Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

[Request] Cancelling Dice for End of the World: Zombie Apocalypse

I've been playing End of the World: Zombie Apocalypse lately. In trying to adapt it to R20, it's not hard at all. I am more interested in streamlining the process of the roll mechanic where you roll a Positive and Negative pool of dice, and any dice of one pool that matches the number on a die in the other pool cancel each other out. Per example:

P: 6, 3, 2, 4
N: 3, 5, 1

The two 3s cancel, and everything else remains. Then you count up the leftover Negative dice, and check how many of the Positive dice came in under your target number.

I took an online class on C# like 4-5 years ago, and it was very basic, so I have no idea how to tackle this from a programming perspective. I was hoping I could find someone(s) to help turn this into an API to support this series of books. Thank you.
February 14 (9 years ago)
Bump! This API would be very helpful to my gaming group as well!
February 14 (9 years ago)
The Aaron
Pro
API Scripter
Are the dice always the same type? Would you do something like this:

!zd [[4d6]] [[3d6]]
to roll 4d6 positive and 3d6 negative?

Can you give a few examples of success and failure, how you'd specify the target number (or is it then number of remaining negative dice?), etc.

February 14 (9 years ago)

Edited February 14 (9 years ago)
Hello again Aaron =)

I found a youtube video that may be able to explain it much better that I, I'm brand new to the system.
http://youtu.be/ww5qUyXtT5k?t=25m12s

So and Example would be:

I'm trying to jump over a chain link fence to get away from a zombie.

I would then use my Dexterity Dice pool, which is a 3 on average heroes

The GM would add Positive or Negative dice to the pool depending on the task difficulty or my character's features.

So the GM decides that the sheer panic of the situation & the fact that my character is asthmatic adds two negative dice to the dice pool.

I will be rolling a total of 3 white positive dice, and 2 black negative dice.

After being rolled, if any negative dice match any positive dice- they are eliminated. Only Dice rolls that are equal to or below the stat's dice pool counts as a success.

Un-cancled negative dice become stress, but that can be tracked seperately.


In order for an API to roll correctly, it would need an "?input" or a attribute on a character sheet to roll under.. So I've whipped up a quick character sheet we can use

HTML: https://gist.github.com/d0ed15371c8045482dce.git

CSS Style: https://gist.github.com/c339679974a201e7423e.git

The Attributes the character sheet names are as follows:

"attr_dexterity"
"attr_vitality"
"attr_logic"
"attr_willpower"
"attr_charisma"
"attr_Empathy"



February 14 (9 years ago)
The Aaron
Pro
API Scripter
So, some examples:
!zd @{selected|Dexterity} [[@{selected|Dexterity}d6]] [[?{Negative Dice?|0}d6]]
So, assuming a Dexterity of 3, it might play out like this:
Positive Dice[3]: 2 4 5
Negative Dice[2]: 2 5
Failure, no stress

Positive Dice[3]: 2 4 5
Negative Dice[2]: 4 5
Success, no stress

Positive Dice[3]: 2 4 5
Negative Dice[2]: 1 5
Success, 1 stress

Positive Dice[3]: 2 4 5
Negative Dice[2]: 1 3
Success, 2 stress

Positive Dice[3]: 6 4 5
Negative Dice[2]: 1 5
Failure, 1 stress

Sound about right?
I have to clarify something that's been misstated above. There is no "dexterity dice pool." Your dexterity number only sets the difficulty for your positive dice to determine success.

To determine dice pools, everyone starts with one positive dice. Then, the GM may give you additional positive dice for any positive features that you may have which apply, or beneficial conditions for your action, or dice granted by a weapon or piece of gear.

Everyone begins with zero negative dice, but the GM may impose additional negative dice for any negative features or traumas that you may have with apply, detrimental conditions for your action, or penalties from weapons or gear that are more difficult to use.

I hope this helps.
February 14 (9 years ago)

Edited February 14 (9 years ago)
Gen Kitty
Forum Champion
That just changes the input slightly.

!zd @{selected|Dexterity} [[?{Positive Dice?|1}d6]] [[?{Negative Dice?|0}d6]]
February 14 (9 years ago)
The Aaron
Pro
API Scripter
Which of these is true?
Positive Dice[3]: 2 4 5
Negative Dice[2]: 2 2
Failure, 1 stress

Positive Dice[3]: 2 4 5
Negative Dice[2]: 2 2
Failure, 0 stress
And which of these is true?

Positive Dice[3]: 2 2 5
Negative Dice[2]: 1 2
Success, 1 stress

Positive Dice[3]: 2 2 5
Negative Dice[2]: 1 2
Failure, 1 stress
All of those appear true with an attribute target of 3.
February 14 (9 years ago)
The Aaron
Pro
API Scripter
Hmm.. So I guess my question is , do dice cancel all of the same number in a pool, or one for one?
Positive Dice[10]: 2 2 2 2 2 2 2 2 2 2
Negative Dice[1]: 2
Is that Success or Failure?


February 14 (9 years ago)

Edited February 14 (9 years ago)
The Aaron
Pro
API Scripter
Assuming full cancel: https://github.com/shdwjk/Roll20API/blob/master/Zo...

Calculates Success, Stress, Cancels. Adapts based on the results to only show Stress if there is Stress, only show Negative if there is Negative, etc. Dice are shown as uncanceled in order, followed by canceled in order. Supports open and whispered to GM modes.



Use:
!zd <SUCCESS NUMBER> [[ Positive Pool ]] [[ Negative Pool ]]
Or for whispered:
!wzd <SUCCESS NUMBER> [[ Positive Pool ]] [[ Negative Pool ]]
You can omit the Negative Pool entirely if you don't have one:
!zd <SUCCESS NUMBER> [[ Positive Pool ]]
Here are a macro:
!zd @{selected|Dexterity} [[ ?{# Positive Dice|1}d6 ]] [[ ?{# Negative Dice|0}d6 ]]
Simple Example:
!zd 3 [[4d6]] [[2d6]]

If you need 1-1 canceling, let me know and I'll adjust it.
It's just one for one canceling. The first one of each of your above examples are true, the seconds are not. If you have ten 2s on your success dice, and one 2 on the negative dice, you still have nine 2s left over after canceling.
February 14 (9 years ago)
The Aaron
Pro
API Scripter
Ok. That's slightly harder... I'll see what I can do. =D Thanks!
February 15 (9 years ago)
The Aaron
Pro
API Scripter


Update v0.2: Now with 1-1 cancelation. Available in the GitHub Repo: https://github.com/shdwjk/Roll20API/blob/master/Zo...
Well then. Yeah, I was trying to figure out what you thought was wrong in those you posted, and glossed right over the obvious... :/
This is awesome, btw. Thank you so much. Quick too.
February 15 (9 years ago)
The Aaron
Pro
API Scripter
No problem! It was a fun problem to solve. =D
February 25 (9 years ago)
Hi guys, just saw that, and will try to implement it within a game. It would also be good t indicate the number of successes as this can be used to the GM to inform how the success impact the story.

Thanks
February 25 (9 years ago)
The Aaron
Pro
API Scripter
Like this?


I added the Target Number as well.

https://github.com/shdwjk/Roll20API/blob/master/Zo...

February 25 (9 years ago)
Coal Powered Puppet
Pro
Sheet Author
The Aaron, that is amazing. I have no idea how you did that, and its awesome.

I am not likely to use this coding anytime soon, but the fact is exists is just...wow, this is cool.
February 25 (9 years ago)
The Aaron
Pro
API Scripter
Thanks!

The formatting is just some CSS (the flags on the bottom are just floating left or right) with some control over what is added. As for the canceling of dice, that was a bit harder and involved making an object with the rolls as properties and a value of how many times they occurred, then walking each key and doing the right subtractions, then turning them back into lists of rolls. Success is the number of un-canceled positive rolls at the target number or less, stress is the number of un-canceled negative rolls.

Bam! =D
February 27 (9 years ago)
Thanks, great, thanks a lot!
February 27 (9 years ago)
The Aaron
Pro
API Scripter
No problem!!