Skip to content

Create setup-editor.lua #1480

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

Snowstar38
Copy link

This adds a new GUI popup to edit game setup points, in both Fortress and Adventure mode.

"embark-skills" already does something very similar for Fortress mode, but this is a GUI vs a command script.

setup editor

I am quite new to programming, so for all I know, this could be absolutely horrific to an experienced programmer. But I hope that I'm providing something useful here!

@chdoc
Copy link
Member

chdoc commented Jul 9, 2025

I don't have time to do a full review right now, but here are a few things I can say right off the bat:

  1. this pull-request needs both an entry in the changelog.txt and a documentation file (i.e. .rst file) for the new tool. For the latter, please have a look at the docs folder.
  2. From the pictures, it looks like the user has to manually select the Fortress or Adventure tabs. Since those are different game modes, I don't think it is useful to put them in tabs. The tool should simply always display the information relevant for the active game mode. Of course, this requires detecting the game mode, which shouldn't be too hard.
  3. I'm not a fan of wrapping all the accesses to game variables in pcall. There should be a way to determine the number of dwarves or the number of adventure characters from the game state. I don't like the idea of the tool silently failing in case the used data structures of the game are changed.
  4. You should not assume that a fort always starts with 7 dwarves. There is also the startdwarf tool.
  5. Apart from the liberal use of pcall, I think the quality of the code is pretty decent 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants