Print Page | Close Window

Advanced Attacking: a work in progress

Printed From: Illyriad
Category: Strategies, Guides & Help
Forum Name: Strategies, Tips & Tricks
Forum Description: Player created guides and advice.
URL: http://forum.illyriad.co.uk/forum_posts.asp?TID=3506
Printed Date: 20 Apr 2024 at 05:08
Software Version: Web Wiz Forums 12.03 - http://www.webwizforums.com


Topic: Advanced Attacking: a work in progress
Posted By: Innoble
Subject: Advanced Attacking: a work in progress
Date Posted: 02 May 2012 at 00:21
Hi there,

There's two reasons I do well attacking. The first is a good understanding of Illy mechanics and the second is my excel calculator. I will try to share both with you. 

Here are the links to the files you will need. 

http://www.mediafire.com/download.php?h96h394lq8ov5g5" rel="nofollow - Guide in docx format  (MS Word)
http://www.mediafire.com/download.php?lley9sna6lyx21v" rel="nofollow - Calculator in xlsx format, version 1.3 (MS Excel without macro)
http://www.mediafire.com/download.php?uvco4252nhaorgq" rel="nofollow - Calculator in xlsm format, version 1.3 (MS Excel with macro)

For the guide you will need a reasonably new version of MS word (one that reads xdoc) or you can't see the formulae.

For the excel calculator you will need actual MS excel, not a mac emulator or something. I provide it xlsm format and in xlsx format. I added the xlsm one because it has a fancy button to minimize troops used (a macro).

The terrain modifiers I use are in both the guide and the calculator. The modifiers are good for plains, small hills and both kinds of forests. More rare terrain like buildings, large hills and mountains I am making progress on, but are currently not accurate. The green colored modifiers I am pretty sure of (100% in the case of plains).

For a small taste of what you can do if you use the calculator correctly:

Attackers:Unit:Quantity:Casualties:Survivors:
Commander: Heavy IKnights Knight1Damaged for 99, 151 health remains.
Commander: Heavy IIKnights Knight1Damaged for 99, 151 health remains.
Commander: Heavy IIIKnights Knight1Damaged for 99, 101 health remains.
Commander: Heavy IVKnights Knight1Damaged for 99, 151 health remains.
Troops:Charioteers Charioteers107210711
Commander: LightCharioteers Charioteer1Damaged for 99, 151 health remains.


Defenders:Unit:Quantity:Casualties:Survivors:
Troops:Ratlings Ratlings641964190
Troops:Rats Rats329332930
Troops:Elder Bucks Elder Bucks8898890
Troops:Diseased Rats Diseased Rats159415940

No, this is not a bug. This was first calculated using the calculator and then confirmed with the actual hit. For those who want to try it in the calculator, one of the knight commanders had 12% charge, rest was maxed on both heroism and charge, the troops had 15% bonus of course. Make sure you account for the T4 and T3 rats being switched for some reason. 

Obviously the calculator, attack guide and terrain modifiers are a work in progress. I will update this thread accordingly.

Enjoy!




Replies:
Posted By: Rill
Date Posted: 02 May 2012 at 00:38
Awesome Innoble, and thanks for sharing so generously.  I will need some time to digest the guide, but many thanks for the rigor of your investigation and for your willingness to share the results.


Posted By: Chadgod, Norman
Date Posted: 02 May 2012 at 00:57
This looks good, thanks. Its just im not sure whats going on, I cant see the formulas Shocked 




Basic Attack formulae

For a simple attack of one type of offensive unit against one type of defensive unit it works like this:




Example: 100 charioteers on plains with a 10% bonus from a commander with charge 10 will have:


If the commander has 10 heroism he will have:



  1. The commander base attack ( scales down when you have too few troops. The commander base attack can never be more than the total unit base attack (base means without the bonuses)


  1. The commander attack always has a minimum of twice his attack, so a charioteer commander will always be at least 74 attack (2x37), even if you send only 1 trooper with him.


  1. As you can see from the formula, the commander benefits from terrain and from his own division bonus. Assuming the division bonus applies to his own type of attack of course.








Posted By: Kumomoto
Date Posted: 02 May 2012 at 01:05
Well done!

I, for one, wish there were seperate scores for attacking players vs. Attacking npcs.

(not important for commander xp purposes, but sure would be useful to know for folks to know who has Real Pvp experience, not just npc grinding...)


Posted By: Innoble
Date Posted: 02 May 2012 at 01:21
Chadgod: Most likely you have an old version of MS word. I can't solve that problem unfortunately, unless someone else feels like converting them.

I think it is MS word 2007 you may need.


Posted By: Chadgod, Norman
Date Posted: 02 May 2012 at 01:34
Well I'm using Libre Office 3.4, could that be the problem? 

It's pretty funny I can see all of the info except the formulas! Wacko


Posted By: Innoble
Date Posted: 02 May 2012 at 01:40
Originally posted by Chadgod, Norman Chadgod, Norman wrote:

Well I'm using Libre Office 3.4, could that be the problem? 

It's pretty funny I can see all of the info except the formulas! Wacko

Yep. And it's totally understandable that you can see all the info except the formulae. Equation editors are always pretty specific to programs. Any other program I could use to make them would have the same issues (namely, people not having that program). 

If the equations were simple i would just type them in, but they are too complex for that. I want to keep it readable so thats why I need a good editor. Word is probably most common one.

One thing I could try is convert them into pictures. That would make them uneditable, but then you could see them. Maybe later in the week if I have the time.


Posted By: Chadgod, Norman
Date Posted: 02 May 2012 at 01:47
Converting to pictures sounds good but if in the meantime someone is willing to take screen shots of the formulas for me I'll happily send some IG presents for your efforts. Thanks again Innoble.


Posted By: Bonaparta
Date Posted: 02 May 2012 at 02:48
That's great Innoble. Thank you.

In my experience, cavalry attacking in buildings has -40% attack penalty.


Posted By: Innoble
Date Posted: 02 May 2012 at 08:13
Thats possible, even likely Bonaparta. I've had it at 40 for a while. I might switch back once I did some more testing. I have some new methods that make it so i only need a few good hits to be sure. Unfortunately NPCs don't often stop exactly on a building :)


Posted By: HendelTheDwarf
Date Posted: 02 May 2012 at 12:21
Many thanks for all of your work on this!  I've just started reading it - will need to find some time to really dig into it.

Here's a link to a pdf version of the file - the link should work, message me if you have any problems.

http://db.tt/MRNI5xM3


Posted By: Gasterix
Date Posted: 02 May 2012 at 12:54
I just learned a lot. Thanks for this.


Posted By: Chadgod, Norman
Date Posted: 02 May 2012 at 15:08
Originally posted by HendelTheDwarf HendelTheDwarf wrote:

Here's a link to a pdf version of the file - the link should work, message me if you have any problems.

http://db.tt/MRNI5xM3

Yup, this works. 

Thanks.


Posted By: Captain Ganoes Paran
Date Posted: 02 May 2012 at 16:35
Great work Innoble :) thanks


Posted By: Cerex Flikex
Date Posted: 02 May 2012 at 17:23
Awesome, I'll have to check this out. :D


Posted By: Mara Zira
Date Posted: 02 May 2012 at 18:26
I've been some terrain testing for the last few weeks. I haven't gotten to forests or buildings yet, and I'm still trying to refine my calculations on large hills, but otherwise I'm pretty certain of the accuracy of my results.

For plains, I have a different result than you for spear attacking (which, yes, I see you have as yellow). My results for cav defending on plains is also 1% different than yours. I did several tests, and I'm pretty certain my results are correct, but I guess I'll check them again.

For attacking on large or small mountains, only 3 of my results agree with yours.


Posted By: Innoble
Date Posted: 02 May 2012 at 18:44
Spear attacking may be wrong, you're right. Thats indeed why its yellow. I havent even tried that one so it's a total guess.

Also, cavalry defending could be wrong I guess. I have it within 1-2% accuracy. 

I had a hard time testing that and chose to hit some hits on rhino packs. I did notice that the defending bonus is slightly smaller than the offensive one. If you get 26% or 24% instead of my 25% that is totally possible. 25% seemed likely since I could fit most, if not all, of the bonuses in 5% increments. 

You have to be careful testing though. There are tons of little things that only give a very small error such as commander division modifier and terrain modifier. You can multiply those modifiers (1,15 * 1,30) or add them (1 + 15/100 + 30/100). The difference won't be very large, but it *will* give you varying results that may lead to modifiers that are slightly off. Not saying that that's the case, but be careful.

An easy solution is to use vanilla commanders. If that's what you're doing there should be no problem.

Also, I am pretty happy that 3 of those results agree on mountains as I have done very little testing on them! That means I'm on track. 

If you don't mind, share your results with me. Maybe I have some pointers or maybe you can help me out by finishing it up :)


Posted By: Drydenn
Date Posted: 03 May 2012 at 01:53
TY Innoble & Hendel!  Thumbs Up

I shall now proceed to try staunching the upcoming flow of blood from my ears as I try to digest this.  


Posted By: lokifeyson
Date Posted: 03 May 2012 at 02:39
Innoble is god of the calculations, he already predicted the amount of views this thread would get ;)

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


Posted By: Mara Zira
Date Posted: 03 May 2012 at 20:53
Originally posted by Innoble Innoble wrote:

Also, cavalry defending could be wrong I guess. I have it within 1-2% accuracy.

I'm guessing that some of my results could be 1% off, too. I just thought it would be polite to let you know where we did get different results.

Originally posted by Innoble Innoble wrote:

You have to be careful testing though. There are tons of little things that only give a very small error such as commander division modifier and terrain modifier. You can multiply those modifiers (1,15 * 1,30) or add them (1 + 15/100 + 30/100). The difference won't be very large, but it *will* give you varying results that may lead to modifiers that are slightly off. Not saying that that's the case, but be careful.

An easy solution is to use vanilla commanders. If that's what you're doing there should be no problem.

I'm using 0 level commanders of the same type as the troop they're leading so that as few factors as possible are influencing the tests. I think some of the changes to the combat system may be making terrain testing more difficult as sometimes the only explanation I have for the results of several tests is that casualties occasionally round up now, even for single-type troops attacking single-type troops. Perhaps I'm wrong, though, and I'm overlooking something. I didn't think that the round-up effect was going to effect single-type-troop armies. I need to re-read that dev post. Smile


Posted By: Innoble
Date Posted: 03 May 2012 at 21:29
Oh, while we're on the discussion of rounding and the changes. I ran into a really annoying thing with my large forest report. I saw a legion of rats in the woods, scouted it, sent the armies and ran the report through my calculator. It predicted I should be losing 1013 charioteers. Part of my calculator copy-pasted down below:

Type Amount bonus(%) Casualties
Cavalry 1015 15 1013
0     0

But unfortunately:

Two opposing forces clash against each other.

Heavily wooded terrain spells difficulty for ranged units and cavalry. Infantry units find they have a large advantage here.

Like the attackers, these thick forests do not provide much assistance for anyone except your footsoldiers, who take great pleasure in the extra cover afforded to them.

Attackers:Unit:Quantity:Casualties:Survivors:
Commander: Heavy IKnights Knight1Damaged for 99, 147 health remains.
Troops:Charioteers Charioteers101510123
Commander: Heavy IIKnights Knight1Damaged for 99, 147 health remains.
Commander: Heavy IIIKnights Knight1Damaged for 99, 97 health remains.
Commander: Heavy IVKnights Knight1Damaged for 99, 187 health remains.
Commander: LightCharioteers Charioteer1Damaged for 99, 147 health remains.


Defenders:Unit:Quantity:Casualties:Survivors:
Troops:Elder Bucks Elder Bucks4594590
Troops:Ratlings Ratlings349134910
Troops:Rats Rats175417540
Troops:Diseased Rats Diseased Rats8748740

This really annoys me. I cannot explain the 1 extra survivor. I know noone probably cares if you can get that close, but I kind of want to know the exact calculations they use. This must have something to do with rounding, because my calculator predicts 1013,03 casualties. If it had been 1012,99 my calculator would have said 1012 too. So somewhere in some step in the calculation, the devs have set it to round in some way, up or down, left or right, who knows. The 0,04 difference you can actually achieve with a tenth of a ratling... thats how close it is.

It is impossible to explain this deviation with the terrain-modifiers as any change to those has a 10 to 100 times greater effect. You can't make it right that way. I have other large forest reports, also on the order of 500 troops sent against a legion and those did predict exactly, so it is a rare deviation only happening when things are *just* right for it. That's typical of rounding issues. 


Posted By: Bartozzi
Date Posted: 04 May 2012 at 05:09
FYI, I downloaded the docx to my mac (where the formulas didn't show up upon opening it); then imported it to SkyDrive, and it works perfectly. So anyone who doesn't have up-to-date software but has a Windows Live account should have no trouble.


Posted By: HonoredMule
Date Posted: 04 May 2012 at 15:39
That's a small enough error that it could be caused by a different order of resolution to the same equation.  You have to keep in mind that computers don't have such a thing as real numbers--they have "floating point" numbers which is a finite number system and this will cause slight deviations in calculated results from the mathematically true answer.

I haven't looked at your calculator (only your writeup on the algorithm and modifiers, both of which I personally believe are very accurate).  But you may need to adjust your implementation so that parts of the calculation using very small numbers and floating point calculation are saved for last.  The reason for difference could also be something like Excel and Google Docs using 32 bit floating point numbers while Illyriad uses 64 bits.  Again, the smaller the numbers involved, the more likely this would be to make such a small difference weven without doing something bad like dividing a number by 0.001.

The general rule is that, when order of combination of factors makes no mathematical difference, combine the largest factors first.  Also, keep denominators large, never applying division until you have them as large as you can get them, and minimize the number of multiplication/division steps performed.  For example, don't do 10/100 + 20/100 -- do (10+20) / 100.

http://en.wikipedia.org/wiki/Floating_point#Accuracy_problems" rel="nofollow - http://en.wikipedia.org/wiki/Floating_point#Accuracy_problems

Also keep in mind, that even if your calculator is well-designed, the Illyriad implementation may not be.  You'd have to guess the exact order and breakdown of calculation steps they performed in order to get the exact same results.


-------------
"Apparently, quoting me is a 'thing' now."
- HonoredMule


Posted By: Innoble
Date Posted: 04 May 2012 at 16:20
You make a lot of sense Honored Mule, thanks. I have been trying some things, but so far I have not been succesful with fitting this weird exception. I think your last two lines probably describe the problem best:

Also keep in mind, that even if your calculator is well-designed, the Illyriad implementation may not be.  You'd have to guess the exact order and breakdown of calculation steps they performed in order to get the exact same results.

I've found that I can fit the problem by rounding the defense to a certain digit and then not round the attack, or reverse, but it didn't make sense to me to do it that way. I doubt the problem is small enough to be explained with floating point numbers, because it was on the order of 1/100,000 which is still well within safe limits for those kinds of operations, but yea who knows what the Illy-server does with the numbers. Very hard to tell. 




Posted By: HonoredMule
Date Posted: 04 May 2012 at 17:34
A difference of 1/100,000 is easily explainable by floating point inaccuracy, given that that level of error needn't be accomplished in a single step.  No typical single calculation with reasonable numbers would produce an error that large, but in 5 to 10 steps, it could even be much larger.  In fact, you could get an error of hundreds in about 3 steps if, for example, the first two steps erratically produced a small denominator which was then applied against a large numerator.

Consider the following real-world example, which doesn't even contain any calculation errors, but only shortcomings in representing the original numbers prior to calculation.  These are pseudo-32bit conversions, as the representation is limited to 32 bits but not in IEEE floating point format--there are no exponent bits.  But that is an advantage, actually allowing us to get slightly more accuracy in this particular example.

Consider 0.01.  In binary, it is the incomplete series 0.00000010100011110101110000101... which converted back to decimal is 0.00999999977648258.  Divide 100 by that and you've got an error of 0.000223517424996003816015028 in a single step.

Now suppose you divided 100 by 0.01 squared.  That division produces an error of 0.0447034854988011559760116 which is two hundred times worse than before.  If instead we started with the inaccurate representation of 0.001 (which we know to be 0.01^2), we'd have the same amount of error as when we divided by 0.01 (in this particular case, Windows calculator produces precisely the same error margin, likely due to both numbers having the "same" floating point representation with only the exponent changing).

The important point is that two small errors combined did not increase the error margin by a factor of 2 but 200.  I don't know that they are, but problems with number representation and floating point calculations can easily be fully responsible for the amount of error you're seeing.


-------------
"Apparently, quoting me is a 'thing' now."
- HonoredMule


Posted By: Innoble
Date Posted: 04 May 2012 at 17:53
Well explained, let's hope this is not the reason, because it would be very hard if not impossible to figure out how it happens and how to reproduce an error like that in a calculator program. 

Thankfully it is always just 1 extra dead guy out of many hundreds or 1 extra commander damage where you didn't expect it. It always seems to be in favor of the attacker too, so if you calculate a hit it shouldn't be a problem.


Posted By: Salararius
Date Posted: 04 May 2012 at 17:59
Innoble, very nice spreadsheet, thank you so much for posting this.  Because I am immensely impatient, I wrote a macro to more quickly figure large combat results.  If you are interested, the following macro runs in about 2 seconds for any size group (doesn't cut off at 2000, figures results for "few" to "cornucopia").  It doesn't minimize the same value you were minimizing but it calculates the least number of troops to win a battle.  If you find it useful, wonderful, glad to help.  If not, sorry to waste your time.  Again, thank you so much for sharing all your hard work!Clap

Sub Minimize_Casualties()
    inc = 1000
    Sheets("Calculator").Cells(4, 3).Value = 1000
    casualties = Sheets("Calculator").Cells(4, 15).Value
    Do
        total_offense = Sheets("Calculator").Cells(1, 15).Value
        total_defense = Sheets("Calculator").Cells(2, 15).Value
        If total_offense > total_defense And inc > 0 Then
            inc = Round(-1 * inc / 2, 0)
        ElseIf total_offense < total_defense And inc < 0 Then
            inc = Round(-1 * inc / 2, 0)
        End If
        If inc = 0 Then
            If total_offense < total_defense Then
                Sheets("Calculator").Cells(4, 3).Value = Sheets("Calculator").Cells(4, 3).Value + 1
            End If
            Exit Do
        End If
        Sheets("Calculator").Cells(4, 3).Value = Sheets("Calculator").Cells(4, 3).Value + inc
    Loop
End Sub



Posted By: Innoble
Date Posted: 04 May 2012 at 18:25
Very cool Salararius, yours is much more effective and faster. Can't say I tried very hard in making my button, but even if I had I doubt I would have come up with something that good. 

Do you do this for a living? I only started to use vba a year ago to augment my work as a teacher.

I will put yours in for the next version.

Thanks!!


Posted By: Yhina
Date Posted: 04 May 2012 at 18:51
Some months ago i did some work to figure out terrain mods.. back then, the combat system would trunc casualties (pre-tournament combat system )

No much explanation on it, tho numbers are kinda self explanatory for those who have played with them before.. both combats took place in plains, attacking with pure spearmen, the first with 188 kobolds and the later with 182. Both with a kobold commander L 0.

Under Real is the combat report values (for wounds and casualties) and estimated what comes out by placing the numbers and using terrain mods..   so seems that spearmen got -15% penalty in plains for both attacking and defending.




Posted By: Salararius
Date Posted: 04 May 2012 at 18:52
Originally posted by Innoble Innoble wrote:

Very cool Salararius, yours is much more effective and faster. Can't say I tried very hard in making my button, but even if I had I doubt I would have come up with something that good. 

Do you do this for a living? I only started to use vba a year ago to augment my work as a teacher.

I will put yours in for the next version.

Thanks!!

Very good, it makes me happy to be helpful Big smile.  Helping people was one of the things I appreciated when I was programming.

The short answer is no, I don't do this for a living now.  With very few exceptions, programming is treated as a commodity service.  I'm too special CoolWacko to enjoy being a commodity. CryWink



Posted By: SunStorm
Date Posted: 05 May 2012 at 18:42
All these numbers are making my head hurt...  WELL DONE everyone out there that has figured this out!  Amazing!  (^_^)




-------------
"Side? I am on nobody's side because nobody is on my side" ~LoTR



Posted By: Vanerin
Date Posted: 06 May 2012 at 05:02
This is sooo awesome! Thank you so much Innoble for figuring this out and sharing it with all of us!


Posted By: Marquesta
Date Posted: 06 May 2012 at 06:57
Thanks Innoble!

-------------
~~Marquesta
Whether tis nobler in the mind to suffer the slings and arrows of outrageous fortune, or to take arms against a sea of troubles, and by opposing, end them...


Posted By: scaramouche
Date Posted: 06 May 2012 at 10:18
Here are the links to the files you will need.

http://www.mediafire.com/download.php?qabo2rr71zbwk56" rel="nofollow - Guide in docx format (MS Word)
http://www.mediafire.com/download.php?sdbaccc63acz2m6" rel="nofollow - Calculator in xlsx format (MS Excel without macro)
http://www.mediafire.com/download.php?67v36an45281vga" rel="nofollow - Calculator in xlsm format (MS Excel with macro)

For the guide you will need a reasonably new version of MS word (one that reads xdoc) or you can't see the formulae.
 
thats me buggered then...i cant figure out how to use word


Posted By: Bartozzi
Date Posted: 06 May 2012 at 12:24
Originally posted by scaramouche scaramouche wrote:



Here are the links to the files you will need.

http://www.mediafire.com/download.php?qabo2rr71zbwk56" rel="nofollow - Guide in docx format (MS Word)
http://www.mediafire.com/download.php?sdbaccc63acz2m6" rel="nofollow - Calculator in xlsx format (MS Excel without macro)
http://www.mediafire.com/download.php?67v36an45281vga" rel="nofollow - Calculator in xlsm format (MS Excel with macro)

For the guide you will need a reasonably new version of MS word (one that reads xdoc) or you can't see the formulae.
 
thats me buggered then...i cant figure out how to use word


Or, you can also open the file in Windows SkyDrive, which is kinda like GoogleDocs, Microsoft style. You just need a Live account, I think.


Posted By: Innoble
Date Posted: 06 May 2012 at 16:57
New version up. I made some changes:

-Attacking spearmen now have more accurate modifiers on most terrain (time will tell if they're exact)
-Cavalry has a 25% bonus defending on plains (not 30%)
-Cavalry has no bonus defending on small hills (unlike everything else, which has 5%)
-Did a lot of testing on small mountains. The current configuration should work well.
-The button is changed to Salararius' better minimization algorithm (if you use the macro version)

I still lack some good research on large mountains and buildings. The current modifiers are educated guesses based on very few reports. Large hills should be a bit better than these, but not that good also. All of these modifiers are in yellow. Will post 1.4 once I get all of them down. That may take a while. 

EDIT: Oh and thanks Mara for pointing out the small hills thing, among other comments. I do appreciate any help.



Posted By: JimJams
Date Posted: 06 May 2012 at 22:10
Thanks Innoble for the sharing, I will convert it to LibreOffice as soon as I can read it tomorrow at office.

As the tool will probably confirm my data about the oddity of "the more you are bigger than your enemy the more you lose units", could we all agree it should be changed ??


Posted By: Innoble
Date Posted: 06 May 2012 at 22:29
The oddity is a consequence of heroism and does not occur if you have commanders without it. I explain it in the word document at the end. 

I don't think it could be changed without seriously altering the way combat is calculated. 

EDIT: This doesn't mean heroism hurts you. It just helps you a lot more when you attack with fewer troops (down to about 65 sent...)


Posted By: Marquesta
Date Posted: 08 May 2012 at 04:21
I have to say that I am in awe of those of you that can understand how any of this works, much less write the code and make it work! After taking VB6 (how many years ago was that?) and gaining several hundred new grey hairs to go with the very hard-earned A I got in the class, I decided programing was NOT for me!
Having said that, I have a question Innoble; is there a specific reason that you only allow for 5 different types of units in an army?
And thanks again :)


-------------
~~Marquesta
Whether tis nobler in the mind to suffer the slings and arrows of outrageous fortune, or to take arms against a sea of troubles, and by opposing, end them...


Posted By: Innoble
Date Posted: 08 May 2012 at 15:43
Good question Marquesta.

There's no specific reason for it. You can only have 5 commanders, but I suppose you can have as many as 8 different types of troops . It wouldn't be hard to expand the calculator to allow for that, but it would maybe become a bit big and cumbersome. I suppose I could remove the camp troops part and make the troop-input part bigger, since there are no humanoid camps anymore. 

On the other hand factions are coming back at some point, so I will wait to see what will happen there. 

I think you have to draw the line somewhere though. If I expanded it to include pvp for example (which I could), there could be situations with hundreds of commanders and their troops. It just wouldn't be practical to use this type of calculator for that. It would really have to be able to read scout reports directly and I'm not yet able to do that sort of thing (maybe some day?). I know from a game I played before, utopia, that could do that. You could just put a report in the program (it was called crystal ball) and poof, it would set the calculator for you. Very nice. Maybe Illy tools can be setup to do that...





Posted By: Marquesta
Date Posted: 08 May 2012 at 22:41
Ok, so another question then; how badly would it affect the outcome of the computations to put like troops into one category? Like all archers into the lowest level archer, and all the foot troops into the lowest level foot unit?

-------------
~~Marquesta
Whether tis nobler in the mind to suffer the slings and arrows of outrageous fortune, or to take arms against a sea of troubles, and by opposing, end them...


Posted By: Innoble
Date Posted: 09 May 2012 at 10:32
You should be putting like troops in one category anyway. They shouldn't be in different divisions. Put all archers with the commander with the highest % bonus on archery attack

XP is divided equally amongst all participating commanders, no matter where you put the troops. There's no reason to complicate things by trying to give one commander more xp. 


Posted By: Endrok
Date Posted: 12 May 2012 at 09:10
HI,

Love this Attack Calc, really great effort by Innoble making this and sharing it

Can I just ask a bit of a noob question Embarrassed  

Can somebody confirm what figures should I be entering for the my troop type "Bonus%" and the Commander "Bonus%" - I think I'm getting this bit wrong.

Thanks


Posted By: Innoble
Date Posted: 12 May 2012 at 09:44
Hi there Endrok,

The bonus % for the commander is his own division bonus. So if he has 10 Charge, he will have a 10% bonus.

the bonus % for the troops will also be the division bonus, but it will depend on the commander they are with. If their division commander has 10 charge and they are cavalry, it will also be 10%. 

Typically you will have troops commanded by a commander which will give them a 15% bonus if it is a T2 commander of the right type, but this is not always the case.


Posted By: Endrok
Date Posted: 12 May 2012 at 09:56

Hi Innoble,

Thanks for that.  Thumbs Up

The first time I tried I got the bonuses set wrong and although I won the battle (just) the report didn't match with what was expected, so after that I tried a couple of attacks with the bonus set at 0% - that was I was sure I sent enough troops.

Now I can give it a proper go.






Posted By: Rachel88
Date Posted: 16 May 2012 at 12:10
Innoble This is amazing i love it Thanks



Posted By: dunnoob
Date Posted: 20 Jun 2012 at 06:13
Originally posted by Innoble Innoble wrote:

For the guide you will need a reasonably new version of MS word (one that reads xdoc) or you can't see the formulae.
The free MS Word viewer vintage 2003 plus the free MS Office format converter suffice for Windows 2000 or later users.  It's also possible to upload your .docx to Google docs, here's a https://docs.google.com/document/pub?id=1ncHuOpsOk_tgLITozsRN7w8xIcaCyRwMeZMudCr3bBg" rel="nofollow - public view  of a private copy uploaded today.  Presumably Google docs and Google drive would also eat your simpler Excel spreadsheet.  





Posted By: Avion
Date Posted: 20 Jun 2012 at 14:11
Originally posted by dunnoob dunnoob wrote:

Originally posted by Innoble Innoble wrote:

For the guide you will need a reasonably new version of MS word (one that reads xdoc) or you can't see the formulae.
The free MS Word viewer vintage 2003 plus the free MS Office format converter suffice for Windows 2000 or later users.  It's also possible to upload your .docx to Google docs, here's a https://docs.google.com/document/pub?id=1ncHuOpsOk_tgLITozsRN7w8xIcaCyRwMeZMudCr3bBg" rel="nofollow - public view  of a private copy uploaded today.  Presumably Google docs and Google drive would also eat your simpler Excel spreadsheet.  





Ooo, visible formulae!  Thanks dunnoob!


-------------
Suppose they gave a war and nobody came?


Posted By: dunnoob
Date Posted: 07 Jul 2012 at 19:13
Here's a list of the 14  http://elgea.illyriad.co.uk/data_downloads/datafile_terrain_combat.xml" rel="nofollow - terrain types for combats , some not yet covered in Innoble's document:
  1. Large mountain
  2. Small mountain
  3. Large hill
  4. Small hill
  5. Impassable
  6. Small forest
  7. Plains
  8. Buildings
  9. NPC structure
  10. Large forest
  11. Fresh water
  12. Tidal water
  13. Shallow salt water
  14. Ocean


Posted By: Cleopatra
Date Posted: 24 Jul 2012 at 00:14

      I have been studying up on the attack system in the game in order to understand how it works so that I can plan out my strategy for setting up my cities and build my army, and your post has been amazingly helpful in figuring out how it all works.  I do have a couple of questions about some of your information though. :)

       

      First, would you consider this to be a correct interpretation of the way that the number of troops used in the army influences the commander's attack in the formula?

       

      • Basic Total Attack Formula (BTAF)

      BTAF=TUAF + TCAF

       

      • Total Unit Attack Formula (TUAF)

      TUA= UBA × UC × UB

       

      • Unit Base Attack (UBA)

      UBA= Unit Base Attack Variable

       

      • Unit Count (UC)

      UC= Total # of Unit Type Troops

       

      • Unit Bonus (UB)

      UB= 1 + UTB/100 +UDB/100

       

      • Unit Type Bonus (UB)

      UTB= Unit Type Terrain Bonus Variable

       

      • Unit Division Bonus (UB)

      UDB= Unit Type Division Bonus Variable

       

      • Total Commander Attack Formula (TUAF)

      IF (CBA ×HF) UBA × UC

      THEN TCAF= UBA × UC × CB

      UNTIL (UBA × UC) (CBA × 2)

      THEN TCAF = CBA × 2 × CB

      IF (CBA × HF) UBA × UC

      THEN TCAF= CBA × HF × CB

       

      • Commander Base Attack (CBA)

      CBA= Commander Unit Base Attack Variable

       

      • Heroism Factor (HF)

      HF=(1 + 6 × H)

       

      • Heroism (H)

      H= Heroism Variable

       

      • Commander Bonus (CB)

      CB= 1 + CTB/100 + CDB/100

       

      • Commander Terrain Bonus (CTB)

      CTB= Commander Terrain Bonus Variable

       

      • Commander Division Bonus (CDB)

      CDB+ Commander Division Bonus Variable

       

      Second, when calculating the HF, would HF= (7 × H) be equivalent to HF = (1 + 6 × H), or should the actual order of operations be (1 + (6 × H))?

       

      Third, while I understand your Basic Defense Formula perfectly, I would be very interested in learning what calculations you actually use in your expanded defense formula.

       

      For example, what do you mean by total attack type 1/total attack?

      Is that simply the BTAF(UNIT TYPE 1)/BTAF(UNIT TYPE1 + UNIT TYPE 2...for the total number of troop types)?

       

      If so, where does the CBAF figure in at?

       

      Would this be an accurate representation of the EDF for a battle using 4 attack units and 4 defense units?

       

      FOR CASUALTIES

      ((((AU1/CUA)÷(DU1×UC×UB))+((AU2/CUA)÷(DU1×UC×UB))+((AU3/CUA)÷(DU1×UC×UB))+((AU4/CUA)÷(DU1×UC×UB)))

       

      +(((AU1/CUA)÷(DU2×UC×UB))+((AU2/CUA)÷(D21×UC×UB))+((AU3/CUA)÷(DU2×UC×UB))+((AU4/CUA)÷(DU2×UC×UB)))

       

      +(((AU1/CUA)÷(DU3×UC×UB))+((AU2/CUA)÷(DU3×UC×UB))+((AU3/CUA)÷(DU3×UC×UB))+((AU4/CUA)÷(DU3×UC×UB)))

       

      (((AU1/CUA)÷(DU4×UC×UB))+((AU2/CUA)÷(DU4×UC×UB))+((AU3/CUA)÷(DU4×UC×UB))+((AU4/CUA)÷(DU4×UC×UB)))

       

      ×TC)

       

       

      FOR COMMANDER

      ((((AU1/CUA)÷(DU1×UC×UB))+((AU2/CUA)÷(DU1×UC×UB))+((AU3/CUA)÷(DU1×UC×UB))+((AU4/CUA)÷(DU1×UC×UB)))

       

      +(((AU1/CUA)÷(DU2×UC×UB))+((AU2/CUA)÷(D21×UC×UB))+((AU3/CUA)÷(DU2×UC×UB))+((AU4/CUA)÷(DU2×UC×UB)))

       

      +(((AU1/CUA)÷(DU3×UC×UB))+((AU2/CUA)÷(DU3×UC×UB))+((AU3/CUA)÷(DU3×UC×UB))+((AU4/CUA)÷(DU3×UC×UB)))

       

      (((AU1/CUA)÷(DU4×UC×UB))+((AU2/CUA)÷(DU4×UC×UB))+((AU3/CUA)÷(DU4×UC×UB))+((AU4/CUA)÷(DU4×UC×UB)))

       

      ×100)

       

      Or would it be

       

      ((((TCAF)÷(DU1×UC×UB))+((TCAF)÷(DU1×UC×UB))+((TCAF)÷(DU1×UC×UB))+((TCAF)÷(DU1×UC×UB)))

       

      +(((TCAF)÷(DU2×UC×UB))+((TCAF)÷(D21×UC×UB))+((TCAF)÷(DU2×UC×UB))+((TCAF÷(DU2×UC×UB)))

       

      +(((TCAF÷(DU3×UC×UB))+((TCAF)÷(DU3×UC×UB))+((TCAF)÷(DU3×UC×UB))+((TCAF)÷(DU3×UC×UB)))

       

      (((TCAF)÷(DU4×UC×UB))+((TCAF)÷(DU4×UC×UB))+((TCAF)÷(DU4×UC×UB))+((TCAF)÷(DU4×UC×UB)))

       

      ×100)

       

       

      • Attack Unit 1 (AU1)

      AU1 = TUA for First Unit

       

      • NOTE: TUA is the Total Unit Attack Formula from above.

       

      • Attack Unit 2 (AU2)

      AU2 = TUA for Second Unit

       

      • Attack Unit 3 (AU3)

      AU3 = TUA for Third Unit

       

      • Attack Unit 4 (AU4)

      AU4 = TUA for Fourth Unit

       

       

      • Defense Unit 1 (DU1)

      DU1= Unit Base Defense Variable (For corresponding Attack Unit Type)

       

      • Defense Unit 2 (DU2)

      DU2= Unit Base Defense Variable(For corresponding Attack Unit Type)

       

      • Defense Unit 3 (DU3)

      DU3= Unit Base Defense Variable(For corresponding Attack Unit Type)

       

      • Defense Unit 4 (DU4

      DU4= Unit Base Defense Variable(For corresponding Attack Unit Type)

       

       

      • Unit Count (UC)

      UC= Total # of Unit Type Troops

       

      • Unit Count (UC)

      UC= Total # of Unit Type Troops

       

      • Total Count (TC)

      Total # of All Troops in Battle

       

       

      Do commanders not actually inflict casualties on troops?  From the basic attack formula, I was inclined to understand that they did, but I don't see anything about commander attack factoring into defense, so it seems I was incorrect. 



Posted By: Rill
Date Posted: 24 Jul 2012 at 02:42
I think the calculator works off of NPCs, which do not have commanders, so there would be no commander bonuses to consider.  Values for attacks against players would have to calculate in commander defense bonuses separately.


Posted By: Cleopatra
Date Posted: 24 Jul 2012 at 05:20
Even if the NPC doesn't have a commander, the player would still have one. So whether or not the attacking commander inflicts any actual damage on the defending NPC or not is still relevant.

I am not planning on actually running my own calculator, I just want to know how it all fits together. Understanding bits and pieces of the attack system doesn't really let me plan out an overall strategy.  
Do commanders kill attacking troops? Do they kill defending troops? Do the kill no troops at all? Why does it matter what the commander's attack does? How do defending commanders affect the battles? 

If I have all the equations, I can figure all that out for myself. 

Basically, I understand what the list of factors involved is, but I'm trying to understand how they interrelate, what actual impact each of them has, and how they combine.  


Posted By: SugarFree
Date Posted: 24 Jul 2012 at 08:24
o gosh, geeks...
the commander issue IS known to the devs.



-------------
Nuisance


Posted By: Cleopatra
Date Posted: 24 Jul 2012 at 14:29
I take it that means that commanders do NOT actually attack troops. Hmmm, well that changes the dynamics up quite a bit. When you say that is a known issue, does that mean that commanders are SUPPOSED to attack troops, but for some reason don't actually do it? Or does that mean that they never intended for commanders to attack troops, but now might be considering changing it?

Oh, and one other question. Where does the prestige bonus to attack/defense get factored in at?


Posted By: SugarFree
Date Posted: 24 Jul 2012 at 14:32
i think : 10% + attack means that the individual unit attack is raised by 10%?

-------------
Nuisance


Posted By: Cleopatra
Date Posted: 25 Jul 2012 at 01:13
So is it
1.
BTAF×PRESTIGE BONUS

or?

2.
  • Basic Total Attack Formula (BTAF)

BTAF=TUAF + TCAF

 

  • Total Unit Attack Formula (TUAF)

TUA= (UBA×PRESTIGE BONUS) × UC × UB

 

  • Unit Base Attack (UBA)

UBA= Unit Base Attack Variable

 

  • Unit Count (UC)

UC= Total # of Unit Type Troops

 

  • Unit Bonus (UB)

UB= 1 + UTB/100 +UDB/100

 

  • Unit Type Bonus (UB)

UTB= Unit Type Terrain Bonus Variable

 

  • Unit Division Bonus (UB)

UDB= Unit Type Division Bonus Variable

 

  • Total Commander Attack Formula (TUAF)

IF (CBA ×HF) UBA × UC

THEN TCAF= UBA × UC × CB

UNTIL (UBA × UC) (CBA × 2)

THEN TCAF = CBA × 2 × CB

IF (CBA × HF) UBA × UC

THEN TCAF= CBA × HF × CB

 

  • Commander Base Attack (CBA)

CBA= Commander Unit Base Attack Variable

 

  • Heroism Factor (HF)

HF=(1 + 6 × H)

 

  • Heroism (H)

H= Heroism Variable

 

  • Commander Bonus (CB)

CB= 1 + CTB/100 + CDB/100

 

  • Commander Terrain Bonus (CTB)

CTB= Commander Terrain Bonus Variable

 

  • Commander Division Bonus (CDB)

CDB+ Commander Division Bonus Variable





Posted By: Salararius
Date Posted: 20 Oct 2012 at 04:36
This was one of the first truly helpful tools I used for Illy.  I was tinkering with Google web apps tech and thought Innoble's spreadsheet would be a fun project to practice with to learn the new tech.  Here's the link, I believe it's the same calculations as Innoble's work, just in a web page.

This link should give public access (sorry for the bad link earlier).

https://script.google.com/a/macros/marasco.net/s/AKfycbysx7_fCwzijpQErWFzhCmkutSmFVCE_OhHQJnWqHfvhU52SefT/exec" rel="nofollow - https://script.google.com/a/macros/marasco.net/s/AKfycbysx7_fCwzijpQErWFzhCmkutSmFVCE_OhHQJnWqHfvhU52SefT/exec

Doesn't seem to work very well in browsers other than Chrome.  Obviously not what I wanted.  I'll keep working and see if I can iron out the issues.



Posted By: dunnoob
Date Posted: 20 Oct 2012 at 10:04
Testing your link, Google asks me to login, and Chrome offers to do this for me.  (IIRC that's a new spyware feature offered in about:flags for the stable Chrome versions.)  After that Google allows me to request access.  Is that as you wanted it, did you forget to set some public flag, or is your link the version for co-authors instead of users?  


Posted By: Salararius
Date Posted: 21 Oct 2012 at 04:08
Originally posted by dunnoob dunnoob wrote:

Testing your link, Google asks me to login, and Chrome offers to do this for me.  (IIRC that's a new spyware feature offered in about:flags for the stable Chrome versions.)  After that Google allows me to request access.  Is that as you wanted it, did you forget to set some public flag, or is your link the version for co-authors instead of users?  

yes, i posted the wrong link :(  Which is all just as well because I didn't check to see how the code would work on other browsers, not very well.  Just got too excited to be doing something more productive than forum posting.  Oh well, back to work.  The link should work for Chrome (I hope).  As I said, I'm learning as I go.



Posted By: Angrim
Date Posted: 29 Sep 2013 at 17:14
was any version of this released that would avoid the Excel requirement?  OpenOffice, gdocs, or other...?


Posted By: Salararius
Date Posted: 30 Sep 2013 at 02:11
Originally posted by Angrim Angrim wrote:

was any version of this released that would avoid the Excel requirement?  OpenOffice, gdocs, or other...?

Try this:

https://docs.google.com/spreadsheet/ccc?key=0Ao6l7avI4cJvdEdncmd6bzBDZnl2ZUprQmZYMmY1TWc&usp=sharing

it's based on the same calculations but the presentation may be different.




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.03 - http://www.webwizforums.com
Copyright ©2001-2019 Web Wiz Ltd. - https://www.webwiz.net