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

Combat, Abandoned Mine, wrong number of ghosts, ghost groups and their positioning #5651

Closed
2 tasks done
LeHerosInconnu opened this issue Jul 14, 2022 · 15 comments · Fixed by #6875
Closed
2 tasks done
Labels
bug Something doesn't work logic Things related to game logic
Milestone

Comments

@LeHerosInconnu
Copy link

LeHerosInconnu commented Jul 14, 2022

Preliminary checks

Platform

Windows

Describe the bug

In fheroes2, the Ghosts guarding an Abandoned Mine should always be divided into five groups, as in the original game.
Otherwise it's too easy to slow down the single group with an easily accessible Slow spell, compared to the Mass Slow spell.

In original game:

Abandoned mine 001

Abandoned mine 002

Abandoned mine 003

Abandoned mine 004

Abandoned mine 005

Abandoned mine 006

In fheroes2:

Abandoned mine 007

2022-07-14.16-41-34.mp4

Edit 2022/07/16.

In fheroes2:

Abandoned Mine:

  • The number of ghosts can evolve over the combats, unlike the original game.
  • There is a different number of ghosts than in the original game.
  • There is a different number of ghost groups and the positioning of these ghost groups than in the original game.

In original game:

Abandoned Mine:

The ghosts can be divided into three configurations:

  • 5 groups
  • 4 groups
  • 3 groups

In original game:

Abandoned Mine H2 001

Abandoned Mine H2 009

Abandoned Mine H2 003

The number of ghosts does not increase or decrease if the combat is not won and another combat is started on the same abandoned mine.
If there are 30 ghosts at the beginning of the combat and the hero reduces this number to 15 ghosts before fleeing, there will still be 30 ghosts at the next combat.
If there are 30 ghosts at the beginning of the combat and the number of ghosts is increased to 45 ghosts before the hero flees, there will still be 30 ghosts in the next combat.

The number of ghost groups and their positioning in the battlefield hexes is related to the position of the abandoned mine on the adventure map.
Repeating the combat in the same abandoned mine always gives the same number of groups and the same positioning of the ghosts, even if the scenario is completely restarted.
The number of ghosts is different when the scenario is completely restarted, but is always the same during the same scenario session.
This is certainly determined at the start of the scenario for all abandoned mines.

@undef21 @LeHerosInconnu

It is mentioned here that the number of ghosts can be in the range of 30-60:

https://handbookhmm.ru/2-objects

This is consistent with what I have observed.

In original game:

30 ghosts:
Abandoned Mine H2 003

60 ghosts:
Abandoned Mine H2 001

Originally posted by @LeHerosInconnu in #5651 (comment)

Save file

Here are the save files:
Abandoned mine 01.zip

Additional info

Related issues: #5662, #5663.
Related discussion: #5664.

@LeHerosInconnu LeHerosInconnu added the bug Something doesn't work label Jul 14, 2022
@undef21
Copy link
Contributor

undef21 commented Jul 14, 2022

@LeHerosInconnu how ghosts should be placed in case total count < 5

@LeHerosInconnu
Copy link
Author

Hello @undef21,

@LeHerosInconnu how ghosts should be placed in case total count < 5

Four groups of one creature (4 ghosts), or three groups of one creature (3 ghosts), or two groups of one creature (2 ghosts), or one group of 1 creature (1 ghost), always from the hexagon at the top of the screen. :)

@oleg-derevenetz oleg-derevenetz added the logic Things related to game logic label Jul 14, 2022
@oleg-derevenetz oleg-derevenetz added this to the 0.9.18 milestone Jul 14, 2022
@undef21
Copy link
Contributor

undef21 commented Jul 14, 2022

Hm, according fheroes2 code the total ghosts count is 39-45. Does OG have same count?

@oleg-derevenetz
Copy link
Collaborator

Hm, according fheroes2 code the total ghosts count is 39-45. Does OG have same count?

Please remember that ghosts may arrive also under the following circumstances:

  1. Using the Haunt adventure spell (IIRC numbers are dependent on hero's Spell Power, but I'm not sure about this). Anyway I'm totally sure that their numbers may be less than 39 in this case;
  2. When they defeat the hero's army, their numbers may increase during the battle up to literally any numbers (depending on the size of the defeated army). All these additional ghosts then remain on the tile.

@undef21
Copy link
Contributor

undef21 commented Jul 15, 2022

@oleg-derevenetz it's all true.
Look at src/fheroes2/maps/maps_tiles_quantity.cpp:815. The possible counts of ghosts are 39, 42, 45. And look at @LeHerosInconnu's screenshots. He attacked the mine twice or OG placed ghost with another way.

@LeHerosInconnu
Copy link
Author

Hello @undef21 and @oleg-derevenetz,

I will do a more complete test on the subject. :)

@oleg-derevenetz
Copy link
Collaborator

@undef21 @LeHerosInconnu

It is mentioned here that the number of ghosts can be in the range of 30-60:

https://handbookhmm.ru/2-objects

@LeHerosInconnu
Copy link
Author

Hello @undef21 and @oleg-derevenetz,

Hello @undef21 and @oleg-derevenetz,

I will do a more complete test on the subject. :)

Here is what I have observed in Heroes 2:

Abandoned Mine:

The ghosts can be divided into three configurations:

  • 5 groups
  • 4 groups
  • 3 groups

In original game:

Abandoned Mine H2 001

Abandoned Mine H2 009

Abandoned Mine H2 003

The number of ghosts does not increase or decrease if the combat is not won and another combat is started on the same abandoned mine.
If there are 30 ghosts at the beginning of the combat and the hero reduces this number to 15 ghosts before fleeing, there will still be 30 ghosts at the next combat.
If there are 30 ghosts at the beginning of the combat and the number of ghosts is increased to 45 ghosts before the hero flees, there will still be 30 ghosts in the next combat.

The number of ghost groups and their positioning in the battlefield hexes is related to the position of the abandoned mine on the adventure map.
Repeating the combat in the same abandoned mine always gives the same number of groups and the same positioning of the ghosts, even if the scenario is completely restarted.
The number of ghosts is different when the scenario is completely restarted, but is always the same during the same scenario session.
This is certainly determined at the start of the scenario for all abandoned mines.

@undef21 @LeHerosInconnu

It is mentioned here that the number of ghosts can be in the range of 30-60:

https://handbookhmm.ru/2-objects

This is consistent with what I have observed.

In original game:

30 ghosts:
Abandoned Mine H2 003

60 ghosts:
Abandoned Mine H2 001

While I was at it, I also did a test on ghosts in the other places concerning them.

Shipwreck:

It works the same way as for the abandoned mine:

  • The number of ghosts does not increase or decrease if the combat is not won and another combat is started on the same shipwreck.
  • The number of ghost groups and their positioning in the battlefield hexes is related to the position of the shipwreck on the adventure map.
    ...
    This is certainly determined at the start of the scenario for all shipwrecks.

In original game:

Shipwreck H2 007

Shipwreck H2 003

Shipwreck H2 001

The reward works this way:

  • win the combat against 10 ghosts gives 1000 gold (30%).
  • win the combat against 15 ghosts gives 2000 gold (30%).
  • win the combat against 25 ghosts gives 5000 gold (30%).
  • win the combat against 50 ghosts gives 2000 gold and 1 random artifact (10%).

Note: I have used the percentage given on this page: https://handbookhmm.ru/2-objects.

In original game:

10 ghosts:
Shipwreck H2 004

15 ghosts:
Shipwreck H2 002

25 ghosts:
Shipwreck H2 008

50 ghosts:
Shipwreck H2 022

Haunt spell:

Here again, it works in the same way as for the abandoned mine regarding the number of ghost groups and their positioning in the hexes of the battlefield, which is therefore related to the position of the mine on the adventure map.

The total number of ghosts generated corresponds to 4 ghosts multiplied by the hero's Spell Power value.

In the case of the Haunt spell, the number of ghosts is conserved over the course of the combats if the first combat is not won, and it can therefore increase or decrease if another combat is started on the same haunted mine.

In original game:

Kastore generates 12 ghosts (4 x 3 Spell Power) before attacking them:
Haunt H2 001

Kastore reduced the number of ghosts to 6 before running away and attacking them again:
Haunt H2 002

Innocent peasants are sent to feed the ghosts for the purpose of the demonstration: :)
Haunt H2 003

Kastore attacks again the ghosts whose number has been increased by the martyr imposed on these brave peasants, peace to their souls:
Haunt H2 004

I will do a test, certainly tomorrow, with fheroes2 to compare how it goes.
I will change the title and the original post of this issue after my test with fheroes2.

Here is the test scenario file:
0 9930.zip

@oleg-derevenetz
Copy link
Collaborator

oleg-derevenetz commented Jul 15, 2022

The number of ghosts does not increase or decrease if the combat is not won and another combat is started on the same abandoned mine.

I can already say that in fheroes2 it isn't like this. In fheroes2 number of ghosts may be decreased after unsuccessful battle (unsuccessful for a hero OFC) and even increased - just like with other wandering monsters or guardians. I believe this looks more natural BTW.

@LeHerosInconnu
Copy link
Author

@oleg-derevenetz.

The number of ghosts does not increase or decrease if the combat is not won and another combat is started on the same abandoned mine.

I can already say that in fheroes2 it isn't like this. In fheroes2 number of ghosts may be decreased after unsuccessful battle (unsuccessful for a hero OFC) and even increased - just like with other wandering monsters or guardians. I believe this looks more natural BTW.

I already know that there are differences with fheroes2, and I was wondering if this working mode should be offered as an option because it is different from the original game.
Something like this:

"world: number of ghosts is memorized at the end of a combat not won in the places concerning them"

This working mode could eventually be extended to other places on the adventure map like the Graveyard, Dragon City, etc.

@LeHerosInconnu
Copy link
Author

LeHerosInconnu commented Jul 16, 2022

Hello @undef21 and @oleg-derevenetz,

I will do a test, certainly tomorrow, with fheroes2 to compare how it goes.
I will change the title and the original post of this issue after my test with fheroes2.

So I did my test with fheroes2 and here are my observations:

Abandoned Mine:

  • The number of ghosts can evolve over the combats, unlike the original game.
  • There is a different number of ghosts than in the original game.
  • There is a different number of ghost groups and the positioning of these ghost groups than in the original game.

Shipwreck:

  • The number of ghosts cannot evolve over the combats, as in the original game.
  • There is a different number of ghosts than in the original game.
  • There is a different number of ghost groups and the positioning of these ghost groups than in the original game.

Haunt spell:

  • The number of ghosts can evolve over the combats, as in the original game.
  • There is a number of ghosts similar to the original game.
  • There is a different number of ghost groups and the positioning of these ghost groups than in the original game.

I will change the title and the original post of this issue and open new issues for the other places concerning ghosts.

I'm not against the idea that the number of ghosts evolves over the course of the combats and I'll open a discussion about it.
This could also be applied to other places on the adventure map, like the Graveyard, Dragon city, etc. (#6883)

@LeHerosInconnu LeHerosInconnu changed the title Combat, Abandoned Mine, Ghosts guarding an Abandoned Mine should always be divided into five groups Combat, Abandoned Mine, wrong number of ghosts, ghost groups and their positioning Jul 16, 2022
@ihhub ihhub modified the milestones: 0.9.18, 0.9.19 Aug 10, 2022
@ihhub
Copy link
Owner

ihhub commented Aug 11, 2022

Hi @oleg-derevenetz , did we fix this issue?

@oleg-derevenetz
Copy link
Collaborator

oleg-derevenetz commented Aug 11, 2022

Hi @ihhub not quite. Currently the Haunted mine and Abandoned mine in fheroes2 are the same, and number of ghosts is conserved between battles for both types of mines, while in the OG it is not conserved in case of Abandoned mine. The current behavior looks more natural to me (since the number of Ghosts is conserved in Shipwrecks too, so I have no idea why it should not be conserved in Abandoned mines), but still it's the difference, so I didn't close this issue.

@Branikolog
Copy link
Collaborator

Branikolog commented Aug 12, 2022

Hi, @oleg-derevenetz and @ihhub
I think, the number of ghosts should be conserved for all similar objects.

@oleg-derevenetz
Copy link
Collaborator

Hi @Branikolog @ihhub The current logic of conservation of guardians is as described by @LeHerosInconnu here:

#5651 (comment)

So it seems that eventually we will need to make Haunted mine and Abandoned mine different objects (now they are effectively the same) and apply a different logic regarding conservation of guardians between battles.

@ihhub ihhub modified the milestones: 0.9.19, 0.9.20 Sep 11, 2022
@ihhub ihhub modified the milestones: 0.9.20, 0.9.21 Oct 10, 2022
@ihhub ihhub removed this from the 0.9.21 milestone Nov 12, 2022
@ihhub ihhub added this to the 1.0 milestone Nov 12, 2022
@ihhub ihhub modified the milestones: 1.0, 1.0.1 Dec 20, 2022
@ihhub ihhub modified the milestones: 1.0.1, 1.0.2 Feb 8, 2023
@ihhub ihhub modified the milestones: 1.0.2, 1.0.3 Mar 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something doesn't work logic Things related to game logic
Projects
None yet
5 participants