---
# System prepended metadata

title: Souls-like damage system (physical) and procedural object properties

---

# Souls-like damage system (physical) and procedural object properties

The souls games (and Elden Ring) have a quite intuitive system to determine which weapon will be good against a certain oponent. Since in SS13 you can use almost any object as a weapon, we could use the same ideas to bring some variety into the weapons instead of simple flat strenght of each object as a weapon, and a single parameter to determine how good it is against windows/machinery.

[TOC]

## Mass
All items have mass. May be somehow tied to integrity, or replace it. The mass determines how hard it is to swing the item (more mass = more inertia). In the game it deremnies the cooldown between swings and how good the item is as a blunt weapon. 

**Examples**: 
* Fireaxe is big and heavy, you can swing it once per 2 seconds
* Combat knife is small and you can attack every second with it

## Material
All items have material. They have different density rank and the more dense the material, the better it can apply its mass to deal damage.

The material in conjunction with mass will determine how much of material autolathe can retrieve from an object. So when you add a new object into the game, it is easier to set its recycle results by guessing it's mass in grams and specifying its material. This can be done in base classes and overriden only in exceptional cases. Like all bottles are made out of 100g of glass, but plastic bottles override material to plastic, and set mass to 50g instead of 100g.

The materials will also be used to determine the SFX of an attack. The attack sound is determined by the less dense material of the weapon and a target.

**Examples**: 
* A casette tape is an object of 100g of mass and made of plastic. If you put it into lathe, it will give 100 plastic. If you hit a machine with it, it will play plastic sound. If you hit a paper wall with it, it will play paper sound.
* A spear made out of titanium glass shard is stronger than one of regular glass shard because titanium glass is more dense, and the value is not hardcoded.

## Damage types
All objects that can be weilded should have a certain damage type they deal. This can be done by assigning damage type to the parent classes.

### 🔨 BLUNT damage
Most common damage type, and all items have it by default. The more mass the object has, the bigger the blunt damage. So a big sword and fire axe may be more effecient at slashing, they still are good blunt wepons because they're 2-handed and big.

* More mass - More blunt damage, but longer cooldown between attacks
* Blunt damage is good against all hard objects
* Less damage than other damage types
* Ignores armor
* Breaks bones
* Also deals stamina damage if the object has stamina

### 🪓 SLASH damage
Damage type of all objects with a blade - knives, axes, swords. Deals most damage of all 3 types, but not efficient against objects with hard armor or just thick leather clothing.

* Weapons still deal 50% of their damage as blunt, depending on their mass
* Slash damage is good against all soft objects
* Most damage compared to other damage types
* Best at dismembering
* Weak against armor
* Causes bleeding wounds

### 🗡 PIERCE damage
Damage type of spears, bullets, and pointy knives. Deals less damage, but can be spammed better due to generally smaller mass of spears and knives. Worse than brute, but better than slash against armored objects.

* Knives have 50% chance to deal piercing attack or slashing attack (non-pointy knives deal slash only)
* In the middle between Slash and Blunt against armor and the damage amount
* Can embed into the target
* Causes bleeding wounds
* Does not dismember
* Syringe guns use piercing damage to determine whether they can penetrate


## Resistances
### 🔨 BLUNT resistance
Less common resistance type. Hard objects have 0 brute resistance, slimes have 100 - immune to blunt damage.

Determines how strong you are against bats, toolboxes, fire extinguishers.

### 🪓 SLASH resistance
The harder the object, the less damage it takes from slash weapons (but not the blunt part of it!).
Any armor is good at protecting against slash attacks, even a leather coat.

Determines how strong you are against cult knives, armblades and such.

### 🗡 PIERCE resistance
The harder the object, the less damage it takes from pierce weapons, and they usually don't have the blunt part. Though they have a chance to pierce armor, so leather coat or a chain mail will not save from a spear. Syringe guns have a chance to not pierce with higher pierce resistances.

Determines how strong you are against bullets and thrown objects.

## Gameplay effects / example cases
* Glass has 0 blnt resistance, but is immune against slash and pierce, which resembles the current logic
* Shotgun shots one bullet that deals blunt damage instead of of many scattered projectiles with pierce. So it is not as OP at point black as right now, but has a unique property and a better weapon against armored targets.
* Toolboxes and bats are quite good against heavily armored targets, so Butcher's cleaver is no longer the best option against nukies
* Golems are weaker to blunt damage than humans, but immune against slash and pierce (there should be a visual effect of sparks that indicates that the weapon just scratches the hard object)
* You have to think about the damage types of your oponent to choose the right armor, tactics, wound treatment items
* Now there is more point in having a sidearm - to adapt for the type of your oponent's resistances