Page 158 of 179
Re: Official KaM Remake Ideas topic
PostPosted: 17 Jan 2015, 12:06
by Krom
I think I like the idea, it adds more tactical decisions to the fight.
On the other hand, that complicates the math. Both from the players side (so there are even fewer solid unit stats) and from the game logics side (when does the start and the end of a fight happen)
Re: Official KaM Remake Ideas topic
PostPosted: 17 Jan 2015, 12:53
by Esthlos
from the game logics side (when does the start and the end of a fight happen)
In my opinion it could be implemented similarly to units' HP.
While a unit's Storming animation is being displayed, then its "Bonus Counter" would be set to 20; if it is higher than 0 and another animation is being used, then it is decreased every tick by 1.
(20 so that the melee unit still has it >= 10 when starting to fight)
For horses, instead, they get it increased by 1 per tick until it reaches 10, as long as noone in the group is caught in a fight.
Then, in the code that manages the actual fighting (the one that calls OnUnitAttacked) (by the way, there's a bug there: OnUnitAttacked is called twice per attack), it also checks for the bonus (wounds the appropriate unit if it is >= 10, skipping most of the rest of that code) and then sets it to 0.
What do you think about this?
P.S. That value doesn't have to be 10 in the actual implementation...

Re: Official KaM Remake Ideas topic
PostPosted: 18 Jan 2015, 11:37
by Krom
As I've said, I like the idea, it allows to make tactical fighting a bit deeper. Sadly I don't have time to try and test it now.
Re: Official KaM Remake Ideas topic
PostPosted: 19 Jan 2015, 09:06
by Esthlos
As I've said, I like the idea, it allows to make tactical fighting a bit deeper. Sadly I don't have time to try and test it now.
The change is uploaded as a proposed patch, but since
Krom doesn't have time at the moment and
Lewin is on a Summer break,
Krom wrote me to upload it here and hope in the community... so, here it is!
https://www.sendspace.com/file/c5dgon
(it's an 8 MB archive and the max allowed size for attachments in the forum is 2 MB, thus I've uploaded it externally)
It is implemented like this: every unit gets a new property, called Inertia.
It increases by 1 per Tick if the unit is storming or if it's a cavalry unit that is moving, and decreases by 1 otherwise. Limits are 0 and 15.
During a fight, with each blow the attacker's Inertia is set to 0; if it was >= 10 then it is guarenteed to wound someone: the attacker himself if the opponent is of an Anti-Cavalry type, the opponent otherwise.
Of course these values (10, 15, 1 per tick, etc) can be changed... I was only concerned with getting something that works.
The archive includes
- A test map I made to test this proposed new mechanic
- The compiled executable it requires in order to work
The included KaM Remake executable includes
- The proposed new mechanic
- States.UnitInertia
- Actions.UnitWound
- Actions.UnitHeal
- States.UnitHealth
- States.UnitTypeMaxHealth
- Actions.GiveUnitFromHouse
(Near all these functions are the ones I asked
Lewin to check and add, and since I already had them on my PC and they're useful for testing they sort of... carried over in this executable

)
What do you think of it?
Re: Official KaM Remake Ideas topic
PostPosted: 19 Jan 2015, 09:36
by Esthlos
Used my old Test Fight map to see how this would impact the Horse vs Anti-Horse balance.
Test 1:
Armies:
45 Pikemen (1170 Corn) vs 23 Knights (1150 Corn)
With the old mechanic:
Pikemen won 100 battles on a total of 100
With the proposed mechanic:
Pikemen won 87 battles on a total of 100
(The Test Fight map is not really suited for testing Storming too

)
(In the uploaded executable the bonus attack versus mounted units is disabled, but can be re-enabled if needed for balance reasons)
Test 2:
Armies:
45 Sword Fighters (1665 Corn) vs 33 Knights (1650 Corn) (no storming)
With the old mechanic:
Sword Fighters won 50 battles on a total of 100
With the proposed mechanic:
Sword Fighters won 12 battles on a total of 100
Re: Official KaM Remake Ideas topic
PostPosted: 19 Jan 2015, 18:17
by The Dark Lord
I don't think these are desirable results... Knights are strong enough already. If 45 pikes lose against 23 knights I will never play KaM again.
Re: Official KaM Remake Ideas topic
PostPosted: 19 Jan 2015, 18:43
by Esthlos
I don't think these are desirable results... Knights are strong enough already. If 45 pikes lose against 23 knights I will never play KaM again.
(In the uploaded executable the bonus attack versus mounted units is disabled, but can be re-enabled if needed for balance reasons)
Yes, it looks unbalanced... this definitely isn't a finished feature, but I still think it has a lot of potential if appropriately balanced and implemented.
You should also consider that it would be very easy to implement this for Storming troops only, leaving Horse/Antihorse balance unaffected...
Re: Official KaM Remake Ideas topic
PostPosted: 19 Jan 2015, 19:18
by The Dark Lord
That would still make sword fighters stronger, I think they don't need a boost either. :S For militia it would be nice.

Re: Official KaM Remake Ideas topic
PostPosted: 19 Jan 2015, 19:52
by Esthlos
Let's see... slightly changed the code.
Now Inertia can go up to 35, and for every point over 10 it gets a 4% chance to wound (or get wounded) more severely (up to 100% max chance).
Cavalry units only get the chance to be wounded more for each point of Inertia over 10.
This should reward being able to Storm from further away and should make Anti-Cavalry stronger against horses...
https://www.sendspace.com/file/37wy3m
Repeating tests with the changed code:
Test 1:
Armies:
45 Pikemen (1170 Corn) vs 23 Knights (1150 Corn)
(both in a 15 columns formation)
Pikemen won
100 battles on a total of 100
Test 2:
Armies:
45 Sword Fighters (1665 Corn) vs 33 Knights (1650 Corn) (no storming)
(both in a 15 columns formation)
Sword Fighters won
12 battles on a total of 100
EDIT: With the Sword Fighters Storming at the start of each battle and the Knights not dodging it, the result is that Sword Fighters won
59 battles on a total of 100
In my opinion it looks better now... doesn't it?
That would still make sword fighters stronger, I think they don't need a boost either. :S For militia it would be nice.

Well, not really: Cavalry units can dodge a Storm Attack, ranged units are dead anyway if caught in melee battle, and Anti-Cavalry units are the ones who get the bonus against a storming opponent...
P.S. Taking note of the changed code:
KM_Units.pas
- Code:
procedure TKMUnit.UpdateInertia;
begin
//Now we check for the inertia bonus due to charging or storming
if ( not (GetUnitAction is TUnitActionFight) ) and (fUnitType in [low(UnitGroups) .. high(UnitGroups)]) then
begin
if (GetUnitAction is TUnitActionStormAttack)
or ( (GetUnitAction is TUnitActionWalkTo) and (UnitGroups[fUnitType] = gt_Mounted) ) then
begin
if fInertia < 35 then Inc(fInertia);
end
else if fInertia > 0 then Dec(fInertia);
end;
end;
KM_UnitActionFight.pas
- Code:
end else begin
IsHit := True;
if (fOpponent.UnitType in [low(UnitGroups) .. high(UnitGroups)]) and (UnitGroups[fOpponent.UnitType] = gt_AntiHorse) then
begin
if ((fUnit.Inertia-10)*4) < KaMRandom(101) then fUnit.HitPointsDecrease(1, fOpponent)
else fUnit.HitPointsDecrease(2, fOpponent);
end else begin
if (((fUnit.Inertia-10)*4) < KaMRandom(101)) or (UnitGroups[fUnit.UnitType] = gt_Mounted) then fOpponent.HitPointsDecrease(1, fUnit)
else fOpponent.HitPointsDecrease(2, fUnit);
end;
end;
[/size]
Re: Official KaM Remake Ideas topic
PostPosted: 21 Jan 2015, 19:44
by Esthlos
Warning: Long post.
Lots of numbers were harmed in making it, too.
Comparing the current system (CS) and the proposed system (PS)
Pikemen vs Knights balance
200 battles per test.
Each troop was on a 15 columns formation.
Positive numbers of survivors are Pikemen surivors; negative numbers are Knights survivors
Test 1
45 Pikemen vs 30 Knights
CS:
200 won vs 0 won
Survivors
- Code:
36;34;32;30;33;32;32;24;36;35;36;33;28;35;28;31;39;35;38;31;33;33;36;36;41;39;32;32;32;34;38;36;41;35;35;33;32;35;32;36;34;36;33;37;34;34;28;33;36;30;36;34;35;39;37;38;37;39;31;34;31;31;34;31;33;38;36;33;31;33;25;38;34;28;32;34;37;34;31;38;35;36;35;33;36;32;30;35;32;37;29;34;31;34;33;37;36;32;33;33;34;35;32;37;35;38;36;31;26;35;33;25;36;38;34;36;36;37;36;30;31;34;36;35;27;28;35;31;32;40;37;30;28;23;32;26;37;30;37;39;38;31;37;29;37;36;36;32;31;33;33;34;30;31;37;31;23;36;35;40;39;35;34;31;32;34;36;38;39;36;30;35;31;34;21;33;34;31;39;37;35;34;36;30;35;36;35;33;39;30;33;36;31;39;38;38;37;35;28;27
Average number of survivors: 33,76
standard deviation: 3,55
PS:
197 won vs 3 won
Survivors
- Code:
24;18;20;18;36;31;36;23;22;20;13;8;30;18;27;32;31;16;26;25;38;32;37;27;25;32;23;18;13;28;24;28;25;30;14;36;25;31;33;23;20;15;5;21;18;22;25;28;17;14;30;32;25;17;25;28;22;33;25;27;3;31;27;29;27;30;28;25;27;10;21;29;34;6;29;23;26;20;19;29;18;30;15;19;20;29;25;31;30;27;28;31;28;21;8;30;20;13;25;21;21;17;19;31;26;25;20;30;18;36;24;31;34;20;25;25;25;28;26;29;27;23;28;24;24;23;27;17;24;9;36;28;24;12;19;26;31;32;35;25;34;19;28;34;29;16;29;29;14;15;32;19;15;14;33;24;29;28;16;21;13;29;28;33;7;16;18;26;26;24;28;27;23;16;30;25;30;23;26;34;15;14;25;24;32;17;28;27;33;17;34;27;16;24;24;24;17;11;10;7
Average number of survivors: 23,99
standard deviation: 7,10
Student's t test: 17,40
The two results are statistically different. (p<0,01)
Test 2
30 Pikemen vs 30 Knights
CS:
199 won vs 1 won
Survivors
- Code:
17;19;11;14;20;18;18;19;15;15;17;19;20;20;18;18;24;22;7;11;20;13;16;18;19;10;17;10;17;22;18;20;13;29;14;19;24;26;24;17;24;20;18;26;26;23;26;21;22;18;20;15;20;24;20;11;23;26;19;19;22;18;27;17;19;14;16;9;19;23;22;22;19;19;23;12;26;26;14;17;18;21;20;6;21;20;22;14;17;18;23;24;21;17;16;17;25;20;15;13;15;12;24;21;14;22;19;13;19;19;20;24;20;24;13;19;8;16;21;15;20;20;18;24;17;19;16;25;12;18;20;15;24;13;23;22;15;21;17;19;19;24;21;18;13;24;21;21;22;14;23;8;25;21;17;24;24;21;12;15;19;15;13;18;11;17;12;20;20;19;27;16;14;23;22;23;18;22;6;4;2;3;3;2;2;-3;7;0;7;4;4;4;4;-2;3;9;-6;10;3;9
Average number of survivors: 17,04
standard deviation: 6,48
PS:
131 won vs 69 won
Survivors
- Code:
10;4;3;0;3;1;1;11;14;11;9;13;12;2;4;-1;9;16;15;16;7;-1;-10;2;-9;-8;-10;-5;-11;-17;-14;-12;1;7;1;7;12;0;-4;1;3;-5;8;1;4;8;7;11;0;-11;2;-2;-3;1;1;-5;-6;-7;3;-4;-3;-1;1;7;-2;0;7;6;15;9;4;9;11;16;0;16;5;-4;10;0;5;8;-8;-1;8;-7;2;11;9;-2;-7;5;4;7;1;8;5;-2;-2;3;14;15;12;11;16;4;9;15;14;14;14;0;6;8;3;5;-3;-4;3;3;-6;-1;1;14;1;-2;-9;-7;2;8;6;10;10;9;1;9;13;2;9;13;8;-1;-8;-1;5;7;-8;-2;-1;-4;-10;-6;-13;-4;-7;-12;-9;2;-4;0;3;1;0;-5;11;5;-1;5;2;8;-7;-15;-7;-7;8;13;6;3;9;4;1;8;8;5;7;11;8;-4;-5;-6;0;10;14;-7;11;4;-6;-2;3;3
Average number of survivors: 2,61
standard deviation: 7,36
Student's t test: 20,81
The two results are statistically different. (p<0,01)
Test 3
15 Pikemen vs 30 Knights
CS:
8 won vs 192 won
Survivors
- Code:
6;5;8;3;6;7;23;6;0;8;15;8;11;8;7;6;7;3;8;13;9;-11;-8;-13;-13;-6;-2;-16;-3;-15;-4;-11;-8;-17;-13;-14;-13;-6;-13;-15;-16;-14;-7;-14;-12;-18;-7;-16;-7;-11;-14;-15;-18;-16;-17;-12;-11;-17;-8;-15;-11;-5;-13;-10;-10;-18;-12;-13;-11;-16;-15;-19;-12;-2;-17;-5;-10;-5;-11;-10;-2;0;-4;-10;-1;3;-7;1;-3;-10;-8;-8;-8;-8;-7;4;3;-7;-5;-1;-13;-6;-3;-2;-8;-12;-2;-3;-5;-5;-5;-1;0;-3;-6;-2;-5;-5;-8;-6;-5;-6;-6;-13;-9;-2;0;-9;-9;-10;-6;-5;-3;0;-2;-8;-6;4;-1;-5;-5;-5;-3;3;0;-6;-9;0;-6;-9;5;-10;-8;-1;0;-11;0;-2;-11;-12;-6;-9;-2;-3;-5;-10;-4;-8;-1;-1;-5;-5;-6;5;-7;-9;-4;-7;-11;-11;-10;-9;-3;-1;-5;-9;-8;-10;-11;-9;0;-9;3;-6;-7;-8;-11;-10;-3;-8
Average number of survivors: -5,68
standard deviation: 6,99
PS:
6 won vs 194 won
Survivors
- Code:
-21;-18;-12;-13;-21;-15;-19;-8;-20;-15;-13;-24;-19;-16;-14;-18;-21;-19;-20;-19;-14;-3;-4;-7;-9;-5;-2;-6;-6;-5;-2;-8;-17;-19;-18;-24;-19;-19;-11;-7;-13;-12;-13;-5;-20;-21;-16;-11;-10;-7;-13;-22;-15;-18;-19;-10;-18;-13;-14;-16;1;-18;-15;-12;-17;-18;-10;-16;-18;-7;-19;-17;-15;-18;-20;-20;-16;-14;-4;-13;-15;-12;-12;-14;-17;-20;-5;-10;-12;-9;-13;-8;-22;-8;-7;-7;-19;-14;-16;-21;-20;-13;-19;-12;-7;-14;-11;-15;-16;-15;-19;-8;-11;-21;-16;-13;-20;-15;-19;-14;-13;-6;-17;-15;-16;-12;-14;-6;-17;-20;-14;-12;-12;-19;-10;-1;-12;-14;2;-10;-18;-5;-13;-12;-15;-10;-7;-3;-3;-18;-1;-20;-4;-4;-13;-12;-18;-16;-8;-14;-8;-6;-9;-9;-7;-12;-17;-13;-18;-18;-14;-5;-6;-11;-15;-15;-22;-18;-15;-9;-1;-16;-17;-17;-16;-14;-11;-18;-13;-15;-14;-16;-23;-2;-18;-12;-8;-12;-14;1
Average number of survivors: -13,18
standard deviation: 5,55
Student's t test: 11,88
The two results are statistically different. (p<0,01)
Opinions, pwease?

Re: Official KaM Remake Ideas topic
PostPosted: 21 Jan 2015, 19:59
by The Dark Lord
Anything that results in knights killing more pikemen than with the current system is bad. This means that pikemen can't do anything (while they are supposed to counter knights), because in a normal game, there is a lot of ranged support. With the knight having more hit points AND the shield bonus, the pikeman has no chance. As I already said, I don't like the idea of knights becoming stronger, not even if it was just 0.5%.
Re: Official KaM Remake Ideas topic
PostPosted: 21 Jan 2015, 20:16
by Ben
Well I'm actually fine with knights being stronger. Actually if the current system had knights have higher attack and MAYBE even an extra hit point (I'd prefer more armor) then I think that would be great if all anti horse units had a higher bonus against horses. Perhaps even 2x. I think right now anti horse units are a bit too weak. The best counter for knights is knights, themselves it seems. I played a game of furious warriors where my entire team made pikes and the entire enemy team made horses. I know it's not a fair comparison, but even in many situations where the pikes outnumbered the knights, we still lost. This might be because knights are so much faster so they "wrap around" the pikes and get flank bonuses before the pikes even get kills.
In summery, if knights and scouts had an overall better combat ability and anti horse units' bonus heavily increased, perhaps we could see a higher role of pikes and lances....
Re: Official KaM Remake Ideas topic
PostPosted: 28 Jan 2015, 21:45
by Ben
Can we please be able to change the game speed after returning to lobby? I would like the possibility to play the first 10-15 minutes of the game with 2x speed and then turn the speed down a bit.
Re: Official KaM Remake Ideas topic
PostPosted: 29 Jan 2015, 08:18
by Krom
Game speed right now is split between economy and fighting. Using lobby to change the speed at any given time does not sounds like an improvement, more like a patch for "allow to change game speed freely during the match"
Re: Official KaM Remake Ideas topic
PostPosted: 29 Jan 2015, 09:47
by Rhaenon
Anything that results in knights killing more pikemen than with the current system is bad. This means that pikemen can't do anything (while they are supposed to counter knights), because in a normal game, there is a lot of ranged support. With the knight having more hit points AND the shield bonus, the pikeman has no chance. As I already said, I don't like the idea of knights becoming stronger, not even if it was just 0.5%.
I agree, I thought the idea was to make lancers and pikemen stronger. But maybe I misunderstood.
As I understood, pikemen and lancers are standing still, defending, and troops crash in to them by either storm attack or just knights they die. Instead of the lancers & pikemen. While when storming (melee/cavalry) at cavalry or regular melee troops standing still, they are buffed since they have the advantage here.
So while melee (to a certain degree) and cavalry (more so) get a bonus for running in to troops (not anti-cavalry) standing still, the anti-cavalry units get a bonus for defending when such a thing happens for both melee (to a certain degree) and cavalry (more so).
Now this is conflicted, of course. If cavalry gets a bonus for storming troops and anti-cavalry get a bonus for fending this storm off, you end up with the exact same thing we have now. Therefore I think the bonus the anti-cavalry get should be greater than the bonus both melee and cavalry get.
But that's just the way I see it and I thought this was the proposed system.