---
# System prepended metadata

title: Mining / Excavation / Archeology

---

# Mining / Excavation / Archeology

- actual xenoarcheology will come in another draft/pr, archeology will be implemented with this pr as excavation levels and that's about it

## design/playerbase

- half our mining playerbase are active miners/gamers while the other half would rather set something up and go rp
- mining system should be universal as to allow widespread support later 
- split mining into:
    - active component - breaking through /turf's to access the rest of the map. weaponry to defend from fauna, etc. heavily gamey, wacky mechanics
    - passive component - drilling underground, setting up infrastructure, etc; friendly for rp-focused people. more serious-like (minus wacky things like the base-defense-drill)
- have system be expandable for more "fun things" later.

## active mining / tunnelling

"active mining" refers to the usage of tools to break rock either to gather materials or to progress in the level

### excavation level
each turf has an excavation level, defaulting to 200
when reaching 0, the turf is fully excavated. may spawn a rock outcrop.

- minerals/ores can change this level
- minerals/ores will almost certainly be harder to mine
- to mine anomalies/artifacts you have to carefully mine to that level and then mine past that level instead of mining into that level from before that level to not smash it
    - pulverizing tools will obviously smash artifacts
- mineral turfs will almost definitely drop rock outcrops so you need to mine that too to fully mine it

### goals for excavation time/ore densities
- each ore vein should be enough for a good chunk of a major haul
- mining should start with some of the better tools at roundstart to kickstart things
- base time for unpowered excavation will be averaged to 10 seconds per turf with roundstart gear
- base time for powered excavation will be averaged to 5 seconds per turf with roundstart gear
- harder to mine materials can/will exist, but most will be relatively easy
- cavegen needs to be looked at to make movement not too painful (or as painful as it is right now due to too much rock and not enough pathways)

### tools
- sorry gamers as much as i love my /tg/ nolstalgia, kinetic weaponry will no longer be infinite
- infact, **all** tooling other than pickaxes and other non-technological tools will probably require cells
- tooling will generally reward synergizing/having a buddy mining with you. while capable in their own right when used alone, things like kinetic devices and resonators greatly benefit from something else being used at the same time (and hopefully by a different person).
- sound like cock and ball torture?
    - we'll probably make most tools storeable/accessible in some way
    - stuff like KAs will still have relatively high efficiency for what they are, so it's still **very worthwhile to use them**
    - we'll probably need some way to make emp resistance a thing because i don't believe in "EMP shorts out all miners and leaves you helpless" design
    - we will add smaller tools that will probably fit in some new "excavation pouch" or a multitool of some kind for emergencies
    - (oh, it is going to be mildly annoying to get used to, because the entire push is 'make mining rewarding but also breaking rocks harder without making it unrewarding because being able to tunnel through an entire mountain in half a minute is stupid')

#### pickaxes
- works as usual, flat excavation after delay

#### archeological pickaxes, drills
- same as pickaxes, but 1. slow 2. extremely powerful and ignores hardness and 3. doesn't break artifacts, ever, since they don't pulverize
- you can technically mine with this if you want but it'll be a good deal slower as instead of excavating different amounts due to hardness they will just excavate slower

#### drills
- click button, continuously drill turf until it breaks
- jackhammer has pulverization quality (aka exponentially higher gain as you drill a rock even if the flat excavation strength is a bit low making it Really Really Good in some niche situations)

#### plasma cutters
- efficient pickaxe but runs off phoron or energy or air or i don't know dude we'll figure it out
- now usable as a fast but shitty welding torch too! (not just for cutting normal wall!)
- very powerful against softer materials

#### phoron bores
- still fires projectile 
- almost definitely will break 1-2 tiles on hit
- pierces rest of tiles, weakening them (?)
- repeated hits may bore way faster due to weakening
- this item probably needs a rework, as it's very much contrary to this design right now.

#### **explosives** (seismic charges included)
- explosions will generally be very adept at weakening rock and excavating a bit of it
- when wave-explosions are implemented they'll bounce off rock instead
- seismic charges will weaken rock severely in a radius
- explosives will **no longer excavate underground ore.** more on that later.
    - except seismic charges, if you can't wait until the next section to yell bloody murder!
    - normal explosives will still be useful for that in some way!
- explosives become very useful to make a large segment way easier to mine instead of clearing it all out entirely
    - they will, however, still mine a good chunk.

#### resonators
- places resonator fields as before
- set resonator to low/high power
- resonator fields severely weaken rock, and be manually or automatically detonated to weaken rock
    - high power detonations can chain to nearby rock
- buddy system! project resonance fields with the resonator in active, two-hand-required mode to amplify all impacts within field!
    - greatly buffs kinetic weaponry as well
    - buffs most forms of explosives/concussive weakening to rocks as well
    - mildly buffs other forms of excavation

#### **kinetic weaponry**
kinetic weaponry have been powercreeped (mostly by me) into being extremely powerful jack of all trades mining + combat weaponry. this is bad! while miners do need defense, not much can excuse infinite 40 damage weapons that check **bomb** armor instead of any other armoring. therefore, we're likely going to rework kinetic weaponry as a whole.

- you can tell by the size of this section that i have a liking to the concept of kinetic technology
    - kinetic weapons will mostly be synergy weapons + omnitools, instead of monstrous in combat and mining in low pressure.
    - upgrades will rarely if ever make them directly more damaging in combat, instead offering combat sidegrades and mining upgrades, with a focus on synergizing upgrades
- kinetic accelerators will serve as a jack of all trades tool, because nolstalgia will still win out
    - `A standard issue kinetic accelerator provided to Nanotrasen's salvage divisions as part of the NT-PKA lineage. While not particularly outstanding at neither excavation nor offensive uses, it is widely renowned for its versatility and modularity.`
    `Click with your other hand, or Alt-Click to unload the power cell.`
    `Use in-hand manually charge if the cell is empty.`
    - 48 shots per weapon cell
    - default range buffed massively
    - default excavation will be equivalent to a regular pickaxe. it will also weaken rocks on hit, but not as strongly as a resonator/other equipment.
        - the intent is it should be used with other weapons!
    - default damage is now a measly 20 brute. instead, it will disrupt most dumber fauna on hit with the concussive blast.
        - this disruption doesn't work in pressurized environments
        - this disruption barely works on humans and high-tier fauna/simplemobs
    - the weapon still uses the overheat-delay system; but it now charges from cell, and doesn't need to be held
        - if the cell is empty, you can temporarily charge it by using in hand. this obviously has drawbacks to it.
    - the weapon no longer has "conflicts", so you can have faster overall charging by carrying more than 1 now
    - the weapon will be more designed as a modular-energy-rifle like system. 
        - ranging from range upgrades, to AoE resonance upgrades, to AoE fauna disruption, etc
        - upgrades are no longer stackable; upgrades are meant to give it more functionality and versatility, rather than being purely for stat-adjustments
        - weapon attachment system will be made for this woo?
        - starts with a powerful flashlight (draws power!!)
- kinetic daggers (and crushers and etc etc)
    - `A newer prototype provided to mining and salvage divisions, the NT-PKL series trades the classic design of 'barrel towards target' for more close range capabilitiy. This diverse weapon has been the subject of much controversy - with many users stating that it is 'the dagger of choice for those with no self preservation.'`
    `Due to most models being too small to fit standard issue cells, PKL-series weaponry self-charge from the user's motion. Keep this weapon in your inventory to charge it up!`
    - integrated flashlight comes by default - high efficiency + brightness
    - impact "marks" target - resonance effect on mineral turfs, the classic "crusher mark" on mobs
    - synergizes with other kinetic weaponry by deonating by impact
        - detonations are more powerful when hit by another crusher-like device, and doubly so if by the original marking device
        - by default, the detonation damage will be **low**, and apply a similar concussive effect to disrupt weaker monsters.
    - weaker in excavation than kinetic accelerators, but faster recharge
    - has a weak integrated light that works while held
    - this weapon will also have upgrades/etc
        - less of an attachment system than accelerators (classical upgrades no weapon mod system)
        - upgrades are also not-stackable and act more like the crusher trophies of /tg/code: resonator synergy, longer marks for rocks, etc

#### antimatter weaponry
remember those antiparticle projectors? well how about we make them Not Utterly Worthless?

- has mining capabilitiy
- keeps their (relatively) high space damage, as these are more weapons than mining tools
- as always, only works in near-vacuums
- has weak AOEs. space mining is meant to be !!fun!!

#### hand crank chargers
a hand crank charger will be added for slowly recharging equipment-grade (not the big industrial ones) weapon cells.

### do you have an idea for making this better?
if you do, 1. talk to me and 2. be prepared to either sprite or get someone to sprite it for you

## passive mining / base building

### drill
- nothing changed
- it still runs on power cells lol
- no seriously nothing changed 
- probably add automatically dumping into an adjaceny ore box for QOL
    - or i don't, and just make it store more lol

### explosions
- seismic charges greatly weaken the ground, making drilling far faster
    - will also unearth some ores
- normal explosions do the same but less efficiently
    - does not mine ores directly

### pickaxes/shovels/vertical bores
- shovels still shovel sand (duh)
- pickaxes can eventually excavate vertically enough to bring out ores
    - because clearly we don't care about the immersion of someone realistically digging down some 50 meters within a few seconds
    - this is, obviously, heinously inefficient. please use a big drill
- powered vertical bores still exist! they will work as before, if not a slight bit better

### underground ore scanner
- nothing changed

### portable generators
- pacmans and all the other generators get refactored to be Less Stupid, and can now charge power cells. 

### ore machinery
- processor, unloader, etc, will all be constructible

### do you have an idea for making this better?

if you do, 1. talk to me and 2. be prepared to either sprite or get someone to sprite it for you

### The Base Defense Drill (stretch goal)
"noooo you can't turn mining into unga" lol yes i can vorestation did it it won't be that bad 

- set it up like a normal drill
- can drill minerals out of Everywhere on a planet
- what you get from the planet depends on the planet you're drilling and where you put it 
- just as good as normal drilling but the longer you drill an area the tougher it gets 
- help the spiders are in our walls
- potentially have it only work on explo planets or certain area to Alleviate Salt

## generation

`/datum/ore_generation/*`
- perlin
- rng placement + spread
- `/datum/ore_generation/proc/run_aboveground(list(z's), ...)`
- `/datum/ore_generation/proc/run_belowground(list(z's), ...)`

with fixing amounts for
- flat rarity amounts by ore type
- flat rarity/richness from 0 to 100
- list(ore = amount)

with biasing by 
- predetermined/mapped hotspots
- centerizing ores
- avoiding sides to avoid "overmaps situations" where rarely frequented parts of the map have a lot of the content

### what you will care about as a player
- aboveground minerals will be rare and clumped tightly (more than one ore type in tile), rare and clumped normally (one ore type per clump, can overlap). don't expect random tiles here and there; finding a clump will be harder but when you find one you're going to get like a stack or two out of it atleast.
    - this depends on generation method used for a zlevel
- underground minerals will be able to use both the above algorithm, or use perlin to create "bands" and "strains" of ores. 
    - again, this obviously depends.
- majority of rock will just be rock with varying hardness

## ore refactor

not going to explain but tl;dr fuck materials system i'm standardizing ores to /datum/ore sorry lordme

## mineral amount fixing
the current amount of minerals generated is wildly ridiculous on all levels
therefore, there'll be ways to fix (see generation design) mineral amounts.

science will initially suffer for this but science recipes will need adjustments at some point anyways

limitations:
- cannot fix materials at under 20-30 sheets accessible within a decent time in a certain level - the minimum stack amount is 2000 cm3 which is a **lot**, and it would be unfair to make science unable to eject materials under that.
    - partial stack support? food for thought for the future.
    - /datum/material/var/stack_amount? 
- rng is fickle and doing this in a way that doesn't result in inaccessible materials is hard
- i have to fix >100% deconstructor efficiency so science can't dupe materials
- stuff like supermatter and some more expensive designs need to immediately be demoted in cost so sciene doesn't instantly suffer

### example values 
- by rarity value per planet:
    - low: infinite (iron/sand/carbon/etc)
    - medium: 3000-4000 pieces (not stacks) (gold/silver/copper/phoron/etc)
    - high: 500-750 pieces (platinum/uranium)
    - extreme: 150-250 pieces (mhydrogen/verdantium/diamond)
- most ores will probably convert to sheets at 4 or 5 to 1 sheet rate

### defines
- material worth defines to fix design cost to standardized values?
- MAT_COST_TRACE --> 0.125 sheets
- MAT_COST_LOW --> 0.5 sheets
- MAT_COST_MEDIUM --> 1.5 sheets
- MAT_COST_HIGH --> 3 sheets
- MAT_COST_BULK --> 5 sheets
- MAT_COST_INDUSTRIAL --> 10 sheets
- ???

## interfaces
since we do not have generic planet supports, the mining system will mostly be interacted with using an API that's just
- `SSmapping.GenerateUndergroundOres(z, ...)`
- `SSmapping.GenerateAbovegroundOres(z, ...)`
- `SSmapping.GenerateOres(z, ...)` - call once to do everything for you

exact params TBD
support will be added for "level grouping" for the purpose of mineral amount fixing

## fauna
- i don't really give a fuck about this because i'm not in my "kill everyone" phase (yet) thus it's up to mappers and feature coders to write shitcode to spawn fauna everywhere kkthx 


