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

Mutant:Year Zero

February 02 (8 years ago)
Hi all,

I already looked and can only find this post that realy talks about advanced Scripting for M:Y0: https://app.roll20.net/forum/post/1496080/slug%7D

It is a year old however and not much happened it looks like. I am very interested in running this game on R20, and hope there are some more advanced implementations around somewhere. Thanks for looking.
February 02 (8 years ago)
The Aaron
Pro
API Scripter
I don't know anything about the mechanics of Mutant: Year Zero, but I'm happy to help if you need scripting questions answered. Depending on what the mechanics are, I might be able to help with the scripting as well. :)
February 02 (8 years ago)
Hello Aaron, here is the summary from the linked thread, you helped a guy there too :-) Sadly he does not seem to have finished his work.

The player rolls a number of dice for Stat(yellow), Skill(green), optional item(black).
The dice are D6 but in this case the values are irrelevant if they are not 6 or 1.

This is due to 6 being a success, more successes equals better results, 1 does not count as a fail or a negative, but it does have special meaning if the character pushes him/her/self.

When pushing one self, the player get`s to re roll all non 1 and 6 results in the hope of getting more 6, but now the 1 have a negative effect. equipment breaks, the body breaks etc.

February 03 (8 years ago)
The Aaron
Pro
API Scripter
That sounds pretty doable...  =D

MutantYearZero v0.1.1

This is a bit rough around the edges (no help, rudimentary formatting, etc), but it should get you rolling. =D

There are two commands:
  • !myz [[ expression ]] 
  • !wmyz [[ expression ]]
Both are identical, except the !wmyz will whisper to the GM.  Expression is any combination of dice.  The first set will determine the size, but you can use d6, d8, d13, whatever.  For example, on a character I added this ability:
!myz [[ @{yellow}d6 + @{green}d6 + ?{Item Dice?|0}d6 ]]
Running it results in:

For 1 success and shows you the dice that were rolled.  Clicking the Push Yourself button will re-roll all the non-six (max die) dice, and count failures as well as successes.  Here are some possible outcomes:


Messages will be prefaced by who rolled them.

If you need to do just a push roll manually, you can do so like this:
!myz [[4d6]] 3
Where the 3 above is the successes forward from the original roll.


Git: https://github.com/shdwjk/Roll20API/blob/master/Mu...

Let me know what enhancements you'd like and I'll see what I can do. =D
February 03 (8 years ago)
This sounds amazing!! I have no idea yet if I can get this to actually work but will try it out asap. Thanks for stepping up!
February 03 (8 years ago)
Works very well so far, amazing job. Thank you so much. I just found that if I have a failure 1 on the first roll it is not mentioned. Would be helpful to write that out at that roll as well as they count to the total after the push. And you can theoretically continue to push yourself until all dice show 1 or 6.



Just a thing I forgot to mention (sorry) is that we need to keep track of the color of the 1 and 6 we rolled as each has different effects on the character/result. Not sure if it would be at all possible to show the currently white dice sqares as the color of the dice?  Love that push yourself button. Totally stunned you could do this so quickly.
February 03 (8 years ago)
The Aaron
Pro
API Scripter
I've written a couple similar scripts, so there was a bit of a head start.  All that you mentioned can be done, interface is the hard part.  Lets take it one at a time:

1) Color the dice -- Can definitely do that, what sounds like the easiest way to handle it:
  • !myz [[ 2d6 + 3d6 + 1d6 ]]   where they are considered yellow (the first one, 2 dice here), green (the second one, 3 dice here), item [black] ( the 3rd ones, 1 die here)
  • !myz [[2d6]] [[3d6]] [[1d6]]  where the order is the same, but they are separate inline rolls.
  • !myz --yellow 2 --green 3 --item 1
2) Push forward failures -- So, 1s in the first roll count as failures going into the next roll?  That's pretty straight forward.
3) so, you can push yourself multiple times, and each time you count the 1s as failures, so this could be a valid sequence:
  • [1][2][3][5] -- 0 Successes, 0 Failures (1 pushed forward)
  • [1][1][4][6] -- 1 Success, 3 Failures (1 from above, 2 from here.)
  • [1][2][6]  -- 2 Successes (1 from second, 1 from here), 4 Failures (1 from first, 2 from second, 1 from third roll)
February 04 (8 years ago)
Im currently using rollable tables with images of the dice
 
Wasnt too hard to setup. 
But if some clever clogs comes up with a more elegant way of doing it i'd love to know 
February 04 (8 years ago)
PaulOoshun
Marketplace Creator
I asked the Aaron if he could get the API to do my taxes.
After a moment of pondering he concluded he could. 
February 04 (8 years ago)

The Aaron said:

I've written a couple similar scripts, so there was a bit of a head start.  All that you mentioned can be done, interface is the hard part.  Lets take it one at a time:

1) Color the dice -- Can definitely do that, what sounds like the easiest way to handle it:
  • !myz [[ 2d6 + 3d6 + 1d6 ]]   where they are considered yellow (the first one, 2 dice here), green (the second one, 3 dice here), item [black] ( the 3rd ones, 1 die here)
  • !myz [[2d6]] [[3d6]] [[1d6]]  where the order is the same, but they are separate inline rolls.
  • !myz --yellow 2 --green 3 --item 1

2) Push forward failures -- So, 1s in the first roll count as failures going into the next roll?  That's pretty straight forward.
3) so, you can push yourself multiple times, and each time you count the 1s as failures, so this could be a valid sequence:
  • [1][2][3][5] -- 0 Successes, 0 Failures (1 pushed forward)
  • [1][1][4][6] -- 1 Success, 3 Failures (1 from above, 2 from here.)
  • [1][2][6]  -- 2 Successes (1 from second, 1 from here), 4 Failures (1 from first, 2 from second, 1 from third roll)
1) I am honestly not sure what you are asking. :) Are these the format one would enter the roll in the chat window? I guess the easiest way would be to type !myz then pop up comes asks for yellow, then one for green and one for item. Typing out with brackets might get cumbersome?

2+3 ) OK, to be absolutely sure I put the book in front of me to read off of it. Memory is a bitch and it looks we actually played wrong. You can only push once. You keep the 1s. However only the 1s from the Yellow and Black dice, the Green ones do not have a fail symbol. Hence you can reroll 1-5 from green and 2-5 from yellow and black. Image of the dice here http://dicecollector.com/images/large/e8/115d4982...

This will teach me to properly research first.


February 05 (8 years ago)
The Aaron
Pro
API Scripter
Found this discussion:  https://philgamer.wordpress.com/2015/02/12/lets-st...
Failure can be mitigated by Pushing Your Roll, this allows you to reroll all dice that didn’t come up with a symbol and roll them again. This can only be done once, after which you have to live with the consequences.
When pushing, rolling a “1” or biohazard symbol inflicts trauma to the attribute used. On the upside, you also get a mutation point for each point of trauma you suffer.
So, sounds like when you push, you can re-roll Green 1-5, Yellow 2-5, Black 2-5.  Any existing Y1 or B1 are carried forward and are now Trauma/Gear Degradation, along with any newly rolled Y1 and B1.

I'll see what I can do.  =D
February 05 (8 years ago)
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter

Alan H. said:

I asked the Aaron if he could get the API to do my taxes.
After a moment of pondering he concluded he could. 

Don't.
I have found him to have far too much ethics and character to be trusted with doing anyones taxes.
February 07 (8 years ago)

The Aaron said:

Found this discussion:  https://philgamer.wordpress.com/2015/02/12/lets-st...
Failure can be mitigated by Pushing Your Roll, this allows you to reroll all dice that didn’t come up with a symbol and roll them again. This can only be done once, after which you have to live with the consequences.
When pushing, rolling a “1” or biohazard symbol inflicts trauma to the attribute used. On the upside, you also get a mutation point for each point of trauma you suffer.
So, sounds like when you push, you can re-roll Green 1-5, Yellow 2-5, Black 2-5.  Any existing Y1 or B1 are carried forward and are now Trauma/Gear Degradation, along with any newly rolled Y1 and B1.

I'll see what I can do.  =D
Thanks again, I appreciate it.

February 07 (8 years ago)
The Aaron
Pro
API Scripter
Ok. updated to version 0.1.2.  See how this strikes your fancy:

Down the left, that's Successes, Trauma (greyed out), Gear Damage (greyed out), and Push It Button.

And after pushing, with just the dice that were rerolled and new tallies (now not greyed out).

Note, the explosion symbol will look like this on your system:   On a Mac, it uses the Colored Emoji, on Windows it's a solid color.

Calling it is the same commands, but with 3 inline dice:
!myz [[3d6]] [[2d6]] [[1d6]]
Thats 3d6 for skill dice (green), 2d6 for base (stat) dice (yellow), and 1d6 for gear dice (black).  You could use the following to prompt for the number of dice:
!myz [[?{Skill Dice?|0}d6]] [[?{Base Dice?|0}d6]] [[?{Gear Dice?|0}d6]] 
or if you'd prefer a dropdown:
!myz [[?{Skill Dice?|0|1|2|3|4|5|6}d6]] [[?{Base Dice?|0|1|2|3|4|5|6}d6]] [[?{Gear Dice?|0|1|2|3|4|5|6}d6]]
Let me know!

Git: https://github.com/shdwjk/Roll20API/blob/master/Mu...
February 07 (8 years ago)
The Aaron
Pro
API Scripter

=D
February 07 (8 years ago)
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
Slick!
February 09 (8 years ago)
this is only works with plus or pro account? because i'm ctr+c ctr+v this.. 

!myz [[?{Skill Dice?|0}d6]] [[?{Base Dice?|0}d6]] [[?{Gear Dice?|0}d6]]

show the number of dices to put.. and nothing happens after that.... 
February 09 (8 years ago)
The Aaron
Pro
API Scripter
Yes.  API scripts require the Game Creator to be a Pro Subscriber and to install the scripts they want in their game in their API area for the Game.
February 09 (8 years ago)

Edited February 09 (8 years ago)
thx.. so i ill still using the.. 

&{template:default} {{name= Ability Test}} {{Base Dice = [[?{Base Dice|0}d6>6]]}} {{Skill Dice = [[?{Skill Dice|0}d6>6]]}} {{Gear Dice = [[?{Gear Dice|0}d6>6]]}}

=D
ty

edited: but i will following this topic to see the news ^^

February 09 (8 years ago)
Aaron, this looks BRILLIANT! Sadly I am away from my home PC and can`t try it from work. I will check it this evening, looks mindblowing fantastic!
February 09 (8 years ago)
The Aaron
Pro
API Scripter
Excellent!  :)
February 09 (8 years ago)
This is incredible. Works absolutely fantastic! Thank you so much. This will make running the game so much more smoothly and good looking to boot.
February 09 (8 years ago)
The Aaron
Pro
API Scripter
No problem!  Let me know if there's anything else I need to add.  =D
February 11 (8 years ago)

Edited February 11 (8 years ago)
Hey Aaron, hate to bother you... Something that is an exception to the normal Pushing rules is Automatic Fire, there you can push as often as you like, core mechanic is the same. How hard would it be to remove the one push limit? It does not need to be a separate function. Just let me push as often as I´d like. 

I am looking for anything else, but so far it looks like the system uses this for everything. Thanks again, I can`t even begin to comprehend what you did with this.

February 11 (8 years ago)
The Aaron
Pro
API Scripter
Actually, should be pretty trivial...

on line 251, change this:
                pushButton = (!push
                    ? makeButton(
                        '!'+(w?'w':'')+'myz '+
                        makeRerollExpression(skillDiceArray)+
                        makeRerollExpression(baseDiceArray)+
                        makeRerollExpression(gearDiceArray)+
                        '|| '+successes+' '+trauma+' '+gearDamage,
                        symbols.push
                    ) 
                    : ''
                );
to this:
                pushButton = makeButton(
                        '!'+(w?'w':'')+'myz '+
                        makeRerollExpression(skillDiceArray)+
                        makeRerollExpression(baseDiceArray)+
                        makeRerollExpression(gearDiceArray)+
                        '|| '+successes+' '+trauma+' '+gearDamage,
                        symbols.push
                    );
and save.  Let me know how the functionality is and I'll make an official release tonight with the changes if they are acceptable. =D
February 11 (8 years ago)

Edited February 11 (8 years ago)
That was fast! Yep, works wonderfully! Thank you very much.
February 11 (8 years ago)
The Aaron
Pro
API Scripter
No problem! =D

I was thinking about adding some additional notice, like how many times the action was pushed, that kind of thing.  Let me know what you think about that.
February 11 (8 years ago)
If you can do that, that would be neat. :-) One thing I just noticed is that I can push any prior diceroll, instead of only the most recent one. Not sure if you can capture that? 
February 11 (8 years ago)
The Aaron
Pro
API Scripter
I can certainly introduce a way of knowing. The question is what should it do with that knowledge? 
February 12 (8 years ago)
Interesting question. I think what I am looking for is that you can only ever push the latest result. At the moment I could Roll, Push, and then Push the original roll again instead of the reduced dice from the first push. Or even Push a roll that is way back in the queue.  And Visually you could not necessarily tell. If someone is not careful that could allow cheating.

If you use the roll query it could set an ID like "Roll1". If you push the ID is "Roll1_Push1". You Push again because it is automatic fire for "Roll1_Push2". You should not be able to Push "Roll1", only "Roll1_Push1". If you want to push again you should only push "Roll1_Push2" resulting in "Roll1_Push3". "Roll1" and "Roll1_Push1" are not available for pushing, if you try it should block.

Afterwards you roll again, now it is "Roll2". This makes it so that you can not push anything with "Roll1" as that roll is concluded and a new chain is started. Error message when you try maybe?

By all means, if this is getting too complicated we just need to be careful what to click, it would be an advanced error or player mistake catching. So not necessarily needed to run the game. As you do this for free I can`t really ask more of you then you already did! :-)
February 12 (8 years ago)
The Aaron
Pro
API Scripter
Ah, I see what you're saying.  That's not a problem.  

I've made some small changes locally (no push button if you have no dice!) and it shouldn't be too difficult to add in preventing old pushes.  I'll need to make the roller stateful, which is easy enough, and I'll change the arguments behind the scenes a little bit but it will be for the better and won't have any effect on how you're calling it.  I'll add in some configuration options (and a help screen) to specify what sort of logging is desired (nothing, whisper the GM on attempt, public warning, etc), as well as an ability to optionally label the roll with other details (See CthulhuTech Dice for an example of what I mean).  I'll get that out either tonight or over the weekend.  =D
February 12 (8 years ago)
Hello. Yeah I made that old thing for our group way back when. It worked decently for what we needed. as it allowed for rolling and pushing rolls. There where issues similar to those mentioned, for one thing the roller was shared, so if some one did a roll they would remove the possibility for a new player to push their roll. And some other small things like that. It was a fun project.
February 13 (8 years ago)
Very cool, Thanks Aaron! 

Jonas, sounds like you had more then the old thread suggested. :)

February 15 (8 years ago)
The Aaron
Pro
API Scripter
New version is out!  https://app.roll20.net/forum/post/2968252/script-m...

This was almost a total rewrite.   It's possible I went a little overboard... but I'd been meaning to experiment with _.template() more, and so I did. =D  Enjoy!