Are you, in fact, a pregnant lady who lives in the apartment next door to Superdeath's parents? - Commodore

Create an account  

 
building an online updated damage calculator

Initial version is released here:

https://gmbarak.github.io/COM-Damage-Calculator/

Source code in Javascript and C# can be found here:
https://github.com/gmbarak/COM-Damage-Calculator

you can download the doc folder to a local folder and open index.html and it can run locally on your pc without internet access.

It's still an initial version, more is to come!
Thanks!
Reply

Is there an interest from anyone that we continue to develop this damage calculator?
Reply

I am interest in it. Too bad that I still to busy to check.
Reply

(May 31st, 2022, 10:10)Suppanut Wrote: I am interest in it. Too bad that I still to busy to check.

Great! your wish is my command, let's make this the best damage calculator ever together! features I am planning:

1. remember last user selection in browser cache
2. create list of presets of creatures that you can select your favorite ones from the list.
3. setup reading creatures from configuration file so we can add all creatures we are interested in.
4. implement all features: invisibility, invulnerability etc...
5. enable simulation of stack of units damage probability and battle results estimation.

Please let me know what you would want your dream damage calculator to have...
Reply

(May 31st, 2022, 12:24)GMBarak Wrote:
(May 31st, 2022, 10:10)Suppanut Wrote: I am interest in it. Too bad that I still to busy to check.

Great! your wish is my command, let's make this the best damage calculator ever together! features I am planning:

1. remember last user selection in browser cache
2. create list of presets of creatures that you can select your favorite ones from the list.
3. setup reading creatures from configuration file so we can add all creatures we are interested in.
4. implement all features: invisibility, invulnerability etc...
5. enable simulation of stack of units damage probability and battle results estimation.

Please let me know what you would want your dream damage calculator to have...

I want ability to read game file database so for data about creature and spell as I would use it for my warlord mod.
Reply

(May 31st, 2022, 22:02)Suppanut Wrote: I want ability to read game file database so for data about creature and spell as I would use it for my warlord mod.

Ok, in which files are they located?
Reply

(May 31st, 2022, 23:14)GMBarak Wrote:
(May 31st, 2022, 22:02)Suppanut Wrote: I want ability to read game file database so for data about creature and spell as I would use it for my warlord mod.

Ok, in which files are they located?

I think it would be better if you make calculator that when put into game folder it would take data from files in data folder to analyze the mod/main game?
Reply

(June 1st, 2022, 08:22)Suppanut Wrote:
(May 31st, 2022, 23:14)GMBarak Wrote:
(May 31st, 2022, 22:02)Suppanut Wrote: I want ability to read game file database so for data about creature and spell as I would use it for my warlord mod.

Ok, in which files are they located?

I think it would be better if you make calculator that when put into game folder it would take data from files in data folder to analyze the mod/main game?

well, you can include javascript files from a folder, but if the syntax of the configuration files is not JSON/javascript. it will not compile - just generate an error when loaded. your browser cannot open files on your computer by itself partially for security reasons.
Reply

(May 26th, 2022, 13:36)GMBarak Wrote: Hi,

I am using this probability calculator to test my calculator:
https://masterofmagic.fandom.com/wiki/Ad...Calculator

and I found the following issue, assume:
1 attacking figure, 2 attack, 2 defending figures, 1 defense, to hit: 30% to defend 30%, 2 hit points per figure and the defender took 1 hit, so over all the defending stack has 3 hit points.
the only scenario where the defender takes 2 hits is when the attacker made 2 successful hits and both first and second defender failed their single defense roll.
so the probability of such event should be:
2 successful hits: 9%
first failed defense: 70%
second failed defense: 70%

= 0.09*0.7*0.7 = 0.0441
that is: 4.41%

but the online calculator gives 6.3%.

is there anything I am missing? or does this online simulator has bugs?

if it is buggy, can you please write a online damage calculator without bugs so I can compare to it?

j/k ofc wink

What you're missing are these two paragraphs, from the Defense article:

Quote:Confusingly, the game uses two different mechanics to determine when the first  figure has taken "enough damage" to be slain for the purpose of proceeding with the next Defense Roll. Unit attacks, such as Melee- or Ranged Attacks, are always considered to be directed at a healthy  figure, meaning that the second  figure's roll can commence only after a  figure's full  Hit Points' worth of  damage has been recorded by the unit. This is true even if the unit no longer has such a  figure.

On the other hand,  Spell Damage allows for a second Defense Roll as soon as the unit has taken enough  damage to destroy the actual "top figure", whose current  Hit Points and  damage are visible in the unit statistics window. This makes direct damage spells somewhat less effective against  Multi-Figure Units with an injured "top figure", especially if the target unit has a high  Defense score.

This is, of course, in the DOS versions. It's probably different in the Windows version of CoM. In any case, the calculator on the wiki is working again now.
Reply

(June 6th, 2022, 16:23)drake178 Wrote:
(May 26th, 2022, 13:36)GMBarak Wrote: Hi,

I am using this probability calculator to test my calculator:
https://masterofmagic.fandom.com/wiki/Ad...Calculator

and I found the following issue, assume:
1 attacking figure, 2 attack, 2 defending figures, 1 defense, to hit: 30% to defend 30%, 2 hit points per figure and the defender took 1 hit, so over all the defending stack has 3 hit points.
the only scenario where the defender takes 2 hits is when the attacker made 2 successful hits and both first and second defender failed their single defense roll.
so the probability of such event should be:
2 successful hits: 9%
first failed defense: 70%
second failed defense: 70%

= 0.09*0.7*0.7 = 0.0441
that is: 4.41%

but the online calculator gives 6.3%.

is there anything I am missing? or does this online simulator has bugs?

if it is buggy, can you please write a online damage calculator without bugs so I can compare to it?

j/k ofc wink

What you're missing are these two paragraphs, from the Defense article:

Quote:Confusingly, the game uses two different mechanics to determine when the first  figure has taken "enough damage" to be slain for the purpose of proceeding with the next Defense Roll. Unit attacks, such as Melee- or Ranged Attacks, are always considered to be directed at a healthy  figure, meaning that the second  figure's roll can commence only after a  figure's full  Hit Points' worth of  damage has been recorded by the unit. This is true even if the unit no longer has such a  figure.

On the other hand,  Spell Damage allows for a second Defense Roll as soon as the unit has taken enough  damage to destroy the actual "top figure", whose current  Hit Points and  damage are visible in the unit statistics window. This makes direct damage spells somewhat less effective against  Multi-Figure Units with an injured "top figure", especially if the target unit has a high  Defense score.

This is, of course, in the DOS versions. It's probably different in the Windows version of CoM. In any case, the calculator on the wiki is working again now.

Thanks Drake178,
for your damage calculator and for your answer.

I've been using your damage calculator for a long time, it's great!!  I also used it to debug the one I wrote and it also helped me find bugs.
regarding the "damaged figure defends last" formula, which indeed justifies the 6.3% result in the damage calculator you wrote. It is a little bit counter intuitive. because you would expect in the example above assuming only one damage done in the battle to have two figures surviving each with one damage when in actually you will get one figure surviving with two health points.

Also "This is true even if the unit no longer has such a figure.", what??? are you telling me a one remaining hitpoint, one remaining figure must first take full figure (possibly 14 hitpoints) damage before it's destroyed? doesn't make any sense.


Seravy, is that how it works in Caster of Magic? that is: when defending, first the healthy figures defend and the damaged figure defends last? and in the end of the battle all figures except the last get full health? so that only the top figure can be a damaged figure?
Reply



Forum Jump: