Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limit the use of the Summon Boat by AI #8991

Merged
merged 8 commits into from
Aug 18, 2024

Conversation

oleg-derevenetz
Copy link
Collaborator

@oleg-derevenetz oleg-derevenetz commented Jul 26, 2024

In the original game, AI could not use the Summon Boat spell at all, and many of the original maps (including the maps of the original campaign) were created with this in mind. For example, on the famous "Broken Alliance" map, the powerful AI-only Purple hero sits on a separate island with a fully built castle and Titans, and, if this hero has the Summon Boat spell (which happens quite often), he may just summon a neutral boat at the beginning and kill everyone on the continent. Well, he can also get the Dimension Door spell and do the same, but the probability of this is still much lower (at least such a scenario was possible in the original game as well).

In fheroes2, however, the AI is able to use this spell. To mitigate the impact of this on the gameplay of the original maps, this PR at least prohibits the AI from summoning "neutral" boats (i.e. boats placed on the map by the map creator and not yet used by anyone).

@oleg-derevenetz oleg-derevenetz added improvement New feature, request or improvement AI Artificial intelligence behaviour labels Jul 26, 2024
@oleg-derevenetz oleg-derevenetz added this to the 1.1.2 milestone Jul 26, 2024
@Mr-Bajs
Copy link
Contributor

Mr-Bajs commented Jul 26, 2024

Yes, have made several plays on broken alliance recently and Purple just rushes trough the map.

However shouldn't the human player also be limited and not be able to summon neutral boats? That approach is more sensible in my mind having the AI and human as equal options as possible. That might break other maps and it is a departue from the OG but isnt it an departure from the OG either way...

@oleg-derevenetz
Copy link
Collaborator Author

oleg-derevenetz commented Jul 26, 2024

However shouldn't the human player also be limited and not be able to summon neutral boats?

In the OG, the human player (at least the first "in line") is not limited in this regard:

DOSBox.0.74-2.1.Cpu.speed_.max.100.cycles.Frameskip.0.Program_.HEROES2.2024-07-26.20-13-41.mp4

and this is what the developers of a number of maps were probably counting on.

That approach is more sensible in my mind having the AI and human as equal options as possible.

Providing AI and humans with as much equal opportunities as possible is not the end in itself IMHO. The real goal is a hassle-free gameplay (well, of course, not to such an extent that the game turned into a casual one), including the original maps developed at the time for the original game.

@Mr-Bajs
Copy link
Contributor

Mr-Bajs commented Jul 26, 2024

However shouldn't the human player also be limited and not be able to summon neutral boats?

In the OG, the human player (at least the first "in line") is not limited in this regard:

DOSBox.0.74-2.1.Cpu.speed_.max.100.cycles.Frameskip.0.Program_.HEROES2.2024-07-26.20-13-41.mp4

and this is what the developers of a number of maps were probably counting on.

That approach is more sensible in my mind having the AI and human as equal options as possible.

Providing AI and humans with as much equal opportunities as possible is not the end in itself IMHO. The real goal is a hassle-free gameplay (well, of course, not to such an extent that the game turned into a casual one), including the original maps developed at the time for the original game.

True. But same same could be said about the goal to resemble the OG as end goal in of itself. To depart from the OG game to an externt could make the game more hassle free and vetter overall. I could see this as an example of this. To no doubt to make some OG maps unplayable but the gain is an better and simpler game overall. Anyhow it would be wise to have a set of replacement maps for the broken maps if going that route.

Anyhwo limiting the AI though is probably a good enough solution, and fixes more problem than bit causes if any

@oleg-derevenetz
Copy link
Collaborator Author

To no doubt to make some OG maps unplayable but the gain is an better and simpler game overall. Anyhow it would be wise to have a set of replacement maps for the broken maps if going that route.

Many people play fheroes2 for nostalgic reasons. That's what they write in the Google Play reviews, something like "I was happy to play the maps and campaigns I've known since childhood". If we redo it too much, then it won't be HoMM2 anymore, but a completely different game, unfamiliar to these people. This, of course, does not mean that reasonable improvements are not needed, but IMHO OG maps and campaigns should still remain playable. At that time, the map creators widely practiced the approach of "locking" the "pre-pumped" AI opponents on the islands so that the human players would come to them when they were ready, but AI opponents could not come to human players too early (Broken Alliance, mission 8 of PoL campaign, etc). Allowing the AI players to summon neutral boats (often placed by the map creator for use by a human player) a kind of ruins that.

@ihhub
Copy link
Owner

ihhub commented Aug 17, 2024

Hi @oleg-derevenetz , would it be better not limit such behavior only for the original maps? We can distinguish map types during gameplay.

@oleg-derevenetz
Copy link
Collaborator Author

Hi @ihhub

would it be better not limit such behavior only for the original maps? We can distinguish map types during gameplay.

Do you mean to ban summoning only on the original HoMM2 maps, but enable it on Resurrection maps? Okay, let's do it this way.

@ihhub ihhub merged commit 9585796 into ihhub:master Aug 18, 2024
20 checks passed
@ihhub
Copy link
Owner

ihhub commented Aug 18, 2024

@oleg-derevenetz , thank you so much for this change!

@oleg-derevenetz oleg-derevenetz deleted the ai-summon-boat-tuning branch August 18, 2024 02:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AI Artificial intelligence behaviour improvement New feature, request or improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants