As a French person I feel like it's my duty to explain strikes to you. - AdrienIer

Create an account  

 
How does strategic combat work, exactly?

This is one part of the game which is famously obscure. Even in the official strategy guide, the author declines to reveal any of the machinations behind strategic combat. We know this is how the computers resolve combats between themselves, but I don't think any player has ever used it. The OSG suggests if you can't win a battle the conventional way, try strategic combat to see if it comes out differently. I've never done this, though. Is it random, or deterministic, how does it work?
Reply

(October 20th, 2015, 21:26)Tiltowait Wrote: This is one part of the game which is famously obscure. Even in the official strategy guide, the author declines to reveal any of the machinations behind strategic combat. We know this is how the computers resolve combats between themselves, but I don't think any player has ever used it. The OSG suggests if you can't win a battle the conventional way, try strategic combat to see if it comes out differently. I've never done this, though. Is it random, or deterministic, how does it work?

I haven't looked into that yet, let's see...


1. Units are converted to their battle stats.
2. Units owned by a wizard with ID below 0 or above 5, they are all set as status=6, disintegrated. As these wizard IDs are invalid, this step probably does absolutely nothing.
3. Original stores away (30-unit defense) into a variable (var_AE).
Insecticide stores 1 into the variable instead....but if unit has 50 or higher defense (that's not even possible???) then it stores (102-unit cost/10) instead.
4. Calls the procedure "AI_Unitvalue_Healthdefense" which assigns a rating to the unit based on remaining health and defense. Adds up this value for all units together and stores it.
5. If unit has a ranged attack, it calls the "AI_Unitvalue_RangedAttack" and adds up the total then stores it.
6. Calls "AI_Unitvalue_Attack" to rate attack power like the above two, and stores it into another total for the army.
7. A long complicated process follows where the wizard's mana and skill is measured and the amount they can afford to spend on the battle is spent and stored in other variables.
8. Some complicated parts follow with lots of percentage calculations to decide the outcome
9. Units in the loser's army die
10. Units are selected by using var_AE as a priority array, and damage is being applied to them on the winner side I assume. If the unit dies from damage, another one gets selected.
11. Combat_End is called and then it's over.

A point of interest :

point 3 seems to be broken in insecticide. Don't see why he would want to assign a non-1 value only to units of 50 or higher defense.

Edit : I think it does 1 damage to the winning army for each point of difference between two variables, one of which being the total health of the winner's army. The other is a percentage of the same value, so it's making the army lose a percentage of their total health based on the outcome.

About the Mana spent
-Amount seems to be equal to 10% of the total available mana, but no more than the casting skill.
-I think it spends skill/3 mana in one go so there might be 3 "turns" of the combat.
-Influence of mana spent on the outcome of battle is applied through three different variables (probably a modifier for each of attack, ranged, and defense) multiplied by the amount of skill spent per use.
-The amount of these is influenced by the spellbooks the wizard has and the battle location (nodes). Some spellbooks seem to add more to these values than others, it does not always add up to 100%.
-If less than 10 mana would be used, it isn't, and the whole thing gets skipped. This implies you need 100 mana to have any effect on the battle through spellcasting because only 10% of the mana is spent.
Reply

It's supposed to spend the wizard's full casting skill in mana every strategic combat. I didn't know it actually affected your chances of winning, though.

They weren't kidding about the process being complicated, eh? The "status=6, disintegrated" thing sounds like a bugfix if I've ever heard one. How random is it? Will you often get different results when trying the same battle, or is it generally the same?
Reply

(October 21st, 2015, 08:17)Tiltowait Wrote: It's supposed to spend the wizard's full casting skill in mana every strategic combat. I didn't know it actually affected your chances of winning, though.

They weren't kidding about the process being complicated, eh? The "status=6, disintegrated" thing sounds like a bugfix if I've ever heard one. How random is it? Will you often get different results when trying the same battle, or is it generally the same?

It's somewhat random. I tried a lair with "many war bears" using 3 low level heroes, a priest and 2 cavalry.
I won about 85-90% of the time, lost the remaining 10-15%.
I always lost at least 2 units, but sometimes all but one.

Due to the issues of damage distribution, the unchanged version always resulted in one damaged unit, and all other units either dead or full health.
After my changes it became a lot better, there were more surviving units on average but usually most of them had at least some damage on them. As their cost and health is roughly the same, heroes had a roughly even chance of dying as the other three.

I haven't tested what happens if I had an expensive unit like Sky Drake but without changes it wouldn't be different due to Kyrub's mistake. In 1.31 it also wouldn't be much different because 10 defense is only 20/30 chance compared to the base 20/30.

However with my formula, the expensive unit(s) would almost always take no damage until the weak ones get used up completely. (where expensive refers to a cost of 500+, weak to a cost of -let's say- below 100)
High fame rank heroes are expensive so this change makes them survive better. Rare+ fantastic units likewise. The difference between normal units is not that big but noticeable, a cost 250 units takes damage half as often as a cost 10 one.

I expect the outcome to be less varied if the two armies have a vastly different total power, but both my units and bears are on the weak side so it was an even match. I think I'll run some test with my army including a great wyrm next.

Edit : I replaced one of the cavalry with a great wyrm.
The total damage taken by my army seems to have been reduced roughly by half compared to not having the wyrm with them, so the increased power did reduce the losses. On average 5 units survived, with only 2-3 of them being damaged to various degrees.
Due to my previously mentioned changes, the Wyrm never took any of the damage, being a unit more expensive than 500.
I also looked inside, there were 5 bears.
Reply

You'd have to test with two equal stacks, 5 pikemen vs. 5 pikemen, that sort of thing. Then the degree of randomness would be more apparent.
Reply

(October 21st, 2015, 22:57)Tiltowait Wrote: You'd have to test with two equal stacks, 5 pikemen vs. 5 pikemen, that sort of thing. Then the degree of randomness would be more apparent.

I was more interested in if the power of the army actually matters in reducing the losses or not. I expect equal battles to be highly random on who wins them with heavy losses on the winner's side no matter what. In my test battle I had a bit of an advantage and still took a lot of damage almost always lost about half the units.
Reply



Forum Jump: