June 4th, 2017, 11:39
(This post was last modified: June 4th, 2017, 11:40 by Seravy.)
Posts: 10,536
Threads: 395
Joined: Aug 2015
No and no.
...actually the second might be possible, not as a debuff but by directly altering the stats inside the strategic combat procedure. But it's kinda hard to translate spellcasting power to unit debuffs.
June 4th, 2017, 13:07
(This post was last modified: June 4th, 2017, 13:08 by Nelphine.)
Posts: 5,010
Threads: 17
Joined: Aug 2016
(June 4th, 2017, 11:33)Seravy Wrote: The only thing I can imagine working is if units attacked each other randomly until one side dies. (instead of a queue. A queue is bad. It means 1 immune unit can kill off 8 other units in the enemy army by itself.)
Simulating attacks works, it is already used by the AI to pick what to attack in normal combat.
However if that is done, there is no spellcasting, and I can't simulate that.
It also means the ability to distribute damage the way we want is lost - the current system attempts to keep higher value/armor units alive which benefits the AI.
So while it would make armor and immunities work, it would be otherwise a lot worse.
What I can do is change strategic combat to not call "defensive rating" at all, and calculate something else. I can't do a different "defensive rating" procedure and then changes to overland to have the same result anyway.
I think you're still misinterpreting me.
When I say a 'queue', I don't mean 'simulate attacks as if in tactical'. I simply mean, using the information we already have in strategic combat, fight one unit against one unit, instead of the whole army against the whole army. That means immunities still don't exist. And the ONLY reason to do this is if we can make armor more functional within the parameters of what strategic combat currently gets as information. And it completely wrecks the damage distribution, as I pointed out, and you pointed out. So this is one of those ideas where I'm suggesting it mostly to trigger discussion 'is there ANYTHING in this idea that seems helpful, even if it doesn't currently fit the current equation used in strategic combat' - it's not an actual suggestion.
Similarly, when I'm suggesting breaking the defensive rating, I'm specifically takling about changing the formula - not making something brand new. So for instance, right now, the offensive rating is 'melee rating + thrown rating + ranged rating' and these are all calculated separately. And since they are separate, we could easily modify one to be completely different (such as my suggested change to thrown, has no consequence whatsoever on melee or ranged). With defensive rating, the formula is much much simpler. It boils down to almost hp*armor. I want to make it something much more complicated, in the way that ranged/thrown/melee can all be calculated completely separately (and therefore each individual equation can be modified separately without any consequence on the other 2).
Once I have a formula that works in the combat, then I'll figure out how to use them together to make the defensive rating (just like how right now, ranged/melee/thrown are all used separately in combat, but they are combined to make an overland offensive rating.)
Posts: 10,536
Threads: 395
Joined: Aug 2015
Quote: I simply mean, using the information we already have in strategic combat, fight one unit against one unit, instead of the whole army against the whole army.
That would take more work for a less accurate result (attacking randomly instead of in a queue should be better and calling an existing attack procedure instead of making my own is easier). So it's one thing I'm definitely not doing.
Quote:It boils down to almost hp*armor. I want to make it something much more complicated
There is close to no free space left in the segment that handles ratings as far as I remember. "much more complicated" is way out of reach here and I've already explained you only have HP and Armor (and now To Def) as input parameters in the defense rating procedure and I can't and won't change that - as it involves changing all the calls to the procedure and that's an unreasonable thing to do.
Posts: 5,010
Threads: 17
Joined: Aug 2016
No, you have hp, armor, to def, and figures. That's all i'm planning on working with.
But your offensive rating COULD be 'attack + ranged + thrown' and it's not. It's a complicated (attack-2)*figures*20 + (ranged-2)*figures*20 + (thrown-2)*figures*30. That's MUCH more complicated. That's all I'm talking about when I'm saying 'more complicated'. I'm not talking about more information, I'm not talking about input parameters or changing calls; just changing what the equation is (so instead of 4*figures*hp*(armor+4), it will be something else).
Posts: 10,536
Threads: 395
Joined: Aug 2015
(June 4th, 2017, 18:45)Nelphine Wrote: No, you have hp, armor, to def, and figures. That's all i'm planning on working with.
But your offensive rating COULD be 'attack + ranged + thrown' and it's not. It's a complicated (attack-2)*figures*20 + (ranged-2)*figures*20 + (thrown-2)*figures*30. That's MUCH more complicated. That's all I'm talking about when I'm saying 'more complicated'. I'm not talking about more information, I'm not talking about input parameters or changing calls; just changing what the equation is (so instead of 4*figures*hp*(armor+4), it will be something else).
You don't have figures. HP there is the total remaining HP of the unit, not HP per figure.
June 4th, 2017, 19:24
(This post was last modified: June 4th, 2017, 19:26 by zitro1987.)
Posts: 1,341
Threads: 24
Joined: Feb 2012
I find the mechanics fairly difficult to understand right away, but could get better over time.
Nonetheless, 'thrown' calculations jumped out at me and are clearly excessive (I would imagine *10 per figure instead of *30 would be far more realistic and balanced). This is what makes those berserkers look so high on the army strength charts (and do so well on strategic combat, though I'm wrecking them with 2 cause-fear wraiths without a scratch).
June 4th, 2017, 23:44
(This post was last modified: June 4th, 2017, 23:47 by Nelphine.)
Posts: 5,010
Threads: 17
Joined: Aug 2016
OK, I just clued in that you really can simulate attacks from units, with the actual units. Problem? No spellcasting, no overland army strength, poor damage distribution. But the battles are better than current strategic combat.
So, are you at all interested in making that work? I think fixing those 3 problems would be easier than trying to fix armor in current strategic combat.
Doing that, yes, randomly choose targets although I'd personally put in a clause to skip immune targets - magicians would never attack a golem if skeletons were around.
The biggest reason we had damage distribution changed is because the strategic combat system has severe flaws - so choosing to make a flawed system result in a more challenging match for the human was the best we could do. If we can actually simulate tactical, I don't think it would be such an issue. (Movement isn't accounted for though, so if we wish, we could arbitrarily take total damage done at the end, and redistribute it before actually applying it.)
Spellcasting: you have calls for how the AI uses spells in combat - couldn't you just do that? Do spell, simulate attacks for all units, spell, etc. This way you can even give defending wizards the advantage back again. Might be able to just call a lightning strike too to simulate a fortress.
I'm probably totally wrong on this though. So, assuming you can't do those calls, we can still use a super simple system like strategic for spellcasting, and just throw a pile of damage at random units.
Overland army strength: if you're actually using tactical battle simulation, then you just use cost (including buffs). Since things are (in theory) balanced anyway, and they're balanced around tactical.
My guess is you don't like this idea though, so I'm still working on how to change armor.
Currently trying to understand why the x4 and the +4 are in the defensive rating formula. I think the x4 is actually a x20 (since it would make sense that attack and HP are completely linear compared to reach other), which means the armor portion is actually (armor +4)/5.
Which seems bizarre.
But then, the armor is being multiplied by HP. Which means that for every HP you have, the attacker has to chew through armor. How much armor? Well, the basic is armor*0.3. But that would imply that every attack is doing 1 damage after armor. That seems like an odd assumption. If we assumed every attack did 1.666 damage after every attack, then we'd divide the armor by 1.666.. That gives us armor/5. So the +4 seems to be the defensive equivalent to the -2 on the offensive side. Its an arbitrary number hopefully designed to counterbalance multifugures.
So, the basic strategic defensive rating formula seems to say 'HP are linear with hit points. On average creatures are well enough balanced that they usually do 1.666 damage after armor*. And we want to arbitrarily pretend everything has extra armor to further weaken multifigure attacks which naturally have lower strength than solo figure attacks.'
*this is a particularly bad flaw to keep in CoM due to the rebalancing of units. In general things do a lot more damage now, especially with +to hit being far more widespread.
So the formula actually is 20*HP*figures * (armor+arbitrary number to counterbalance multifigures)*chance to defend/average damage over all battles.
This happens to simplify down to the formula we use today of 4*HP*figures*(armor+4).
I think it would make more sense to add armor as extra 'pretend' HP, rather than try to use armor as a multiplier on every HP.
Posts: 10,536
Threads: 395
Joined: Aug 2015
Quote: you have calls for how the AI uses spells in combat - couldn't you just do that?
No, those display the spells on the screen.
Only single target direct damage spells have a procedure that displays nothing to calculate a damage amount.
Besides, if the AI had to pick a spell for each turn, we'd be looking an 2 hour long game turns.
The greatest risk at this sort of thing is speed - the original game most likely didn't use this simple system because they wanted to, but because simulating actual battle is far too slow on a 1995 computer (or an emulated environment).
Quote:Currently trying to understand why the x4 and the +4 are in the defensive rating formula.
The *4 is there because that results in defense ratings close to attack on a basic unit with the same amount of swords and shields, and 12 total hp (6 figures at 2 each).
The +4 is there for better scaling - we don't want a 1 armor creature to be half as powerful as a 2 armor creature, when in reality they are almost the same. If 4 is added, the difference between those creatures is only the difference between 5 and 6, which is +20%. The higher amount is added here, the LESS effect early armor points have on the outcome.
Armor does work like a multiplier in real combat. If the unit has X times as many HP then it needs X times as many attacks to kill, so the armor is applied X times as many too. So whatever effect armor has, needs to be linearly scaled up by the hit points of the unit.
June 5th, 2017, 07:09
(This post was last modified: June 5th, 2017, 07:28 by Nelphine.)
Posts: 5,010
Threads: 17
Joined: Aug 2016
No, its not based on the HP of the target. Its based on the figures in the attacking unit.
Whether I've got 2 HP or 10 HP, if I get attacked by a great drake, or my super bezerkers, my 6 armor blocks 4 damage against the great Drake, and 24 damage against the bezerkers. (In fact this is what causes the raise dead issues. Attack and armor are calculated regardless of the targets HP allowing for enormous overkill.)
If I have enough HP to survive the attack, then it also gets multiplied by number of attacks the enemy unit makes. If I have 2 HP and 1 left over after the first attack, or if I have 30 HP and 1 left over, I still get attacked twice, and my armor us twice as effective. This is NOT linear with the targets HP.
Similarly, 2 armor is EXACTLY twice as effective as 1 armor. Sure it happens to be almost the same, but even done linearly and twice as effective, it will still be almost the same - as long as its not multiplied by the targets hp. Armor IS linear, which is why that +4 is completely arbitrary. It makes armor non linear, because the original writers had no idea how to actually calculate armor in strategic combat, and this was the best guess they had.
However, regardless of all that, I think I may have found a way to make this work.
How big of a number can the defensive rating be? Can I give units a defensive rating of 4 million or higher? If not, how about 40000-50000? If not, what is the highest it can go?
Posts: 10,536
Threads: 395
Joined: Aug 2015
"defensive rating" fills the same role as HP in strategic combat. It shows how many of a specific attack it takes to kill the unit.
Your explanation looks at it as though it was armor - reduction of damage. It is not. It's the total durability of the unit.
Quote:How big of a number can the defensive rating be? Can I give units a defensive rating of 4 million or higher? If not, how about 40000-50000? If not, what is the highest it can go?
It's a signed integer, so 0-32767. The sum of all units in the battle can be a longint (about 2100 million max).
But that's for the best possible unit and then some safety margin (imagine a hero with 50 shields, +5 To Def and 40 hit points - that should be around 10-20000).
|