> For the complete documentation index, see [llms.txt](https://pororoca-works.gitbook.io/pororocaworks-satdoc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://pororoca-works.gitbook.io/pororocaworks-satdoc/penetratio-system.md).

# Penetratio system

### Penetration System Overview

The **S.A.T. Penetration System** is a lightweight, easy-to-extend mechanic for ballistic projectiles that uses **Physical Materials** to define how well surfaces resist penetration. It works out-of-the-box with no need to manually tag surface types in Project Settings.

***

#### 💡 How It Works (In Short)

<figure><img src="/files/xzDNlwGLPtd8ujuqqs6d" alt=""><figcaption></figcaption></figure>

* **Ballistic projectiles** carry a `Penetration` integer.
* On every hit, the projectile checks the **Physical Material** of the surface.
* It reads the **Penetration Index** from a **data table (`DT_MaterialsIndex`)**.
* The index value is **subtracted** from the projectile’s current penetration.
* If penetration ≥ material index → **projectile continues**
* If penetration < material index → **projectile stops and resets to pool**
* **Damage is reduced** after each penetration by the **Penetration Ratio Variable**.

<figure><img src="/files/4d1EbQsQ18hdS3NHalkX" alt=""><figcaption></figcaption></figure>

***

#### 🔁 Pooling Compatibility

* When the projectile is stopped by a material it **can’t penetrate**, it:
  * Triggers impact logic
  * Resets **penetration value and damage** to original
  * Returns to pool (if pooling is enabled)

***

#### 🧪 Example Setup

| Physical Material | Name         | Penetration Index |
| ----------------- | ------------ | ----------------- |
| `PM_Flesh`        | Enemy flesh  | 1                 |
| `PM_Concrete`     | Wall surface | 3                 |

This means a projectile with penetration value **3**:

* ✅ Can pierce **3 enemies with `PM_Flesh`**
* ❌ Will stop on the **first `PM_Concrete`** surface

***

#### 📁 Data Table: `DT_MaterialsIndex`

<figure><img src="/files/mJsU2NQkyaDp3WnTbonW" alt=""><figcaption></figcaption></figure>

You can add your own materials by:

1. Creating a **new Physical Material** in your project.
2. Assigning that material to a row in the **`DT_MaterialsIndex`**, giving it a penetration index.
3. Applying the physical material to a mesh's material slot under **"Phys Material"**.

<figure><img src="/files/Ll2GgJULduoQU7fChe3E" alt=""><figcaption></figcaption></figure>

***

#### 🛠️ Customization Tips

* Want armor to block more? Just give it a **high index** (e.g., 5–10).
* Want paper-thin surfaces? Set index to **0**.
* Want to simulate light cover? Use **fractional damage reduction** via the **Penetration Ratio**.

***

#### 💥 Damage Scaling (Penetration Ratio)

After each penetration, projectile damage is **scaled down** using a predefined ratio (set on the projectile). For example:

* `Penetration Ratio = 0.75`
* Initial damage = 100
* After 1st hit = 75
* After 2nd hit = 56.25
* And so on...

This prevents infinite multi-kills with a single bullet and creates diminishing returns on deep penetrations.

***

#### 🎯 Integration Steps Recap

1. ✅ Create new **Physical Materials** for the surfaces you want.
2. ✅ Add each to **`DT_MaterialsIndex`** with desired index.
3. ✅ Assign Physical Materials to your **meshes** (Static or Skeletal).
4. ✅ Ensure projectiles hitting those meshes are **Ballistic** and have Penetration > 0.
5. ✅ Tweak **penetration value** and **penetration ratio** per projectile.

***

### ✅ Best Practices

* Use pooling only for **ballistic projectiles**, not explosive.
* Use **clear Physical Material naming** (like `PM_Wood`, `PM_Armor`, `PM_Glass`) for organization.
* Keep indexes intuitive: lower = easier to pass, higher = stronger resistance.
* Always test with **debug lines or prints** to confirm material is correctly detected!


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://pororoca-works.gitbook.io/pororocaworks-satdoc/penetratio-system.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
