AbyssalCraft

AbyssalCraft

20M Downloads

Shoggoths spawn amount/chance suggestion/fix

IdkWhatNameThingyToPut opened this issue ยท 7 comments

commented

Description:

Hello I wanted to make a suggestion for an option to control how many shoggoths can spawn. I think I counted 9 at a time spawning all in the lair together and I don't like the thought of what it could be doing to FPS if someone was to build a base near a lair or be on the surface doing other stuff on top of that happening. I've tried using the In Control mod aswell and it seems to actually ignore the In Control mod (works with other mobs from other mods) and continues to spawn the shoggoths no matter what even if some of them appear with "Unknown" as the name of the shoggoth when looking at them. Whichever way you decide to deal with this no matter what I think something should be done about the fact that 9 of them are spawning in a lair together because I can't see that being good for performance.

I also saw in the config file:
# The minimum distance at which two Shoggoth Lairs will generate from each other.
# [range: 40 ~ 1000, default: 100]
I:"Shoggoth Lair Generation Distance"=100

Which is interesting because it wouldn't surprise me with enough render distance (maybe not high either I'm guessing 8-10 maybe?) that there could be another lair around which means that now instead of 9 it's probably 18 of these spawning (I'm thinking about multiplayer too with someone else in the same area around a different lair).

It seems like a pretty big problem because not only do I think it's not good for performance but who knows what 9 creatures nearby could be doing to monster spawns in the area there maybe even less monsters around to fight and stuff I don't know.

I think a spawn cap option would be amazing. If intentional it seems like with 9 of them spawning in one lair you want this to be a big challenging fight? So I think another way to get the numbers of the monsters down is to buff the monsters to make up for the loss of how many there is. For example instead of 4 spawning, remove 2 and have 2 spawned that are buffed to make up for it. I don't know what your goals are though and if they should be so challenging or buffed in the first place anyway just some thought.

Affected versions ("latest" is NOT a version):

  • Minecraft: 1.12.2
  • Forge: 14.23.5.2860
  • AbyssalCraft: 1.10.6.jar

Latest log file for when the issue was present:

I don't think I have the latest.log file for when this happened unfortunately as it was something I spotted recently but remembered enough to make a ticket for today as I think it's a pretty big problem. Hopefully you can understand and this is ok as it's a more of a suggestion instead of a bug report to do with crashing/errors anyway.

commented

Sorry I accidently got carried away and used the wrong label thingy on github this is meant to be a suggestion.

commented

There is a spawn limit check in the biomass block (the thing that spawns them) of 6, but since the lair is empty when it generates, that doesn't kick in for the first round of spawning, which isn't the most optimal solution. I guess prematurely messing with the cooldown on each biomass block when generating the structure would ensure not enough of them would run the spawn logic in tandem.
Building a base in the vicinity of a lair generally only becomes a problem if you're within 32 blocks of the lair (since the biomass stays dormant if there isn't a player within 32 blocks of it). You can also just cover the entrance with cobblestone, as that's enough to stop anything from coming out of it. I can't really do that much in regards to the player's decision on where to build a base.

commented

There is a spawn limit check in the biomass block (the thing that spawns them) of 6, but since the lair is empty when it generates, that doesn't kick in for the first round of spawning, which isn't the most optimal solution. I guess prematurely messing with the cooldown on each biomass block when generating the structure would ensure not enough of them would run the spawn logic in tandem. Building a base in the vicinity of a lair generally only becomes a problem if you're within 32 blocks of the lair (since the biomass stays dormant if there isn't a player within 32 blocks of it). You can also just cover the entrance with cobblestone, as that's enough to stop anything from coming out of it. I can't really do that much in regards to the player's decision on where to build a base.

32 blocks is a lot people will build bases near them I don't think it's their fault either this should be optimized in a way where it's not a problem, shoggoths barely crawl out of the lair when your fighting them and if they did happen to I hope they stay counted to the spawn cap and don't keep spawning.

I think config options to change the 32 block radius and the spawn limit check would be amazing. I don't mean to come across rude or anything sorry I do think the shoggoths and lairs are cool, but what I don't want is creatures piling up in a hole in the ground that I'm not currently interacting with purely because it's nearby.

It also sounds like the spawn limit check isn't working correctly right now because it may have a cap of 6 but if "that doesn't kick in for the first round of spawning" then does that mean it's spawning 12? Or like more than 6? Hopefully that can be fixed soon.

I think all these features with I:"Shoggoth Lair Generation Distance"=100 set higher probably around 150-200 so it's not really possible for 2 lairs to be activated spawning their own shoggoths within what I think is the standard render distances would be a performance overhaul on it's own.

If you don't know what I mean about some stuff I said I made a drawing thingy with the alien technology Paint app:
Untitled

Anyway tyty for reading didn't mean to come across rude or anything hopefully more config options and stuff added soon to get better performance

commented

32 blocks is a lot people will build bases near them I don't think it's their fault either this should be optimized in a way where it's not a problem, shoggoths barely crawl out of the lair when your fighting them and if they did happen to I hope they stay counted to the spawn cap and don't keep spawning.

That number is there so you don't have to stand right by the block for shoggoths to spawn, giving you distance so you don't get overrun (depending on the amount of biomass blocks nearby, as each block only spawns one shoggoth when all conditions are met). That could've probably been 16 without any noticeable effect.

It also sounds like the spawn limit check isn't working correctly right now because it may have a cap of 6 but if "that doesn't kick in for the first round of spawning" then does that mean it's spawning 12? Or like more than 6? Hopefully that can be fixed soon.

It works, the problem is just that when the lair is empty, and there being ~25 biomass blocks, they all have the "perfect condition" to spawn a shoggoth (none within a 32 block radius, a player within the same radius from each respective block), so they all run their spawn logic nearly simultaneously, where in this case 9 shoggoths manage to spawn (as they spawn the same second) before the detection logic in other blocks catches that enough shoggoths are in the area and do nothing. The next time a block tries to spawn a shoggoth, it won't, because there's already the max number (or more) within the distance to check.

This became a wall of text, but simply put:

  • Empty lair
    • Biomasses will spawn shoggoths when the timer runs out
    • If they detect that there are enough within a 32 distance, they don't spawn anything
    • If enough of them manage to trigger a spawning at the same time, they might overlap the max amount
  • Lair that isn't empty
    • Biomasses only spawn new shoggoths if no more than 6 are within a 32 distance
    • When a biomass spawns a shoggoth, it resets the timer of all nearby blocks (8 to be exact), to extend the timespan of another spawn attempt

I think all these features with I:"Shoggoth Lair Generation Distance"=100 set higher probably around 150-200 so it's not really possible for 2 lairs to be activated spawning their own shoggoths within what I think is the standard render distances would be a performance overhaul on it's own.

Set it yourself? That's why the config file is there. If you are dissatisfied with the values in the file, change them to suit your needs.

commented

image
Also, to cover this statement:
The config option specifies the distance between two lairs. So if a lair generates, a second lair can't generate less than 100 blocks from where it generated. I'll provide a doodle here.
image
Render distance doesn't have any relevancy here, as unless a player is close enough to a lair, nothing happens there. Could be some other mobs walking around inside (as it's dark enough), but the biomass blocks are dormant (effectively timers counting down, then resetting and starting to count down again).
Obviously having a higher render distance means more loaded chunks, but a couple of shoggoths in a lair aren't the only thing in those chunks taking up a bit of your CPU cycles (not to mention they can't affect your FPS notably if you can't see them, as they're not being rendered in that case).

commented

It works, the problem is just that when the lair is empty, and there being ~25 biomass blocks, they all have the "perfect condition" to spawn a shoggoth (none within a 32 block radius, a player within the same radius from each respective block), so they all run their spawn logic nearly simultaneously, where in this case 9 shoggoths manage to spawn (as they spawn the same second) before the detection logic in other blocks catches that enough shoggoths are in the area and do nothing. The next time a block tries to spawn a shoggoth, it won't, because there's already the max number (or more) within the distance to check.

  • If enough of them manage to trigger a spawning at the same time, they might overlap the max amount

Well that sounds flawed why don't you fix it then? I saw you mention it in the other comment that you said "which isn't the most optimal solution" aswell is it able to be fixed? I'm not sure if this is due to technical limitations or something of what your able to do with your mod but it's seems like a conflict of interest, if shoggoths are spawning more than the spawn cap limit then the spawn cap limit isn't working.

Set it yourself? That's why the config file is there. If you are dissatisfied with the values in the file, change them to suit your needs.

Stop being petty I'm fully aware I can change it myself, I was trying to point out that you should the change the default value in the config file since it's better for performance. I find it funny how you mentioned to use the config file when I'm here requesting options to be added to the config that shouldn't be locked away and should be in the config file in the first place.
Why don't you let me "change them to suit your needs."? Make it optional then

This type of stuff is important because this is just one mod and like what if every other mod developer does stuff like this? Can't just have 6 creatures here for absolutely no reason, 6 there, 6 more here, 6 more with 5 other mods adding 6 more there for no reason, like this type of stuff stacks up it just can't be happening is how I think about it. Some modpacks have like 150+ mods some even have way more like there's no room for this type of stuff going on. If I see something that can be fixed or improved I try to get it fixed.

There is no reason for a hole in the ground that's not being interacted with at all to have up to 6 or I think more creatures in it doing whatever, it's a waste of resources and doesn't seem like a very optimised way of having things. You also don't seem to be thinking of stuff like server TPS and it potentially taking up meaningful monster spawns around a player that could make the area more fun at night.

Render distance doesn't have any relevancy here, as unless a player is close enough to a lair, nothing happens there. Could be some other mobs walking around inside (as it's dark enough), but the biomass blocks are dormant (effectively timers counting down, then resetting and starting to count down again). Obviously having a higher render distance means more loaded chunks,

For some reason I thought it was WITHIN 100 that 2 lairs can spawn near each other but it's 100 away from each other, but I understand now sorry about that at the end of the day I wasn't trying to make that claim but instead have more of a constructive conversation about it (that's literally why I'm here typing on github trying to get this all fixed/improved) so you were always free to correct me on it. But I still think it's bad because if someones render distance is 8-10 which I think it's 128, then 100 is not enough because a 2nd lair could be activated by another player on a server and someone could be dealing with 2 activated lairs if also around. I think the value being set to 150 or you could even try something like 135 is better.

but a couple of shoggoths in a lair aren't the only thing in those chunks taking up a bit of your CPU cycles (not to mention they can't affect your FPS notably if you can't see them, as they're not being rendered in that case).

It's not a couple shoggoths it's 6 which I think stacks with each lair like imagine a server with 12+ people or something in different areas of the map constantly accidently activating lairs and maybe in ways that takes awhile for shoggoths to despawn if they ever do.

This is easily fixed you have a config system already in place and can easily change these "32" radius and "6" spawn limit caps to fetch values from a config file instead. I think it's good to have options like that in a config file, keep the default values if you really want but atleast let people change it that's what a config file is for. I would love to change the spawn limit to around 2-3ish for instance, why don't I get to change it? Nearly every mod that spawns mobs under the sun has a spawn limit/spawn chance feature. I think it also doesn't play nice with the In Control mod so that's not an option either.

Anyway up to you I guess, you can close this issue if you want it's a suggestion that I think would be good but if you don't want to do it then it is what it is.

commented

Wasn't my intention to get all heated up, but I guess this struck a toe, and I let it get to me.

I'm gonna add the config options. I'm gonna stop arguing, but optimizing things starts to become more difficult the bigger you scale things up, and I can only do so much on my end.

Will likely need to re-engineer how the blocks do their spawning if that would enable In Control to pick it up, but main issue there might be something along the lines of it not being "natural" spawning (or maybe that each mob spawns individually?). I at least have some "quick fix" up my sleeve I can apply for the structure generation.