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

[API Request][D&D 5e] 5e Encounter Calculator

Are there any APIs out there, or is there a coder willing to take on the challenge of building an API, that can: 1) Store party members for use in doing current party level and composition calculation in it's API configuration !encounters5e --config to GM from 5eEncDiff v1.0: 5e Encounter Difficulty Configuration Menu v1.0 Character Sheet (Defaults) [OGL / Shaped / Custom ] PC Level Attribute [level] NPC CR Attribute [npc_challenge] Select a PC in your Party [Click Here to Add] Bob - Level 1 [remove] Jim - Level 1 [remove] Sue - Level 1 [remove] Amy - Level 1 [remove] 2) Allow you to select multiple monsters, calculate all relevant CR information, then run it&nbsp;to output the encounter difficulty to the GM chat?&nbsp; !encounters5e --calculate to GM from 5eEncDiff v1.0: 5e Encounter Difficulty: Deadly Based on Party: 4 level 1 characters Enemies: 6 CR 4 monster(s), 2 CR 10 monster(s), 1 CR 15 monster(s) Description: ( Deadly Encounter) A deadly encounter could be lethal for one or more player characters. Survival often requires good tactics and quick thinking, and the party risks defeat. The idea was inspired by this little gem:&nbsp; <a href="http://dhmstark.co.uk/rpgs/encounter-calculator-5th/" rel="nofollow">http://dhmstark.co.uk/rpgs/encounter-calculator-5th/</a> &nbsp;- but I wondered if there was something that someone made for Roll20 already to do this work, making monsters selectable to do the calculations, and do it on the fly to make sure our encounters are at the difficulty we're looking for.&nbsp; This is especially important to newer DMs like myself, returning to D&amp;D in 5e after 2e went the way of the dodo&nbsp;(almost - I know some DMs still bring it to life again, but the truth is that the game progressed beyond it in a lot of ways, and IMO it's casting a raise dead on an entire edition to do that), and CR wasn't a thing back then.
1560743608

Edited 1560744008
GM Michael
API Scripter
I don't know of any script that can do this already, but it's very similar to what I did for the Battle Rating operation in my Mass Combat script .&nbsp; I'd be willing to look into this tomorrow; it shouldn't take long to do. For what it's worth though, in 5th edition, experience isn't so much a hard number, and is often done away with in favor of plot-based advancement.&nbsp; Now, if you just want to use it for calculating difficulty, it can be a decent starting place for new DMs, like you said. Back when I first started DMing, I used this spreadsheet I made to track experience per day or over time.&nbsp; Nowadays, I mainly just use Kobold Fight Club &nbsp;which has all the monsters and their CRs preloaded, plus you can filter, so it just makes the decision of "what kind of undead do I throw at my level-5 party" a whole lot easier.
1560753599

Edited 1560753691
Michael G. said: I don't know of any script that can do this already, but it's very similar to what I did for the Battle Rating operation in my Mass Combat script .&nbsp; I'd be willing to look into this tomorrow; it shouldn't take long to do. For what it's worth though, in 5th edition, experience isn't so much a hard number, and is often done away with in favor of plot-based advancement.&nbsp; Now, if you just want to use it for calculating difficulty, it can be a decent starting place for new DMs, like you said. Back when I first started DMing, I used this spreadsheet I made to track experience per day or over time.&nbsp; Nowadays, I mainly just use Kobold Fight Club &nbsp;which has all the monsters and their CRs preloaded, plus you can filter, so it just makes the decision of "what kind of undead do I throw at my level-5 party" a whole lot easier. Being that I'm running a sandbox homebrewed campaign, its more for planned encounters and making sure I'm not doing things I know are stupid, like throwing an Ancient Dragon at 3 level 6's (TPK!).&nbsp; So as i highlighted above, that's really all I'm looking for in the end, but in a nice way of explaining the different Encounter Difficulty as well.&nbsp; I mean sometimes - like boss battles - you want it to be deadly to feel like a boss battle.&nbsp; But the random or non-narrative progressing encounter - no, Easy or Medium is fine, maybe ... maybe ... Hard, if they're nearing something significant to the plot. Also, I'd like something I can recommend to new DMs in their campaigns, as we just had an experience tonight, running Princes of the Apocolypse at the Earth Temple, of a DM who thought 2 (CR 2) gargoyle's against our group of 6 level 6s wasn't enough and threw in 5 (CR 10!) Stone Golems.&nbsp; Our Dragonborn Fighter got hit with 2 sword attacks from one and was downed on the first round.&nbsp; I healed him with healing word for a whopping 2 HP to get him back up, but he was quite ineffective against most things in that room, and gladly he had the AC to not go down again.&nbsp; But the DM realized his mistake and mounted them on the statue pedestals to immobilize them, giving us a way around them instead of forcing us to fight them (at least he wasn't hard and fast on the battle).&nbsp; He is using Milestone, so unimportant battles aren't necessary, but I just did his encounter challenge rating and it was 23!&nbsp; Quite definitely in the "Deadly" Category. So I'm not only looking at this for my own campaign, but think it could be useful for others as well.&nbsp; I think it would help with the Marketplace modules to beef up existing encounters to the level of the party.&nbsp; Had he just added 4 more gargoyles to the above example, we would have had a nice Medium level encounter to adjust to our levels and number.&nbsp; I think in many of the non-railroady/ sandbox modules, such as CoS, you can be above level for certain areas and below for others.&nbsp; This kind of tool would be very helpful.
So not really an API answer (and not entirely sure why this would need to be in roll20 itself) but there are a number of 5E CR rating calculators available on the web.
Aku said: So not really an API answer (and not entirely sure why this would need to be in roll20 itself) but there are a number of 5E CR rating calculators available on the web. All due respect, I fail to see how that is adding anything to the thread.&nbsp; I already mentioned one of those calculators in my original posting.&nbsp; Micheal G added Kobold Fight Club as another.&nbsp; I think you're missing the point entirely, and failing to add anything remotely constructive to the topic. But I'll try to entertain you, even if I feel I'm feeding a possible/ potential internet troll.&nbsp; The point is to have a way to select a group of monsters and calculate that difficulty on the fly.&nbsp; The party members would be pre-saved (from configuration) in memory of the API, and would be able to calculate the party members' current level.&nbsp; Run the API, and it would do the work, instead of having to open yet another window.&nbsp; Not all of us have 6 monitors running to be able to access everything at the same time. There are plenty of APIs that duplicate things available elsewhere, such as loot generators, character sheet APIs, etc.&nbsp; We use them to avoid opening more web pages than we have to.
1560775370

Edited 1560775715
GM Michael
API Scripter
... Pretty sure Aku wasn't trolling.&nbsp; I believe the implied question of his post was "Why do we need that built into Roll20?" KFC is an amazing tool and frankly more powerful than I would ever bother to do.&nbsp; It's not something you really need once the game is running though.&nbsp; Just calculate it beforehand. Now, again, I'm not opposed to doing this, but I see this as more useful as a last second sanity check of random encounters.
Wolf Thunderspirit said: Aku said: So not really an API answer (and not entirely sure why this would need to be in roll20 itself) but there are a number of 5E CR rating calculators available on the web. All due respect, I fail to see how that is adding anything to the thread.&nbsp; I already mentioned one of those calculators in my original posting.&nbsp; Micheal G added Kobold Fight Club as another.&nbsp; I think you're missing the point entirely, and failing to add anything remotely constructive to the topic. But I'll try to entertain you, even if I feel I'm feeding a possible/ potential internet troll.&nbsp; The point is to have a way to select a group of monsters and calculate that difficulty on the fly.&nbsp; The party members would be pre-saved (from configuration) in memory of the API, and would be able to calculate the party members' current level.&nbsp; Run the API, and it would do the work, instead of having to open yet another window.&nbsp; Not all of us have 6 monitors running to be able to access everything at the same time. There are plenty of APIs that duplicate things available elsewhere, such as loot generators, character sheet APIs, etc.&nbsp; We use them to avoid opening more web pages than we have to. Sorry, not trolling at all. Just responding way to early in the morning, when words are hard.&nbsp;
1560805203

Edited 1560805986
Michael G. said: ... Pretty sure Aku wasn't trolling.&nbsp; I believe the implied question of his post was "Why do we need that built into Roll20?" KFC is an amazing tool and frankly more powerful than I would ever bother to do.&nbsp; It's not something you really need once the game is running though.&nbsp; Just calculate it beforehand. Now, again, I'm not opposed to doing this, but I see this as more useful as a last second sanity check of random encounters. Either way ... The Question doesn't add anything, it diminishes the thread by it's asking.&nbsp; My question is if there is anyone who has a script or willing to write one.&nbsp; That question leads to the ability to spread shade on the question, and put out there that this is not needed/ don't bother .&nbsp; So, in essence, my question would be ignored because someone shamed the question.&nbsp; To me - while it isn't a trolling behavior, yet - it could be disruptive to the context of the original post.&nbsp; And I find the possible results of that a slight bit offensive, because of a post - no one will even take the question seriously.&nbsp; There is where I get the idea of it being a possible Troll, even if it wasn't the original intent. The idea behind it is simply to provide New DMs a tool that is In-Game as opposed to opening another browser window and taking their attention away from the game.&nbsp; Planned encounters are one thing.&nbsp; Random, not so much.&nbsp; I don't have time to open other web pages mid game to check if the encounter is even worth doing because it's rating is trivial, or if it's too much for their level.&nbsp; This API I'm suggesting is something that would take just a moment of selecting the monsters and macro'ing the API to run on a button click.&nbsp; I use the same kind of thing with Kirsty's Lootgen script, so I don't have to consult a bunch of tables to dole out random loot.&nbsp; I do the same to see how random shops are stocked using Robin Kuiper's Magic Shop script instead of beating out the details of stocking shops worldwide.&nbsp;&nbsp; I want something that is more the results of a check, like the website link I provided - not what monsters to put in an encounter as KFC is.&nbsp; Any DM worth their DMG should be able to drag out another creature into the encounter to raise the bar to party level, or delete one/ suspend one on the gm layer to lower the bar down to level.&nbsp; This just spot checks what kind of results doing so would have. If I knew how the code works, I'd do this thing myself and am more than willing to work collaboratively with someone who knows the code and willing to teach me.&nbsp; At this point I can only direct an idea, which is kind of like telling an artist what to paint.&nbsp; I know there will be issues lost in translation and wordplay, concept, and reason behind wanting the artwork done.&nbsp; That doesn't take away from wanting to see it to completion.&nbsp; So if there's someone who would teach me how to make this script, I'm just as interested in that as I am in seeing the script done.&nbsp; I've written webpages way back in the days of HTML 4, PHP, JavaScript, MySQL, and Perl (though I was bad at Perl).&nbsp; But the language used in this, though it seems very akin to JavaScript, somehow alludes me - probably because in the decade or two since I last wrote a site, a lot has changed and they've progressed far beyond my ability to keep up with new things.
1560832394

Edited 1560858994
GM Michael
API Scripter
Unfortunately, I didn't feel so great tonight so I only got a fraction of the time on this that I'd hoped.&nbsp; Having said that, it now does technically function, but with precisely zero beautification or user friendliness.&nbsp; (And it's probably riddled with bugs.) Provided I'm feeling better tomorrow, I'll finish it up then, but I suppose if you want to take a look now, it's on github gist . UI buttons will eventually handle everything, but for now... To add a player, you'd use this command... !dr --addPlayer ?{Please enter character level} ^?{Please enter character name}^ And to calculate encounter difficulty, you'd use... !dr --calculate and then in terms of what this beta version displays... EDIT: I updated it a bit this morning before work.&nbsp; It now has a (mostly complete) UI.&nbsp; Player deletion doesn't work yet, nor does mode.
Very nice Micheal!&nbsp; When this is finished, you should definitely submit it for the one-click options/ Roll20s Script Library.&nbsp; Looks real good!&nbsp; Excellent work, Thank you very much for this!
Alright, I've made a dedicated thread here , so I can more easily maintain it in the future. As for one-click, I'd love to, but I've never actually added anything to one-click before :P
I understand, but this might be the most ideal entry ever to it.&nbsp; Contact other One-Click Authors on how - I myself have no clue what the process is.&nbsp; I suggest The Aaron, Jakob, and others for help on how, and know they would be great collaborators if you want a sounding board on how to do things if you get stuck.&nbsp; I don't see that as an issue, as you have been doing great thusfar.&nbsp; I want to wait until you're satisfied before installing and testing it out myself though.