show what the prospecting pick reads, and find it
The ore maps GenDeposits makes are ported and match the save's for all 31 minerals in every stored region. With them and the strata, a column reads as the pick's density mode would read it: a Minerals overlay colours the map by reading, the probe lists every mineral the pick finds, and Find nearest looks for a mineral read at least so high. Readings run slightly high: the pick's column already holds the ore of its chunk's deposits, which are not generated yet. The check against the 13 readings stored in the save asserts exactly that direction. Silver, gold and peridot are read from ore inside other deposits, so they wait for the deposits themselves. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
85
Plan.org
85
Plan.org
@@ -50,6 +50,8 @@ redistribute their code verbatim.
|
||||
| Strata for one column | =vssurvivalmod/Systems/Prospecting/ProPickWorkSpace.cs= =GetRockColumn= |
|
||||
| Dry-climate height raise | =.../GenBlockLayers.cs:185=, patched by =Rivers/src/Patches/BlockLayersPatches.cs= |
|
||||
| Forced story landforms | =vssurvivalmod= =GenStoryStructures=, plus =GenMaps.ForceLandformAt= / =ForceClimateAt= |
|
||||
| Ore maps | =.../ChunkGen/5.GenDeposits/GenDeposits.cs= (=initWorldGen=, =getOrCreateMapLayer=), =DepositVariant.cs=, =GenMaps.GetOreMap=, =NoiseOre=, =MapLayerOre=, =MapLayerPerlinWobble= |
|
||||
| Prospecting readings | =vssurvivalmod/Systems/Prospecting/ItemProspectingPick.cs= (=GenProbeResults=), =ProPickWorkSpace.cs=, =DiscGenerator.cs= (=GetPropickReading=, =GetAbsAvgQuantity=), each disc generator's =GetYMinMax=, =PropickReading.cs= |
|
||||
|
||||
Assets come from =assets/survival/worldgen/=: =landforms.json=,
|
||||
=geologicprovinces.json=, =rockstrata.json=, =storystructures.json=,
|
||||
@@ -215,6 +217,7 @@ Modules. Each is a Sex module; the =vsmv= CLI and the GUI share them.
|
||||
the dry-climate raise for validation.
|
||||
- =strata=: =genBlockColumn=, plus queries for "rock at depth d" and
|
||||
"rock at Y".
|
||||
- =ores=: ore maps and the prospecting pick's density reading.
|
||||
- =assets=: lenient JSON loading and asset structs, plus a rock color
|
||||
palette. Hardcode the palette at first; take block texture averages
|
||||
later.
|
||||
@@ -274,9 +277,11 @@ What the save turned out to be:
|
||||
=landformScale=, which only scales the noise inside
|
||||
=MapLayerLandforms=.
|
||||
|
||||
Not used: forest, shrub, flower and beach (2, 5, 6, 15), ore maps
|
||||
(8), mod data (9), ore distortion (13, 14), block patch maps (16),
|
||||
animal spawn maps (21).
|
||||
| 8 | ore maps: entries {1: mineral code, 2: map}, 33 (0 top-left, 1 bottom-right) |
|
||||
|
||||
Not used: forest, shrub, flower and beach (2, 5, 6, 15), mod data
|
||||
(9), ore distortion (13, 14), block patch maps (16), animal spawn
|
||||
maps (21).
|
||||
- *=mapchunk=* (=ServerMapChunk=). All ushort arrays are repeated, not
|
||||
packed.
|
||||
|
||||
@@ -565,6 +570,73 @@ Viewer:
|
||||
11 us). Probes on the main thread use it too.
|
||||
- *Test flag.* =--mouse X Y= places the cursor for screenshot tests.
|
||||
|
||||
** Minerals: prospecting density
|
||||
What the prospecting pick's density mode reads, per column and mineral
|
||||
(=src/ores.sex=). Exact deposit placement is a later phase.
|
||||
- *Ore maps.* One per mineral code: =NoiseOre= cells every 16 pixels,
|
||||
smoothstep-lerped, then =MapLayerPerlinWobble= (5 octaves, scale 110,
|
||||
intensity 16.5). Region maps are 32 pixels plus one of bottom-right
|
||||
padding.
|
||||
- *Seeds.* World seed plus the code's =GetNonRandomizedHashCode=, the
|
||||
newer .NET hash. It rotates instead of shifting and reads the string's
|
||||
terminator, so it differs from =DotNetStringHash=. The sums wrap as
|
||||
C# ints.
|
||||
- *Which deposit counts.* Deposit files load in path order, and their
|
||||
variants in file order with children after their parent.
|
||||
- The map of a code takes the parameters of the first deposit that
|
||||
asks for it. A child's map takes its parent's scale, contrast and
|
||||
sub.
|
||||
- The reading of a code comes from the last deposit with it (the
|
||||
pick's =depositsByCode=). So cassiterite reads with its second,
|
||||
rare variant, silver with quartz's child, and peridot with
|
||||
olivine's child.
|
||||
- *Reading.* The ore map's low byte over 255, times the share of the
|
||||
column (y below the surface, with the default rock at y = 0) that is
|
||||
host rock inside the deposit's Y range. The Y range depends on the
|
||||
generator:
|
||||
- follow surface: =yPosRel= times the height;
|
||||
- follow sea level: =yPosRel= times the sea level;
|
||||
- follow surface below: the height minus =depth=.
|
||||
ppt is the total times =GetAbsAvgQuantity= (100 radius and thickness
|
||||
draws from a fresh =LCGRandom= of the world seed), over height x
|
||||
1024, x 1000. Categories: over 0.025, =(int)(total x 7.5)= from very
|
||||
poor up to ultra high; over 0.002, miniscule.
|
||||
- *Not reproduced.*
|
||||
- The game takes the Y range from 100 draws of the shared deposit
|
||||
RNG, whose state depends on what ran before; we take the
|
||||
distribution's limits.
|
||||
- The pick's column already holds the ore of the deposits generated
|
||||
in its chunk.
|
||||
- Children (silver, gold, peridot) are hosted by their parent's ore,
|
||||
so they need the deposits themselves.
|
||||
|
||||
Validation:
|
||||
- *Ore maps.* =vsmv verify= compares every mineral's map in every
|
||||
stored region: 3,658 maps, 3,983,562 / 3,983,562 pixels including
|
||||
padding.
|
||||
- *Readings.* The save keeps the pick readings players took
|
||||
(=oreMapMarkers-PLAYER= in game mod data: position, then code,
|
||||
TotalFactor, PartsPerThousand per mineral). Thirteen are stored. Both
|
||||
gaps above only lower the game's reading, so the check is that ours
|
||||
is never below the game's and at most 15% above it. 42 of 42 pass;
|
||||
the game's is 0.875 to 1.00 of ours. 38 of 42 fall in the same
|
||||
category, and the 4 others sit at a category edge.
|
||||
|
||||
Viewer:
|
||||
- *Minerals overlay.* Tiles keep =64 + category= per sample and share
|
||||
the rock palette, so they cost one more palette range, not a new
|
||||
tile kind.
|
||||
- *Minerals panel.* Picks the mineral from a list of the readable ones.
|
||||
Its legend gives each category's share of the view. Find nearest
|
||||
takes a least category (decent by default) and runs as search mode
|
||||
4.
|
||||
- *Cursor and Info.* A second label line gives the reading under the
|
||||
cursor while the Minerals overlay is on.
|
||||
- *Probe.* Lists the pick's full reading for the column, highest first,
|
||||
then the miniscule amounts, as the pick words it.
|
||||
- *Command line.* =--overlay mineral=, =--mineral CODE=,
|
||||
=--min-reading NAME= and =--find-mineral=.
|
||||
|
||||
** 7. Performance + polish
|
||||
- Level of detail:
|
||||
- zoomed out: one column per N blocks;
|
||||
@@ -575,8 +647,11 @@ Viewer:
|
||||
- Optional disk cache of tiles and plates, keyed by a hash of the
|
||||
settings.
|
||||
- Go-to-coordinates, PNG export of the current view.
|
||||
- Later: gravel-beach layer; ore deposits (=GenDeposits.GeneratePartial=
|
||||
is already on the =ProPickWorkSpace= path).
|
||||
- Later: gravel-beach layer; exact ore deposits
|
||||
(=GenDeposits.GeneratePartial= and the disc generators). That would
|
||||
place real ore blocks, make the pick readings exact, and read
|
||||
silver, gold and peridot. Checking it needs the save's chunk
|
||||
blocks decoded.
|
||||
|
||||
* Risks
|
||||
- *Bit-exactness* of the noise and the Rivers trigonometry. The
|
||||
|
||||
Reference in New Issue
Block a user