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

Editor preparations #6845

Closed
52 tasks done
ihhub opened this issue Mar 16, 2023 · 19 comments · Fixed by #8449
Closed
52 tasks done

Editor preparations #6845

ihhub opened this issue Mar 16, 2023 · 19 comments · Fixed by #8449
Assignees
Labels
editor Map editor related stuff high priority Very critical change needed immediately improvement New feature, request or improvement
Milestone

Comments

@ihhub
Copy link
Owner

ihhub commented Mar 16, 2023

Preliminary checks

Describe the problem requiring a solution

The next major goal of the project is deliver an in-game editor. This issue serves as a collection of tasks related to the main task.

Describe the possible solution

This is a list of tasks we have to complete in order to deliver a base version of the Editor:

  • remove usage of quantity1 and quantity2 in the code. Make them more readable without the calculation magic present in the code.
  • Tiles class should just have a stack of all TilesAddon. Move the same members of the Tiles class away from the class. This will make the code much cleaner and easier to maintain
  • Move all auxiliary methods outside of the Tiles class. Tiles class is designed just to store information about a tile in general, not about specific objects
  • Create an information table for each object in the game: which images are used to determine the object, its properties, passabilities
  • Remove unused structures in mp2.h file and expand the code with necessary explanations within comments where we actually read data for these structures
  • add a shortcut key (E) to open an Editor main menu and add there needed buttons like it is done in the original Editor (for now only for debug mode). The main menu image must be resizable
  • add a new mode within interface_area to enable Editor mode (something similar what we did for view world
  • add UI elements to handle terrain types and change cursor type based on a chosen type
  • change terrain type using terrain brush (enable support for keeping objects on terrain as well as selecting an area for terrain)
  • add historical changes support: undo and redo functionality
  • propose a map format which stores objects as whole and their data. For example, a castle must have only 1 main tile while in the editor and the game it will populate the needed number of tiles.
  • add required helper functions into the code to load new map format. These functions should be shared among the Editor and the game
  • add a UI toolset to handle objects within the Editor. It should be a different way than in the original game
  • display passabilities for objects on the map
  • figure out text encoding support for maps
  • investigate whether it is required to have a separate format for campaign scenarios
  • change MapObjectType type to uint16_t to support new objects
  • add a window to change Hero properties
  • add a window to change Castle / Town properties
  • add a window to change Sphinx properties
  • add a window to change Bottle / Sign properties
  • add a window to change Jail properties
  • add a window to change Random Hero properties
  • add a window to change Random Town properties
  • add a window to change Event properties
  • add a window to change Monster properties
  • add a window for map properties
  • add a window for saving a map
  • add a a structure to store Event properties
  • add a a structure to store Bottle / Sign properties
  • add a a structure to store Sphinx properties
  • add a a structure to store Random Hero properties
  • add a a structure to store Random Town properties
  • handle all original map winning and loosing conditions
  • add code to load every object properties
  • update the conditions for object placement
  • update object layers, mostly for background layer
  • fix cursor rendering in File Options window when Animation is stopped
  • implement the main menu button for the Editor
  • properly connect roads and castles
  • fix radar rendering for heroes and castles
  • remove beta Editor tag
  • add zlib compression to the map format
  • fix river delta placement
  • add a shortcut to go to Main Menu from the Editor
  • add daily event support
  • add logic to place random ultimate artifact
  • add a window to modify random ultimate artifact radius
  • update objects while changing terrains under them
  • add rumours into the map format
  • make Evil interface for New/Load/Save Map buttons

The above list is going to be expanded based on the progress and discoveries.

Additional info

No response

@ihhub ihhub added the improvement New feature, request or improvement label Mar 16, 2023
@ihhub ihhub added this to the 1.1.0 milestone Mar 16, 2023
@ihhub ihhub added the editor Map editor related stuff label Mar 17, 2023
ihhub added a commit that referenced this issue Apr 2, 2023
- remove few unused structures from mp2.h file and add appropriate comments about them in the code
- add more checks while loading an MP2 file

relates to #6845
@ihhub ihhub added the high priority Very critical change needed immediately label Apr 30, 2023
ihhub added a commit that referenced this issue May 6, 2023
ihhub added a commit that referenced this issue Jul 22, 2023
As a part of efforts to clear the code and prepare it for the upcoming editor.

Also make some methods in Heroes class inlined as they should be.

relates to #6845
ihhub added a commit that referenced this issue Sep 16, 2023
Rename some cryptic functions and variables.

relates to #6845
ihhub added a commit that referenced this issue Sep 20, 2023
ihhub added a commit that referenced this issue Oct 1, 2023
ihhub added a commit that referenced this issue Oct 7, 2023
ihhub added a commit that referenced this issue May 17, 2024
ihhub added a commit that referenced this issue May 17, 2024
ihhub added a commit that referenced this issue May 18, 2024
No need to update map information for each town and hero.

relates to #6845
ihhub added a commit that referenced this issue May 18, 2024
ihhub added a commit that referenced this issue May 18, 2024
based on the feedback

Also, change some comments.

relates to #6845
@Branikolog
Copy link
Collaborator

I've encountered a small passability difference with the original game. Sorry, if it was mentioned somewhere before.
OG:
image
fheroes2:
image
This results in allowing to place the object in slightly unnatural place for it:
image

@ihhub
Copy link
Owner Author

ihhub commented May 20, 2024

Hi @Branikolog , we mentioned that mountains are going to have unified passability. Therefore, we have a difference with the OG.

@Branikolog
Copy link
Collaborator

@ihhub
It is sadly to admit, that the idea of changing the passability for a consistency with similar (but still different) object was not that good. 😅
While this similar object looks nice, while placing it close to the water...
image
The problem object looks kind of out of the logic:
image

@ihhub
Copy link
Owner Author

ihhub commented May 21, 2024

I am closing this issue as all major tasks have been completed.

@ihhub ihhub closed this as completed May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
editor Map editor related stuff high priority Very critical change needed immediately improvement New feature, request or improvement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants