Jump to content

Random calls in CentipedeCaveTask execute immediately, causing inconsistent caves seeds (I'm certain this is the right cause this time)


mr. brj
  • Fixed

Currently, the caves generate a different map every time the same seed is used.

In map/tasks/caves.lua, changing the number of "VentsRoom" and "RockTreeRoom" like the following seems to fix this inconsistency, so I want to suggest this change (which is actually otherwise present in every similar case):

Spoiler

AddTask("CentipedeCaveTask", {
    locks={ LOCKS.CAVE, LOCKS.TIER4, },
    keys_given={ KEYS.CAVE, KEYS.TIER5, KEYS.CENTIPEDE },
    room_choices={
--        ["VentsRoom"] = 2 + math.random(2),
--        ["RockTreeRoom"] = 1 + math.random(2),
        ["VentsRoom"] = function() return 2 + math.random(2) end,
        ["RockTreeRoom"] = function() return 1 + math.random(2) end,
        ["VentsRoom_exit"] = 3,
        ["CentipedeNest"] = 1,
    },

 


Steps to Reproduce

1) generate multiple caves worlds using the same seed

2) they are all different

3) try the same but with the suggestion above

4) they are (hopefully but almost certainly) all the same

  • Like 2



User Feedback


A developer has marked this issue as fixed. This means that the issue has been addressed in the current development build and will likely be in the next update.

Is this a bug?  Unless I've remembered incorrectly, I remember that using the same seed for DST world generation had always resulted in different results.  The same seed never produced same results.

Share this comment


Link to comment
Share on other sites

4 hours ago, worldking said:

Is this a bug?  Unless I've remembered incorrectly, I remember that using the same seed for DST world generation had always resulted in different results.  The same seed never produced same results.

It's more so a small oversight. Using the same seed in a vanilla world should always result in the same map (landmasses, objects, etc.) but the contents of this map can (and should) be in different conditions after reusing that seed (for example what's inside the Terrarium chest, how tall the marble statues are, how much durability the dark sword from your lucky dark sword boon has, etc.).

Share this comment


Link to comment
Share on other sites



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...