Skip to content

[WIP] Debug map editor ImGui conversion#85599

Draft
ShnitzelX2 wants to merge 1 commit intoCleverRaven:masterfrom
ShnitzelX2:debug-map-editor
Draft

[WIP] Debug map editor ImGui conversion#85599
ShnitzelX2 wants to merge 1 commit intoCleverRaven:masterfrom
ShnitzelX2:debug-map-editor

Conversation

@ShnitzelX2
Copy link
Contributor

Summary

Interface "debug map editor ImGui conversion"

Purpose of change

The debug map editor is currently difficult to use because the uilist prompts cover the control interface. Example:
image

Additionally, I found this UI difficult to use before ImGui was introduced, so I wanted to simplify it.

Describe the solution

Write a new interface for the debug map editor in ImGui.

Screenshots

General UI
image

"Point" brush with terrain enabled (t_wall)
image

"Rectangle" brush
image

Resizing brush
image
image

Enabling fields (along with terrain)
image

OMT mapgen editor
image
image

Major differences:

  • Each of the map features can be preselected and enabled individually and therefore drawn simultaneously. For example: a wall and a blood splatter can both be placed at once, but if blood is not desired, fields can be toggled off.
  • There is now a (paint)"brush" that on the back-end contains most of the UI's state data.
  • There are two simple modes: "Draw", which applies the brush selections, and "Select Brush Points", which resizes the brush.
  • Terrain info can be toggled off to save space. Most keybind hints are removed to save space (except for the keybinder hint)
  • Some uilists are moved to the side of the screen to improve visibility.

Describe alternatives you've considered

  • Integrate the debug map editor with mapgen palettes, so that mapgen can be fully designed in-game.
  • A copy/paste brush that can save copied selections to user-defined brushes.
  • Full mouse support?

Any of the above warrant separate PR(s).

Testing

Mostly-functional, still very WIP.

Additional context

If you have suggestions, please comment. There are some QOL improvements I'm going to make, and there's a lot of commented blocks to remove.

@github-actions github-actions bot added Info / User Interface Game - player communication, menus, etc. [JSON] Changes (can be) made in JSON [C++] Changes (can be) made in C++. Previously named `Code` Monsters Monsters both friendly and unfriendly. astyled astyled PR, label is assigned by github actions json-styled JSON lint passed, label assigned by github actions labels Mar 1, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 1, 2026

Spell checker encountered unrecognized words in the in-game text added in this pull request. See below for details.

Click to expand
  • "Edit mapgen for OMT"
  • "dist: %d; u_see: %s; veh: %s; scent: %d"
  • " Furniture: %s (#%d); move cost %d; movestr %d"

This alert is automatically generated. You can simply disregard if this is inaccurate, or (optionally) you can also add the new words to tools/spell_checker/dictionary.txt so they will not trigger an alert next time.

Hints for adding a new word to the dictionary
  • If the word is normally in all lowercase, such as the noun word or the verb does, add it in its lower-case form; if the word is a proper noun, such as the surname George, add it in its initial-caps form; if the word is an acronym or has special letter case, such as the acronym CDDA or the unit mW, add it by preserving the case of all the letters. A word in the dictionary will also match its initial-caps form (if the word is in all lowercase) and all-uppercase form, so a word should be added to the dictionary in its normal letter case even if used in a different letter case in a sentence.
  • For a word to be added to the dictionary, it should either be a real, properly-spelled modern American English word, a foreign loan word (including romanized foreign names), or a foreign or made-up word that is used consistently and commonly enough in the game. Intentional misspelling (including eye dialect) of a word should not be added unless it has become a common terminology in the game, because while someone may have a legitimate use for it, another person may spell it that way accidentally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

astyled astyled PR, label is assigned by github actions [C++] Changes (can be) made in C++. Previously named `Code` Info / User Interface Game - player communication, menus, etc. [JSON] Changes (can be) made in JSON json-styled JSON lint passed, label assigned by github actions Monsters Monsters both friendly and unfriendly.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant