s25client icon indicating copy to clipboard operation
s25client copied to clipboard

Conquerer gets killed

Open Spikeone opened this issue 4 years ago • 8 comments

When a soldier conquers a building, the conquerer may be intercepted by attacking soldiers.

This should not happen with a soldier, fighting at a flag and defeating the last soldier in that building. This (possibly) results in an empty building.

Around GF 173000, at 42:12 White attacks green Green soldier gets defeated White general gets intercepted by yellow soldier White general dies -> Green building is occupied with 0 soldiers

grafik grafik

2021-12-03_16-32-04.zip

Spikeone avatar Dec 03 '21 18:12 Spikeone

From the code I can tell that this is wanted behavior: https://github.com/Return-To-The-Roots/s25client/blob/6561079cf1d2bc27e397b24376c63a1e63c7f37d/libs/s25main/figures/nofAttacker.cpp#L427-L430

  • Attacker kills defender
  • If no more defender found look for hostile soldiers around
  • If none found, conquer building.

An empty building can be conquered with a single soldier, destroyed by a single catapult stone or reoccupied by the original player. Kinda makes sense to me. E.g. you have "aggressive defenders" and as long as someone challenges you you can't just walk in, can you?

I know that situation is rare but what is it like in original S2? Can't really remember all details but isn't is possible that more than 1 defender goes out of the attacked building to fight the attacker? E.g. You attack with 2 soldiers a building with 2 defenders, one walks out to fight the first attacker before he reaches the flag, the other does too when the 2nd attacker reaches the flag. Then at the flag the attacker wins, but the other fight is won by the defender. You don't want the attack to conquer the building in this case, do you?

Flamefire avatar Dec 03 '21 19:12 Flamefire

The behavior you described in the last paragraph is the settlers 2 tng way of handling this. You have to defeat all soldiers of a building before you can conquer it.

But in settlers 2, as soon as the last soldier in a building was defeated, you lost it. No matter what. Even if you had like 8 defenders out who were on their way back - if the last soldier was defeated, you lost the building. This is the reason why attack potential vs defend potential was an important part of the tactics.

In most cases the battle is 1 vs 1 (player wise), so that the situation as in the replay doesn't occur often.

But as stated, a soldier fighting occupying soldiers can't be intercepted anymore, so if he defeats the last one, no other soldier can challenge him anymore (as of settlers 2 original behavior). In terms of tactics this does make sense, and therefore the gameplay. From a logical viewpoint it doesn't. So I'd vote for the original approach which means the contesting soldier can't be intercepted anymore

Spikeone avatar Dec 03 '21 23:12 Spikeone

Ok so basically: Remove that FindEnemiesNearby call. That would be an easy fix. Just want to make sure this is what you mean. And it also means that lot's of existing replays may not play anymore (async) due to that changed behavior

Flamefire avatar Dec 04 '21 10:12 Flamefire

As far as I can see: yes. The english comment does indicate, that the rttr behavior was changed at some point, doesnt it?

Spikeone avatar Dec 04 '21 11:12 Spikeone

@Flow86 Any opinion from your side?

Flamefire avatar Dec 05 '21 11:12 Flamefire

can we make this optional in the addon settings? defaulting to original s2 behavior.

Flow86 avatar Dec 08 '21 12:12 Flow86

FWIW, I'm pretty sure I saw this happen in the original S2 Gold back in the day. I'd fight a friend in epic battles, where we'd attack each other with hundreds of soldiers, multiple buildings at the same time, and sometimes, rarely, you suddenly had a military building with nobody in it. Unfortunately there was no replay feature back then so we never figured out how that would happen, but it always looked like pure chaos anyways. You could still attack such a building, and the attacking soldier would just walk in and conquer it. You could also have a fresh soldier walk back in from HQ and re-stock the building. So at least it kinda worked properly. I'd consider it a bug nonetheless, so maybe add a feature to prevent this. I mean, another thing that happened in these large fights too sometimes was soldiers just freezing in place and never moving again. I think I saw both things independent of each other, but since this is 25 years ago, I wouldn't swear my life on it.

srett avatar Apr 02 '22 10:04 srett

Agree with srett, this is definitely how it was in the original S2. Remember having empty military buildings against AI multiple times.

However, from what I remember there are 2 versions, 2nd one is most likely a bug.

  • if a building is attacked and defenders (not attackers) are coming to defend against the last attacker and defeat him, they will go back to their military building, leaving the defended one empty; this seems intended behaviour.
  • now the weird one: say a soldier exits building to defend against 2 attackers, engages one of them. Another attacker bypasses and goes straight to the building to fight the only soldier left in there. Meanwhile, the first defender defeats attacker, queues back at military building to defend. The 2nd attacker defeats the last soldier in the building and now engages the queued up 1st defender. The defender beats the attacker. Now, instead of going back into the military building, this soldier won't - but will run around aimlessly, finally finding their way back to a store house, leaving the building empty. This military building has now a capacity of one less than before, the soldier will not be replaced.

r-or avatar Apr 11 '22 00:04 r-or