UnofficialCrusaderPatch / UnofficialCrusaderPatch2

Unofficial balancing patch installer for Stronghold Crusader 1
MIT License
430 stars 59 forks source link

Attention killing or removing manned siege engines leeds to an reduction of People Available to Place (Possible Workaround) #468

Open gunthermann opened 4 years ago

gunthermann commented 4 years ago

What i recommend to fix the Issue this entry is about I would like modders to search for the People Available to Place number that should be somewhere inside each Map/Save file so that we can retroactivly fix or change that number to suit our needs.

I just found out that siege engines if they get killed while being fully manned will only give back the one point that it took to make the siege engine itself but not the points for the engineers that man them which means that the unit limit will be decreased by the exact amount of engineers that the siege engine uses when a siege unit gets removed or dies. Example before the siege engine dies 100 People Before After the siege engine died 101 People however it should be 105 People (Fear Factor for Mace Man Damage) After

PS: Lions do not reproduce quickly enough to be the cause of this as in the time it took 3 normal macemen withouht positive fear factor to kill the siege tower only a single additional lion spawned PSS: The number on the counter is binding meaning it does stop new units from being placed even if we make it factually incorrect via this method it is therefore the real actual amount of units left not just an unsynchronized number meaning i really was only able to build 101 new macemen not 105 like i should be able to PSSS: I think its now a possibility that the game checks the number of People Available to Place not via searching for every unit on the screen but via a simple a Counter which simply decreases its number when a unit gets spawned or increases it when a unit dies/dissappears with some additional extra rules for special cases (but as we can see not enough special rules) this means that every map should save its People Available to Place inside the actual Map/Save file meaning we could modify it thereby increasing our People Available to Place near endlessly PSSSS: This might be the reason why siege engines were always manned in the later Stronghold games but then again in later games siege engine also need multiple peasants to be created YES This bug is also in Stronghold 1 and in Extreme

Deutsch und Kurz Jedes Belagerungsgerät das im bemannten Zustand zerstört gelöscht wird gibt nur eine Einheit fürs Einheitenbaulimit zurück das heißt das die Baumeister die das Gerät bemannen ihre Kapazität nicht zurückgeben und daher jedes mal wenn ein Gerät stirbt das Einheitenlimit um genau die Menge der Baumeister Besatzung reduziert wird Mange 2 Bockie 4 etc. So weit so schlimm aber aufgrund dieses sache und der sache mit den Tunnelbauern kommt mir die idee das dass Einheitenlimit eigentlich nur durch einen simplen Zähler bestimmt werden müsste der einfach nur zum Limit Addiert oder Subtrahiert wenn eine Einheit stirbt oder erscheint sowie ein paar andere Sonderregeln (aber wie man sieht haben die Entwickler nicht an alles gedacht) Das heißt das irgendwo innerhalb jeder Map/Save(Speicherstand) Datei irgendwo eine Nummer ist die genau besagt wie viele Einheiten das Spiel denkt auf der Map sind.Diese Nummer gilt es zu finden den dann kann man solche Fehler im nachhinein korrigieren oder sogar viel mehr Einheiten aufeinmal auf eine Karte platzieren und ja der fehler taucht auch in Stronghold 1 und Extreme auf

J-T-de commented 4 years ago

Just to link the tunneler post you mentioned: https://github.com/Sh0wdown/UnofficialCrusaderPatch/issues/428 .

Krarilotus commented 4 years ago

Actually, if you look into the army tab of that player loosing the siegeengines, the engineers are still counted and displayed there

Rakso69 commented 4 years ago

That happens because there is no such thing in the game as peasants limit. The true in-game limit is the sprites limit. A sprite is everything capable of rotation animation, from troops, siege equipment, and up to animals, even such as ravens from fear factor wall skulls count into it too. The siege tower is a sprite.

Xebenkeck commented 4 years ago

Destroying the siege equipment does not remove the engineers from the game count. If you go into the army tab like Krarilotus mentioned it will still show the engineers still as part of the army.

This bug also horribly skews the greatest lord tab. I'm sure people have noticed when killing The Wolf or Saladin that the greatest lord tab will show them having like 50 units, when their castle is completely destroyed and every unit dead.

Not sure what specifically causes it, but it only happens to the AI Lords when using Harassing Siege Equipment and Tower Defenses. AI's when they use Siege Equipment in their attacks(like the pig using catapults and battering-rams) when the attack has failed, the engineers used for the siege equipment will respawn at the location of the siege equipment(even if it died) at the end of the attack. Usually the engineers will then die by archers because there are no other units around to target. But when they die in this fashion it reflects correctly in the in-game counts.

This however does not happen when harassing siege equipment and tower defensive units are destroyed, the engineers are never killed off with them. Thus always incrementing the army tab, the count in the greatest lord, and the overall unit/sprite limit.

In my experience for human players it is inconsistent, sometime when your catapult dies it will subtract the engineers, other times it won't. This I have no idea what causes it on the human player side.

This is a bug. I hope you guys can find it's source. Or make a work around like when a siege piece dies it causes the original engineers to respawn always, like they do when the AI sieges end.

Also this may or may not be directly related to issue #371 . I suspect maybe why the cpu's don't continue to make harassing siege equipment is due to the game thinking the engineers are still alive, so it won't make more siege equipment because it thinks its at the max limit.

I hope Sh0wdown prioritizes this bug, for me and all the years i have played crusader, this is the biggest and most noticable bug left in the game.

Admiral-Gumpert commented 4 years ago

I agree, Usually the AI will overbuild tents on current siege engines , Someone will have to test this carefully on the normal crusader game and detect if those lost engineers are still counted or not.

Admiral-Gumpert commented 4 years ago

Also sometimes a trashed AI with no single unit around and a destroyed castle will usually have more than 10 counted units in the "order of merit" tab , I assume they are the lost counted engineers

Krarilotus commented 4 years ago

@Admiral-Gumpert yes the engineers are still there. You can test that youself with an 'active spectator map'. How to make one: https://www.youtube.com/watch?v=XGBPj8KhOzo

or just download them off my AI-test-map suite that i use for my efficient castles: https://github.com/Krarilotus/Stronghold-Crusader-efficient-AI

GRhin commented 4 years ago

One other point here, is that seige engines lost does not effect the units lost count. Neither does laddermen oddly enough. Im guessing a unit death function is not called when seige equipment is destroyed, finding that function and adding a check for seige equipment, or finding the function that is called when seige equipment health gets below 1 and adding a call to the unit death function might be what is needed. Note I dont know how the code works, this is an assumption based solely on observed results (lost units not increments, killed units not increments, current units not decremented, available unit space not incremented) Edit: this information comes from my research into where greatest lords stats are kept. Another thing I found was a weighted kill/loss value - increases by 1 for a slave 4 for spear 10 for pike etc which is also unaffected by seige equipment destruction. I suspect that there is also a weighted current troop count somewhere, and this is used for score, or for indicating an AI should be scared. This would indicate that seige equipment has no impact on score or intimidating ai further than what the engineers are worth (5 points each). Again it is speculation, but interesting nevertheless.