CleverRaven / Cataclysm-DDA

Cataclysm - Dark Days Ahead. A turn-based survival game set in a post-apocalyptic world.
http://cataclysmdda.org
Other
10k stars 4.09k forks source link

"Board up window" shows no missing requirements but I cannot build it. #73328

Open Brambor opened 3 months ago

Brambor commented 3 months ago

Describe the bug

Board up window shows no missing requirements but I cannot build it.

There are 4 recipes on the screenshot. The second two require a window, the first two don't mention needing a window.

Attach save file

Game-trimmed.tar.gz

Steps to reproduce

  1. Open the construction menu in the attached save *
  2. It already shows the board up window construction recipe
  3. Observe you cannot construct it (press ENTER)

Expected behavior

Require some sort of window.

Screenshots

image

Versions and configuration

Additional context

Good first issue. It will just miss something in the JSON.

PatrikLundell commented 3 months ago

The first one (in the JSON file) requires a window with the flag BARRICADABLE_WINDOW, the second BARRICADABLE_WINDOW_CURTAINS, the third requires a starting tile of t_window_empty, and the last one a starting tile of t_window_frame.

The issue is then to figure out what kind of starting tile you have, why it doesn't match any of these criteria, and define a new "recipe" matching your criteria. The task should reasonably also look for other missed cases (assuming your starting tile is reasonable to board up, which I assume it is). Note that it could also be that your starting tile lacks a flag it ought to have (so, update the "terrain" to match an existing "recipe").

Kywi001 commented 2 months ago

The only time I can see it not allowing you is when there's no window right next to you

github-actions[bot] commented 1 month ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Please do not bump or comment on this issue unless you are actively working on it. Stale issues, and stale issues that are closed are still considered.

Brambor commented 1 month ago

assuming your starting tile is reasonable to board up, which I assume it is

It is not, I was standing in the middle of the room.

The only time I can see it not allowing you is when there's no window right next to you

Yes that is what this issue is about.

I see I wasn't clear. My problem is that it should tell me "You need to be next to (some kind of) a window." But it doesn't. It doesn't state any requirements on a tile.

The player should see the recipe including all the requirements. Not omiting that (some kind of) a window is required for a boarded up window.

It is not obvious. I thought that maybe I could make a boarded up window from scratch on dirt in the middle of nowhere.

PatrikLundell commented 1 month ago

Telling you what the preconditions for the recipes to be available is tricky:

Brambor commented 1 month ago

there are tiles that are technically different but share the same displayed "name", so lists might contain the same "name" multiple times.

I thought about that too now. We should not display multiple entries with the same requirements if only the tile differs, but the tile name is the same. Specifically, if the player cannot distinguish between WINDOW_0 and WINDOW_1 (let's say they have different durability) they should see only one entry for both of these constructions.

...

I don't have a good solution to the rest, but the vehicle construction menu goes into greater detail that looks too wordy, but when I wouldn't understand something I would look there for answers.

Still, if we could solve that one issue, it is still a big improvement.

Brambor commented 1 month ago

The screenshot https://github.com/CleverRaven/Cataclysm-DDA/issues/73328#issue-2267089382 is a great example of repeated things. There is only one difference, the tile required, which is:

  1. nothing
  2. nothing
  3. empty window
  4. window frame

So the 1 and 2 should merge into a single entry.

The player cannot make any decisions with both entries 1 and 2. They see no difference in the recipes (unless I overlooked something?). Therefore, showing both recipes is only confusing to the player, they have to read more and assume there is some difference they cannot find. That is how I feel when presented with entries 1 and 2.

Ideally, it would all show as a single entry with ORs between the required tiles. This would also be good for maintainability on the development side if the underlying JSON changed. It can also be a C++ change aggregating similar entries.

PatrikLundell commented 1 month ago

I wasn't able to display your image. It links to something that doesn't display for me. Don't know if the "private" part of the link means it won't be visible to others or something else is an issue. However, you can get images embedded in the post by dragging the image into the post when writing/editing it.

Brambor commented 1 month ago

Sorry, I am just citing the first image in the original post (first message). Edited.

github-actions[bot] commented 3 weeks ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Please do not bump or comment on this issue unless you are actively working on it. Stale issues, and stale issues that are closed are still considered.