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] Anima: Beyond Fantasy open rolls / fumbles script

1381712140

Edited 1384199165
aRotondi
Sheet Author
For anyone using Anima: Beyond fantasy, much of the game is spent calculating if open rolls or fumbles need to occur (and the extra dice that comes with them). Additionally, the scaling and modifiers that can apply to these rolls makes them unusually complex, and it is unlikely that roll20 will incorporate rules for them in their default commands. Therefore, I have taken to the API to make this type of roll which is damn near impossible to remove from A:BF easy and (hopefully) fun to use! Below you can find the specifications and accepted uses of the script, as well as the Gist link to the code itself. Edit 10/28/2013: Updated the script and usage description to allow multiple number modifiers and correct wording. Edit 11/11/2013: Added Colors to openrolls and fumbles to better identify player success/failure. Colorblind friendly hopefully. Use of the Script: As it says in the top section of the script itself, the command for this script is in the following format. !openroll [modifier1] [modifier2] [...] [flag1] [flag2] [...] so your players will need to fill in at minimum the !openroll and any modifiers while selecting the token they wish to roll as. This is essentially the same as the standard command /roll 1d100, but using A:BF's open roll and fumble mechanics. By default, rolling over 90 will trigger another roll and sum the totals together, unless the second roll is above 91, then it will roll a third roll, etc. Fumbles occur on results below 4, and display the fumble level.Additionally, it will by default limit a person's rolls to below Inhumanity (320). A simple example of this could be something like: !openroll 90 This will roll 1d100 and automatically sum all open rolls, and finally add 90 to the total. If this value is above 319, it will be 'capped' at that number, as by default rolls are not allowed to score at inhumanity (320) or higher. The output for such a simple roll will look similar to this: [character name]: [(05)]+(90) = 95 Where all the numbers inside of the square brackets [ ] represent dice roll results. the number afterwards is the total of all modifiers detected in the script. Players and GM's can make use of this and attributes to create even more complex rolls such as: !openroll ?{Situation} @attack @weapon_quality Note the lack of algebraic symbols in the above examples, as the logic of the script is simply to add numeric results together. For negative numbers, simply put the - in the same term as the number, and it will correctly interpret. To change some of these values, you can use the flags at the end of the command to modify the behavior of the roll. The flags are case insensitive , and the list of flags are as follows: Inhumanity, Zen, Complex, Mastery, Initiative, Reset Inhumanity and Zen follow the standard rules, allowing rolls to exceed 320 and 440, respectively. Note that only one of these modifiers should be used, as it makes little sense to note that you have both (and it will currently cause one of the only bugs in the script). Complex and Mastery increase or reduce respectively your fumble chance as per the standard rules. Both of these modifiers can be applied, making your character fumble on a 4 or lower. Initiative allows the roll (and all other applied modifiers) to push to the initiative window, making many characters' lives much easier. Using the additional Reset flag will clear the initiative window of all other characters. NOTE: The additional reset flag is not recommended except by GM use, as by default, just using the Initiative flag will replace the selected token's initiative if it is already present in the initiative window. It will also put the character in the initiative window if they were not already present. Known bugs flaws: I had assumed that people either use the Inhumanity or the zen flag, but not both (as to me it doesn't really make any sense), so the logic doesn't compensate for having both, and it will probably limit you if you roll above 320 and have both flags. Use of the flags is not really limited, so as a player or GM, make sure your roll is applicable to having these flags, as it may cause unintended weirdness if you put complex on say your initiative roll (or if one of your players is using the Reset flag!). Thankfully the flags are logged so GM's can check their API console to determine if a roll was in fact in error. Certain effects such as high natura or the blessings of Suzaku can introduce different open roll levels and mechanics (such as rolling doubles). These are not currently incorporated into the flags system due to slightly increased complexity, but hopefully I can tackle that issue soon(tm). The framework for this type of modification has been implemented, but the actual flags are not entered yet. Currently, if you speak as yourself using this script, your avatar will show in the chat window, but when speaking as a character (hopefully the one you have selected) the avatar will not show. The reasoning for this bug is unknown at this time. Use of linked attributes (such as @attack) and roll queries (such as ?{situation}) as shown in the above examples is functional, but linking to complete macros (such as #attack_roll) does not work. I am guessing this is due to macros not being interpreted as part of a standard roll . Corrected. Use of inline rolls (such as [[1d100+20]]) does not work in all circumstances. Since use of abilities/macros are functional, decompose your command into the simplest terms possible (or nesting them) instead. Script for download: <a href="https://gist.github.com/aRotondi1990/6795346" rel="nofollow">https://gist.github.com/aRotondi1990/6795346</a> Thanks guys for looking at my script (first one, yay!) and if you know someone who is currently running or playing Anima: Beyond Fantasy, send them this script. If anyone has any requests or feature additions (other than those hinted at above) please leave a reply below and I can probably add it!
As I said on the forums, awesome work :)