Jump to content

Lunar Rifts Not Spawning More Crystals sometimes


lakhnish
  • Pending

About every 3/4 of a day to I think 1.75 of a day, the Lunar Rifts should spawn more Rift Crystal for the player to mine.

However, if I mine at the beginning of stage 2, I never get more crystals until stage 3 occurs.

If I mine at the beginning of stage 3, I again don't get more rift crystals to spawn.


Steps to Reproduce

Camp a stage 2 and stage 3 Lunar Rift.

See that you barely get Rift Crystals to show up.




User Feedback


Crystal spawns are weird. The 0.75-1.25 day timer doesn't actually spawn crystals, it just schedules a new crystal set to be spawned 1 - 2.167 days from the time that timer starts (Changes during phase 3 to 0 - 5.33 days). There's a max of 1 set of crystals during phase 2 and 3 sets during phase 3. It looks like it only queues crystal sets up to this max, but I'm not positive that always holds true.

I did a data set on this recently (this was update 572130, before the beta):
image.thumb.png.d888fa94abcb8483078b1c95b03282dd.png
(This is in day units. Testing methodology was getting TheWorld's age debug string every time a crystal spawned, timer stopped, or phase changed. Note the orange sections don't count for scheduling crystal spawns because I didn't mine them all in time.)

I'm getting 1 - 2.167 and 0 - 5.33 from an online lua compiler interpreting this code, which is a re-arranged version of the code from lunarrift_portal.lua

Spoiler
-- Code is taken from lunarrift_portal.lua

local TILE_SCALE = 4
local MIN_CRYSTAL_DISTANCE = 3.0
local MAX_CRYSTAL_DISTANCE_BY_STAGE = {0.0, 6.5, 22.5}
local CRYSTALS_PER_RING = 4
local TERRAFORM_DELAY = (4.0 * 480) / 3

-- These functions return time_delay with math.random() being substituted for 0 or 1
local function calcMinTime(phase)
    return math.max(0, ((MIN_CRYSTAL_DISTANCE + math.sqrt(0)*(MAX_CRYSTAL_DISTANCE_BY_STAGE[phase] - MIN_CRYSTAL_DISTANCE) - (MAX_CRYSTAL_DISTANCE_BY_STAGE[phase - 1] or 0)) / TILE_SCALE) * TERRAFORM_DELAY)
end
local function calcMaxTime(phase)
    return math.max(0, ((MIN_CRYSTAL_DISTANCE + math.sqrt(1)*(MAX_CRYSTAL_DISTANCE_BY_STAGE[phase] - MIN_CRYSTAL_DISTANCE) - (MAX_CRYSTAL_DISTANCE_BY_STAGE[phase - 1] or 0)) / TILE_SCALE) * TERRAFORM_DELAY)
end

for s = 1, 3 do -- for phases 1-3, print minimum and maximum time for crystals to spawn.
    print("Stage: " .. s)
    print("Minimum time until crystals spawn: " .. calcMinTime(s) .. " seconds or " .. calcMinTime(s) / 480 .. " days")
    print("Maximum time until crystals spawn: " .. calcMaxTime(s) .. " seconds or " .. calcMaxTime(s)  / 480 .. " days")
    if(calcMaxTime(s) - calcMinTime(s) < 0) then
        print("Impossible range, so crystals can't spawn during this phase.")
    end
    print()
end

 

Edited by Arcwell
Corrected phase 3 spawn time and added code for spawn delay
  • Sanity 1

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