Page 1 of 2

9th Age Combat Calculator

Posted: Mon Jun 10, 2019 7:01 am
by jimmygrill
Hi, first post here 8)

While I don't really have anything to do with Druchii per se, I'm making extensive use of the 9th Age Combat Calculator, because it is an excellent tool.

It has aged now a bit, though, and would need some updates, so my main question would be if it is still being updated at all? :badh:
If so, I'd have some remarks/suggestions...

Re: 9th Age Combat Calculator

Posted: Mon Jun 10, 2019 7:16 am
by Calisson
This would be a question for Daeron.
May I suggest you wrote him a personal message?
This would reach him sooner.

Re: 9th Age Combat Calculator

Posted: Mon Jun 10, 2019 1:51 pm
by jimmygrill
Thanks for the hint, but it appears I'm too new here to be able to send PMs... :(

Re: 9th Age Combat Calculator

Posted: Tue Jun 11, 2019 6:30 am
by Calisson
IIRC you need to have a total of 3 posts at least.
Designed to prevent spam from robots.

Re: 9th Age Combat Calculator

Posted: Tue Jun 11, 2019 4:52 pm
by Red...
Just one more post needed then! Make it a good one! :)

Re: 9th Age Combat Calculator

Posted: Fri Jun 14, 2019 5:16 pm
by Daeron
Sorry.. it took me a while to find this message. Thank you for bringing it to my attention, Calisson.

There is no active development at the moment, but I can take requests. What needs to be done?

Re: 9th Age Combat Calculator

Posted: Fri Jun 14, 2019 7:25 pm
by jimmygrill
Ah, excellent :P

I have been using the T9A Combat Calculator quite extensively over the past year, and all in all it's an extremely useful tool.
It just has a few things where it's no longer up to date.


The first is a glitch, whenever opening the site:
Image

And whatever you enter, as soon as you hit Calculate, it will always give you an error for the #1 position:
Image

If you Remove the #1 slot and create a new one, all works perfectly fine. But the first result is always this error.
So there is a workaround, but it is very tedious and it will give people the impression the tool isn't working, because at their first try they'll always get an error.



Second, for T9A there is now no worse to hit roll than 7+, which you achieve by rolling a 6 followed by a 4. Anything worse than that is no longer in the game and can be removed
Image
All those extra results that shouldn't exist anymore make entering the correct hit score unnecessarily tedious.



One final thing that exists now in the game and that would be super useful in the calculator is "battle focus".
Battle focus means that each natural 6 to hit generates not one but two hits.


Maybe one more thing is that it isn't possible to calculate multiples of dice, for example you cannot enter 2*2d6 attacks - which is different to 4d6. That's a bit of a minor point though, because just using 4d6 in this case is close enough...


Thanks for your attention 8)

Re: 9th Age Combat Calculator

Posted: Tue Jun 18, 2019 7:15 pm
by Daeron
That can be arranged. I'll see what I can do!

Re: 9th Age Combat Calculator

Posted: Tue Jun 18, 2019 8:03 pm
by Daeron
  • Bug fixed
  • Hit rolls of 8 and 9 removed. Support in the plotter remained, to preserve backwards compatibility and not break old plots.
  • Battle Focus can be done "reasonably easy". The core calculator is quite capable of handling it, but as it's been more than a year since I updated the code, it might take me a while to program it in.
  • Multiple of dice is the same deal. But just to be sure, you mean with 2*2d6 that, if you roll a 7, you have 14 attacks?

Re: 9th Age Combat Calculator

Posted: Tue Jun 18, 2019 8:11 pm
by Daeron
A few questions on rule combinations:
  • How does battle focus combine with poison? Does it give two automatic wounds? I'm guessing not, but then which rule takes precedence? For now I'll try to combine them, as it's the only clear resolution I can think of.
  • How does battle focus combine with a roll of 7+? Do the 6's still cause 2 hits? I'm guessing not... So will be ruling it like this for now.
  • When you have 2*2d6+2 attacks, and you roll a 7, do you get 16 or 18 attacks? In other words, is the +2 added before the multiplier (so being multiplied as well) or is it added after the multiplier? I'm guessing the latter.

Re: 9th Age Combat Calculator

Posted: Tue Jun 18, 2019 9:34 pm
by Daeron
Added the multiplier to the valid dice expressions. IE you can now have 2*2d6+2 attacks.
http://tools.druchii.net/9th-Combat-Cal ... 1:m0000&s=
Which rolls like
Image

Re: 9th Age Combat Calculator

Posted: Tue Jun 18, 2019 9:35 pm
by Daeron
The Battle Focus will be for another day. If you can provide them, the answers to the above questions would be helpful.

Re: 9th Age Combat Calculator

Posted: Tue Jun 18, 2019 11:14 pm
by Lord Drakon
Amazing work Dearon, I also still use the calculator on a regular basis.

Re: 9th Age Combat Calculator

Posted: Wed Jun 19, 2019 4:45 pm
by jimmygrill
Daeron wrote:A few questions on rule combinations:
  • How does battle focus combine with poison? Does it give two automatic wounds? I'm guessing not, but then which rule takes precedence? For now I'll try to combine them, as it's the only clear resolution I can think of.
  • How does battle focus combine with a roll of 7+? Do the 6's still cause 2 hits? I'm guessing not... So will be ruling it like this for now.
  • When you have 2*2d6+2 attacks, and you roll a 7, do you get 16 or 18 attacks? In other words, is the +2 added before the multiplier (so being multiplied as well) or is it added after the multiplier? I'm guessing the latter.

Oh, excellent work! 8)

As for the questions, the battle focus/poison interaction works a bit different in the rules (two hits, but only one of those auto-wounds), but this combination is so rare that it won't really matter (the only way you can currently get this combo is with spells).

Basically same answer for 7+ battle focus... it's such an implausible combination that it won't really matter either way...
(If you're interested though: if you roll a 6+ AND 4+, it will trigger battle focus)

Concerning multiplier and sums, you assume correctly - the usual mathematical rules apply :D

Re: 9th Age Combat Calculator

Posted: Tue Jun 08, 2021 12:55 pm
by jimmygrill
It's me again... I still use the tool a good bit, still loving it.

Recently I noticed that something is off with "Holy Attacks" though, so I checked. I made an example with 10 auto-hits and auto-wounds and no armour save, just a 4+ special save:
Image
Seems right.

If you now activate "Holy Attacks", the 4++ must be re-rolled so is saving only 1/4 of the hits, so should give an average of 7.5, but it doesn't:
Image
Just in case, the rule mechanic for Holy Attacks (which are now called Divine Attacks since v2 of the game from 2018) is simple that successful ward saves must be re-rolled.

@Daeron
Is somebody still able and willing to change this thing? Could you look into it please? The mistake seems quite simple...

Re: 9th Age Combat Calculator

Posted: Thu Jun 10, 2021 11:21 am
by Daeron
yes, I still try to support the tool. I will check out the the bug tonight.

Perhaps I am a bit early with the news, but I plan on increasing support for the tool in the future. My motivation is to support 40k (the game I play) but I will be extending the support to other games. Although I don’t play T9A, I will contact the community to see what more they wish from the tool when the base code has been redone. I don’t have a planning yet, though.

Re: 9th Age Combat Calculator

Posted: Thu Jun 10, 2021 9:16 pm
by Daeron
Image
Fixed.
http://tools.druchii.net/9th-Combat-Cal ... &f=isv&s=1

Apparently I had some test code that slipped in :(

Re: 9th Age Combat Calculator

Posted: Sat Jun 12, 2021 2:13 pm
by jimmygrill
@Daeron Awesome, thanks :o

I think the tool is super useful, and with very few additions could be exceptional 8)

Re: 9th Age Combat Calculator

Posted: Sun Jun 13, 2021 9:59 am
by Daeron
You're welcome. And ... feel free to share which additions you'd like to see.
I am planning to contact some communities (T9A included) to figure out what people would like to see in a revamped calculator. I know some rules will be among the most desired features, but it needn't be restricted to those.

For example:
  • I've seen some people screenshot the entire calculator, because they wanted to show the dice rolls and parameters along. I'll try to provide such an option in the output.
  • I provided a way to hot-link the images from the calculator, but I still see people fall back to PNG / JPG screenshots. When I made the calculators, I was gambling on the idea that SVG image support would improve. It kind of did, browser wise, but the incorporation for social media remained limited. A PNG/JPG output could be added. There are some architectural concerns there, but nothing we can't figure out :)
  • Social media support in general is poor. It was designed with forums in mind, but I struggle to use it in Discord or Facebook. Something to work on.
  • Whenever a new edition is released, people would like to compare old vs new rules. Generally, only 1 edition is supported a time. I'll try to support multiple editions in the future.
  • Designers may want to experiment with new rules. Right now, the options to try out new rules are quite limited. I have a more generic calculator in mind, that allows to users to try more complex rules. Battle Focus comes to mind but it can be taken further still. The generic calculator will be the basis of the new generation, where specific rules and editions will be "pre-made" configurations for this generic core.

Anyway, I'm still working on how I want to launch this campaign to make the new tools.

I also would like to throw in a tough question for the community money wise. I'm tempted to add some form of monetization on the tool. It's not going behind a paywall or anything. I want it to be freely accessible. But if I could somehow make it alleviate some of the hosting costs (shared with Dnet, Ulthuan), I would appreciate that.
Perhaps something along the lines where no banner or add is used, but people can activate that if they choose to as a sign of support?
I took pride in the fact that the site didn't need cookies or anything. I want that to remain the default. I hate how so many sites trap you to force you to give up your privacy just to store your preferences on guarding your privacy. I don't want to go down that route.

Re: 9th Age Combat Calculator

Posted: Mon Jun 14, 2021 8:38 am
by Calisson
Daeron wrote:I also would like to throw in a tough question for the community money wise. I'm tempted to add some form of monetization on the tool. It's not going behind a paywall or anything. I want it to be freely accessible. But if I could somehow make it alleviate some of the hosting costs (shared with Dnet, Ulthuan), I would appreciate that.
Perhaps something along the lines where no banner or add is used, but people can activate that if they choose to as a sign of support?
I took pride in the fact that the site didn't need cookies or anything. I want that to remain the default. I hate how so many sites trap you to force you to give up your privacy just to store your preferences on guarding your privacy. I don't want to go down that route.
Sounds good.
Perhaps you may add a couple of lines saying:
"This tool is free and uses no cookie to capture information for you.
If you appreciate the help it provides, perhaps you may accept to support me, the developer,
in the support I provide to the fan websites Dnet, Ulthuan and Asrai.
If so, you can donate here <link>. With deep thanks."

Re: 9th Age Combat Calculator

Posted: Tue Jun 15, 2021 11:52 am
by jimmygrill
Daeron wrote:You're welcome. And ... feel free to share which additions you'd like to see.


First, ward should be renamed to special save and as a bit of an advanced idea could even have a button to distinguish between aegis (old: ward save) and fortitude (old: regeneration).

One relatively simple thing to change would be to change the "re-roll" button for all four rolls to:
no re-roll
re-roll 1
re-roll fails
re-roll successful
This would also make the "holy attacks" button redundant.


The main thing still missing is "battle focus", and that's a bit of a tricky one: for each to-hit roll of 6, you score two hits instead of one. (from then on, regular process)
This might require more effort than the rest, but these attacks are quite common now in T9A.

Re: 9th Age Combat Calculator

Posted: Wed Jun 16, 2021 8:20 am
by Daeron
I swapped the label to Special Sv. I'll try the re-rolls somewhere this week (I'm frantically trying to finish painting another squad of models ;))

Battle Focus requires quite some re-work. My current mathematical model allows for virtually any kind of "on X" kind of mechanic but I never applied it as such.
I wrote a whole code-block for "1 attack -> 1 wound" and glued on a variable amount of attacks and damage before and after this. For Battle Focus, I'd have to use my new mathematical model and re-write the whole thing, including any special rule and re-rolls implemented thus far.

This is one of the main motivators to rewrite the calculators from the ground up, and because I can take it even up a notch where people can invent their own rules and try them out. That would be helpful for designers, beta-rules and can serve as a backup in case I'm slacking on keeping the calculator up-to-date. It's that flexible as a model.

To explain (if you're up for a short read):
My earlier statistical models relied on a statistical distribution. I think I posed the theory of using a binomial distribution for combat calculations somewhere in the earlier 2000's (2004?). For Warhammer Fantasy Battles, 6th edition, it was sufficient for -most- combat calculations. And it certainly was quite novel at the time.
But a binomial distribution has 3 restrictions: (1) a fixed number of tests / attacks, (2) a fixed outcome per test (fixed number of wounds, not d3/d6, etc), (3) a fixed chance for each test (so 1 type of attack only).
The entire coding of a combat calculator had to focus on the chance of 1 attack causing 1 wound. With p (chance to wound), n (number of attacks), d (damage per wound) you have all the parameters for the distribution.
I included this model http://tools.druchii.net/9th-Combat-Cal ... .25:10:1:0 in the "generic" calculator.

I wanted to overcome these restrictions so that I could model the impact of a chariot (D6 Impact Hits at the time) and multiple wounds. I solved this by calculating the outcomes for each number of attacks, and then adding up the individual outcomes. For example, the chance to do 1 wound was the chance to do 1 wound on 1 impact hit, plus 1 on 2 impact hits, plus 1 on 3 impact hits etc.
The same logic was applied for random damage.
But this still required the same code for "1 attack -> 1 wound".

When I built these calculators, I did what I had always done and made that code-block. I later figured a simple, generic model that supports random attacks, random damage, and any "on X -> event" kind of rules. It uses a plain discrete mathematics and polynomials. I did go back to re-write the random attacks and damage using this method, but did not re-write the entire "chance to wound" code-block because I had no need.

And that is why this will require more effort... Although I have the solution lying right in front of me, it requires me to rewrite a sizeable portion of the calculator that is still stuck in mid-2000 logic. :)
I will get there. That's a promise. I just don't know when.

Re: 9th Age Combat Calculator

Posted: Sat Jun 19, 2021 8:44 am
by Daeron
jimmygrill wrote:One relatively simple thing to change would be to change the "re-roll" button for all four rolls to:
no re-roll
re-roll 1
re-roll fails
re-roll successful
This would also make the "holy attacks" button redundant.


Is it possible to have to re-roll successful rolls and be able to re-roll 1s as well?
For example, having to hit on 3+, but then some ability forces re-rolls of successful hit rolls, and another allows the re-rolls of 1s?
In that case you'd get:
1 - Failed -> Re-roll -> 4/6 chance to hit
2 - Failed
3 - Success -> Re-roll -> 4/6 chance to hit
4 - Success -> Re-roll -> 4/6 chance to hit
5 - Success -> Re-roll -> 4/6 chance to hit
6 - Success -> Re-roll -> 4/6 chance to hit
----
55.6% chance to hit

How does this combine with poison? A 6 still is forced to re-roll, and when the re-roll is a 6, then it's a poison wound?

Re: 9th Age Combat Calculator

Posted: Sat Jun 19, 2021 6:40 pm
by Daeron
The re-roll successful rolls will get implemented soon. I'm still working on the battle focus, but as I was working out the math I noticed it has a peculiar problem in combination with poison.

Which brings me to the question:
What if you have battle focus and/or poison on a 7+?
I assume:
* Roll for 7+
* 7+ triggers both poison and battle focus

Re: 9th Age Combat Calculator

Posted: Sun Jun 20, 2021 4:49 pm
by jimmygrill
Sorry, I don't come here often, but I'll try to check in every couple days...

Daeron wrote:Is it possible to have to re-roll successful rolls and be able to re-roll 1s as well?
For example, having to hit on 3+, but then some ability forces re-rolls of successful hit rolls, and another allows the re-rolls of 1s?
In that case you'd get:
1 - Failed -> Re-roll -> 4/6 chance to hit
2 - Failed
3 - Success -> Re-roll -> 4/6 chance to hit
4 - Success -> Re-roll -> 4/6 chance to hit
5 - Success -> Re-roll -> 4/6 chance to hit
6 - Success -> Re-roll -> 4/6 chance to hit
----
55.6% chance to hit

Technically, such situations are possible with specific combinations of special rules and spells. I don't know if I would bother to cover this tbh...



How does this combine with poison? A 6 still is forced to re-roll, and when the re-roll is a 6, then it's a poison wound?

Yes, second roll counts as normal in all regards.