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

Nested query @ 5e Default ability template

Hello I am trying to make a macro for Turn Undead ability on my BECMI retro-clone game using 5e Defaut template. Problem is I am lost inside queries, HTML entities and the absurd way these rules work. First of all I need to explain how the rules work: you roll 2d6, look at your cleric table in which the following results are listed: - : no action possible. 11 : roll 2d6 and will succeed if the result will be 11 or higher. If succeeded, roll 2d6 again to see how many HD of undead you affect. 9 : roll 2d6 and will succeed if the result will be 9 or higher. If succeeded, roll 2d6 again to see how many HD of undead you affect. 7 : roll 2d6 and will succeed if the result will be 7 or higher. If succeeded, roll 2d6 again to see how many HD of undead you affect. T : automatic success, roll 2d6 to see how many HD of undead you affect. D : automatic success and undead are destroyed rather than simply turned. Roll 2d6 to see how many HD of undead you affect. D+ : automatic success and undead are destroyed rather than simply turned. Roll 3d6 to see how many HD of undead you affect. D# : automatic success and undead are destroyed rather than simply turned. Roll 4d6 to see how many HD of undead you affect. The calls to the values are made with such attributes: turnskeleton, turnzombie, turnvampire and so on... I was trying to build a macro that would prompt the user for the kind of undead, and then display the result accordingly, automatically rolling the necessary dice for the result and for the amount of HD affected. Any idea on how to proceed?
1612892731

Edited 1612893257
David M.
Pro
API Scripter
Without a Pro subscription and api access, you won't be able to fully automate this. Here is a sort of kludge-y proposal: I can't recall exactly how the BECMI table is set up, but I seem to recall it is based on Undead level. You could perhaps create a set of rollable tables (one for each Undead level), called "1HD-Undead", "2HD-Undead", etc. Populate each table based on the row of the master BECMI table. Then, query for which table to run and roll off of that table using 1t[TableName] syntax. This is an example of how to do that (this will be added to your main macro later): [[ 1t[?{Undead Level?|1}HD-Undead] ]] You can create a macro to roll Xd6 (call it "RollXd6"), which would have the following syntax. This will be called by your main macro from a button. [[?{HowManyd6?|2}d6]] Then, your main macro to start the ball rolling would be this. It rolls the table you specify based on undead level, then creates a chat menu button that rolls the extra d6's (if needed) as many times as needed. &{template:default} {{Result=[[ 1t[?{Undead Level?|1}HD-Undead] ]] }} {{Roll for HD Affected=[Xd6](!
#RollXd6)}} This still requires manual comparison if you rolled the 11/9/7 entry. Optionally, you could put multiple buttons in your main macro to handle these situations if you really wanted to, each pointing to a different sub-macro that instead rolls using a success/fail roll, e.g. 2d6>9. Then you could click whichever one is prompted by the rollable table result.
Indeed I feared it would have been necessary to manipulate API to have it 100% automated. I will try working upon your suggestions, then. Thank you :)