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

An event is not triggering if a player is boarding a ship #8834

Open
2 tasks done
Killbrum opened this issue Jun 14, 2024 · 3 comments
Open
2 tasks done

An event is not triggering if a player is boarding a ship #8834

Killbrum opened this issue Jun 14, 2024 · 3 comments
Labels
bug Something doesn't work logic Things related to game logic
Milestone

Comments

@Killbrum
Copy link
Contributor

Preliminary checks

Platform

Windows

Describe the bug

Greetings!
Recently, I've encountered a weird case, and mainly, I assume that it's a bug. On Pirates Utopia map there is the event on the bottom right corner (the last pixel). It has to be triggered when some one teleports to the closes tile, spawns a boat, and onboards the boat (tricky case). Still, in my case, nothing happened. I assume because this logic is not handled (like even can occur if someone boarding a boat). PC hasn't reach that place at all.

I will try to upload correct save file soon

event

Save file

So far no save game, but I will try to add

Additional info

No response

@Killbrum Killbrum added the bug Something doesn't work label Jun 14, 2024
@oleg-derevenetz
Copy link
Collaborator

oleg-derevenetz commented Jun 14, 2024

Currently in fheroes2, both event and boat are "map objects", and there cannot be more than one object on the same tile at the same time (excluding the hero objects, because they are "special"). AI will not try to summon a boat here, because there is already an object on that tile. Logic for human players is a bit different (perhaps by mistake), and human players are allowed to summon a boat on that tile, but the result is that the boat object "overwrites" the event object, so there is no event object on that tile anymore after the boat summoning.

@Killbrum
Copy link
Contributor Author

Ah, I see :( thanks for the explanation. Anyway, that is a good item to add to the "to-do" list since potentially it can break the logic of some old maps. Nowadays I'm not very familiar with fheroes2 code, but, perhaps, if the maps is a multidimensional array, then maybe we can convert that array to an array of lists or vectors and once the player steps into the tile - trigger everything that is under that tile

@oleg-derevenetz oleg-derevenetz added the logic Things related to game logic label Jun 14, 2024
@oleg-derevenetz oleg-derevenetz added this to the 1.2.0 milestone Jun 14, 2024
@oleg-derevenetz
Copy link
Collaborator

oleg-derevenetz commented Jun 14, 2024

The fact that only one object can be placed on a tile at a time (even in the case of "invisible" objects, such as events) is the part of the core game mechanics. In the OG editor, you cannot place an event on a tile with the boat, and vice versa:

DOSBox.0.74-2.1.Cpu.speed_.max.100.cycles.Frameskip.0.Program_.EDITOR2.2024-06-14.19-04-27.mp4

Moreover, in the original game, the hero cannot disembark to a tile where an event object is located:

DOSBox.0.74-2.1.Cpu.speed_.max.100.cycles.Frameskip.0.Program_.HEROES2.2024-06-14.19-00-37.mp4

This is because the hero can only disembark on tiles where there is another "invisible" object called a "coast object", and you cannot have both the "event object" and "coast object" on the same tile at the same time. Therefore, I am inclined to believe that a human player simply should not be able to summon a boat to the tile on which the event object is located - just as AI cannot do it now.

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
Development

No branches or pull requests

2 participants