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

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

Open
Brambor opened this issue Apr 27, 2024 · 9 comments
Open

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

Brambor opened this issue Apr 27, 2024 · 9 comments
Labels
(S1 - Need confirmation) Report waiting on confirmation of reproducibility

Comments

@Brambor
Copy link
Contributor

Brambor commented Apr 27, 2024

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

  • OS: Windows
    • OS Version: 10.0.19045.4291 (22H2)
  • Game Version: 0.G-9005-g6700088ca4-dirty [64-bit] master was 2e32db9
  • Graphics Version: Tiles
  • Game Language: English [en]
  • Mods loaded: [
    Dark Days Ahead [dda],
    Disable NPC Needs [no_npc_food],
    Portal Storms Ignore NPCs [personal_portal_storms],
    Slowdown Fungal Growth [no_fungal_growth]
    ]

Additional context

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

@Brambor Brambor added the (S1 - Need confirmation) Report waiting on confirmation of reproducibility label Apr 27, 2024
@PatrikLundell
Copy link
Contributor

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
Copy link

Kywi001 commented May 4, 2024

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

Copy link
Contributor

github-actions bot commented Jun 3, 2024

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.

@github-actions github-actions bot added the stale Closed for lack of activity, but still valid. label Jun 3, 2024
@Brambor
Copy link
Contributor Author

Brambor commented Jun 3, 2024

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
Copy link
Contributor

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

  • There are precondition tile restrictions. It would presumably be possible to extract those, but it's not necessarily the case they make sense in that there are tiles that are technically different but share the same displayed "name", so lists might contain the same "name" multiple times.
  • A worse issue is that coded evaluations operations can be used to determine preconditions, and as it's code it can be absolutely anything. It would presumably be possible to have texts associated with each of these operations to describe what they test, but it would be rather wordy. You could cram all of that into the text displayed with the construction that's currently a short line, but it would be a lot of text. Conditions could be something like this (not verified against the exact code, but along the same line of what these do):
    "Can be placed on any tile considered "flat" (dirt, grass, long grass, tall grass, white grass, yellow grass, ...[a bazillion other legal alternatives matching a flag in the terrain definition] that's free of items and that's supported from below or from at least two sides". This also means the term "support" has to be made known.
    In the case of your boarded up window it would mean listing all the kinds of window tiles that can be boarded up, which, again, is a rather long list (probably around 8 or so).

@github-actions github-actions bot removed the stale Closed for lack of activity, but still valid. label Jun 3, 2024
@Brambor
Copy link
Contributor Author

Brambor commented Jun 3, 2024

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
Copy link
Contributor Author

Brambor commented Jun 3, 2024

The screenshot #73328 (comment) 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
Copy link
Contributor

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
Copy link
Contributor Author

Brambor commented Jun 3, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
(S1 - Need confirmation) Report waiting on confirmation of reproducibility
Projects
None yet
Development

No branches or pull requests

3 participants