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

[Innawoods] Fixes trails spawning manmade stuff #78777

Merged
merged 2 commits into from
Jan 5, 2025

Conversation

Maarifrah
Copy link
Contributor

Summary

Bugfixes "Innawoods - Fixes trails spawning manmade stuff"

Purpose of change

Trails in Innawoods were spawning things like map boards, signs, benches, ect. As indicated by the Innawoods readme.md, having man-made objects present is not within the design goals of the mod.
Here are the precise issues addressed:

  • Some segments of forest trails were spawning map boards and signs.
  • Some variations of 24x24 trail intersections (which are also called for trail endings, not just intersections) were spawning nests with furniture such as benches, horse posts, a tiny wooden shed with supplies in it, and a fire ring.

Describe the solution

For the parts of the forest trails that were spawning map boards and signs, I simply overwrote the vanilla game's trail palette and removed any nest spawns for man-made objects, using null instead.

The problem with trail intersections required using the solution that aftershock: exoplanet and desert region used to control roads, bridges and lakes spawning:

  1. In the base game, assigns a weight global variable to all vanilla trails that include the offending 24x24 intersection in their list for potential chunk spawns with a value of 1000.
  2. Creates an EoC in Innawoods that fires at game start that reduces this global variable to 0.
  3. Replacement mapgen files within the innawoods mod are then used in lieu of the vanilla mapgen files that were disabled by this EoC.
  4. These replacement mapgen files use a modded innawoods-specific variant of the intersection that do not include the man-made objects.

Describe alternatives you've considered

Assigning the global variable to all the individual segments of vanilla trails. I didn't do this because then I would be required to include replacement mapgen for all of those affected trails. I decided that this would be unnecessary, so I kept the weight global variables specific to the parts of trails that were causing issues.

Testing

INNAWOODS:
image
The intersections (the big round dirt patches) are no longer spawning furniture, and the other trail segments aren't spawning signs/ect.

VANILLA:
image
The base game is unaffected. Intersections retain the potential to spawn man-made furniture and other trail segments are correctly spawning their signs and map boards.

Additional context

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

@github-actions github-actions bot added [JSON] Changes (can be) made in JSON Map / Mapgen Overmap, Mapgen, Map extras, Map display EOC: Effects On Condition Anything concerning Effects On Condition Mods: Innawood 🌲 Anything to do with Innawood mod <Bugfix> This is a fix for a bug (or closes open issue) astyled astyled PR, label is assigned by github actions labels Dec 26, 2024
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@github-actions github-actions bot added the json-styled JSON lint passed, label assigned by github actions label Dec 26, 2024
@Light-Wave
Copy link
Contributor

Sounds reasonable. Innawood spawning maps and benches and stuff is indeed a bug.

@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Jan 5, 2025
@Maleclypse Maleclypse merged commit 51a54ce into CleverRaven:master Jan 5, 2025
22 of 26 checks passed
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 <Bugfix> This is a fix for a bug (or closes open issue) EOC: Effects On Condition Anything concerning Effects On Condition [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 Mods: Innawood 🌲 Anything to do with Innawood mod
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants