Jump to content

Custom ore heatmap for the world


Go to solution Solved by MKMoose,

Recommended Posts

Posted

So, as far as I know, VS uses randomly generated heatmaps to determine ore spawns, but, is it possible to alter/provide a pregenerated heatmap that dictates orespawns? I know that altering an existing map would probably not do anything, since the world is already generated using it, but maybe you could add some changes to it and regen the world?

Usecase is limiting ore access on servers, since people can't fucking stop themselves from rushing to steel and then leaving cause they can't commit to doing a cool build/rping. It would also add a multiplayer aspect to progressing, since ore mines could be monopolised by player groups and you would have to deal with it someway. Which hopefully makes classes more meaningful since if you find a rare vein outside of the main location, you would really like to get the most of it, and that's where mining classes shine, since normally you can just keep finding more ore which makes normal classes just save you some time instead of allowing you to differ your gameplay and maybe more unique unforeseen interactions between players, yada-yada-yada.

  • Solution
Posted
4 minutes ago, Floodlight said:

So, as far as I know, VS uses randomly generated heatmaps to determine ore spawns, but, is it possible to alter/provide a pregenerated heatmap that dictates orespawns? I know that altering an existing map would probably not do anything, since the world is already generated using it, but maybe you could add some changes to it and regen the world?

Providing a custom, pregenerated ore map doesn't seem to be possible in a simple way, in part because the world is normally impractically large to provide an ore map to cover it in its entirety unless you tile it in some way, though it should be absolutely possible with a code mod if you modify the deposit generation code.

But if you just want to make the deposits less common or otherwise adjust ore generation, then you can change a lot of the parameters through a relatively simple JSON mod by modifying the appropriate files in %AppData%/Vintagestory/assets/survival/worldgen/deposits.

If you wish to go the modding route, then I can't help much further myself, but there's a bunch of available resources on how to go about it which you might find useful, or even there's some people who take mod requests.

Posted

Ye, I obviously would not be able to manage that for the entire world, should've also mentioned that the world size is cut. But yeah, I guess there is a way, even if it is slightly complicated.

12 minutes ago, MKMoose said:

But if you just want to make the deposits less common or otherwise adjust ore generation, then you can change a lot of the parameters through a relatively simple JSON mod by modifying the appropriate files in %AppData%/Vintagestory/assets/survival/worldgen/deposits.

Sadly, those parameters simply make the deposits smaller, but don't change their location, meaning you can find ore wherever, just less, which in turn does not meaningfully change the progression, just makes it slower.

Posted
4 minutes ago, Floodlight said:

Sadly, those parameters simply make the deposits smaller, but don't change their location, meaning you can find ore wherever, just less, which in turn does not meaningfully change the progression, just makes it slower.

You can adjust ore map scale, contrast and add a constant to it, you can change the rock types where deposits appear, adjust the deposit Y level, radius and thickness distribution, change the deposit frequency, and a couple likely less interesting parameters. All of that separately for each deposit as needed. While it's not the same level of control as you would have with an entirely custom solution, it goes much beyond just making deposits smaller.

 

1 hour ago, Floodlight said:

I know that altering an existing map would probably not do anything, since the world is already generated using it, but maybe you could add some changes to it and regen the world?

I'm not fully certain what the effect will be when you change these parameters on an already generated world, but I think new or regenerated chunks would follow the new parameters once the world is reloaded, because as far as I know the world generation system is initialized fresh each time the world is started up. It loads whatever is saved in the save file, including the world seed which it then uses to create ore maps and so on, but then generates everything using the current parameters.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.