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

Unhardcode "crater", improve appearance of mutable craters #66499

Merged
merged 20 commits into from
Jul 2, 2023

Conversation

Procyonae
Copy link
Contributor

@Procyonae Procyonae commented Jun 27, 2023

Summary

Content "Mutable (the large not extra ones) craters are now round"

Purpose of change

Hardcoding bad
Square craters ugly

Describe the solution

Unhardcodes "crater" and removes all references to it in the c++
New map creates round craters with a single map for the edges using neighbour based nests
Also added a small version for some more variety, annoyingly #59781 means I can't use less bombs without resulting in straight borders on the explosion (tried 1 and 2)
All the crater maps now use fallback_predecessor_mapgen allowing the mutable to spawn over roads sensibly and resulting in items where stuff like trees and road are destroyed
Slightly reduces the occurrences to make up for the fact they're bigger now
All unsolved joins are resolved over already altered terrain so should never cause issues

Describe alternatives you've considered

Not ruining the beautifully simplistic mutable by making the terrain's radius small enough it wouldn't need to be changed to accommodate corners
Sadly while vehicles that spawn in the blast get decimated as expected, ones that spawn over the place_rubble get damaged very inconsistently and I'm getting the occasional crash that appears to be from that so I'm removing all vehicles outside of the small area of no rubble which basically means you'll never see vehicles getting wrecked v_v
Ideally it would be able to spawn anywhere but that's not viable presently
I might make a follow up PR where I:

  • Make it more randomly patchy at the edges (see the wibbly wobbly commit for the general idea)
  • Allow it to spawn over more exclusively z0 maps like fields/pastures etc
  • Add sensible items to the crater, maybe a fighter crash site variant as an alternate choice with no join in the first phase so it only makes one crater

Testing

Compiled and checked every phase variant spawned by making them blue one at a time

Testing Screenshot

image

Additional context

Screenshots

image
Example over road

image
Example in forest

image
Very rare vehicle getting destroyed

image
Map screenshot to show potential sizes and shapes, minimum size is one 3x3 crater (Obv this many don't spawn)

@github-actions github-actions bot added [C++] Changes (can be) made in C++. Previously named `Code` [JSON] Changes (can be) made in JSON Fields / Furniture / Terrain / Traps Objects that are part of the map or its features. Map / Mapgen Overmap, Mapgen, Map extras, Map display json-styled JSON lint passed, label assigned by github actions astyled astyled PR, label is assigned by github actions labels Jun 27, 2023
@ashGlaw
Copy link
Contributor

ashGlaw commented Jun 28, 2023

Presently, are craters just sheer pits? Might make some sense for some ramps to spawn, that way the craters can be explored and don't provide some handy zombie storage

@Procyonae
Copy link
Contributor Author

Presently, are craters just sheer pits? Might make some sense for some ramps to spawn, that way the craters can be explored and don't provide some handy zombie storage

They're currently (and still will be) explosions that occur when they enter your reality bubble the same as the extra currently which makes them fairly random without needing to do anything clever but at the same time means adding ramps would be very awkward if not impossible. Feasibly the fake explosive could be replaced with an EOC that causes an explosion and then creates ramps/slopes where appropriate but that's very much out of scope.
I could swap the explosives out for "set": "bash" or "rubble" nests with slopes at the sides but that would be messy and neither of those are particularly robust at destroying terrain, or I could just make holes and manually fill them with expected items but that's far from ideal.
I will say that they don't currently place any items themselves other than a very underwhelming "wreckage" itemgroup around the actual blast so there's no purpose to exploring them particularly but the zombie storage problem is pretty silly.
Also just generally I'd argue destroyed natural terrain should result in ramps/slopes but the current implementation of ramps/slopes is really iffy already so I defo won't be attempting to add that.

@github-actions github-actions bot added json-styled JSON lint passed, label assigned by github actions and removed json-styled JSON lint passed, label assigned by github actions labels Jun 28, 2023
@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Jun 29, 2023
@LovamKicsiGazsii
Copy link
Contributor

The screenshot's looking seriously awesome, well done so far!

@Procyonae Procyonae force-pushed the UnhardcodeCraters branch from adb344a to 135b693 Compare June 30, 2023 13:51
@github-actions github-actions bot removed the BasicBuildPassed This PR builds correctly, label assigned by github actions label Jun 30, 2023
@Procyonae Procyonae marked this pull request as ready for review June 30, 2023 14:32
@github-actions github-actions bot added <Documentation> Design documents, internal info, guides and help. Mods Issues related to mods or modding [Markdown] Markdown issues and PRs Mods: Innawood 🌲 Anything to do with Innawood mod labels Jun 30, 2023
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto-requesting reviews from non-collaborators: @Light-Wave

@Procyonae
Copy link
Contributor Author

Innawood's crater was added in #54149, hasn't been touched since and only appears to exist to remove the radioactivity and that's been removed from the vanilla crater anyway to save you some time ^^

@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Jun 30, 2023
@dseguin dseguin merged commit 0e57fb8 into CleverRaven:master Jul 2, 2023
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 BasicBuildPassed This PR builds correctly, label assigned by github actions [C++] Changes (can be) made in C++. Previously named `Code` <Documentation> Design documents, internal info, guides and help. 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 Map / Mapgen Overmap, Mapgen, Map extras, Map display [Markdown] Markdown issues and PRs Mods: Innawood 🌲 Anything to do with Innawood mod Mods Issues related to mods or modding
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants