Jakepeng99 Posted September 11, 2025 Share Posted September 11, 2025 16 hours ago, Milordo said: No, again. Out of the options. You can't have Glommer in the caves. Whoosh 8 hours ago, viblym said: we already have several bosses like that No we dont 1 Link to comment https://forums.kleientertainment.com/forums/topic/167923-great-depth-worms-spawning-mechanic-needs-completely-rework/page/3/#findComment-1835272 Share on other sites More sharing options...
yyyyyyyyyyyyyyy Posted September 11, 2025 Author Share Posted September 11, 2025 wave 2 occasions 01 calculation 0.05 probability 0.05 wave 3 occasions 001 calculation 0.95*0.1 probability 0.095 wave 4 occasions 0001,0101 calculation 0.95*0.9*0.15+0.05*0.05 probability 0.13075 wave 5 occasions 00001,00101,01001 calculation 0.95*0.9*0.85*0.2+2*0.95*0.1*0.05 probability 0.15845 wave 6 occasions 000001,010101,001001,000101,010001 calculation 0.95*0.9*0.85*0.8*0.25+0.05³+(0.95*0.1)²+2*0.95*0.9*0.15*0.05 probability 0.167325 That's my last explanation on my calculation. As I have no idea how to be clearer. Frankly I didn't expect this would be a problem. 1 Link to comment https://forums.kleientertainment.com/forums/topic/167923-great-depth-worms-spawning-mechanic-needs-completely-rework/page/3/#findComment-1835279 Share on other sites More sharing options...
GrapeVruit Posted September 11, 2025 Share Posted September 11, 2025 (edited) 11 hours ago, viblym said: I'd like it if they just increased the odds of the boss spawning but the "territorial boss" idea sounds very boring, we already have several bosses like that, and every cave boss functions this way. I much prefer the worm actually targeting the player I feel at this point, I'd rather them just make it territorial. I can appreciate them trying something new, but with how its spawning mechanic works now, it just doesn't work the way they wanted it to. I've got 4 worlds with the day count in the hundreds and I've still never gotten to see this guy spawn. Sure, it'd be lame if they made it another cave raid boss, but at least you don't have to wait hundreds of days for the CHANCE to see this thing, with loot that's irrelevant in that point of the game. Edited September 11, 2025 by GrapeVruit 1 1 Link to comment https://forums.kleientertainment.com/forums/topic/167923-great-depth-worms-spawning-mechanic-needs-completely-rework/page/3/#findComment-1835281 Share on other sites More sharing options...
Milordo Posted September 11, 2025 Share Posted September 11, 2025 27 minutes ago, GrapeVruit said: I feel at this point, I'd rather them just make it territorial. I can appreciate them trying something new, but with how its spawning mechanic works now, it just doesn't work the way they wanted it to. I've got 4 worlds with the day count in the hundreds and I've still never gotten to see this guy spawn. Sure, it'd be lame if they made it another cave raid boss, but at least you don't have to wait hundreds of days for the CHANCE to see this thing, with loot that's irrelevant in that point of the game. It's exactly what we discussed here in my post, made the first day of the patch: Three options has been found for now and it's very possible to fix it in a way to still keep Klei's vision. Plus I want to add again that spawning is one of the four problems. The others errors are just as important. It all depends on Klei. 1 Link to comment https://forums.kleientertainment.com/forums/topic/167923-great-depth-worms-spawning-mechanic-needs-completely-rework/page/3/#findComment-1835286 Share on other sites More sharing options...
hyoton123 Posted September 11, 2025 Share Posted September 11, 2025 (edited) Genuine what to the math by OP. Edited September 11, 2025 by hyoton123 Link to comment https://forums.kleientertainment.com/forums/topic/167923-great-depth-worms-spawning-mechanic-needs-completely-rework/page/3/#findComment-1835322 Share on other sites More sharing options...
Well-met Posted September 11, 2025 Share Posted September 11, 2025 though luck guys, beta's basically over 1 1 Link to comment https://forums.kleientertainment.com/forums/topic/167923-great-depth-worms-spawning-mechanic-needs-completely-rework/page/3/#findComment-1835328 Share on other sites More sharing options...
Milordo Posted September 11, 2025 Share Posted September 11, 2025 56 minutes ago, Well-met said: though luck guys, beta's basically over Link to comment https://forums.kleientertainment.com/forums/topic/167923-great-depth-worms-spawning-mechanic-needs-completely-rework/page/3/#findComment-1835352 Share on other sites More sharing options...
-Variant Posted September 11, 2025 Share Posted September 11, 2025 19 hours ago, viblym said: I'd like it if they just increased the odds of the boss spawning but the "territorial boss" idea sounds very boring, we already have several bosses like that, and every cave boss functions this way. I much prefer the worm actually targeting the player ^This, please. I'm growing very tired of bosses being in set locations or needing players to outright go hunting them down. I want to be prey, I like having bosses that can come at a [somewhat] random time. Ways to maybe influence it, I guess, but giving it a set location and/or being summoned on command sound very boring. 2 1 1 Link to comment https://forums.kleientertainment.com/forums/topic/167923-great-depth-worms-spawning-mechanic-needs-completely-rework/page/3/#findComment-1835364 Share on other sites More sharing options...
Popian Posted September 11, 2025 Share Posted September 11, 2025 So what do you want, 1/4-1/8 waves? You want it frequent enough to be a reliable source of threat and loot, but also infrequent enough so that it's not as much of a threat to high effort/non-renewable things. Note that there are other potential changes like returning some types of items that it ate or making eat time more proportional to how much was eaten to consider. 2 1 Link to comment https://forums.kleientertainment.com/forums/topic/167923-great-depth-worms-spawning-mechanic-needs-completely-rework/page/3/#findComment-1835379 Share on other sites More sharing options...
Pep61 Posted September 12, 2025 Share Posted September 12, 2025 It could easily be a new cave raid boss. the random spawning chance it's so thin and it's just SO destructive.... it's a big nuisance, not even worth fighting it at all. no even by the VERY slim chance of fossils....the fight is triccy but doable. but again , not even worth the time or resource to fight it. this boss would work so much better as a raid boss with new blueprints, maybe an upgrade to moggles/ minerhat or something. If they are gonna keep it like that ... at least would be convenient to give us a bigger timeframe to even attack while its munching , or even giving it a new "weakness" just like how mutated bosses have I get that klei's idea is to make a varglet equivalent for caves... but god, this is way worse than varglets in every way possible. It has sketch, own theme song and yet is not a boss!? bruh.... there's a mod at the workshop where it gives big worm a rework, phases, new attack and a rage mode. a very interesting mod over all... https://steamcommunity.com/sharedfiles/filedetails/?id=3360553731 2 Link to comment https://forums.kleientertainment.com/forums/topic/167923-great-depth-worms-spawning-mechanic-needs-completely-rework/page/3/#findComment-1835389 Share on other sites More sharing options...
Swiyss Posted September 12, 2025 Share Posted September 12, 2025 I think it's perfect the way it is, in around 100+ days worlds, I got it every single time. Also, the boss is kinda hard to defeat if you have no idea what it does so it being random is great. I already don't really like the deerclops being guaranteed to spawn if you got flares, so adding another way of spawning this boss wouldn't really satisfy me. Like, I don't have much of a problem with the hostile flare, it just bothers me 25% of the time when I remember it exists, but 75% of the time I feel like it's great to have. But I'm pretty sure a way to call the giant worm would be too programmed, like too scripted, too boring, too normal. I like the random aspect of this thing just happening to be around you, sensing your steps and chasing you to eat you alive. 2 1 Link to comment https://forums.kleientertainment.com/forums/topic/167923-great-depth-worms-spawning-mechanic-needs-completely-rework/page/3/#findComment-1835392 Share on other sites More sharing options...
Dingle Posted September 12, 2025 Share Posted September 12, 2025 24 minutes ago, astareus said: I think it's perfect the way it is, in around 100+ days worlds, I got it every single time. Also, the boss is kinda hard to defeat if you have no idea what it does so it being random is great. I already don't really like the deerclops being guaranteed to spawn if you got flares, so adding another way of spawning this boss wouldn't really satisfy me. Like, I don't have much of a problem with the hostile flare, it just bothers me 25% of the time when I remember it exists, but 75% of the time I feel like it's great to have. But I'm pretty sure a way to call the giant worm would be too programmed, like too scripted, too boring, too normal. I like the random aspect of this thing just happening to be around you, sensing your steps and chasing you to eat you alive. Never seen it. Are you spending a ton of time underground? Link to comment https://forums.kleientertainment.com/forums/topic/167923-great-depth-worms-spawning-mechanic-needs-completely-rework/page/3/#findComment-1835400 Share on other sites More sharing options...
ThemInspectors Posted September 12, 2025 Share Posted September 12, 2025 18 hours ago, Bumber64 said: I want to say that I don't think the mechanic fundamentally needs reworking, just tweaking. IIRC, setting GDW to Often changes it to +10% per wave and caps at 100%. Should we just make that Default? We can run the numbers on it. +10% per wave is really quite quick. Median time to happen is wave 4. 1/4 encounters will happen on wave 2 or wave 3 (As in, only 1 or 2 regular waves before GDW comes). (The 100% cap doesn't do much to change the distribution, since most encounters are before wave 6) Wave GDW (Individual) GDW (Any) 1 0.00% 0.00% 2 10.00% 10.00% 3 20.00% 28.00% 4 30.00% 49.60% 5 40.00% 69.76% 6 50.00% 84.88% 7 60.00% 93.95% 8 70.00% 98.19% 9 80.00% 99.64% 10 90.00% 99.96% 11 100.00% 100.00% I think right now as it spawns, a little less than once a year is fine. Maybe OP thinks it's too low, but he can just change the settings on his own. Link to comment https://forums.kleientertainment.com/forums/topic/167923-great-depth-worms-spawning-mechanic-needs-completely-rework/page/3/#findComment-1835432 Share on other sites More sharing options...
ThemInspectors Posted September 12, 2025 Share Posted September 12, 2025 16 hours ago, yyyyyyyyyyyyyyy said: That's my last explanation on my calculation. As I have no idea how to be clearer. Frankly I didn't expect this would be a problem. Thanks for sharing your process 10 hours ago, hyoton123 said: Genuine what to the math by OP. It's not incorrect, it just doesn't say what you think it does. Their analysis is the probability that wave X has a GDW, given that you know nothing about the result of previous waves and that the first wave has a probability of 0. The results aren't applicable anymore after a pass/fail happens. This is because co-successes are counted together and because encountering a fail event updates your knowledge of the future probability distribution. It doesn't really tell you how long you can expect to wait for a GDW though. Link to comment https://forums.kleientertainment.com/forums/topic/167923-great-depth-worms-spawning-mechanic-needs-completely-rework/page/3/#findComment-1835441 Share on other sites More sharing options...
Milordo Posted September 12, 2025 Share Posted September 12, 2025 5 hours ago, Pep61 said: It has sketch, own theme song and yet is not a boss!? bruh.... It is..... Link to comment https://forums.kleientertainment.com/forums/topic/167923-great-depth-worms-spawning-mechanic-needs-completely-rework/page/3/#findComment-1835450 Share on other sites More sharing options...
Bumber64 Posted September 12, 2025 Share Posted September 12, 2025 (edited) I've updated my script: Spoiler local chance, max_chance = {0.0, 0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.35, 0.40, 0.45}, 0.5 local mult = 1.0 --Rare = 0.5; Default = 1.0; Often = 2.0 local function test_occasion(s) --Analyze probability for a string like '010' local idx, gdw, t = 1, 0, {} --Chance index, GDW count, equation for x = 1, #s do --Iterate chars if s:byte(x) == ('1'):byte() then --GDW wave table.insert(t, math.min((chance[idx] or max_chance)*mult, 1.0)) --Store current chance idx = 1; gdw = gdw+1 --Reset chance, count the GDW else --Normal wave table.insert(t, 1.0-math.min((chance[idx] or max_chance)*mult, 1.0)) --Chance of not GDW idx = idx+1 --Increase next chance end end local prob = 1.0 for _,v in ipairs(t) do --Multiply probabilities prob = prob * v end local result = {s = s, p = prob, t = t, gdw = gdw} --Save these result.text = ('%s: %.6f (%d GDW)'):format(s, prob, gdw) --Occasion text result.math = table.concat(t, ' * ') --Show math return result end local function recurse_occasions(s, waves, results) --Handle all occasions recursively local w = #s --Length is current wave if w > waves then return --Exceeded wave limit end results[w] = results[w] or {} --Group results by wave table.insert(results[w], test_occasion(s)) --Test occasion and store results recurse_occasions(s..'0', waves, results) --Next wave is not GDW if s:sub(-1) == '0' then --'11' is invalid recurse_occasions(s..'1', waves, results) --Next wave is GDW end return results end local function analyze_waves(waves, verbose) --Analyze all occasions and print local results = recurse_occasions('0', waves, {}) --First wave never GDW for k,v in ipairs(results) do --Get results by wave print('-- Wave #'..k..' --') local tot, cur = {}, 0.0 --Track probability per GDW count; current wave for _,r in ipairs(v) do --Iterate each occasion in wave if verbose and verbose > 1 then print(r.text) --Occasion text if verbose > 2 then --Show the equation print(' = '..r.math) end end tot[r.gdw+1] = (tot[r.gdw+1] or 0.0) + r.p --Add to total; tot[1] is 0 GDW if r.s:sub(-1) == '1' then cur = cur + r.p --Current wave contribution end end local out, avg = nil, 0.0 --GDW count text, average yield for x,y in ipairs(tot) do --First entry is a special case avg = avg + (x-1)*y --Weighted average GDW out = (out and ('%s, %d: %.6f'):format(out, x-1, y) or ('GDW Count: [%d: %.6f'):format(x-1, y)) end if verbose and verbose > 0 then print(out..']') --Print counts end print(('Seen GDW: %.6f; This Wave: %.6f; Cumulative: %.6f\n'):format(1.0-tot[1], cur, avg)) end end --This program is not optimized. Analyzing more than 25 waves is not advised. analyze_waves(20, 0) --Number of waves; 0: Just totals, 1: Show counts, 2: Show occasions, 3: Show math The values for the table in the OP turn out to be these: Wave Probability 1 0 2 0.05 3 0.095 4 0.13075 5 0.15485 6 0.167325 7 0.17043 8 0.167754 9 0.162991 10 0.158888 11 0.15673 12 0.154847 13 0.156707 14 0.158567 15 0.159448 16 0.159496 17 0.159147 18 0.158763 19 0.158527 20 0.158465 The script isn't optimized for more than 25 waves, but I forced it to do 30 so I could make some graphs. Here's for the individual probabilities: And here's for the cumulative yield: 42 minutes ago, ThemInspectors said: This is because co-successes are counted together and because encountering a fail event updates your knowledge of the future probability distribution. I think that's necessary for predicting if your next wave contains a GDW, but is that valid for determining how many GDWs are in a given time interval? The focus seems to be on farming them, not when we'll actually see one. Edited September 12, 2025 by Bumber64 1 Link to comment https://forums.kleientertainment.com/forums/topic/167923-great-depth-worms-spawning-mechanic-needs-completely-rework/page/3/#findComment-1835451 Share on other sites More sharing options...
Milordo Posted September 12, 2025 Share Posted September 12, 2025 15 minutes ago, Bumber64 said: The focus seems to be on farming them, not when we'll actually see one. Farming and being a threat Link to comment https://forums.kleientertainment.com/forums/topic/167923-great-depth-worms-spawning-mechanic-needs-completely-rework/page/3/#findComment-1835454 Share on other sites More sharing options...
Bumber64 Posted September 12, 2025 Share Posted September 12, 2025 (edited) I got the data for the various settings: Default (1.0 mult) Rare (0.5 mult) Often (2.0 mult) Single Cumulative Single Cumulative Single Cumulative 0 0 0 0 0 0 0.05 0.05 0.025 0.025 0.1 0.1 0.095 0.145 0.04875 0.07375 0.18 0.28 0.13075 0.27575 0.070094 0.143844 0.226 0.506 0.15485 0.4306 0.088116 0.231959 0.2376 0.7436 0.167325 0.597925 0.102254 0.334213 0.2278 0.9714 0.17043 0.768355 0.112356 0.446569 0.2142 1.1856 0.167754 0.936109 0.118672 0.56524 0.208108 1.393708 0.162991 1.0991 0.121778 0.687019 0.21011 1.603818 0.158888 1.257988 0.122462 0.809481 0.214472 1.81829 0.15673 1.414717 0.121579 0.93106 0.216525 2.034815 0.154847 1.569564 0.114423 1.045483 0.215907 2.250722 0.156707 1.726272 0.111529 1.157012 0.214613 2.465335 0.158567 1.884839 0.110998 1.26801 0.214044 2.679379 0.159448 2.044287 0.111568 1.379578 0.214213 2.893591 0.159496 2.203783 0.112463 1.492041 0.214561 3.108152 0.159147 2.36293 0.113263 1.605304 0.214726 3.322878 0.158763 2.521693 0.113795 1.719099 0.214689 3.537567 0.158527 2.680221 0.114038 1.833137 0.214593 3.75216 0.158465 2.838686 0.114052 1.947189 0.214543 3.966704 Individual: Cumulative: If we take the reciprocals of the last individual values (i.e., when they're stable), that should give the number of waves per GDW in the long run: Default: 6.3 | Rare: 8.8 | Often: 4.7 Taken as days: Default: 69.4 | Rare: 96.4 | Often: 51.2 As years: Default: 0.99 (1.0 per) | Rare: 1.4 (0.73 per) | Often: 0.73 (1.37 per) Often doesn't actually seem to help that much? It's like 33% more GDW each year after the first year. Edited September 12, 2025 by Bumber64 2 Link to comment https://forums.kleientertainment.com/forums/topic/167923-great-depth-worms-spawning-mechanic-needs-completely-rework/page/3/#findComment-1835456 Share on other sites More sharing options...
Bumber64 Posted September 12, 2025 Share Posted September 12, 2025 (edited) I think the main thing to remember is that GDW isn't seasonal. If you pop your head up to the surface in autumn or winter, you're guaranteed to be chased down by a giant. Two threats a year. GDW is the only ambush giant in the caves, so you'll only get (an average of) one threat a year. However, that's only if you stick around permanently! If you're just entering the caves now and then, you're likely to have only a normal worm wave waiting for you when you step in. Say you spend the entire summer (15 days) plus another 20 days doing random stuff. That's half a year, so you're actually only going to see a GDW every two years through standard gameplay. Even then you're at the whims of RNG, so you might just not see one for a few years. Edited September 12, 2025 by Bumber64 2 1 Link to comment https://forums.kleientertainment.com/forums/topic/167923-great-depth-worms-spawning-mechanic-needs-completely-rework/page/3/#findComment-1835463 Share on other sites More sharing options...
ThemInspectors Posted September 12, 2025 Share Posted September 12, 2025 (edited) 1 hour ago, Bumber64 said: The focus seems to be on farming them, not when we'll actually see one. Admittedly, the drops aren't super amazing from the GDW, but if y'all are trying to farm the giant ahh worm boss but realizing it's a bad investment compared to killing dragonfly, meanwhile I'm trying to outrun utter cataclysmic destruction of my cave base, I feel like we're playing two very different games. Edited September 12, 2025 by ThemInspectors Link to comment https://forums.kleientertainment.com/forums/topic/167923-great-depth-worms-spawning-mechanic-needs-completely-rework/page/3/#findComment-1835465 Share on other sites More sharing options...
Bumber64 Posted September 12, 2025 Share Posted September 12, 2025 (edited) 23 minutes ago, ThemInspectors said: Admittedly, the drops aren't super amazing from the GDW, but if y'all are trying to farm the giant ahh worm boss but realizing it's a bad investment compared to killing dragonfly, meanwhile I'm trying to outrun utter cataclysmic destruction of my cave base, I feel like we're playing two very different games. It's only 5k health, right between Deerclops and Bearger. Dragonfly at 27.5k isn't in the same ballpark. Given it simply despawns if you outrun it, and only spawns right on the player, it's only a problem if your base is so big you can't get out of it in 90 seconds. (It looks like there's another warning that plays 500 seconds before? That'd be over 8 minutes of advance warning.) It's not so much about the loot (though it is a renewable source of fossils and boulderboughs). It's designed to be the threat the caves were lacking compared to surface. The cave threat ought to be about as prevalent. Edited September 12, 2025 by Bumber64 Link to comment https://forums.kleientertainment.com/forums/topic/167923-great-depth-worms-spawning-mechanic-needs-completely-rework/page/3/#findComment-1835467 Share on other sites More sharing options...
Milordo Posted September 12, 2025 Share Posted September 12, 2025 10 minutes ago, Bumber64 said: I think the main thing to remember is that GDW isn't seasonal. If you pop your head up to the surface in autumn or winter, you're guaranteed to be chased down by a giant. Two threats a year. GDW is the only ambush giant in the caves, so you'll only get (an average of) one threat a year. However, that's only if you stick around permanently! If you're just entering the caves now and then, you're likely to have only a normal worm wave waiting for you when you step in. Say you spend the entire summer (15 days) plus another 20 days doing random stuff. That's half a year, so you're actually only going to see a GDW every two years through standard gameplay. Even then you're at the whims of RNG, so you might just not see one for a few years. 6 minutes ago, ThemInspectors said: Admittedly, the drops aren't super amazing from the GDW, but if y'all are trying to farm the giant ahh worm boss but realizing it's a bad investment compared to killing dragonfly, meanwhile I'm trying to outrun utter cataclysmic destruction of my cave base, I feel like we're playing two very different games. It's a bad investment, as of NOW. Again, in my post I showed perfectly. If those changes were in place, farming "ahhh worm boss" (lol) wouldn't be at all bad investment, considering GDW is easier than Dragonfly, and can/could give things that Dragonfly can't. Then why are you trying to outrun the utter cataclysmic destruction of your cave base? Please, absolutely don't take it the wrong way, I'm trying to help, but where are your scarse about GDW? It spawns on you, keep run in a straight line and it will despawns fast, otherwise kill it with the best way and it will die in about 2 minutes or even less depending on your character and weapons. Unless you had a bad situation before GDW but I can help you if you describe me. Link to comment https://forums.kleientertainment.com/forums/topic/167923-great-depth-worms-spawning-mechanic-needs-completely-rework/page/3/#findComment-1835468 Share on other sites More sharing options...
ThemInspectors Posted September 12, 2025 Share Posted September 12, 2025 52 minutes ago, Bumber64 said: I got the data for the various settings: Default (1.0 mult) Rare (0.5 mult) Often (2.0 mult) Single Cumulative Single Cumulative Single Cumulative 0 0 0 0 0 0 0.05 0.05 0.025 0.025 0.1 0.1 0.095 0.145 0.04875 0.07375 0.18 0.28 0.13075 0.27575 0.070094 0.143844 0.226 0.506 0.15485 0.4306 0.088116 0.231959 0.2376 0.7436 0.167325 0.597925 0.102254 0.334213 0.2278 0.9714 0.17043 0.768355 0.112356 0.446569 0.2142 1.1856 0.167754 0.936109 0.118672 0.56524 0.208108 1.393708 0.162991 1.0991 0.121778 0.687019 0.21011 1.603818 0.158888 1.257988 0.122462 0.809481 0.214472 1.81829 0.15673 1.414717 0.121579 0.93106 0.216525 2.034815 0.154847 1.569564 0.114423 1.045483 0.215907 2.250722 0.156707 1.726272 0.111529 1.157012 0.214613 2.465335 0.158567 1.884839 0.110998 1.26801 0.214044 2.679379 0.159448 2.044287 0.111568 1.379578 0.214213 2.893591 0.159496 2.203783 0.112463 1.492041 0.214561 3.108152 0.159147 2.36293 0.113263 1.605304 0.214726 3.322878 0.158763 2.521693 0.113795 1.719099 0.214689 3.537567 0.158527 2.680221 0.114038 1.833137 0.214593 3.75216 0.158465 2.838686 0.114052 1.947189 0.214543 3.966704 1 hour ago, Bumber64 said: I've updated my script: Reveal hidden contents local chance, max_chance = {0.0, 0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.35, 0.40, 0.45}, 0.5 local mult = 1.0 --Rare = 0.5; Default = 1.0; Often = 2.0 local function test_occasion(s) --Analyze probability for a string like '010' local idx, gdw, t = 1, 0, {} --Chance index, GDW count, equation for x = 1, #s do --Iterate chars if s:byte(x) == ('1'):byte() then --GDW wave table.insert(t, math.min((chance[idx] or max_chance)*mult, 1.0)) --Store current chance idx = 1; gdw = gdw+1 --Reset chance, count the GDW else --Normal wave table.insert(t, 1.0-math.min((chance[idx] or max_chance)*mult, 1.0)) --Chance of not GDW idx = idx+1 --Increase next chance end end local prob = 1.0 for _,v in ipairs(t) do --Multiply probabilities prob = prob * v end local result = {s = s, p = prob, t = t, gdw = gdw} --Save these result.text = ('%s: %.6f (%d GDW)'):format(s, prob, gdw) --Occasion text result.math = table.concat(t, ' * ') --Show math return result end local function recurse_occasions(s, waves, results) --Handle all occasions recursively local w = #s --Length is current wave if w > waves then return --Exceeded wave limit end results[w] = results[w] or {} --Group results by wave table.insert(results[w], test_occasion(s)) --Test occasion and store results recurse_occasions(s..'0', waves, results) --Next wave is not GDW if s:sub(-1) == '0' then --'11' is invalid recurse_occasions(s..'1', waves, results) --Next wave is GDW end return results end local function analyze_waves(waves, verbose) --Analyze all occasions and print local results = recurse_occasions('0', waves, {}) --First wave never GDW for k,v in ipairs(results) do --Get results by wave print('-- Wave #'..k..' --') local tot, cur = {}, 0.0 --Track probability per GDW count; current wave for _,r in ipairs(v) do --Iterate each occasion in wave if verbose and verbose > 1 then print(r.text) --Occasion text if verbose > 2 then --Show the equation print(' = '..r.math) end end tot[r.gdw+1] = (tot[r.gdw+1] or 0.0) + r.p --Add to total; tot[1] is 0 GDW if r.s:sub(-1) == '1' then cur = cur + r.p --Current wave contribution end end local out, avg = nil, 0.0 --GDW count text, average yield for x,y in ipairs(tot) do --First entry is a special case avg = avg + (x-1)*y --Weighted average GDW out = (out and ('%s, %d: %.6f'):format(out, x-1, y) or ('GDW Count: [%d: %.6f'):format(x-1, y)) end if verbose and verbose > 0 then print(out..']') --Print counts end print(('Seen GDW: %.6f; This Wave: %.6f; Cumulative: %.6f\n'):format(1.0-tot[1], cur, avg)) end end --This program is not optimized. Analyzing more than 25 waves is not advised. analyze_waves(20, 0) --Number of waves; 0: Just totals, 1: Show counts, 2: Show occasions, 3: Show math And here's for the cumulative yield: Cumulative yield doesn't make any sense in this context. This is because if you add the probabilities of one wave to another, it has overlap and you count those events twice. Ex. Wave 2: 01, Wave 4, 0101, 0001. These two overlap. Wave 2 includes these two probabilities 0100, 0101. Link to comment https://forums.kleientertainment.com/forums/topic/167923-great-depth-worms-spawning-mechanic-needs-completely-rework/page/3/#findComment-1835469 Share on other sites More sharing options...
Bumber64 Posted September 12, 2025 Share Posted September 12, 2025 (edited) 1 hour ago, ThemInspectors said: Cumulative yield doesn't make any sense in this context. This is because if you add the probabilities of one wave to another, it has overlap and you count those events twice. Ex. Wave 2: 01, Wave 4, 0101, 0001. These two overlap. Wave 2 includes these two probabilities 0100, 0101. Auugh. So why does the weighted average give the exact same result? -- Wave #4 -- 0000: 0.726750 (0 GDW) 0001: 0.128250 (1 GDW) 0010: 0.095000 (1 GDW) 0100: 0.047500 (1 GDW) 0101: 0.002500 (2 GDW) GDW Count: [0: 0.726750, 1: 0.270750, 2: 0.002500] Seen GDW: 0.273250; This Wave: 0.130750; Cumulative: 0.275750 0.270750 + 2*0.002500 = 0.27575 -- Wave #6 -- 000000: 0.436050 (0 GDW) 000001: 0.145350 (1 GDW) 000010: 0.145350 (1 GDW) 000100: 0.121838 (1 GDW) 000101: 0.006413 (2 GDW) 001000: 0.081225 (1 GDW) 001001: 0.009025 (2 GDW) 001010: 0.004750 (2 GDW) 010000: 0.036338 (1 GDW) 010001: 0.006413 (2 GDW) 010010: 0.004750 (2 GDW) 010100: 0.002375 (2 GDW) 010101: 0.000125 (3 GDW) GDW Count: [0: 0.436050, 1: 0.530100, 2: 0.033725, 3: 0.000125] Seen GDW: 0.563950; This Wave: 0.167325; Cumulative: 0.597925 0.530100 + 2*0.033725 + 3*0.000125 = 0.597925 The cumulative yield absolutely cannot be lower than the chance to have already seen GDW, so I'm not sure how much you could take away from it. Edited September 12, 2025 by Bumber64 Removing the ones ending in 0 was a dumb idea. Link to comment https://forums.kleientertainment.com/forums/topic/167923-great-depth-worms-spawning-mechanic-needs-completely-rework/page/3/#findComment-1835477 Share on other sites More sharing options...
ThemInspectors Posted September 12, 2025 Share Posted September 12, 2025 (edited) 52 minutes ago, Bumber64 said: Auugh. So why does adding waves together get the same result as taking the weighted average? It shouldn't? The weighted average should be your expected value of GDW our time period. So we need all combinations of GDW (1 GDW, 2 GDW, 3 GDW etc), with their respective probabilities, rather than the probability of seeing a GDW on wave 1 + wave 2 + wave 3 etc. 52 minutes ago, Bumber64 said: Is 0100 and 0101 double-counting? Should I just skip the ones ending in 0? Wave 2: 01 -> 0101, 0100 Wave 4: 0001, 0101. The cumulative probability should be three events, not four 0001, 0101, 0100. If you add the probabilities of wave 2 and 4, then you have 0101 counted twice. My math shows this for expected value of GDW/year: Spoiler Wave P(X) P(!X) P(!Y) P(Y) P(K) GDW/year Weighted 1 0.00% 100.00% 100.00% 0.00% 0 6.36 0.00 2 5.00% 95.00% 95.00% 5.00% 5.00% 3.18 0.16 3 10.00% 90.00% 85.50% 14.50% 9.50% 2.12 0.20 4 15.00% 85.00% 72.68% 27.33% 12.83% 1.59 0.20 5 20.00% 80.00% 58.14% 41.86% 14.54% 1.27 0.18 6 25.00% 75.00% 43.61% 56.40% 14.54% 1.06 0.15 7 30.00% 70.00% 30.52% 69.48% 13.08% 0.91 0.12 8 35.00% 65.00% 19.84% 80.16% 10.68% 0.80 0.08 9 40.00% 60.00% 11.90% 88.10% 7.94% 0.71 0.06 10 45.00% 55.00% 6.55% 93.45% 5.36% 0.64 0.03 11 50.00% 50.00% 3.27% 96.73% 3.27% 0.58 0.02 Total 1.22 P(K) = probability that the GDW in the cycle is on that wave Weighted = GDW/year, weighted by probability GDW/year = how many GDW/year if a GDW shows up on that wave My method isn't the same as P(GDW=1) + 2*P(GDW=2) + 3*P(GDW=3) ... and divide by the time period, but I think it should be similar Edited September 12, 2025 by ThemInspectors Link to comment https://forums.kleientertainment.com/forums/topic/167923-great-depth-worms-spawning-mechanic-needs-completely-rework/page/3/#findComment-1835481 Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now