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

Added roof bashing to 'indoors' terrain #72946

Closed

Conversation

PatrikLundell
Copy link
Contributor

@PatrikLundell PatrikLundell commented Apr 10, 2024

Summary

None

Purpose of change

Partial address of #72765, i.e. support bashing of roofs resulting in somewhat reasonable roofless terrain as a result.

Describe the solution

Adding ter_set_bashed_from_above entries to all roofed terrain in terrain-floors-indoors.json as well as adding a few roofless terrains to terrain-floors-outdoors for usage.
Adjusted a couple of ter_set values to be more consistent as a bycatch (t_dirt is better represented by t_null for instance, as that should resolve into something that's reasonable for the location).

Describe alternatives you've considered

  • Introducing a different mechanism than bashing for the transformation when a roof is removed as suggested by the suggestion.
  • Introducing construction entries for the restoration of roofs.
  • Introduction of additional roof less terrain, as some are transformations aren't too great (such as crappy metal roofed terrain being converted to a metal gangway, as a nice metal floor seemed a worse choice).
  • Revamp of the construction process such that the roofless versions become steps in the construction process, so the roof is added at the end.
  • Guerilla change to the construction process on top of roof less terrain where you can specify the kind of roof you want on a roof less terrain, and the process would generate the standard roofed terrain but with the selected roof on the tile above. Not sure if it's reasonable to implement from a technical perspective, though. It might not be well received by the main devs either.

Testing

  • Copied the modified JSON files elsewhere.

  • Switched to master (and hacked in the missed include that's PR:ed) and compiled.

  • Copied the saved JSON filed back (into "master").

  • Saved a save where a companion is clearing a hole while the PC is standing in the basement below.

  • Debug changed the terrain beneath the future hole to a terrain changed by this PR.

  • Waited until clearing was done.

  • Debug checked that the terrain below changed as expected (has to use debug as the terrain looks the same visually with the roof less version.

  • Killed and loaded the save.

  • Repeated the above for each changed terrain. For carpets only one color carpet was tested for each floor material as copy-from should ensure other colors behave the same.

Testing uncovered a few cases where terrain didn't specify roofs, as well as cases where the roof less terrain was misspelled (not exactly helped by the inconsistent nomenclature).

Additional context

As mentioned, the implementation is an attempt at a best fit between existing roofed and unroofed terrain, with the introduction of new terrain in only a bare minimum of cases. Reviewers might want new roof less terrain for additional questionable matches.

Note that this PR is not contain everything that ought to be updated, only a single file. There's more that needs doing. However, it might be that further efforts may require the addition of new entries to terrain-floors-outdoors which will cause the incompetent conflict detection to consider it a "conflict" to add entries directly after the entries added here, so the next step should not be performed after this PR is merged (assuming it's approved).

Apart from the errors detected during testing, there are several suspect terrain definitions in the indoors file that don't have roofs. There's a whole suite of colored ones, for instance. Those were not touched by this PR, both because they're slightly out of scope, but mostly because I don't know if they should have roofs.

@github-actions github-actions bot added [JSON] Changes (can be) made in JSON Fields / Furniture / Terrain / Traps Objects that are part of the map or its features. json-styled JSON lint passed, label assigned by github actions astyled astyled PR, label is assigned by github actions labels Apr 10, 2024
@PatrikLundell PatrikLundell marked this pull request as draft April 18, 2024 10:37
@PatrikLundell PatrikLundell marked this pull request as ready for review April 18, 2024 11:37
@PatrikLundell
Copy link
Contributor Author

Closing this as I'll try the avenue of separating roofs from the rooms beneath instead.
That's a better approach, provided it works out, but it's also a longer route.

@PatrikLundell PatrikLundell deleted the smash_concrete_roof branch November 13, 2024 14:38
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 Fields / Furniture / Terrain / Traps Objects that are part of the map or its features. [JSON] Changes (can be) made in JSON json-styled JSON lint passed, label assigned by github actions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant