Dumb-Code / Project-Nublar

PN Rewrite Repo
GNU Lesser General Public License v3.0
1 stars 1 forks source link

Beta Fossils Technical Writeup #1

Open kashgummaraju opened 4 months ago

kashgummaraju commented 4 months ago

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:

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:

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.

_orequalities.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.cambrian]:
min_y = -30 
max_y =-15
rarity_mod = 0.5 
[periods.ordovician]
min_y = -20 
max_y = -8
rarity_mod = 0.5
[periods.silurian]
min_y = -10 
max_y = 15
rarity_mod = 0.5 
[periods.devonian]: 
min_y = 9
max_y = 30
rarity_mod = 0.5
[periods.carboniferous]:
min_y = 15
max_y = 40
rarity_mod = 1
[periods.permian]: 
min_y = 30
max_y = 45
rarity_mod = 1
[periods.triassic]: 
min_y = 35
max_y = 40
rarity_mod = 2.3
[periods.jurassic]: 
min_y = 40
max_y = 55
rarity_mod = 2.8
[periods.cretaceous]:
min_y = 55
max_y = 75
rarity_mod = 2.95
[periods.paleogene]:
min_y = 56
max_y = 61
rarity_mod = 3
[periods.neogene]
min_y = 60
max_y = 64
rarity_mod = 3.3
[periods.quarternary]: 
min_y = 60
max_y = 64
rarity_mod = 3.4

_fossilsets.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"]

_amberrarities.toml

[amber]
#rarities of each kind of amber

[amber.weights]
tyrannosaurus = 1
velociraptor = 2

_tracefossils.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 commented 4 months ago

This issue is not really needed. The card on the projects board includes this description.

kashgummaraju commented 4 months ago

This issue is not really needed. The card on the projects board includes this description.

Yeah it is the same card, I moved it from the Archived rewrite repo