PDA

View Full Version : Research: Numerical investigation of Unit Stats & Attributes



Dol Guldur
03-04-2007, 21:07
This post (and thread) has been superceded by the "Complete EDU Guide" which you can find in the Scriptorium.

This research thread has been set up publicly to investigate, discuss and share the actual in-game value of unit stats and attributes, and their relationship to each other, with a view to determining formulae and other items (possibly including templates and tools) necessary to facilitate more realistic unit balance for mods using the RTW/BI engine...

This initial post will maintain a growing list of likely values, formulae etc.

Values

1. light_spear and spear attribute give a 4 point combat penalty vs. infantry and a 4 point bonus vs. cavalry

Formulae



Useful Links

Relative Value of Upgrades...
https://forums.totalwar.org/vb/showthread.php?t=63907

xerex
03-04-2007, 22:02
I will start off with some of the basics that you probably all know already, but people new to modding may not. I am pretty new myself, so I may have some of these wrong.

melee to kill formula=a*lethality*(1.1)^(attack-defense)

attack is the units attack power including any possible charge bonus.

defense is the sum of all applicable defenses of the target. defense skill applies against all melee. Shields only apply against attacks from front and left and armor applies only half (I haven't tested this myself, but everyone says it is half, so I am believing them until I get a chance to do it myself)against an armor-piercing attack.

lethality is the last entry on the stat_pri line in the edu file. It is a hidden attribute (in that it doesn't show up on unit cards unless you mod them) and can be used to balance hidden bonuses such as those from the short_pike attribute.

I don't know what "a" is but I heard it was .019. That is what it was in MTW1, so its a reasonable guess.

light_spear and spear attribute appear to give a 4 point combat penalty vs. infantry and a 8 point bonus vs. cavalry. I don't know if the bonus is to defense or attack or half to each.

spear attribute also gives some pushing power.

1 experience point gives 1 attack point, 1 defense point, and 1 morale point to a unit. The morale point is hard to test, but I am reasonably confident of it. Let me know if you get contradictory results.

Attributes I want to understand more fully are powerful charge attribute and short_pike. It seems that short_pike gives the multiple rank bonus of MTW1, but it is difficult to tell.

How does a unit with two melee weapons decide which weapon to use?

Thats all for now, let the sharing of knowledge begin!:smash:

Moros
03-04-2007, 22:09
A good idea to start this. The thing I'm wondering most about is the actual effect of mass except for which unit will push which unit back. I'm going to do some tests on that, unless anyone has an idea.

About the template part, I've set up a kind of spreadsheet in excel, but I need to evaluate it further. The things that I'm mostly trying to search for are good morale and lethality values and a good basic attack vs defence point rating. (for example an average of 2:3 or something)

About the effects of attributes and stuff a lot are explained in the edu. Also I remember (an) older thread(s) about this, in which research was done. I'm not sure if they were 1.5, tough.

Also does anyone know if there are actual differences between RTW and BI (except for shieldwall and those additions)?

Edit: are you sure about the .019, shouldn't it be .19 instead or something, my best bet however is that you swapped attack and defence. inserting a few random stats into your formula is giving bizarre numbers. For example I just inserted those of the pezhetairoi from EB (just had those unit cards open) in a pezhetairoi vs pezhetairoi fight the chance of a lethal attack would be: 0.019*0.17*1.1^(15-20)=0.0020055759 or in other words: it would take an average of 498.61 attacks before a man in the pezhetairoi unit would kill someone. Now I know EB battles are slower but this?
whe we use 0.19, it results into this:
0.19*0.17*1.1^(15-20)=0.200557587 or an average of 49.86 attacks untill a person dies. This also seems a little to big if you ask me.
You perhaps switched attack and defence? That would mean:
0.019*0.17*1.1^(15-20)=0.052019473 or an average of 19.2 attacks. This seem quite a good number if you ask me. So I guess the formula should be correct like this. Tough the a might have changed a little since Mtw.

xerex
03-04-2007, 23:12
I am not sure about the value of a. .019 is just what it was in MTW1.

I am 100% sure it isn't 1.1^(defense-attack) because that would mean that increasing the target's defense increased the percentage chance to kill them and increasing attack power decreased the chance to hit. It would make peasants the best unit in the game.

"a" could very well be different in RTW. I would have to sit there with a stop watch and time the battles. Then I would need to know what the animation time is for an attack, how often units attack, etc. It is almost impossible to pin down unless we had a CA member here.

Note: I don't see a difference between
0.019*0.17*1.1^(15-20)=0.0020055759
and
0.019*0.17*1.1^(15-20)=0.052019473

except for the matematical result you get. I assume you meant the latter to read
0.19*0.17*1.1^(20-15)=0.052019473.

This can't be right because it doesn't work for any other unit in the game except that one.

you can test this formula easily. Get two units that are evenly matched...you can make them clones if you want. Then increase the attack power of one of them by 20. Then multiply that same units lethality by .148644. Then do the fight again. The units will still be roughly evenly matched.

the kill rates for the unmodified unit will be
a*1.1^(-defense)*base_lethality*1.1^(base_attack)
for the modded unit the kill rate will be
a*1.1^(-defense)*(.148644*base_lethality*1.1^(base_attack+20))
or equivalently
a*1.1^(-defense)*base_lethality*1.1^(base_attack)*(.148644*1.1^20)

but .148644*1.1^20=1, so the two units still have the same kill rate.

"a", the unknown, just controls the kill rate and is the same for every unit in the game. I don't think you can even change it. You can control the melee kill rate by dividing unit lethality factors by 2 or 3 or whatever you want so long as you divide by the same value for all melee weapons.



as for the edu explanations of attributes, they are vague at best, misleading at worst.

The edu says spear attribute gives a penalty vs. infantry and a bonus vs. cavalry. It doesn't bother to say how much the penalty is. Nor does it mention the extra pushing power spear attribute gives.

short_pike lines the units up in a phalanx type formation, but is that ALL it does? is it just visual or does it give a combat bonus. I have noticed that short_pike gives a bonus vs. infantry as well as vs. cavalry, but its hard to say how much the bonus is without extensive testing and enough test battles to get a reliable average.

The terrain bonuses are combat bonuses in certain terrain according to the edu. What kind of combat bonus? attack? defense? attack AND defense(I ruled this one out yesterday)? If it is a defense bonus, to defense skill, or a general bonus? What defines scrub terrain anyway? Is long grass scrub?

To develop a balanced mod, stat modders need specifics on what these attributes do and how the guts of the combat engine works. Otherwise, we are just eyeballing it and that either sucks, or takes too long to get right for so many units.

Moros
03-05-2007, 17:15
Yes I missed something in the last formula. However, I don't think the result can be true, an average of 498,6 attacks before a kill seems rather a lot to me. So somewhere something must be wrong in the formula.

xerex
03-05-2007, 18:14
Like i said in my OP, the value for "a" in the formula, the .019, is just a guess based on what it was for mtw1. It could be something totally different. There is no way I can think of to probe that value reliably. The rest of the formula has been tested as far as the game engine will allow.

Moros
03-05-2007, 20:20
oh well. I'm gonna do some test and post the results. To try and get some conclusions on mass.

tk-421
03-06-2007, 02:41
defense is the sum of all applicable defenses of the target. defense skill applies against all melee. Shields only apply against attacks from front and left and armor applies only half (I haven't tested this myself, but everyone says it is half, so I am believing them until I get a chance to do it myself)against an armor-piercing attack.

Shield, ds, and armor do not have a simple point to point relationship. I think that shield points only count as about 75-80% as an armor point and I'm not sure exactly how much a defensive skill point counts compared to armor and shield.


light_spear and spear attribute appear to give a 4 point combat penalty vs. infantry and a 4 point bonus vs. cavalry. I don't know if the bonus is to defense or attack or half to each.

That sounds about right, I've often thought that it might like 4 1/2 or something though.

spear attribute also gives some pushing power.


1 experience point gives 1 attack point, 1 defense point, and 1 morale point to a unit. The morale point is hard to test, but I am reasonably confident of it. Let me know if you get contradictory results.

I'm pretty sure that it does give morale, but like you said, its hard to test.



How does a unit with two melee weapons decide which weapon to use?

I'm not sure if this is always the case, but I've noticed with EB Hypaspists, Massilian Hoplites and other infantry units with two melee weapons that they march with their primary weapon, charge with their secondary, revert to the primary, and often return to the secondary weapon if they are knocked down and get back up.

As for cavalry with two melee weapons (in EB usually a lance or spear short sword) they pretty much always use the primary weapon unless told by the player to do otherwise. Occasionally they will pull out the secondary weapon, but I have seen this so few times that I have no idea why they do.

fallen851
03-06-2007, 10:06
Also, shield, ds, and armor do not have a simple point to point relationship.


Actually they do in melee, where all are equal. Defensive skill does nothing vs missiles, and shields are about 7/8ths as effective as armor vs missiles.

This is easy to test of course.

Here is an old test of mine:

"Test #2 - Is all armor created equal?

This battery of tests was to see whether or not armor acted different, in other words, does one point in armor equal one point in shield factor and defensive skill? The results are in melee conclusively yes. Against missiles, shields only provide less than 7/8 as much defense (probably less) than normal armor factor.

For melee I did 4 tests for each comparing them to each other, as well as a baseline test, to see whether or not the differences I was noticing were significant.

Here are the tests:

Control Tests

British Swordsmen
stat_pri 9, 1, no, 0, 0, melee, simple, piercing, sword, 25 ,0.55
stat_pri_armour 5, 0, 0, flesh

vs

Gallic Swordmen
stat_pri 9, 1, no, 0, 0, melee, simple, piercing, sword, 25 ,0.55
stat_pri_armour 5, 0, 0, flesh

(yes all other stats were equal)

Run #1: British = 93 kills, Gauls = 86 kills
Run #2: British = 86 kills, Gauls = 75 kills
Run #3: British = 95 kills, Gauls = 91 kills
Run #4: British = 64 kills, Gauls = 88 kills

This give us an idea of what to expect in terms of variance.

Armor vs Shield Test

British Swordsmen
stat_pri 9, 1, no, 0, 0, melee, simple, piercing, sword, 25 ,0.55
stat_pri_armour 0, 0, 5, flesh

vs

Gallic Swordmen
stat_pri 9, 1, no, 0, 0, melee, simple, piercing, sword, 25 ,0.55
stat_pri_armour 5, 0, 0, flesh

Run #1: British 85 kills, Gauls 58 kills
Run #2: British 55 kills, Gauls 85 kills
Run #3: British 92 kills, Gauls 54 kills
Run #4: British 76 kills, Gauls 87 kills

I have no idea why for three straight battles one side spanked the other, but I think the results show there is no significant advantage to shield factor over armor factor or vice versa. Last battle was quite close, could have gone either way.

Armor vs Flesh Test

German Axeman
stat_pri 9, 1, no, 0, 0, melee, simple, piercing, sword, 25 ,0.55
stat_pri_armour 0, 5, 0, flesh

vs

Gallic Swordmen
stat_pri 9, 1, no, 0, 0, melee, simple, piercing, sword, 25 ,0.55
stat_pri_armour 5, 0, 0, flesh

Run #1: Germans 81 kills, Gauls 85 kills
Run #2: Germans 75 kills, Gauls 88 kills
Run #3: Germans 66 kills, Gauls 86 kills
Run #4: Germans 85 kills, Gauls 81 kills

Basically no difference.

Shield vs Flesh Test

German Axeman
stat_pri 9, 1, no, 0, 0, melee, simple, piercing, sword, 25 ,0.55
stat_pri_armour 0, 5, 0, flesh

vs

British Swordmen
stat_pri 9, 1, no, 0, 0, melee, simple, piercing, sword, 25 ,0.55
stat_pri_armour 0, 0, 5, flesh

Run #1: British 89 kills, Germans 63 kills
Run #2: British 81 kills, Germans 71 kills
Run #3: British 89 kills, Germans 41 kills
Run #4: British 62 kills, Germans 88 kills

#3 had strange results, but I think variance accounts for the difference.

Range vs Armor and Shield Test

German Chosen Archer
soldier warband_archer, 25, 0, 1.2
stat_pri 20, 0, arrow, 170, 5, missile, archery, piercing, none, 25 ,1

vs

Gallic Swordmen
stat_pri_armour 5, 0, 0, flesh

and

British Swordmen
stat_pri_armour 0, 0, 5, flesh

Human Controlled Archers:(units moved toward archers)
Run #1: 78 Gauls remaining after 5 volleys
Run #2: 73 Gauls remaining after 5 volleys
Run #3: 66 Gauls remaining after 5 volleys
Average: 72.333 repeating

Run #1: 62 British remaining after 5 volleys
Run #2: 64 British remaining after 5 volleys
Run #3: 51 British remaining after 5 volleys
Average: 59

Computer Controlled Archers:(units stood still)
Run #1: 81 Gauls remaining after 5 volleys
Run #2: 78 Gauls remaining after 5 volleys
Run #3: 78 Gauls remaining after 5 volleys
Run #4: 80 Gauls remaining after 5 volleys
Run #5: 82 Gauls remaining after 5 volleys
Run #6: 80 Gauls remaining after 5 volleys
Average: 79.833 repeating

Run #1: 71 British remaining after 5 volleys
Run #2: 66 British remaining after 5 volleys
Run #3: 68 British remaining after 5 volleys
Run #4: 69 British remaining after 5 volleys
Run #5: 73 British remaining after 5 volleys
Run #6: 61 British remaining after 5 volleys
Average: 68

I feel the computer controlling the archers gave better results, as when the computer controlled the swordsmen, they marched at varying speeds. Furthermore, I feel those results are significant, that shields do not give as much protection as armor vs arrows, and no matter how many times I kept repeating this, more British died than Gauls."

xerex
03-08-2007, 22:45
See...now thats the kind of info we need in this thread..fallen, you the man!

If you have others like that collected in one place, throw us a link..or if they are scattered about...gather them in one place here.

I haven't gotten to balancing missile units yet. There are so many more factors in missile weapons that its nearly impossible to test, so I am glad someone took the time to do it!

P.S. how many men in each unit at the start of the fight? 120?

fallen851
03-10-2007, 01:50
Here is another old test:

"Test #4 - Is armor and attack equal point for point?

The point of this test was to find out whether it was better to add +1 to armor, or +1 to attack. The result was that one point of armor is indeed equal to one point of attack in melee fighting.

Extreme Armor vs Extreme Attack Test

British Swordsmen
stat_pri 1, 1, no, 0, 0, melee, simple, piercing, sword, 25 ,0.55
stat_pri_armour 10, 0, 0, flesh

vs

Gallic Swordmen
stat_pri 10, 1, no, 0, 0, melee, simple, piercing, sword, 25 ,0.55
stat_pri_armour 1, 0, 0, flesh


Run #1: British 86 kills, Gauls 88 kills
Run #2: British 85 kills. Gauls 88 kills

Two very close battles, could have gone either way.

Armor vs Attack Test

British Swordsmen
stat_pri 9, 1, no, 0, 0, melee, simple, piercing, sword, 25 ,0.55
stat_pri_armour 8, 0, 0, flesh

vs

Gallic Swordmen
stat_pri 11, 1, no, 0, 0, melee, simple, piercing, sword, 25 ,0.55
stat_pri_armour 6, 0, 0, flesh


Test #1: British 85 kills, Gauls 81 kills
Test #2: British 79 kills, Gauls 87 kills

Again, two close battles, I don't see a difference."


That is all I got for the moment.

fallen851
03-10-2007, 02:08
If you would like a way to balance units realistically, try this: http://www.axifile.com?1249431

Using the key, type in stuff in the top section, and it should fill out everything under the results section. The unbolded section under the results section should be ignored. If the unit does not have something (such as greaves or armor), simply leave it blank. At the bottom of the page, you'll see another sheet labeled cavalry, to be used for cavalry. This does not balance chariots or elephants.

Please note that unit level is artibrary, and basically means how good is the unit. For instance Spartans might be level 10, while peasants level 1, hastati level 5 ect. It was designed for a 1-10 system.

Moros
04-06-2007, 09:20
a little tool I made for unit costs (note these are higher than with vanilla, low end unit about 500, a middle level unit between 1000-2000, higher level unit 2000-2500 and elite:>2500. Cavalry get's a 30% cost bonus. It saves all the unit costs in a .txt file. It's a WIP, but if you think it might be usefull for you:
http://files-upload.com/152754/unitcosts.exe.html (2.19MB)
Deleting of corresponding unit costs, changing,... isn't included but can easily be done manually in the .txt.
Yes and no questions need to be awnsered with 1 or 0. specialty bonus can range from 0 to infinite. But I'd keep it between 0-4.

guineawolf
04-06-2007, 17:19
here oredi got something to help....:sweatdrop:

https://forums.totalwar.org/vb/showthread.php?t=39668

Ludens
04-28-2007, 11:32
xerex posted a summary of the results of his tests on the effect of armour, heat_stat and the hardy atrribute on fatigue in this post (https://forums.totalwar.org/vb/showthread.php?p=1521855#post1521855).

xerex
04-28-2007, 20:41
LordBula asked for the details of the fatigue tests, so I since I compiled them for him anyway in a semi-readable format, I thought I would post them here in case they are useful to somebody else.

These are results gathered mostly by Aradan over at the fourth age forums. He sent them to me as I am the resident math expert. We were hoping to derive a formula, but it apparently, isn't a simple one and without knowing the form of the equation, it can't just be solved for algebraically. I still haven't tried plotting it up in excel and trying to fit it. That might be worth trying, but it will challenging because of the multiple variables involved.


I apologize for any formating issues:
Below are the times a unit takes to go from fresh to very tired on flat ground in climate_heat= 4

all values are seconds



stat_heat: -2 0 2 4 6
hardiness
normal 241 233 220 205 182
hardy 289 287 254 236 215
very_hardy 350 349 308 278 253


This next table is the same as above except for climate_heat=1



stat_heat: -2 0 2 4 6
hardiness:
normal 248 245 245 245 239
hardy 300 299 299 299 298
very_hardy 385 385 385 385 385


you can see stat_heat is unimportant in low heat climates.

These are recovery times..the time it takes a unit to recover from just turned very_tired to just turned fresh while standing idle on climate_heat =1



stat_heat: -2 0 2 4 6
hardiness:

normal 255 255 255 255 255
hardy 208 208 208 208 208
very_hardy 176 176 176 176 176


Same test as above with climate_heat=4



stat_heat: -2 0 2 4 6
hardiness:

normal 255 267 288 329 384
hardy 208 209 230 255 286
very_hardy 195 195 210 230 255

Severous
04-29-2007, 11:06
Thanks for adding the stats here xerex.

Looks as expected except the -2 heat setting. Is that snow?

Wouldnt we expect troops in snow to tire quicker and take longer to recover?

Aradan
04-29-2007, 11:11
Stat_heat measures the effect heat has on units, it's not the map's climate_heat.
The map's climate_heat is written above each table and is 4 in one occassion and 1 in the other.

So stat_heat -2 shows extremely high resistence to heat.

Biggus Diccus
05-17-2007, 08:43
Did anyone test he effects of fatigue on combat ability; att/def/morale?

Ludens
05-17-2007, 12:58
Did anyone test he effects of fatigue on combat ability; att/def/morale?
It's almost impossible to accurately determine these as combat outcome is a chance process, and fatigue will increase during fighting. However, from recent experiences in the EB mod I know that exhausted units incur a considerable penalty for attack and a smaller but still significant one for defense. There also appears to be a morale penalty, but I am not sure if it is big. However, EB has lowered kill-rates and increased morale, so the size of these effects may be different in vanilla.