> For the complete documentation index, see [llms.txt](https://code-after-sex.gitbook.io/script-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://code-after-sex.gitbook.io/script-documentation/cas-advanced-gang/playing/stash.md).

# The shared stash

The gang's shared stash in the Supply Wagon: daily rank allowances, what can be laid in, guns kept one by one, and food that spoils on RSG.

The gang's goods are kept in the **Supply Wagon**, which comes with tier II. The **Stash** tab shows the wagon on one side and your own satchel on the other. Pick from the wagon to take something, or from your satchel to lay something in.

## Rules

The server checks these in order, and a refusal names the first one that fails.

| Rule                | Detail                                                                                                                                             |
| ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Permission**      | `stashDeposit` to lay in, `stashWithdraw` to take out.                                                                                             |
| **Contested camp**  | With `Config.Territory.lockStores`, nothing leaves the wagon while the camp is contested. Laying in still works.                                   |
| **A wagon stands**  | With no Supply Wagon standing, the tab says what's missing and which tier brings it. Goods already laid in are kept.                               |
| **You're in camp**  | Within `Config.CampBounds` of the tent, unless `Config.RemoteStash = true`.                                                                        |
| **Stock**           | The wagon holds that many.                                                                                                                         |
| **Daily allowance** | A rank's `stashDaily` limits what a member takes per day. Laying in is never limited. It resets when the date rolls over and survives a reconnect. |
| **Room**            | You can carry it, and the wagon has room for what you lay in.                                                                                      |

Capacity rises with the tier: 300, 750, 1400 and 2400 items for tiers II to V by default.

## What can be laid in

The satchel side lists what you carry from `Config.StashItems`. Framework inventories can't be listed through their exports, so the stash offers the goods your server configures. See [Stash settings](/script-documentation/cas-advanced-gang/configuration/stash.md).

## Guns

On **VORP** and **RSG**, a gun is stored as that gun, not as a count. Its serial, custom label, loaded rounds, fitted components and (on RSG) condition go in with it, and the same gun comes back out. Two Cattleman revolvers are two rows.

* Each gun takes one place in the wagon and one from the daily allowance.
* Rounds and components are read before the gun leaves the player. If the database refuses the row, the gun is handed back.
* On RSG a worn gun comes back worn. The wagon isn't a repair bench.

On **RedEM:RP**, guns are plain items listed in `Config.StashItems`. `Config.StashWeapons = false` keeps guns out entirely. Guns already stored can still be taken out.

## Food spoils (RSG)

RSG items with a `decay` value keep losing freshness in the wagon:

* Each stack has one freshness. A fresh deposit onto an older stack averages the two.
* It spoils at `Config.StashDecayRate` times RSG's own rate. `0` means nothing spoils.
* Food comes out with the freshness it has left, shown on the Stash tab.
* A stack of an item RSG deletes at zero is thrown out when it gets there, and the ledger notes it.

VORP and RedEM:RP items have no freshness, so nothing spoils there.
