Jump to content

Complete Battle Predictions Simulator - help request, appreciated


Owns
 Share

Recommended Posts

My Battle Predictor has finally reached a state that is workable enough to share. Hopefully this is near completion. This is a massive, user-friendly calculator that mimics what the in-game battle prediction does. The user inputs base stats, chooses equipment and ability selections from drop down menus, then selects a map to see the battle predictions against all enemies on that map given the chosen setup.

Link: https://docs.google.com/spreadsheets/d/1bBlgPxchHTory0WiKJuvsc5w-ybUEXlmPBs864hgWXI/edit?usp=sharing

Screenshot of example result below. Everything in this view is automatically generated except for the selections of the attack Range and Map. Setup and stats input are done higher up in the sheet:

battle-predictor-sample1.thumb.jpg.b0dad786aa88f9d2ff98aabad9ec70c5.jpg

I hope you enjoy using this to aid, with practical examples, discussions on various builds or to simply experiment with builds and see what kinds of outcomes can be expected. Please make a copy of the sheet to use it yourself. There are also tabs listing all the game's equipment, weapons, spells, and battalions in a Filtered View. These can be used as a convenient reference if you just want to look something up. Using the filters/sorting functions to change the display will not affect the calculations.

Features:

Spoiler

Automatic battle prediction calculations that mimic the in-game battle prediction just before attacking an enemy.                                                                

  • Assumes Player Phase, always                                                        
  • Does not factor enemy counter attack                                                        
  • Certain enemies with special effects on the damage calculation currently not supported (Usually final bosses). If such an enemy is found with an incorrect battle prediction please let me know.                                                        
  • All playable characters, classes, and abilities can be selected to experiment with                                                        
  • "Wait" option included to enable/disable abilities that only activate if the character waits                                                        
  • Range of attack can be chosen to include range effects on Hit calculation                                                        
  • Battalion max level stats are used                                                        
  • Equipment, weapons, and battalion sheets can be used as a reference with a filtered view to easily list things the way you want to see them. Filtered view does not affect the calculations, but changing any actual cells will.                                                        

 

An "Analysis" section includes true-hit probability calculations to display the actual odds of killing an enemy based on the number of attacks of the selected setup / combat art. This analysis includes the odds of getting critical hits and can shed light on aspects not made obvious by the game's battle prediction. Further improvements planned for this section.   

A message for anyone who might like to help improve this calculator:

Spoiler

Given the size and number of factors that go into something like this, it is impossible for me to test every single thing. I have done a fair amount of testing and the predictions look correct for the most part but I don't expect all the calculations to be perfect at this point. Terrain and linked attack effects are not considered so these factors can lead to a normal difference from the game sometimes. There are also certain enemy abilities that are not currently accounted for (like Ancient Dragonskin). With these and other considerations here are some ways you can help:

  1. So the first way that anyone can help is to simply test my battle predictor and see how it compares to the in game predictions. Make sure you have set up the sheet with the exact same way as your character in-game then select an enemy to attack and see if the battle prediction matches what the sheets says. The map options in the sheet are currently limited so that could be a limitation. Keep in mind considerations like attack range, terrain effects, and linked attacks can all cause differences. Also, don't expect the sheet's Battle Stats section to always match the in-game battle stats. This is because the sheet treats everything as a player phase attack so it adds things like personal abilities, death blow, and fiendish blow (and any manually entered extra stats) to the battle stats up front while the game only does so in the battle prediction. Please take screenshots of both your sheet (summary view like the one above) and in-game prediction when reporting these to help me find what's wrong.
  2. Help tabulate enemy stats to add more map options. @LoneRecon400 has gathered screenshots of enemy stats of I think every map in the game here. You can help by putting the stats in a tabulated form in a sheet that I can then easily add as a map option to the calculator. If you go to the "Enemy-Stats' tab, you'll find a separate table for each map. Some list more information than others, that's okay. If you scroll to the table for VW-CH22, you can see the minimum amount of information needed to get accurate battle predictions. As long as you label the columns in exactly the same way and fill out the rest for each unit, then the table will be compatible with this calculator.
  3. Bug-reporting. If the data is incorrect in any way, for example stats of enemies, equipment, battalions, etc, you can report it for me to fix. Similarly if any calculations are off and you're able to identify specifically where it goes wrong then please let me know.
  4. Suggestions and Feedback are welcome.

Some ideas for future versions that may (or might never) be added:

Spoiler
  1. Include support for certain enemy abilities that have special effects on damage calculations (like Ancient Dragonskin).
  2. Counter attack predictions
  3. Interface with average stats calculator to automatically import character stats based on chosen level, if a character's growth has already been setup in the average stats calculator.
  4. Comparative analysis. Have two battle prediction tabs allowing user to setup predictions for 2 separate builds, then compare the predicted outcomes between the two in a third tab.
  5. An overall odds of a ORKO analysis and other analysis improvements/additions.
  6. Add more map options

If you have any ideas, suggestions, thoughts, or feedback please do let me know. If you find this useful, that would be a nice thing for me to hear as well 🙂.

Finally, I honestly don't know if anyone is even looking for something like this or if I end up being the only one who uses it lol, but regardless I wanted to thank everyone on this forum for being good sports and an excellent source of knowledge. Personally, I'm quite satisfied with even just the journey of creating this, figuring out every little piece of the puzzle bit by bit to make everything work. Special mentions go to @LoneRecon400 and @Whisky who aided in more direct ways towards this calculator but many ideas that went into this came from various discussions with many people here. So, Thank you.

Edited by Owns
Link to comment
Share on other sites

Hello there.

First of all, amazing job! It looks great, and I highly respect how much work you put into this. You added a few things I wouldn't have even thought to add and things that I wouldn't know how to do. Then there are parts that wouldn't be hard but would be very tedious, so it would've taken you a long time to do all of this. Overall, this calculator is amazing, and has some very useful features. You definitely out did my own calculator.

Secondly, Thank you for mentioning me, and while I'm here, let this be my offer to help you with anything you want assistance with. Let me know if you have any questions or want help with something specific and I'll be more than happy to do what I can to help you out, although I might not be able to in a timely manner because I just started taking classes again.

------------------------------------------------------------

Now, of course I have some suggestions. Things to add and improvements to be made can wait. I consider it a higher priority to make sure everything you have so far is working as intended, so let's start there. Either some of your calculations are off or I'm not understanding what you're intending to calculate.

The calculation for P(1HKO) is accurate, however, the whole P(xHKO) table is a little confusing without some clarification on what each cell means. Technically, this is P(KOing with 1 Attack) as opposed to 1 Hit, but I'm just being pedantic. While I'm on the subject of clarification, your file could perhaps use an instructions page for this and other things, just to be very clear for people that might not understand it, in order to make it more useful for more people, without them needing to put in the effort just to understand it. For example, what does it mean when a cell becomes highlighted in blue? I can mostly understand the file, after looking through it enough and looking at the formulas, but someone shouldn't need to look at formulas to understand exactly what something is calculating or what something means.

P(2HKO) skips the possibilities of KOing an enemy with 1x or 3x multipliers. If your attack is strong enough to kill an enemy in only 1 hit, that probability will not be calculated, it instead starts off with a 2x multiplier, but then only calculates the probability of Hitting twice, and does not include the probability of only Hitting once with that Hit being a Crit. It then skips 3x and goes up to 4x. So if you deal 20 dmg against an enemy with 60 HP, the probability of Hitting once with that Hit being a Crit will not be included in the calculation. The 4x calculation only calculates the probability of getting a normal Hit and a Crit, which is calculated correctly, however, does not include the probability of getting 2 Crits. It only calculates the exact probability of dealing 4x damage, instead of dealing at least 4x damage. 6x is calculated correctly. That might be what you are intending to calculate, that information could potentially be useful, but it needs an explanation if that's the case.

P(3HKO) has similar problems. It again skips 1x and 2x, starting at 3x. So if you deal enough damage to kill the enemy with only 1 or 2 Hits, then that probability will not be calculated. It starts at 3x, which it only calculates as the probability of land all 3 Hits, without including the probabilities of landing only 1 or 2 Hits with 1 of those Hits being a Crit. It then skips 4x, and goes up to 5x, which only calculates the exact probability of dealing 5x damage, instead of at least 5x damage. It then skips 6x, and goes up to 7x. Dealing 6x damage is still possible if you Hit twice with both of them being Crits, with the last attack Missing. 7x again calculate the exact probability of dealing 7x damage instead of at least 7x damage. 9x is calculated correctly.

P(4HKO) skips calculations for 1x, 2x, 3x, 5x, 7x, and 9x. It starts at 4x, which it calculates as the probability of Hitting all 4 Attacks, not including the probability of killing the enemy with less Hits, with some of those Hits being Crits. 6x, 8x, and 10x all calculate the probability of dealing exactly that much damage instead of at least that much damage. 12x is calculated correctly.

P(5HKO) skips calculations for 1x, 2x, 3x, 4x, 6x, 8x, 10x, and 12x. It starts at 5x, which it calculates as the probability of Hitting all 5 Attacks, not including the probability of killing the enemy with less Hits with some of those Hits being Crits. 7x only calculates the probability of Hitting all 5 times with 1 of them being a Crit, which does not include the probability of getting more Crits, or landing only 3 Hits, with 2 of them being Crits. 9x only calculates the probability of Hitting all 5 times with exactly 2 of them being Crits, which does include the probability of getting more Crits, landing 3 Hits with all 3 being Crits. 11x only calculates the exact probability of dealing 11x damage instead of at least that much damage. 13x again calculates the probability of dealing exactly 13x damage instead of at least that much damage. 15x is calculated correctly.

------------------------------------------------------------

Now, maybe you are calculating exactly what you intended to and I just misunderstood that. That information could definitely be useful, though I think it would be set up differently if that's what you wanted, and if it is what you wanted, then it needs an explanation for exactly what the numbers are actually telling the user.

That's all I have for now. Let me know if you want any help with anything.

Link to comment
Share on other sites

@Whisky thanks for the kind words. Yes I agree that ensuring everything works properly should be the priority. That's part of the reason why I decided to share it now before adding more to it. Good point about the documentation. I tried to make using the sheet as intuitive as possible, but yea things probably won't be as obvious to someone seeing it for the first time as they are to me. I'll add some more instructions and descriptions.

I was actually hoping you could help out with the probabilities analysis part. The way it's set up now was intentionally done, essentially it's the odds of getting a kill with "exactly" that many hits, or at least it should be. "Hits" here does not refer to the number of attempts, rather actual non-misses, so either a regular non-crit hit or a crit. That's why the damage considered in each case is done that way. I realize this isn't the most useful analysis to present, but it's better than nothing at this point. More of a placeholder. I did leave a note saying the analysis section is still under development.

Ultimately, something more in line with what was being discussed towards the end of the effective crits thread is what we want: the odds of dealing enough damage to get a kill as a function of the number of "attempted" hits. Where "hits" would include the possibility of a miss, non-crit hit, or crit. Let's just call them trials from here on, so an attempted hit is a trial, OHKO = an attack involving 1 trial (single attack), 2HKO = 2 trials (double non-brave attack), etc. To get what I'm talking about then each column OHKO through 5HKO needs to include every possible xdamage outcome for that number of trials. We would also need to know the relative likelihood for each outcome to ensure that the highest likelihood option is the one that gets reported in case more than one outcome could potentially get the KO. These should also be calculated as "at least" x damage. Is the table format you used in your spreadsheet all that I would need to get it working this way?

 

Link to comment
Share on other sites

19 hours ago, Owns said:

@Whisky thanks for the kind words. Yes I agree that ensuring everything works properly should be the priority. That's part of the reason why I decided to share it now before adding more to it. Good point about the documentation. I tried to make using the sheet as intuitive as possible, but yea things probably won't be as obvious to someone seeing it for the first time as they are to me. I'll add some more instructions and descriptions.

Sounds good. I imagine there are people who would be interested in the calculator but aren't knowledgeable about how something like that would work, so it's best to make it as user friendly as possible.

19 hours ago, Owns said:

I was actually hoping you could help out with the probabilities analysis part. The way it's set up now was intentionally done, essentially it's the odds of getting a kill with "exactly" that many hits, or at least it should be. "Hits" here does not refer to the number of attempts, rather actual non-misses, so either a regular non-crit hit or a crit. That's why the damage considered in each case is done that way. I realize this isn't the most useful analysis to present, but it's better than nothing at this point. More of a placeholder. I did leave a note saying the analysis section is still under development.

Ah, I see. That makes more sense now. That type of analysis could be useful depending on how it's set up but I imagine that most users wouldn't be interested in it. You could have multiple analysis sections that each present different information like that.

19 hours ago, Owns said:

Ultimately, something more in line with what was being discussed towards the end of the effective crits thread is what we want: the odds of dealing enough damage to get a kill as a function of the number of "attempted" hits. Where "hits" would include the possibility of a miss, non-crit hit, or crit. Let's just call them trials from here on, so an attempted hit is a trial, OHKO = an attack involving 1 trial (single attack), 2HKO = 2 trials (double non-brave attack), etc. To get what I'm talking about then each column OHKO through 5HKO needs to include every possible xdamage outcome for that number of trials. We would also need to know the relative likelihood for each outcome to ensure that the highest likelihood option is the one that gets reported in case more than one outcome could potentially get the KO. These should also be calculated as "at least" x damage. Is the table format you used in your spreadsheet all that I would need to get it working this way?

 

You could do that with the method you were already using, although I think it would be harder that way. I think the table format I used in my calculator is the easiest way to set it up, at least for me. If you want, you can put the tables in a separate sheet so that they don't take up space on the main sheet. The tables and probabilities are working properly on my calculator and I think I set up more or less exactly what you want on the right side of the 'Main Sheet' on my calculator, so you can take a look at those to figure out how to set it up for your own. What I did was, I created two Binomial Distribution tables, one for Hits and one for Crits, and then cross multiply between the two tables to calculate probabilities. The only tricky part might be knowing what to multiply with what. I can try to explain that in more detail if you want.

Another type of analysis I thought of is actually from a game called Battle for Wesnoth. It calculates the probabilities of having any possible amount of HP left at the end of the battle (including 0) for both the attacker and defender. It would take some work, but I imagine that type of analysis would be useful for us.

I would be willing to help more actively, but I won't have much time available between work and school. Fortunately I have confidence that you can make it work on your own and with what little help I'm able to offer. The only part I'm sad about is that I won't be able to help out as much as I would like because I do find these calculations to be fun. I'll let you know if I have some time to set something up myself. If I make a copy of your file, would I be able to edit it and then share the edited version with you, and would you be able to copy over anything that you could use back to your original file?

Link to comment
Share on other sites

On 8/25/2020 at 5:47 PM, Whisky said:

The tables and probabilities are working properly on my calculator and I think I set up more or less exactly what you want on the right side of the 'Main Sheet' on my calculator, so you can take a look at those to figure out how to set it up for your own.

I've been pretty busy myself lately, but I think your table format should do what I want. I just need to figure out a practical/efficient way to get it working automatically with the battle predictions as well. Each row would need its own independent calculation but anyway it's something that can be done. I probably won't get around to it for a bit though. When I can find enough time and mental energy to do it lol.

On 8/25/2020 at 5:47 PM, Whisky said:

Another type of analysis I thought of is actually from a game called Battle for Wesnoth. It calculates the probabilities of having any possible amount of HP left at the end of the battle (including 0) for both the attacker and defender. It would take some work, but I imagine that type of analysis would be useful for us.

This is the type of thing that would be perfect if the sheet had enemy counter attacks factored in as well.

On 8/25/2020 at 5:47 PM, Whisky said:

If I make a copy of your file, would I be able to edit it and then share the edited version with you, and would you be able to copy over anything that you could use back to your original file?

Yes you could do this. Once you have a copy you basically own the copied sheet and can do whatever you want with it. So yea if you  make any interesting additions you can share it with me and we can consolidate in the main version.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...