Jump to content

moon_rock_shell doesn't spawn on high boulder density


chaosmonkey
  • Pending

When boulders are set to a high setting such as insane (often done for megabase worlds), the special boulder moon_rock_shell doesn't spawn as expected. This prevents the player from obtaining the Celestial Orb, building the Celestial Portal, and advancing the main quest line. The cause of this is a fixed, low density setting in the shadowmeteor script.

diff --git a/scripts/prefabs/shadowmeteor.lua b/scripts/prefabs/shadowmeteor.lua
index f9ffb28..6fd072f 100644
--- a/scripts/prefabs/shadowmeteor.lua
+++ b/scripts/prefabs/shadowmeteor.lua
@@ -37,7 +37,7 @@ for k, v in pairs(SMASHABLE_WORK_ACTIONS) do
 end
 local NON_SMASHABLE_TAGS = { "INLIMBO", "playerghost", "meteor_protection" }

-local DENSITY = 0.1 -- the approximate density of rock prefabs in the rocky biomes
+local DENSITY = 3.5 -- the approximate density of rock prefabs in the rocky biomes (insane)
 local FIVERADIUS = CalculateFiveRadius(DENSITY)
 local EXCLUDE_RADIUS = 3
 local BOULDER_TAGS = {"boulder"}

The DENSITY value should be dynamic based on the world gen value of boulder density. Based on the implementation of CalculateFiveRadius, I found 3.5 to be approximately the right value for a boulders density set to insane.

However, I wonder if this density restriction even makes sense anymore and whether meteors should have fixed chance to spawn new stuff regardless of boulder density. Thematically, it makes a lot more sense if meteors can always leave boulders behind.


Steps to Reproduce

- Create a world with insane boulders density

- Observe no new boulders "falling" from meteor showers until the meteor showers (hopefully) destroy enough boulders to make room for new ones. (this can take hundreds of days)

- Observe that if you create a world with low boulder density or otherwise mine all the boulders in the meteor shower area that the rock_moon_shell can spawn.

  • Like 2



User Feedback


There are no comments to display.



Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
  • Create New...