ihhub / fheroes2

fheroes2 is a recreation of Heroes of Might and Magic II game engine.
https://ihhub.github.io/fheroes2/
GNU General Public License v2.0
2.69k stars 375 forks source link

Way too many monsters are joining you and AI runs around with questionable army #5670

Closed fidde9202 closed 1 year ago

fidde9202 commented 2 years ago

Preliminary checks

Platform

Windows

Describe the bug

Something is completely off with % chance of monsters joining your army. Almost every monster that i encounter will join my army, and this is without diplomacy. Feels like a 50% or higher chance, which have made the hardest maps super easy and kinda kills the mood for me. Also i see the enemy running around with odd choices of army, such as a single halfling "why do they pick a slow unit when they got boars in their castle?". If you wanna program the AI to use scouts, please make them choose a fitting unit for it. And 0.9.17 still has issues with ai defending castles, but instead of it being empty they just recruit very few or a single unit, eventhough they got gold and units availiable in town. On the save i provided here you can see them putting a single halfling in the warlock castle.

Save file

savefileh2 - Copy.zip

Additional info

It would also seem like the bonus chance of having an identical unit in your army almost gives you a guaranteed chance for the monster to join you, while it should just be a slight bonus. Please look into this, as it's very gamebreaking.

oleg-derevenetz commented 2 years ago

It would also seem like the bonus chance of having an identical unit in your army almost gives you a guaranteed chance for the monster to join you, while it should just be a slight bonus.

It doesn't work that way in HoMM2. The mood of a monster's squad (friendly or hostile) is determined randomly at the start of the map (except when count of monsters in the squad is specified directly by the creator of the map, such squads are always hostile). Squads with a friendly mood will join if all the following conditions are true:

  1. In the hero's army there is a place for a new squad OR a squad of the same creatures;
  2. The strength of the hero's army exceeds the strength of the neutral squad by more than 2 times;
  3. The hero doesn't have the Hideous Mask.

That's all.

zenseii commented 2 years ago

Hi @oleg-derevenetz, @LeHerosInconnu and @Branikolog.

I'm posting here rather than the PR because I believe a PR should contain mostly discussion about the code in order to not become hard to read later on.

I have been thinking about this issue for the last couple of days but I'm still not sure where I stand on it. I'll share my considerations here. Initially I completely agreed with @oleg-derevenetz's solution of reverting things to how they work exactly in the original game (OG). The argument here being that it is completely unacceptable to change the core rules of the game so that it becomes an easier game, and I still believe this.

So while it is sad to see such a feature disappear, it seemed necessary to avoid ruining the game, as reported by this issue creator for example. However, the doubt I've been having later on is if it really does alter the difficulty. Yes, free/compatible army slots and enough money are prerequisites that will always be there, but will things actually have changed after @oleg-derevenetz's PR?

At first thought, yes it does make it more difficult, since you will not always be granted creatures to join you when they could, because you won't always have a free slot and/or enough money (in the case of diplomacy). However, expert players who know the intricacies of the game, like needing more than 2x (:joining) and 5x (:fleeing) army strength, will know this rule and naturally will just reload and do things over again.

And this is where I am not sure that things will change, and what I believe might have been the thought process behind this "Quality of Life" change (that wasn't purely a QoL change).

We cannot use the argument that saving and reloading is cheating or an incorrect way to play the game, because we have validated this playstyle by allowing the AI to use this in PR #5202.

So this is why I'm neither for nor against this PR. It ensures that novice players will have less creatures joining them, but expert players, at least when only up against the AI, will undoubtly apply save-reload tactics. So this could be considered QoL for expert players who would just end up saving and reloading more often as a result of this PR.

This would not be true for multiplayer/online matches, where a player after this PR will be forced to always remember this before attacking a neutral army and will suffer if they don't.

I think a lot can be said about what sort of considerations this gameplay forces players to make: For example, "Should I dismiss my 30 halflings before approaching this army of lots of mages in case they might want to join me? And does my army really have 2x their strength? And what about after dismissing?". Etc...

Also, as a final note I want to add that the original Heroes 2 designers' idea to lock creatures' willingness to join you to whether you have a free slot or enough money is not design I would agree with. Why would my army of 5 stacks of black dragons be so disgusting to a neutral army of red dragons that they won't even offer to join me, whereas if the stacks are 4 with the same number of units they will? Anyways, Heroes 2 was released like this and we'll just have to figure out how to preserve this design.

@oleg-derevenetz's PR is indeed the most straight-forward solution to this and it might just be something we will have to live with until we can design a clever solution around it.

LeHerosInconnu commented 2 years ago

Hello @oleg-derevenetz, @zenseii and @Branikolog.

Here are my thoughts on the subject.

There is no increase in chance that wandering creatures will join the hero with the enhancements, so the game doesn't get any easier. It's just that it shows the players how many opportunities they missed to incorporate wandering creatures into their army because they forget to let a slot free, or because they didn't know it. In fact, with the enhancements, the average player becomes an expert player without even noticing. :rofl:

As expressed by many, the way the original game works is not a panacea. For example, with an army strong enough divided into five slots, the wandering creatures flee, while with the same army with at least one free slot, the wandering creatures join the hero.

With the return to the original way of fonctionning, experienced players will again have to make manipulations (free a slot, trade resources, or reload) before attacking the wandering creatures. And the average players will continue to remain average, still without noticing it. :)

zenseii commented 2 years ago

There is no increase in chance that wandering creatures will join the hero with the enhancements, so the game doesn't get any easier.

Yes, the chance remains constant either way. The core of the discussion is about removing what is arguably part of the original gameplay where you are forced to stop and make considerations before engaging a neutral army. This does create more suspense before commiting to attack a neutral army.

"Is the risk of engaging a battle with your army of 4 stacks of sprites instead of 5 against an army of potentially 5 stacks of trolls worth it?" Consider that you have enough sprites for them to be 2x the strength of the trolls.

LeHerosInconnu commented 2 years ago

Hello @zenseii,

There is no increase in chance that wandering creatures will join the hero with the enhancements, so the game doesn't get any easier.

Yes, the chance remains constant either way. The core of the discussion is about removing what is arguably part of the original gameplay where you are forced to stop and make considerations before engaging a neutral army. This does create more suspense before commiting to attack a neutral army.

"Is the risk of engaging a battle with your army of 4 stacks of sprites instead of 5 against an army of potentially 5 stacks of trolls worth it?" Consider that you have enough sprites for them to be 2x the strength of the trolls.

Actually, three stacks of sprites would be a better configuration. :rofl:

LeHerosInconnu commented 2 years ago

Hello @oleg-derevenetz, @zenseii and @Branikolog.

Here is the perfect example of the player who forgot to leave a free slot in his army, and who reloads a save.

The alliance bonus with certain creature types (among other cases) suffers from the same problem as the rallying of wandering creatures in the original game, namely not forgetting to leave a free slot in the army: https://github.com/ihhub/fheroes2/issues/5249, https://github.com/ihhub/fheroes2/pull/5507, https://github.com/ihhub/fheroes2/discussions/3309. Some may be familiar with these issues. :)

Edit 2022/07/25.

Here is "anoyther" example of this.

Branikolog commented 2 years ago

Hi, @LeHerosInconnu ! Actually, in many cases player has a higher chance to join creatures with diplomacy now. In the OG hero should have 1 empty slot to be able to join creatures. In current fheroes2 player can take 5 different creatures. So, his army becomes stronger by one additional stack of creatures, which increases his chance to join strong neutrals. So, current implementation allows to join stronger creatures, comparing to the OG implementation, where hero is weaker by one stack.

LeHerosInconnu commented 2 years ago

Hello @oleg-derevenetz, @zenseii and @Branikolog.

Hi, @LeHerosInconnu ! Actually, in many cases player has a higher chance to join creatures with diplomacy now. In the OG hero should have 1 empty slot to be able to join creatures. In current fheroes2 player can take 5 different creatures. So, his army becomes stronger by one additional stack of creatures, which increases his chance to join strong neutrals. So, current implementation allows to join stronger creatures, comparing to the OG implementation, where hero is weaker by one stack.

It is not a question of chance, but of the strength of the army.

It's true that it's not strictly identical to the original game (if the player does not think to leave a free slot) because the troop that was not removed from the army (to leave a free slot) is taken into account when calculating the strength of the hero's army.

So in this case, the player has the possibility to recruit wandering creatures even if he is below the threshold of more than twice the strength of the wandering creatures. But how many times in a scenario would that be?

And what about the cases, where the player could free a slot by reorganizing his army?

Hero with Diplomacy skill, free slots, enough gold, and more than five times the strength of the wandering creatures. Wandering creatures offer to join. Wandering join 007 Wandering join 008

Hero with Diplomacy skill, no free slots (same army as above), enough gold, and more than five times the strength of the wandering creatures. Wandering creatures flee. Wandering join 009 Wandering join 010

I don't mind that it's not strictly identical to the original game, because it saves a lot of manipulation before engaging the wandering creatures.

There is also the possibility of the option to activate, with the ability to adjust the threshold of the hero's army strength by means of a setting in a file. For example, change the threshold from more than twice the power of the wandering creatures to more than two and a half times the power of the wandering creatures.

In my opinion, diplomacy should be more dependent on available gold (and resources to trade for gold) than on a free slot in the hero's army.

LeHerosInconnu commented 2 years ago

Hello @oleg-derevenetz, @zenseii and @Branikolog.

We can have the same operation as the original game and keep the enhancements. :)

Let's consider this:

oleg-derevenetz commented 2 years ago

Why all these half measures? :) Let's just add one button "make it nice" or "win the map", so the player can just click on it and get his victory. I believe that a player should take a risk when choosing whether he should have additional slots occupied by a single units to take a retaliatory strike, or have a chance to join the stack of wandering monsters (or spend some mana on Visions spell). The same is with resources - he should take a risk when deciding should he sell his resources right now (and then buy them back for a more expensive price, if necessary) or not.

Branikolog commented 2 years ago

Hi, @LeHerosInconnu . Accidentally, I've got the same thoughts regarding diplomacy enhancement. :) But @oleg-derevenetz is right: until we decide how it would be implemented... All the rates and the logic... And all our team agree with it... Until then we should make the same to the original, since it is known, how out works and most players are familiar with it.

LeHerosInconnu commented 2 years ago

Hello @oleg-derevenetz and @Branikolog.

Why all these half measures? :) Let's just add one button "make it nice" or "win the map", so the player can just click on it and get his victory. I believe that a player should take a risk when choosing whether he should have additional slots occupied by a single units to take a retaliatory strike, or have a chance to join the stack of wandering monsters (or spend some mana on Visions spell). The same is with resources - he should take a risk when deciding should he sell his resources right now (and then buy them back for a more expensive price, if necessary) or not.

Hi, @LeHerosInconnu . Accidentally, I've got the same thoughts regarding diplomacy enhancement. :) But @oleg-derevenetz is right: until we decide how it would be implemented... All the rates and the logic... And all our team agree with it... Until then we should make the same to the original, since it is known, how out works and most players are familiar with it.

Okay then, let the player make a save before engaging the wandering creatures, and if he doesn't like the result, let him reload the save like in the original game. :)

oleg-derevenetz commented 2 years ago

Okay then, let the player make a save before engaging the wandering creatures, and if he doesn't like the result, let him reload the save like in the original game.

Right now I'm watching a HoMM3 stream where the streamer is doing just that, trying to defeat an enemy hero in a battle by constantly reloading from a save file and trying this and that literally for hours. So what? :) If the player made the wrong decision, he should suffer - one way or another.

LeHerosInconnu commented 2 years ago

@oleg-derevenetz.

Okay then, let the player make a save before engaging the wandering creatures, and if he doesn't like the result, let him reload the save like in the original game.

Right now I'm watching a HoMM3 stream where the streamer is doing just that, trying to defeat an enemy hero in a battle by constantly reloading from a save file and trying this and that literally for hours. So what? :) If the player made the wrong decision, he should suffer - one way or another.

This example of replayed combat is a slightly different situation. :)

Honestly, if the player can perform the actions (reorganize his army, etc.) before engaging wandering creatures, and he forgets to do so, why force him to reload?

oleg-derevenetz commented 1 year ago

I believe we can close this. Diplomacy mechanics from the OG was restored by #5671, and wandering monsters are no longer joining left and right.