Mods / Sea Level Fix

Tags: #Worldgen
Author: MadSeraph
Side: Server
Created: Mar 1st at 12:45 PM
Last modified: Mar 9th at 12:19 AM
Downloads: 715
Follow Unfollow 66

Latest file for Various v1.20.x:
SeaLevelFix_1.0.2.zip 1-click install


IMPORTANT: This mod will only work with the exact game versions listed in the Files tab. New game releases will require a new version of the mod. This is to prevent accidental application of the mods patch in future versions of the game that may already have the fix included. Please update to 1.0.1 to ensure you have a version with this protection.

There is a bug that affects ore generation for ores that use the sea level disc generator where the generator uses the wrong sea level for world heights larger than 256. This results in those deposits being much further underground than they are suppose to be and prevents them from generating surface pieces. This affects things like borax, sulfer, obsidian, saltpeter, all of the irons, black coal, and more.

A less severe bug is that surface ore pieces like copper and tin do not scale how close to the surface a deposit can be based on the world height. Since ore deposit generation is percentage based, this make surface ore pieces less common on larger world heights.

This mod attempts fix both of these bugs. It will only impact new generation and will not fix chunks that were generated before the mod was installed.

Please beware this mod is only lightly tested. There may be bugs. Please report any you find.

In addition, there are two configuration options that will allow you to adjust the default sea level and how deep ore deposits can be to generate surface ore pieces. There is also ConfigLib integration if you'd prefer to use that.

Changing the sea level setting is entirely untested and experimental!! Do not change this unless you are prepared for bugs and are starting a brand new world.

If you decide to give it a try, however, please report the results!

Version For Game version Downloads Release date Changelog Download 1-click mod install*
v1.0.2 307 Mar 9th at 12:19 AM Show SeaLevelFix_1.0.2.zip Install now
v1.0.1 191 Mar 3rd at 1:53 AM Show SeaLevelFix_1.0.1.zip Install now
v1.0.0 217 Mar 1st at 12:47 PM Show SeaLevelFix_1.0.0.zip Install now

16 Comments (oldest first | newest first)

💬 Marlim, 3 days ago

"This mod attempts fix both of these bugs. It will only impact new generation and will not fix chunks that were generated before the mod was installed."

So if I use the /db prune command to delete the chunks in an already loaded save, would it work?
I don't know if I explained it well.

MadSeraph

💬 Junrall, Mar 13th at 7:43 AM

PeterSanderson

I did indeed have Rivers installed and enabled.

💬 PeterSanderson, Mar 12th at 9:27 PM

Junrall I don't suppose you had Rivers on when you tested with Terra Prety by any chance?

💬 Junrall, Mar 9th at 2:06 AM

ElusiveEnigma

I use this with Terra Pretty... works perfectly!

 

💬 MadSeraph , Mar 4th at 4:24 AM

ElusiveEnigma

Mods that work with vanilla worldgen systems, often called "landform" mods, such as Conquest, Terra Prety, Plains & Valleys, etc should work just fine. In fact I did most of my testing with Conquest running. Ones that modify vanilla worldgen code such as Rivers or Alpine Story, however, have the potential to conflict. I have not tested with any of them, so I can't tell you for sure.

💬 ElusiveEnigma, Mar 3rd at 5:27 PM

MadSeraph

To your knowledge, is this compataible with worldgen mods or do you have reason to believe there could be overlapping conflict?

💬 DarkThoughts, Mar 3rd at 1:29 PM

Yes, point 2 is very valid. I'm also often wary of mods that claim to "fix" things, often fixing things that aren't actually broken, or fixing it in ways that aren't proper - which can cause other issues. So far though, after some testing, this mod seems to work very well. I can find many surface bits again when traveling at 320 world height.

As for the clay, I guess I'll leave that be for now until the devs rebalance it maybe. Unless it's their intention to have it this rare / barely visible. I guess if you're lucky you might dig into it when looking for ore. Red clay can be found but it's definitely harder to find than blue clay in 1.19. It's a bit of a shame because this of course nerfs clay working as a whole, and consequently mods that expand on that.

💬 MadSeraph , Mar 3rd at 2:51 AM

DarkThoughts

1) Blue Clay seems to be working "as intended". It only generates at exactly sea level (using the right value even without this patch). It only attempts to spawn 1 in every 250 chunks (vs red clays 1 in every 52). So that low random chance to attempt a spawn has to just happen to try on a block sitting right at sea level. Often those blocks are sand blocks, so you often only end up with half a disc that forms in the dirt behind the sand but _under the surface_. It is _exceptionally_ rare. I don't know why the devs did it this way, but they did.

2) Yes, I have reported these and submitted pull requests on github as well. I have also discussed the issue extensively with one of the devs on Discord. They are aware of the issue, and I'm hopeful it wll be fixed soon, but possibly not before 1.21. Devs are rightly wary of fixes submitted by outsiders. They need to be extra sure my fix works and didn't inadvertantly break something else, and they have much bigger issues to deal with right now. Honestly, I'd prefer they spend their time on desyncs that cause items to vanish when moving between inventories before taking the time to look at this. In the meantime, this issue was particularly itchy for me so I fixed it and made it a mod so I can run it on my server. :)

3) Mods that add their own ores should benefit from this fix. The issue is specifically with deposit configurations that use 'generator: "disc-followsealevel"' in their json configuration.

💬 DarkThoughts, Mar 1st at 4:20 PM

Droseran

Yeah I've seen your mod and have a tab open for it for consideration. I'm just curious whether it actually is a bug - specifically with increased world heights or different worldgen than that of vanilla, simply intended, or just badly balanced in general. There's definitely been an issue with ores, because I've never had this much trouble with finding surface copper before. It's pretty common normally, just often well hidden by shrubs and other foliage. Clay on the other hand was super common before, at least in wetter regions I found patches very close to each other. Since the update I only found a few very rare red clay patches (one of them in a dangerous mountain side since I play with soil instability) and only one blue clay deposit. Given how many test worlds I do where I just explore around to get a feel for the worldgen mods & settings, I think it's incredibly rare at the moment.

💬 Droseran, Mar 1st at 4:08 PM

DarkThoughts

I've made a mod to increase blue clay generation (https://mods.vintagestory.at/show/mod/20343). I think it's just been made ridiculously rare, as it has a spawn rate around 2/3 of red clay on top of the new rigid spawning constraints.

💬 DarkThoughts, Mar 1st at 2:54 PM

Lightpowder

Check the wiki. VS has commands to regenerate chunks. Just be careful and create a backup first in case you accidentally regenerate parts of your base.

💬 Lightpowder, Mar 1st at 2:43 PM

Ah, so that's why I could barely find anything on our Conquest Landform Overhaul (with the mod's recommended settings ofc) world huh...
Shame that it requires either a remaking a world with the same seed or a new world, but it's completely understandable.
We'd probably use it later, when Wildcraft gets a new module cuz we wanna remake our world and copy important chunks when that comes out.

💬 DarkThoughts, Mar 1st at 1:35 PM

Oh my fucking god... I thought I was going crazy with the lack of almost ANY surface ore nuggets anywhere. Some questions though:

1) Could you check if there's a similar issue with blue clay? I use Conquest Landform Overhaul for the worldgen and it seems excessively rare now, even at sea level height on worldgen that recommends 320 world height.

2) Is this reported on the actual VS issue tracker so it can get properly fixed instead of modded band-aid solutions? No disrespect btw, I just don't think it should be a mod's purpose to fix bugs. This should not end up like Bethesda where the developers let the community take care of bug fixing instead of doing it themselves.

3) Is this based on code issues with the individual ores themselves or how the game handles ore spawns in general? I'm asking to understand whether mods that add their own ores, such as Geology Additions, would be affected by this bug or not.

💬 BoogieBrando, Mar 1st at 1:32 PM

following this! i always love playing with a larger world height, makes adventuring all the more fun but i NEVER find borax or black coal.

💬 MadSeraph , Mar 1st at 1:30 PM

DUCATISLO I'm sure it will be. It's been reported. I made this because I want to run a server with a 320 world height, and I wanted working ores. :)

💬 DUCATISLO, Mar 1st at 1:23 PM

i think this should been an official fix tbh

 (edit comment delete)