Play Now Login Create Account
illyriad
  New Posts New Posts RSS Feed - New Battle Calculator - a work in progress
  FAQ FAQ  Forum Search   Register Register  Login Login

New Battle Calculator - a work in progress

 Post Reply Post Reply Page  12>
Author
 Rating: Topic Rating: 1 Votes, Average 5.00  Topic Search Topic Search  Topic Options Topic Options
Tensmoor View Drop Down
Postmaster General
Postmaster General
Avatar

Joined: 07 Apr 2015
Location: Scotland
Status: Offline
Points: 1011
Post Options Post Options   Thanks (0) Thanks(0)   Quote Tensmoor Quote  Post ReplyReply Direct Link To This Post Topic: New Battle Calculator - a work in progress
    Posted: 03 Jul 2018 at 11:34
Bug Fix

When calculating the crafted modifier the code was not including any terrain bonuses if the terrain contained the words Large, Small or Obsidian. Should now be fixed with apologies for any inconvenience my numptyness may have caused Embarrassed
Back to Top
rajput View Drop Down
Wordsmith
Wordsmith
Avatar

Joined: 19 Jan 2017
Location: Punjab
Status: Offline
Points: 195
Post Options Post Options   Thanks (0) Thanks(0)   Quote rajput Quote  Post ReplyReply Direct Link To This Post Posted: 02 Jul 2018 at 13:24
Hug Thank you Tensmoor... Beer Cheers!!!


Warning! Author of this post has weird sense of humor...
Back to Top
Tensmoor View Drop Down
Postmaster General
Postmaster General
Avatar

Joined: 07 Apr 2015
Location: Scotland
Status: Offline
Points: 1011
Post Options Post Options   Thanks (0) Thanks(0)   Quote Tensmoor Quote  Post ReplyReply Direct Link To This Post Posted: 02 Jul 2018 at 01:33
Originally posted by DeliciousJosh DeliciousJosh wrote:

Thanks Tensmoor. A great help for many I'm sure. Has it been a fun process as well as annoying ;p?

Immensly Tongue
Back to Top
DeliciousJosh View Drop Down
Forum Warrior
Forum Warrior
Avatar

Joined: 14 Jun 2012
Location: Denmark
Status: Offline
Points: 255
Post Options Post Options   Thanks (0) Thanks(0)   Quote DeliciousJosh Quote  Post ReplyReply Direct Link To This Post Posted: 01 Jul 2018 at 23:56
Thanks Tensmoor. A great help for many I'm sure. Has it been a fun process as well as annoying ;p?

PublicRelations
HumanResources
Back to Top
Tensmoor View Drop Down
Postmaster General
Postmaster General
Avatar

Joined: 07 Apr 2015
Location: Scotland
Status: Offline
Points: 1011
Post Options Post Options   Thanks (1) Thanks(1)   Quote Tensmoor Quote  Post ReplyReply Direct Link To This Post Posted: 01 Jul 2018 at 23:36
First production version:


Back to Top
Tensmoor View Drop Down
Postmaster General
Postmaster General
Avatar

Joined: 07 Apr 2015
Location: Scotland
Status: Offline
Points: 1011
Post Options Post Options   Thanks (0) Thanks(0)   Quote Tensmoor Quote  Post ReplyReply Direct Link To This Post Posted: 29 Jun 2018 at 22:34
Changes
  • Calculations now done by both Hucbold and Sene methods with results being displayed side by side.
  • Removed a lot of the extraneous text from the results section.
The side by side results makes it much easier to see any differences between the two methods and while I've only done one test so far using equipment the results are interesting.

I'm currently scouting NPCs prior to sending an army against them. This allows me to forecast the casualties before the battle happens and then compare the figures to the report afterwards. Once i have a reasonable number of battles I'll post a table of the comparisons.

Tens

Back to Top
Tensmoor View Drop Down
Postmaster General
Postmaster General
Avatar

Joined: 07 Apr 2015
Location: Scotland
Status: Offline
Points: 1011
Post Options Post Options   Thanks (0) Thanks(0)   Quote Tensmoor Quote  Post ReplyReply Direct Link To This Post Posted: 28 Jun 2018 at 16:43
Changes
  • Disabled the ability to select a calculation method.
  • Set the calculation method to 'Hucbold'.
  • Added calculation of defense scores.
  • Added calculation of winner/loser and overall casualties for winning side troops.
Please note: This is very much a 'work in progress' and as such is liable to change at any time. The results so far seem to indicate that the calculations are reasonably accurate however there have been strange outlying results.

A great deal more testing needs to be done with both equipped and un-equipped armies as well as adding prestige boosts to attack/defence scores and Biome college boosts.

Tens

Back to Top
Tensmoor View Drop Down
Postmaster General
Postmaster General
Avatar

Joined: 07 Apr 2015
Location: Scotland
Status: Offline
Points: 1011
Post Options Post Options   Thanks (1) Thanks(1)   Quote Tensmoor Quote  Post ReplyReply Direct Link To This Post Posted: 21 Jun 2018 at 12:18
Been working on the calculations for the defender and the casualties and having problems. After reaching out in GC Humanoid sent me details on how he calculates the defence and casualties which I've implemented in my development version. I'm getting some problems though. On very small battles using no equipment I get fairly close to the casualty numbers (+/- 1) which although not acceptable does indicate that I'm not completely wrong.

If I throw equipment into the mix then the errors can get quite large - turns out I'm not correctly getting all the relevant bonuses/penalties (vs armies, biomes etc). I need to spend some more time working on that side of it.

Using larger troop numbers also increases the size of the errors and in a test I did with no equipment I was getting 14% more casualties than I should be.

These problems prompted me to go back to the beginning and look at the attack calculations. Given that the Military Overview page gives you the attack score for each commander and group of units I decided to check I was getting the right figures - I wasn't. I was getting fractional parts on some of them so decided to just take the integer part for future use.
  • Note: The Military Overview page states 'NB: All combat values listed above are inclusive of commander, prestige, magic and other modifiers, but exclude terrain modifiers.'. I think this has to be incorrect as for example some armours/weapons have bonuses which only apply to certain types of enemy (Animals, Undead etc). I'm therefor removing all equipment and selecting 'Small Hills' as the terrain (no effects on attack) when doing these checks,
I'm now happy that I get the correct values for the attack scores when there is no equipment involved. I now need to look at the defense scores/casualties and see if I can get those working properly.

The demo version has the latest code deployed so please feel free to check it out and let me know of any boo-boos Wink
Back to Top
Tensmoor View Drop Down
Postmaster General
Postmaster General
Avatar

Joined: 07 Apr 2015
Location: Scotland
Status: Offline
Points: 1011
Post Options Post Options   Thanks (0) Thanks(0)   Quote Tensmoor Quote  Post ReplyReply Direct Link To This Post Posted: 19 Jun 2018 at 13:55
Changes
  1. Complete re-design of the layout (still some positioning bugs).
  2. Allows up to 5 divisions in each army.
  3. Allows equipment for attacking comanders.
Still to do
  1. Do the code for the defender calculations.
  2. Do the entire code for the Hucbold method of calculating.
  3. Check that the equipment bonuses are being properly calculated for all the relevant terrain types - i've got a nagging doubt tapping away in the back of my head...
  4. Code for Biome and Prestige bonuses.
Please feel free to try out this test version and let me know of any bugs.

Tens

Back to Top
Tensmoor View Drop Down
Postmaster General
Postmaster General
Avatar

Joined: 07 Apr 2015
Location: Scotland
Status: Offline
Points: 1011
Post Options Post Options   Thanks (1) Thanks(1)   Quote Tensmoor Quote  Post ReplyReply Direct Link To This Post Posted: 14 Jun 2018 at 03:28
Been working on the calculation of the total offensive army attack score and I think I've got it working with the formulae Sene posted - bear in mind that at present you can only have one div and no equipment is used in the calcs yet. The results of each step in the calcs is shown in a rather feeble attempt at emulating a terminal window.

I've also got the code done to allow you to assign equipment to the commander but as I said above, it isn't used in the calcs yet.

Next on the list is the code to retrieve the applicable effects for the equipment depending on the race, terrain etc.

The updated code has been posted to the demo site.

Back to Top
 Post Reply Post Reply Page  12>
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.10
Copyright ©2001-2017 Web Wiz Ltd.