Skip to content
This repository has been archived by the owner on Apr 22, 2024. It is now read-only.

Beta Fossils Technical Writeup #1

Open
NeusFear opened this issue Mar 28, 2024 · 0 comments
Open

Beta Fossils Technical Writeup #1

NeusFear opened this issue Mar 28, 2024 · 0 comments
Assignees
Labels
feature New feature or request

Comments

@NeusFear
Copy link
Member

NeusFear commented Mar 28, 2024

Introduction:

Below is intended to explain how fossil ore generation should work and how the fossils received by these ores should behave.

The team has further plans for fossils than what is written in this issue, but for all intents and purposes this is the minimum requirements for fossils to do their job in a Beta version of the mod

Fossil Ore & Fossils:

  • Configurable Generation by type and species.
  • Each cluster should only drop one creature type, (Ex. If a cluster is made up of 4 fossil ore blocks they should all drop velociraptor etc.)
  • 3 Types of Fossil; Fossil (plant, dinosaur, etc.), Trace (footprints, decorative fossils), and Amber
  • Each type of fossil has different pieces, see pieces. These pieces show as a visual representation on the ore block, Ex. an ore containing a skull fossil will have a skull texture overlay on the ore.
  • Fossil ores can generate in more than MC block types, including: stone, deepslate, terracotta, and sandstone
  • A fossil ore will drop a fossil, if silk touch is used it will drop a fossil ore (like normal ores work), fortune will just give better chances for higher qualities of fossil to drop, not affect the quantity of dropped fossils, there will always be only one fossil dropped at a time.
  • A fossil belongs to a time period, which determines the depth at which it generates, as well as an extra rarity control. see "periods"

Pieces:

Types of pieces include: skull (generally unique to each dinosaur), neck_long, neck_short, ribcage, foot, arm, leg_quadruped, leg_biped, tail, spine, wing, leaf, trunk

There are also some unique creatures sprites, ex: Spinosaurus neural spines, stegosaurus plates, and the skull of each creatures

Piece sets:
Piece sets define a pool of pieces that can belong to one fossil type, for example t-rex is a biped, so it would contain the biped piece set below:

  • biped: [ribcage, foot, arm, leg_biped, tail, spine] where the; arm, leg, and foot pieces will be weighted double in the chance of generation, see piece sets in below configuration file, see below

Periods:

Periods are what defines the depth and overall rarity of a fossil, the older the time period the deeper and more rare the fossil.

Rarity:

The rarity of a fossil can be calculated pretty easily, it is the typical rarity of MC ores, since this is relative let's assign 1 to that.
Then you multiply that by the rarity of the fossils belonging to it's period, then you take it's weight compared to other fossils in that period as a percentage decimal and multiply that, then finally the weight of that specific piece in the set, finally multiply that by the weight of the quality of the fossil. Ex:
MC ore rarity: 1
Period Rarity: .5
Weight of type: 2 of 12 = .166 (2/12)
Weight of piece: 1 of 8 = .125
weight of quality: 5 of 10 = .5
Total rarity = 1 * .5 * .166 * .125 * .5 = 0.51% chance of an ore in this chunk generating as this specific [quality] [species] [piece] [type], se summary for naming of fossils in the inventory.

Summary:

This will in turn generate many variations of fossil blocks, and fossils:
Common Tyrannosaurus Skull Fossil
Perfect Velociraptor Claw Fossil
With silk touch:
Perfect Deepslate Velociraptor Claw Fossil
Perfect Amber Piece
Perfect Footprint Trace Fossil

Configurability:

It is important that these values be configurable so that modpack creators can customize the rarities of these creatures, and so that we can balance the mod if someone on the team does not understand code.

These configuration files can be combined into one file if that's preferred, but I split them up for the sake of this example. Also note that these files are incomplete and will need to be populated with every dinosaur, plant, etc. in the mod.

ore_qualities.toml:

[qualities]
#define the weights of each fossil quality, (weight / total weights) = percentage chance this quality will generate and how much dna they will yield as a percentage of a full genome.

fragmented = {weight = 2, dna_yield = 0.05}
poor = {weight = 5, dna_yield = 0.1}
common = {weight = 2, dna_yield = 0.4}
pristine = {weight = 1, dna_yield = 1.0}

periods.toml:

[periods]
#defines the depths of each time period for generation, this list is incomplete and the values are examples, DC team to populate a full list once the systems are in place to do so

[periods.carboniferous]
min_y = 2 #the min y value that this period generates in
max_y = 20 #the max y value that this period generates in
rarity_mod = 0.5 #the rarity modifier to apply to the "will generate" method of this vein

[periods.jurassic]
min_y = -12
max_y = 10
rarity_mod = 0.4

[periods.cretaceous]
min_y = -40
max_y = -10
rarity_mod = 0.3

fossil_sets.toml:

[sets]
#define the pieces that belong to each set

biped = [
{piece = "ribs", weight = 1},
{piece = "foot", weight = 2},
{piece = "arm", weight = 2},
{piece = "leg_biped", weight = 2},
{piece = "tail", weight = 1},
{piece = "spine", weight = 1}
]
quadruped= [
{piece = "ribs", weight = 1},
{piece = "foot", weight = 4},
{piece = "leg_quadruped", weight = 4},
{piece = "tail", weight = 1},
{piece = "spine", weight = 1}
]
fern = [
{piece = "leaf", weight = 1}
]

fossils.toml:

[fossils]
#defines the configured information for each type of fossil

[fossils.tyrannosaurus_rex]
pieces = "biped"
special_pieces = [{piece = "rex_skull", weight = 1}] #optional field to include if a species has a special identifiable fossil type
weight = 1 #the lower the number the more rare the fossil; (weight / total weights) = percentage chance this fossil type generating
periods = ["cretaceous"] #The time period that this fossil type belongs to
biomes = ["minecraft:desert", "minecraft:forest"] #all acceptable biomes for this fossil to generate in

[fossils.velociraptor]
pieces = "biped"
special_pieces = [{piece = "raptor_skull" weight = 1}, {piece = "claw", weight = 2}]
weight = 2
periods = ["jurassic"]
biomes = ["minecraft:desert", "minecraft:forest"]

[fossils.cycads] #this section also applies to plants
pieces = "fern"
weight = 2
periods = ["jurassic", "cretaceous"]
biomes = ["minecraft:jungle", "minecraft:forest"]

amber_rarities.toml

[amber]
#rarities of each kind of amber

[amber.weights]
tyrannosaurus = 1
velociraptor = 2

trace_fossils.toml

[trace]
#information pertaining to trace fossils

[trace.shell]
weight = 1
periods = ["jurassic", "cretaceous"]
biomes = ["minecraft:ocean", "minecraft:beach"]

[trace.footprint]
weight = 2
periods = ["cretaceous"]
biomes = ["minecraft:mountain", "minecraft:desert"]
@NeusFear NeusFear added the feature New feature or request label Mar 28, 2024
@NeusFear NeusFear changed the title Beta Fossils Writeup - DRAFT Beta Fossils Technical Writeup Mar 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants