anegostudios / VintageStory-Issues

Vintage Story's public issue tracker for reporting bugs, crashes and the like
43 stars 16 forks source link

Ore and underground structure distribution is not seeded #2689

Open Rosethorns opened 1 year ago

Rosethorns commented 1 year ago

Game Version

1.18.1

Platform

Windows

Modded

Vanilla

SP/MP

Multiplayer

Description

The bug: Ore deposits and underground structures of all kinds appear to be unseeded - their positions are not consistent with chunk data and can be seen to change when regenerating chunks.

Pretext: I happened on this issue when I discovered during the course of play that an "Ultra High 3.7 permille" Magnetite chunk had no iron ore in it at all while on a modded server and the 8 surrounding chunks either.

This was revealed using /wgen delrock 4

I did however notice that a couple of chunks away there was iron ore. So I marked the spot, and regenerated the chunks I had delrock'd /wgen regen 4

I moved to the spot and dug for the ore. I couldn't find it. So I /wgen delrock 1 and sure enough no iron ore present. Being this was a modded server I needed to isolate the issue.

The Problem: This can cause player driven information gathering like the prospector pick readings to be inconsistent, drift, or outright wrong.

How to reproduce

Multiplayer server from a local machine. Vanilla. 1.18.1. Default server settings (no config)

  1. travel to a chunk with a high ore value (for easy observation, ironically magnetite in the evidence)
  2. /wgen delrock 1
  3. screenshot
  4. /wgen regen 1
  5. /wgen delrock 1
  6. screenshot

For extra proof taking a prospector pick reading before and after regen will show the makeup of the area to change sometimes dramaticly.

Screenshots

2023-05-01_20-07-04 2023-05-01_20-06-10

Logs

No logs as everything appears normal in the logs.

radfast commented 1 year ago

This is more of a suggestion than a bug! The game does not guarantee that everything is seed-deterministic, for example trees and other vegetation have never been seed-deterministic.

Before 1.18, it is fair to say that ore deposits, alluvial deposits and lakes were seed-deterministic so something has changed. On that basis I will leave this open for now until the team has time to investigate it.

Rosethorns commented 1 year ago

I think the real issue here is revealed by my pretext. That when a mechanic says a chunk has 37 iron blocks in every thousand it could just.... not. Because what ever the prospectors pick is drawing from is not the same as what ever the chunk actually has.

radfast commented 1 year ago

Oh, missed that. OK that is a major bug.

tyronx commented 1 year ago

I dont see how this is critical. The propick reads from an internal ore map, not the actual deposists.

radfast commented 1 year ago

Testing in new worlds with the same seed: broadly the same ores are generated in the same chunk, only in different spots within the chunk. Like tyron says, this means the propick results are not totally inaccurate for the chunk as a whole.

Still, in my tests, the first world had no tin ore in this chunk, the second world had two large deposits in the same chunk, so that's quite an issue ...

radfast commented 1 year ago

Further tests:

In 1.17.12, two worlds with the same seed generate similar sized ore deposits in identical locations within the same chunk. There is sometimes +/- 1 block difference on the edges of the deposit - a little randomness around the edges of the deposit, one could say.

In 1.18.1, two worlds with the same seed appear to have the same chance of spawning specific ores in a chunk (and those are the same ores seen for the same seed in a 1.17.12 world). But the actual ore deposits spawned will be in slightly different positions, or have slightly different sizes +/- 1 or 2 blocks. This can make it so a deposit at the edge of the chunk seems to disappear completely - it is probably still there at the edge of the neighbouring chunk, in fact.

Craluminum2413 commented 4 hours ago

Isn't it fixed in 1.20 now?