Edit Terrain Type -> Help Button Crashes #553

Closed
opened 2025-01-29 00:18:58 +00:00 by NQNStudios · 8 comments
NQNStudios commented 2025-01-29 00:18:58 +00:00 (Migrated from github.com)

Image

The help button in the top right causes a crash:

Error! Could not load resource 'ter-type-help' of type 'string list'

![Image](https://github.com/user-attachments/assets/706131c8-34b2-4a10-b640-2e6bac75bda6) The help button in the top right causes a crash: >Error! Could not load resource 'ter-type-help' of type 'string list'
NQNStudios commented 2025-01-29 01:19:52 +00:00 (Migrated from github.com)

I don't know a way to search the repo history for a ter-type-help.txt that may have been deleted. There's no files similar to that which look like the right information.

I don't know a way to search the repo history for a `ter-type-help.txt` that may have been deleted. There's no files similar to that which look like the right information.
CelticMinstrel commented 2025-01-30 00:25:05 +00:00 (Migrated from github.com)

I noticed the same bug myself a couple of days ago. I'm pretty sure the file has never existed, and the intent was to add a file with a basic summary of how the dialog works. I did a few checks, but I can't find any evidence in git that the file ever existed.

I noticed the same bug myself a couple of days ago. I'm pretty sure the file has never existed, and the intent was to add a file with a basic summary of how the dialog works. I did a few checks, but I can't find any evidence in git that the file ever existed.
josefwk commented 2025-02-01 20:52:20 +00:00 (Migrated from github.com)

In the Mac classic version of the Scenario Editor (1.0.4), there is no help button on that screen. It is referring to the old docs "Section 6 - Editing Terrain Types", which is found in the doc/editor/Terrain.html file.

Image

In the Mac classic version of the Scenario Editor (1.0.4), there is no help button on that screen. It is referring to the old docs "Section 6 - Editing Terrain Types", which is found in the `doc/editor/Terrain.html` file. ![Image](https://github.com/user-attachments/assets/df8cef6a-259e-423e-a1d1-1b1f0ecd8915)
CelticMinstrel commented 2025-02-02 19:01:55 +00:00 (Migrated from github.com)

I can't even remember why I added a help button there. Based on the code, the referenced strings file was supposed to contain a few paragraphs that are shown in the 6-string style of dialog with an OK button, but I don't quite remember what I intended to put there. We can either remove the button or add the file with some useful content.

EDIT: It already existed when the dialog file was first added in 78cd2139720394ceeec799c31610ce388e5d2e80… which makes it even more of a mystery as to where it came from.

I can't even remember why I added a help button there. Based on the code, the referenced strings file was supposed to contain a few paragraphs that are shown in the 6-string style of dialog with an OK button, but I don't quite remember what I intended to put there. We can either remove the button or add the file with some useful content. EDIT: It already existed when the dialog file was first added in 78cd2139720394ceeec799c31610ce388e5d2e80… which makes it even _more_ of a mystery as to where it came from.
NQNStudios commented 2025-02-02 19:31:46 +00:00 (Migrated from github.com)

Alternately I wouldn't mind if we set a precedent for editor help buttons linking to the relevant section in the docs (are the docs packaged as offline html as part of the build? Would we also have to add anchor elements?)

Because there will always be a conflict inherent in keeping help windows DRY and consistent with the actual documentation.

Alternately I wouldn't mind if we set a precedent for editor help buttons linking to the relevant section in the docs (are the docs packaged as offline html as part of the build? Would we also have to add anchor elements?) Because there will always be a conflict inherent in keeping help windows DRY and consistent with the actual documentation.
CelticMinstrel commented 2025-02-03 01:19:46 +00:00 (Migrated from github.com)

Alternately I wouldn't mind if we set a precedent for editor help buttons linking to the relevant section in the docs (are the docs packaged as offline html as part of the build? Would we also have to add anchor elements?)

Ohh, that might actually be a better idea! The game is set up to show local docs if they're packaged, otherwise link to the docs on openboe.com (which haven't been updated for a bit though). So we can easily decide to package them or not (I think we probably should). I'm not sure if the scons script currently packages them.

I think all the headers on each page of the documentation already have an ID, and in some places (most notably the special nodes) things that aren't headers also have IDs. So I don't think there'd be much need to add more IDs. Still, we totally could if needed. (Not anchors, that's like HTML3 and obsolete.)

> Alternately I wouldn't mind if we set a precedent for editor help buttons linking to the relevant section in the docs (are the docs packaged as offline html as part of the build? Would we also have to add anchor elements?) Ohh, that might actually be a better idea! The game is set up to show local docs if they're packaged, otherwise link to the docs on openboe.com (which haven't been updated for a bit though). So we can easily decide to package them or not (I think we probably should). I'm not sure if the scons script currently packages them. I think all the headers on each page of the documentation already have an ID, and in some places (most notably the special nodes) things that aren't headers also have IDs. So I don't think there'd be much need to add more IDs. Still, we totally could if needed. (Not anchors, that's like HTML3 and obsolete.)
NQNStudios commented 2025-02-07 01:23:16 +00:00 (Migrated from github.com)

Here's the game making that check for packaged docs:

a5d3780c5c/src/game/boe.main.cpp (L1313-L1315)

And here's the scenario editor doing it too:

a5d3780c5c/src/scenedit/scen.main.cpp (L740-L743)

I'll make this DRY and have the Terrain Help button do it, too.

Here's the game making that check for packaged docs: https://github.com/calref/cboe/blob/a5d3780c5c66bd618fc9f0a35f6c4669b6b6a1e9/src/game/boe.main.cpp#L1313-L1315 And here's the scenario editor doing it too: https://github.com/calref/cboe/blob/a5d3780c5c66bd618fc9f0a35f6c4669b6b6a1e9/src/scenedit/scen.main.cpp#L740-L743 I'll make this DRY and have the Terrain Help button do it, too.
NQNStudios commented 2025-02-07 01:43:30 +00:00 (Migrated from github.com)

Scons isn't packaging the docs for me on Mac.

Scons isn't packaging the docs for me on Mac.
Sign in to join this conversation.
No description provided.