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

Fix original maps bottom layer (hacky) placed resources and artifacts #8977

Merged
merged 2 commits into from
Jul 26, 2024

Conversation

Districh-ru
Copy link
Collaborator

@Districh-ru Districh-ru commented Jul 21, 2024

Fix #8852

This PR fixes some issues for the original maps made by hack or some original editor bug when an action object is placed to the bottom player addons instead of the main main tile object.

It:

  • reverts the implemented in Fix incorrect resource placements on certain maps #6395 bottom layer to main object swap;
  • fixes object type update for the case when an action object is placed to the bottom layer and the main tile object is not empty;
  • fixes artifact type setting to correspond the shown artifact sprite when artifact is placed to the bottom layer.

Important! This PR fixes only the new games, not the saved games

Such map "hacks" can be observed on the map LOSTRELI.MP2 ("Lost Relic").
Master build (the picked up artifact is not the same as shown on the map):

fheroes2.2024-07-21.15-38-23-316.mp4

This PR:

fheroes2.2024-07-21.15-31-33-643.mp4

The resource "hack" is noticeable of the map 4 of the Roland campaign.

fheroes2.2024-07-21.15-32-18-908.mp4

@Districh-ru Districh-ru added bug Something doesn't work ui UI/GUI related stuff logic Things related to game logic labels Jul 21, 2024
@Districh-ru Districh-ru added this to the 1.1.2 milestone Jul 21, 2024
@Districh-ru Districh-ru requested a review from ihhub July 21, 2024 12:41
@Districh-ru Districh-ru self-assigned this Jul 21, 2024
@Districh-ru Districh-ru changed the title Fix original maps bottom layer (hacky) plased resources and artifacts on map start Fix original maps bottom layer (hacky) placed resources and artifacts Jul 21, 2024
@oleg-derevenetz
Copy link
Collaborator

Such map "hacks" can be observed on the map LOSTRELI.MP2 ("Lost Relic").
Master build:
[...video...]
This PR:
[...video...]

I didn't really understand exactly where to look here :) In both cases, the artifact is hidden behind the trees, as it should be.

@Districh-ru
Copy link
Collaborator Author

Districh-ru commented Jul 21, 2024

Such map "hacks" can be observed on the map LOSTRELI.MP2 ("Lost Relic").
Master build:
[...video...]
This PR:
[...video...]

I didn't really understand exactly where to look here :) In both cases, the artifact is hidden behind the trees, as it should be.

Hi, @oleg-derevenetz, in master build the current random artifact can have any sprite (according to the randomly given artifact ID) but the metadata[0] will always be 11 and the picked up artifact type will always be the "Mages' Ring of Power".
Yes, it is hard to see but on the tile behind the forest there is some other artifact sprite, not the "Mages' Ring of Power":
изображение

Added:
For the "Mages' Ring of Power" it will be:
изображение

@ihhub ihhub requested a review from Branikolog July 24, 2024 14:02
@ihhub ihhub merged commit 949af3a into ihhub:master Jul 26, 2024
21 checks passed
@ihhub
Copy link
Owner

ihhub commented Jul 26, 2024

@Districh-ru , a bunch of thanks for this update!

@Districh-ru Districh-ru deleted the fix-original-maps-hacked-resources branch July 26, 2024 15:14
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 ui UI/GUI related stuff
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ore (and possibly all other resources) are incorrectly shown on the map.
3 participants