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

[Script] HeroRoller (calling Hero System Beta Testers)

1592256591

Edited 1592495724
timmaugh
Pro
API Scripter
Introducing HeroRoller (aka, HeRoller), a script for Hero Systems 6e. This is a rolling engine for the Hero game system that outputs a (hopefully) visually appealing panel of information. It handles activation, to-hit, normal damage, killing damage, luck, unluck, and checks, producing BODY, STUN, and KB results for each roll. Called shots and location damage are optional. And we need some beta breakers  testers! Where to Get It The script is available on the GitHub repository . Extensive instructions for the care and keeping of your HeRoller script can be found in the README file stored with the script, as well as on the API Script Index Wiki . Eye Candy Here are a few examples of the output panel variations. General Description Using the "!heroll" invocation, you can feed --arg:val pairs to control everything from the number of dice, to the mechanic (normal, killing, luck, unluck), to the output layout (tall or sidecar, shown above). You can set a base color, call a location, use an OCV override, use more/less knockback modifier, use more/less stun multiplier, and more. If you're not getting the output you expected, there is a "verbose" output (shown above) to show you how what you supplied was interpreted by the engine, and what it mapped to for the output. There are even "templates" of the various argument parameters you can use. These templates represent the various powers that you might want to send through the HeroRoller engine. For instance, an Aid power utilizes the normal mechanic, but it produces "Points of Aid" based on the total rolled on the dice. An Entangle also utilizes the normal mechanic, but it produces a points output based on the BODY rolled on the dice that represents the BODY of the Entangle. Example Usage Again, there is much more written in the README  and in the Wiki Entry for the script, so I would suggest taking a look at one of those locations to more fully understand the possible ways to use this script. The following implements a 4d6 flash named Cosmic Flare, with notes describing mechanics, and designates a blue color:  !heroll --d:4d6 --t:f --a:14 --pn:Cosmic Flare --n:flash to common sight, AoE (16m) Non-Selective --c:4b688b Here is a similar implementation except using the *check* value to not output the results bar. This one also references an attribute called "color1" where the color for the panel is stored (for easy color coding or changing at a later date):  !heroll --d:check --pn:Way of the Mountain --n:does 9m of shove --t:ha --col:@{Heretic|Color1} The next utilizes the  xd  ( extradice ) argument to read the velocity from the character's sheet and feed that as a modifier to a martial throw. It sends the output as the sidecar format:  !heroll --d:6.5d6 --t:ha --pn:Way of the Wind --n:throw, target falls --sc --xd:[[@{Heretic|velocity}/10]] --col:@{Heretic|color1} Another example using the  check  value to validate that the character created a wall of given size:  !heroll --p:pts --pn:Wall of Light --d:check --of:tall --pl:Wall of Light --n:8 PD, 8 ED, 6m long, 4m tall, .5m thick, dismiss, choose either not anchored or mobile --c:@{Prism|pwrcol} The next example demonstrates a power the player can choose to "push" by a given amount. The player is asked for input, and the result is fed into the  xd  argument:  !heroll --p:b --pn:Light Stix --d:10d6 --of:TALL --c:@{Duo|pwrcol} --xd:[[?{Supercharge Points|30}/10]] --n:4m radius select attack, no range, IIF vs PD Thanks This began as a revamping and expansion of an old script GiGs had put together, and it would not have come together without some timely input and help from GiGs, Aaron, and Jakob. My thanks to all!
1592666935

Edited 1593287006
timmaugh
Pro
API Scripter
What's Coming: Release 1.2 (week of June 21, 2020) Edit: Looks like this will be coming the week of June 28 I've added the ability to designate targets and the option to use an independent To-Hit roll (and location result) for each. This not only allows for target designation for a straightforward attack (1 target), this would also replicate the game mechanic of Area Effect attacks (n-targets) with or without the Selective or Non-Selective modifier (both require individual to-hit rolls for targets within the affected area). Targets can be designated with the --target (alias: --tgt ) argument, which accepts a list of token ids delimited by either a space or a comma. Call for individual to-hit rolls using the --selective (aliases --sel , --s ) argument, no value required. (I will suggest my InsertArgs script here to help manage creating this list on the fly... currently in beta). There are three options for the output. Multiple targets without selective  will render as many as 3 to a line. If either selective or location is added, then each target gets its own line, with the appropriate information supplied. And if both are selected, all of the information comes through: If I can get the readme updated, this should make it into the refresh this coming week, and I can write up more thorough usage instructions.
This is all awesome!! Thank you! Is there a way to use something like gettarget() yet?  Or do we have to explicitly provide a hard-coded number of targets?
This really is fantastic. In the spirit of beta feedback on the multiple targeting ... if the multiple targets all use the same icon, we can't tell which one received which hit. Perhaps users could associate a colored dot with each identical icon, and that dot could reflect on the multi-targeting output?
Another comment ... it might be nice if the "you got a hit" indicator which shows against successful hits when multiple targets are attacked also appears if only one target is attacked.
Last thought for today; it seems as if all the rolls are openly visible to everyone. It would be useful if it were possible to hide the rolls from everyone except the GM (and the player performing the roll). That way, the combat values of monsters can be kept secret, and players may be able to keep certain things private between themselves and the GM. Thanks again!!!
1594000168
timmaugh
Pro
API Scripter
Hey, Thorngumbald! Thanks for taking a look at the script. That's all great feedback -- keep it coming! I love the suggestions... The "you got a hit" even for only 1 target should be straightforward to make happen. Let me see what I can do as far as whispering the roll with the next release, too. As for a color dot or other identifier for each token if they have the same graphic, I can see where that might necessary... let me think about the best way to implement it. Right now I can tell you that the targets show up in the order that you added them in the --tgt parameter, if that helps you keep them straight. (FYI, other things I'm considering for future releases are autofire and tying into the character's END/END Reserve.) As for the gettargets() piece (part of the InsertArgs script), that script is very nearly ready for beta. You can grab the "super-beta" version from the linked thread (there is a link to the Gist). That's just the proof-of-concept mock up, so it's not properly bumpered against all errors, so use it under advisement. The coming version is looking like it will include a lot more functionality, but it will be probably another week or two before it's ready.
Thanks Tim! Looking forward to the enhancements!! And also in the spirit of beta feedback ... not seen any defects yet, so kudos on your pre-release testing!
Oh, and I would love to see support for Auto-Fire!
I think I am seeing some odd results. I am using: !heroll --of:sc --c:@{selected|Die_Roll_Color} --tgt: @{target|Target 1|token_id} --d:2d6-1 --t:ka --xs:1 --pn:Mac-10, from @{selected|token_name} --n:RKA, 2d6-1, +1 OCV, +1 STUN Mod, Autofire 5 So, 2d6-1 killing attack with a +1 STUN Modifier. Here are two results from that roll. The first looks fine; 7 BODY becomes 28 STUN. The second looks wrong; 11 BODY should become 44 STUN, not 22.
1594398064
timmaugh
Pro
API Scripter
Am I implementing that incorrectly? I'm camping, so I have neither my code not the rules, but 6E stun multiplier should be a d3, so a range of 1-3. A +1 should give you a range of 2-4. Isn't your second example within that range? (It rolled a 1, and added +1) Each stun multiplier is rolled independently for each roll. Why do you say the multiple should have been a 4 in the second example?
1594398333
timmaugh
Pro
API Scripter
Btw, I see the OCV mod in your notes. OCV mods should be in the next version... The less you have to interact with the sheet (if you don't have to) the better. Called shots will still handle themselves...
I'm sorry - yes, you are entirely correct. Hero gets me wrapped around the rules sometimes!  All seems good. FYI, I included the +1 OCV in the power description as an aide memoire to increase OCV when interpreting the results (ie: if the results hits a DCV of 5, then I know it should actually hit a 6). It will be useful to be able to do that directly in the API.
1594406140
timmaugh
Pro
API Scripter
Excellent! Keep the feedback coming!