Generate clay deposits by water-proximity rule #31

Open
opened 2026-08-20 05:44:02 +01:00 by liamjd · 0 comments
Owner

Generates clay Deposit instances per #26's rule-based approach, rather than the scatter-sampling used for ores. Depends on #29 (Deposit/ResourceDeposits) and #30 (distance_to_water).

Rule

A tile is clay-eligible if it is low-lying (answerable from existing level_at()/datum comparisons) and within N tiles of water (via #30's distance_to_water). Exact "low" threshold and N are tuning values, not fixed by the docs - pick reasonable defaults during implementation and expect to adjust them once there's a map to look at.

A map with no water at all (preset.has_water == false) simply has no clay - not an error case, per resource-prospecting.md's "not all maps will have clay."

Chunking

Eligible tiles form one or more connected regions once flood-filled. Per this session's decision, each region must be chunked into several smaller, distinct Deposit instances rather than left as one deposit spanning an entire shoreline - better for player choice, and consistent with how ore deposits are also small, discrete things rather than sprawling claims.

Generation must be deterministic from map_seed, the same as terrain generation - the chunking step will need a seeded source for its split points/boundaries rather than reaching for global randomness.

Output

Populates ResourceDeposits with Deposit(resource_type = Clay, footprint = ..., richness = <flat value>) instances, per #29's flat-richness scope for this pass.

References

#26, #29, #30.

Generates clay `Deposit` instances per #26's rule-based approach, rather than the scatter-sampling used for ores. Depends on #29 (`Deposit`/`ResourceDeposits`) and #30 (`distance_to_water`). ## Rule A tile is clay-eligible if it is low-lying (answerable from existing `level_at()`/datum comparisons) and within N tiles of water (via #30's `distance_to_water`). Exact "low" threshold and N are tuning values, not fixed by the docs - pick reasonable defaults during implementation and expect to adjust them once there's a map to look at. A map with no water at all (`preset.has_water == false`) simply has no clay - not an error case, per `resource-prospecting.md`'s "not all maps will have clay." ## Chunking Eligible tiles form one or more connected regions once flood-filled. Per this session's decision, each region must be **chunked into several smaller, distinct `Deposit` instances** rather than left as one deposit spanning an entire shoreline - better for player choice, and consistent with how ore deposits are also small, discrete things rather than sprawling claims. Generation must be deterministic from `map_seed`, the same as terrain generation - the chunking step will need a seeded source for its split points/boundaries rather than reaching for global randomness. ## Output Populates `ResourceDeposits` with `Deposit(resource_type = Clay, footprint = ..., richness = <flat value>)` instances, per #29's flat-richness scope for this pass. ## References #26, #29, #30.
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
liamjd/UntitledColonyBuilder#31
No description provided.