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

Create an account  

 
Strategic combat

A long time ago, it was between game 10 and 20, I saw a "deadly" stack of 7/8 halfling spearmen/swordmen of an enemy wizard headed to a sorcery node defended by 3 Sky Drakes and some Phantom Beasts.
Doomed to their dead, I supposed.
It was the very beginning of the game, I barely explored the neighborhood and I played usually normal games, so the enemy wizard should not be too powerful, not powerful enough to kill 3 SD, IMO.
Magic immune and flying the Sky Drakes should be able to dispatch the puny troops, I thought.
Maybe the wizard can kill same or all the PB, with the help of the troops, I thought.
I was wrong, the node was conquered with minimal or no deads in the troops.

Since then I never used Strategic Combat, but AI will use it for AI vs AI combats.

I never thought this can be fixed, until I recently "spoke" to Seravy.

Let's see if we can "improve" SC.

Quote:There are no "units" perticipating in Strategic combat, only armies. Then the total damage the army has taken is distributed between the units after the battle is done.
Fine, but if 4 Warlocks fights against 4 LongBowman, the latter will be wiped out, unless the second wizard find a way to damage or kill the warlocks.
Since Warlocks are immune to archery attacks, they should take no damage.

If SC doesn't work this way, and probably doesn't, it is not working correctly, IMO.

There is a way to "fix" this?
Only the people crazy enough to think they can change the world of Arcanus and Myrror can do it. rolleye
Reply

(December 14th, 2015, 14:39)FrancoK Wrote: A long time ago, it was between game 10 and 20, I saw a "deadly" stack of 7/8 halfling spearmen/swordmen of an enemy wizard headed to a sorcery node defended by 3 Sky Drakes and some Phantom Beasts.
Doomed to their dead, I supposed.
It was the very beginning of the game, I barely explored the neighborhood and I played usually normal games, so the enemy wizard should not be too powerful, not powerful enough to kill 3 SD, IMO.
Magic immune and flying the Sky Drakes should be able to dispatch the puny troops, I thought.
Maybe the wizard can kill same or all the PB, with the help of the troops, I thought.
I was wrong, the node was conquered with minimal or no deads in the troops.

Since then I never used Strategic Combat, but AI will use it for AI vs AI combats.

I never thought this can be fixed, until I recently "spoke" to Seravy.

Let's see if we can "improve" SC.

Quote:There are no "units" perticipating in Strategic combat, only armies. Then the total damage the army has taken is distributed between the units after the battle is done.
Fine, but if 4 Warlocks fights against 4 LongBowman, the latter will be wiped out, unless the second wizard find a way to damage or kill the warlocks.
Since Warlocks are immune to archery attacks, they should take no damage.

If SC doesn't work this way, and probably doesn't, it is not working correctly, IMO.

There is a way to "fix" this?

There isn't. Unless you mean recoding the entire thing from zero up as a solution, which I'm not going to do. The amount of space in the file is limited, so there is only so much you can include.
Strategic combat (as far as I remember) uses 3 variables to describe an army :
Attack rating (melee, thrown, gaze, poison etc go here)
Defense rating (health and defense goes here)
Ranged rating (any type goes here)

If wizards do the battle, spells add to one, or more of these ratings, based on skill, and realms owned, multiplied by the amount of books in the realm.

Swordsmen units have 6-8 figures of 4-6 attack each, that can easily have a comparable total to a single figure Sky Drake (20+20).
What makes the difference is the armor, in real combat 10 armor can reduce all the damage done from 5 attack multi-figure units to zero.
In strategic combat, it just raises the "toughness" rating of the army, so it's no different from some extra points of health. Or we can say that the swordsmen are treated as one 24 attack 6 health figure instead of 6 small ones. The point is, the extra benefit of armor working multiple times against multi figure units is ignored. Very much the same situation as ignoring immunities, first strike, benefits of breath and thrown working first, etc.
On the other hand, things like Chaos Spawn will be very strong, because Multigaze adds a ton to the attack rating of the unit/army, and there are no actual resistance rolls or anything done, it just gives a flat +900 attack power to the army (1 point of attack on 1 figure is worth about 20 so this is as good as a having 45 more sword icons total in the army).
Reply

(December 14th, 2015, 15:45)Seravy Wrote:
(December 14th, 2015, 14:39)FrancoK Wrote: There is a way to "fix" this?

There isn't. Unless you mean recoding the entire thing from zero up as a solution, which I'm not going to do.
Of course not, even if I think you can do it, it will take too much time.


Quote: The amount of space in the file is limited, so there is only so much you can include.
Strategic combat (as far as I remember) uses 3 variables to describe an army :
Attack rating (melee, thrown, gaze, poison etc go here)
Defense rating (health and defense goes here)
Ranged rating (any type goes here)

If wizards do the battle, spells add to one, or more of these ratings, based on skill, and realms owned, multiplied by the amount of books in the realm.

Swordsmen units have 6-8 figures of 4-6 attack each, that can easily have a comparable total to a single figure Sky Drake (20+20).
What makes the difference is the armor, in real combat 10 armor can reduce all the damage done from 5 attack multi-figure units to zero.
In strategic combat, it just raises the "toughness" rating of the army, so it's no different from some extra points of health. Or we can say that the swordsmen are treated as one 24 attack 6 health figure instead of 6 small ones. The point is, the extra benefit of armor working multiple times against multi figure units is ignored. Very much the same situation as ignoring immunities, first strike, benefits of breath and thrown working first, etc.
On the other hand, things like Chaos Spawn will be very strong, because Multigaze adds a ton to the attack rating of the unit/army, and there are no actual resistance rolls or anything done, it just gives a flat +900 attack power to the army (1 point of attack on 1 figure is worth about 20 so this is as good as a having 45 more sword icons total in the army).
There is a way to add "invulnerabilties" like flying units vs foot units, magic immune units vs mage , etc. in the form of stats reduction?

Example1:
4 Warlocks fights against 4 LongBowman
I suppose the stats for every unit is added singularly (1 LongBowman + 1 LongBowman +... instead of 1 LongBowman multiplied 4).
Since all Warlocks are immune to LongBowman shoots (but not hand to hand) when we add the first LongBowman we check and see that 100% of the enemies are immune to LongBowman shoots, we reduce ranged to add to 0, then add the second LongBowman, do the same and so on.
Example2:
4 Warlocks and 4 spearmen fights against 4 LongBowman
Since all Warlocks are immune to LongBowman shoots (but not hand to hand) when we add the first LongBowman we check and see that 50% of the enemies are immune to LongBowman shoots, we reduce ranged to add in half, then add the second LongBowman, do the same and so on.

Far to be as precise, this method as the advantage to give a use to special immunities.
What do you think?
Only the people crazy enough to think they can change the world of Arcanus and Myrror can do it. rolleye
Reply

(December 14th, 2015, 17:14)FrancoK Wrote: we check and see that 100% of the enemies are immune to LongBowman shoot

How exactly?The computer isn't a human to just look at it.
We have to go through every enemy unit, and count how many of them have Missiles Immunity. That's, let's say, about 30 bytes of new code if done in a very efficient way.
Then we have to look at the attacker unit's attack type, and decide if it's missile or not (could be magical, rock, thrown, gaze or firebreath, they all use the ranged slot), and if it is, multiply the ranged attack rating with the modifier we calculated from the above "immune units/total army" ratio. Another, let's say 50 bytes.
Then we do the same for
Magic Immunity
Weapon Immunity
and we are at 240 new bytes. The latter doesn't provide complete immunity so we need to come up with an approximate formula to simulate the defense bonus, too.
And we haven't even considered the other 6 types of immunities, not to mention Righteousness, Elemental Armor, Invulnerability and so on.
Ultimately, we'll need like 2000 bytes of empty, free, unused space, which can only be made by deleting existing code, just for the immunities.
At this point we are back to what I said, "we have to recode the entire thing from zero".
Oh and the entire procedure is about 4800 bytes long. If we use 2000 of that on immunities, is there enough left for the entire actual battle?
And we are then still ignoring all movement types including flight, abilities like spellcasting or leadership or holy bonus, and so on.

Or, short answer : "no, can't do that"

At that point, throwing the entire thing out and just making the units actually fight each other by calling the procedure that makes a unit perform an attack on another would be faster and more accurate. Maybe we could do that, I wonder...I rather not, though as it would take out the effect of casting power entirely. There is that rather huge problem that those procedures probably draw stuff on the screen, too.
At this point I wonder...why the hell did they not do it that way? It would have been so simple for them, even easier than this solution, but it's impossible through hex editing, for this kind of stuff you need the source code.
Reply

(December 14th, 2015, 18:51)Seravy Wrote:
(December 14th, 2015, 17:14)FrancoK Wrote: we check and see that 100% of the enemies are immune to LongBowman shoot

How exactly?The computer isn't a human to just look at it.
We have to go through every enemy unit, and count how many of them have Missiles Immunity. That's, let's say, about 30 bytes of new code if done in a very efficient way.
Then we have to look at the attacker unit's attack type, and decide if it's missile or not (could be magical, rock, thrown, gaze or firebreath, they all use the ranged slot), and if it is, multiply the ranged attack rating with the modifier we calculated from the above "immune units/total army" ratio. Another, let's say 50 bytes.
Then we do the same for
Magic Immunity
Weapon Immunity
and we are at 240 new bytes. The latter doesn't provide complete immunity so we need to come up with an approximate formula to simulate the defense bonus, too.
And we haven't even considered the other 6 types of immunities, not to mention Righteousness, Elemental Armor, Invulnerability and so on.
Ultimately, we'll need like 2000 bytes of empty, free, unused space, which can only be made by deleting existing code, just for the immunities.
At this point we are back to what I said, "we have to recode the entire thing from zero".
Oh and the entire procedure is about 4800 bytes long. If we use 2000 of that on immunities, is there enough left for the entire actual battle?
And we are then still ignoring all movement types including flight, abilities like spellcasting or leadership or holy bonus, and so on.

Or, short answer : "no, can't do that"
I agree, if it is going to be so complex it cannot be done.
Since this is a simplified combat, my idea is to simplify it, but taking in account few things.

Only 3 "immunity" check need to see the opposite units.
1. the unit has archery attack and the enemy has missile immunity or guardian wind -> 0 ranged attack (need to check ranged type, not power for the unit and a flag mask for each enemy)
2. the unit has magic ranged attack and the enemy has magic immunity -> 0 ranged attack (need to check ranged type, not power for the unit and a flag mask for each enemy)
3. the walks AND has no ranged attack and the enemy can fly -> 50% melee attack (need to check ranged power, not type for the unit and a flag for not flying movement and a flag for each enemy) take in account the unit cannot attack, but can counterattack.

It will probably take 150 bytes form me, but you are a better coder and can do it in 100 byte, maybe using subroutines.

The others only check the unit itself
4. If the unit has weapon immunity add 5 shields (need one flag check, probably 10 bytes)
5. If the unit has invulnerability add 3 shields (need one flag check, probably 10 bytes)
6. If the unit has invisibility add 10 shields (need one flag check, probably 10 bytes)
Other melee, defense and ranged buffs should be already in the count (Giant Strength, Iron Skin, etc.)
Other defense (spells of armor, cloak) buffs are too complex to implement, so we have to drop them.

To sum it up those are 2 procedure applied with 3 different values.

I'm not telling this is easy, I do not know if you can/have time to implement it and I'm putting no pressure, do you think with this simplification there is somewhere enough room to add the new code?

Quote:At that point, throwing the entire thing out and just making the units actually fight each other by calling the procedure that makes a unit perform an attack on another would be faster and more accurate. Maybe we could do that, I wonder...I rather not, though as it would take out the effect of casting power entirely. There is that rather huge problem that those procedures probably draw stuff on the screen, too.
At this point I wonder...why the hell did they not do it that way? It would have been so simple for them, even easier than this solution, but it's impossible through hex editing, for this kind of stuff you need the source code.
Yeah, you're right, unfortunately the source code is not available. shakehead
Only the people crazy enough to think they can change the world of Arcanus and Myrror can do it. rolleye
Reply

The proper way to do it would be generating a regular tactical combat, settings both sides on 'auto', and suppressing the display; presumably they didn't actually do that because it would be slow and they were working with ancient computers.
Reply

(December 18th, 2015, 18:42)Anthony Wrote: The proper way to do it would be generating a regular tactical combat, settings both sides on 'auto', and suppressing the display; presumably they didn't actually do that because it would be slow and they were working with ancient computers.
I agree. The strategical is, of course, faster.
The question can be: With nowadays computer, can a displayless tactical combat be fast enough?
This way the combats will me much more "realistic".
Can we test it, maybe with a counter to show the number of combat while running?
Only the people crazy enough to think they can change the world of Arcanus and Myrror can do it. rolleye
Reply

(December 19th, 2015, 20:37)FrancoK Wrote: I agree. The strategical is, of course, faster.
The question can be: With nowadays computer, can a displayless tactical combat be fast enough?
No, the first question is: can displayless tactical combat be done at all? I suspect the answer is no. If you can get past that point, you have the performance problem that you're going through DosBox.
Reply

(December 20th, 2015, 04:45)Anthony Wrote:
(December 19th, 2015, 20:37)FrancoK Wrote: I agree. The strategical is, of course, faster.
The question can be: With nowadays computer, can a displayless tactical combat be fast enough?
No, the first question is: can displayless tactical combat be done at all? I suspect the answer is no. If you can get past that point, you have the performance problem that you're going through DosBox.

The answer is "nor really". Display isn't done at one place, it's all over the code. To conditionally skip them we would need to make at the very least like 6-7 bytes of free space directly in front of all of these (I would guess there are hundreds) by rearranging and optimizing code elsewhere.
It's not impossible in theory, but...something that would take like, months or years to complete. And if one of those display calls is located at a place where you can't make those extra few bytes of space, then it's impossible.

Quote:I'm not telling this is easy, I do not know if you can/have time to implement it and I'm putting no pressure, do you think with this simplification there is somewhere enough room to add the new code?
One more time, the strategic combat isn't based on units. To do what you suggest we would need to code in a loop to find any ranged and missile immune units, and make up a modifier based on how many we find of each. (And this isn't easy, if there is a missile immune unit, the archer can target something else and not lose damage output at all. But if other targets run out because there are many archers and they killed everything else, they can't. Making a formula for this would be...way too difficult even if I ignore the problems with coding it).
Flight is even more problematic because the flying unit can decide not to attack and then it cannot get hurt at all...but even then the end of combat damage distribution will hurt them.
Reply

A long time ago in a galaxy far far away I was a developer.
When we had a lot of stuff running on the video, but we do not like to show them to the user, we disable the video, until the final result appear.
As a side effect, all the commands directed to the Graphic Processor where discarded, improving the overall speed.
Also, IIRC, in MoM there is a pause when an unit is moving during combat, so the user can see it walking and we could modify it too.
Now, is it possible the question could be:
Can we disable the video and force the AI vs AI combat to use the tactical combat?
Only the people crazy enough to think they can change the world of Arcanus and Myrror can do it. rolleye
Reply



Forum Jump: