Combat_Rounds effect: to kill or to survive?

Contribute, display and discuss rulesets and modpacks for use in Freeciv here.
bard
Veteran
Posts: 121
Joined: Fri Jun 14, 2013 2:00 pm

Re: Combat_Rounds effect: to kill or to survive?

Post by bard »

I think this only_killing_makes_veteran is good enough for gameplay purposes, and to avoid possible exploits.
One disadvantage, as pointed by Corbeau, is that veteran ranks would stop being "realistic", because units that survived many fights, damaging enemy units and losing hit points, would have no chance to get veterancy in the case that none of the enemies died.

Corbeau suggests to link the chances of veterancy to the hit points lost in battle. But I think the key factor to avoid exploits is to give chances of gaining veterancy only to units that had some chance to die in battle. I'd suggest linking the chances of getting a veteran rank to the chances of being killed in that battle, but I think cazfi patch is a simpler solution, and good enought for me.
cazfi
Elite
Posts: 3069
Joined: Tue Jan 29, 2013 6:54 pm

Re: Combat_Rounds effect: to kill or to survive?

Post by cazfi »

Corbeau wrote:I'm not sure we are discussing the same thing. I'm saying that a Dragoon going around killing Workers shouldn't advance many - if any - veteran levels, while a Phalanx unit barely surviving the Dragoon attack should have a fair chance to get a veteran level, even if it didn't kill the Dragoon.
Yeah, but that's not a new issue with Combat_Rounds effect of S3_0, which we are trying to get working here. I'd say that overall overhaul of veteran level gaining system need to wait for freeciv-3.1 at this point.
cazfi
Elite
Posts: 3069
Joined: Tue Jan 29, 2013 6:54 pm

Re: Combat_Rounds effect: to kill or to survive?

Post by cazfi »

cazfi wrote:overall overhaul of veteran level gaining system need to wait for freeciv-3.1 at this point.
-> Feature #804347
cazfi
Elite
Posts: 3069
Joined: Tue Jan 29, 2013 6:54 pm

Re: Combat_Rounds effect: to kill or to survive?

Post by cazfi »

Corbeau wrote:So, I propose that the chance for veterancy gain is calculated as follows:

A(ttacker) = Att_strength * HP * FP
D(efender) = Def_strength * HP * FP

Defender_vet_gain_chance = A / (A + D)

Attacker_vet_gain_chance = D / (A + D)

This would only be the BASE gain chance. It would be adjusted by what vet level the unit already has, as it is defined in the present ruleset.
Nobody has proposed better formulas during the last 2.5 years, so I guess that's what we try to get in to 3.1.
Lachu
Elite
Posts: 472
Joined: Sat May 04, 2013 2:19 pm

Re: Combat_Rounds effect: to kill or to survive?

Post by Lachu »

For gameplay purpose, I propose as follows. Read careful, because this idea could be hard to implement.

Add to each unit list of hp taken. This list is telling how many percent of hp which unit taken. When unit is killed, we gain change to get veteran based on percent_taken.

But... When unit heal, substract from percent_taken value of UNIT_HP_HEAL / UNIT_MAX_HP * percent_taken, so when unit heal in 100%, the value will be 0 for each attacker. Also, when new unit attack, he got another percent_taken entry in victim's list.

It is hard to realize, because you must keep an eye on attacker destroying event.
cazfi
Elite
Posts: 3069
Joined: Tue Jan 29, 2013 6:54 pm

Re: Combat_Rounds effect: to kill or to survive?

Post by cazfi »

Lachu wrote:For gameplay purpose, I propose as follows. Read careful, because this idea could be hard to implement.

Add to each unit list of hp taken. This list is telling how many percent of hp which unit taken. When unit is killed, we gain change to get veteran based on percent_taken.

But... When unit heal, substract from percent_taken value of UNIT_HP_HEAL / UNIT_MAX_HP * percent_taken, so when unit heal in 100%, the value will be 0 for each attacker. Also, when new unit attack, he got another percent_taken entry in victim's list.

It is hard to realize, because you must keep an eye on attacker destroying event.
I'm not sure I understood correctly, but if I did you are suggesting that we keep track of how much of the each damaged unit's damage is caused by each other unit, not just over the combat event but all the way until the unit dies even if that's hundreds of turns later. And when that unit dies completely, all those who had earlier damaged it, may finally cash in veterancy. Wouldn't it a bit weird to not get veterancy immediately after the combat, but at semi-random time much later when the opponent dies in the other side of the world, in a battle that unit gaining veterancy has nothing to do with? And yes, that also implies already dead units gaining veterancy.
Lachu
Elite
Posts: 472
Joined: Sat May 04, 2013 2:19 pm

Re: Combat_Rounds effect: to kill or to survive?

Post by Lachu »

You have right, but I do not mean to do not remove entries from list. Unit will heal, so the entries automatically by removed if drop to 0. It will be subtracted proportionally for each attacker.

So. Unit have 10 hp max. First unit took 2 hp, so it i 20%. Second unit took 4hp, so it is 40%.

Unit heals 2hp in first turn, so first attacker share level drop to 13%. Second unit victory share will drop to 27%.

Calculation is:
1'st unit) 20% * 1/3 = 13%
2th unit) 40% * 1/3 = 27%
----------
+ 40% gives 4 hp still not heal

1/3, because 2 hp healed is 6 hp total hp not still heal.

On second turn:
1st unit) 13% * 1/2 = 6%
2th unit) 40% * 1/2 = 20%
---------
+ 26% gives 2hp still not heal

And on third turn each entry will be removed from the list.

You can also add substract mechanism by some amount of share per turn (not only by heal ratio), but it requires to full iterate on each unit per turn.

Also, to avoid memory problems, size of attacker list could be limited, so if list is full and unit takes less hp than last unit in list, it would not be added to list.
Post Reply