You are viewing a potentially older version of this package. View all versions.
lagarbure-DeathItemRack-1.1.0 icon

DeathItemRack

On a squad wipe, the whole squad's gear waits on a labelled rack at spawn instead of scattering across the map. Host-side, configurable.

Date uploaded 3 days ago
Version 1.1.0
Download link lagarbure-DeathItemRack-1.1.0.zip
Downloads 2241
Dependency string lagarbure-DeathItemRack-1.1.0

This mod requires the following mods to function

BepInEx-BepInExPack-5.4.2305 icon
BepInEx-BepInExPack

BepInEx pack for Mono Unity games. Preconfigured and ready to use.

Preferred version: 5.4.2305

README

Death Item Rack

Your gear waits for you on a rack instead of scattering across the map.

When the whole squad goes down, How to Fish dumps everybody's inventory in one pile wherever the last player gave up. Half the time that is over water, on a slope, or inside a rock — so the gear rolls away, sinks, or falls through the ground, and what survives is one heap nobody can sort out.

This mod catches it. Every player gets their own rack, stood in a row at the island's spawn point and labelled with their name, holding their inventory and whatever they were carrying in their hand when they died.

Each rack is a shelved cabinet on a plinth with an open flank down each side. Handguns, melee weapons, shotguns and uzis go on the shelves. Snipers, assault rifles and fishing rods are too long to lie down, so they stand upright in the flanks, caught by prongs at two heights and held there — they stay standing until you take them, rather than slowly toppling out. Anything much longer than a shotgun is stood up rather than laid across a shelf — fish excepted, which lie down whatever their length.

A rack at the spawn point, gear on its shelves and a rod standing in the flank

Playing solo, your own death is the wipe.

It never eats your stuff

The rack disappears once the last item has been taken off it, or after three minutes, with the game's own puff of smoke — so it does not clutter the island.

If it times out while gear is still on it, only the rack goes. The items drop to the ground where it stood and stay there like any other dropped item. The mod never destroys anything.

Requirements

BepInEx 5 (x64), the mod loader. If you already have a BepInEx folder in your game directory, skip to Installation.

  1. Download BepInEx_win_x64_5.4.23.5.zip (or newer 5.x) from https://github.com/BepInEx/BepInEx/releases
  2. Right-click How to Fish in Steam > Manage > Browse local files. This opens the game folder (it contains How to Fish.exe).
  3. Extract the BepInEx zip directly into that folder. You should end up with a BepInEx folder and winhttp.dll sitting next to How to Fish.exe.
  4. Launch the game once and quit, so BepInEx can generate its folders.

Installation

Extract this mod's zip into the game folder, merging with the existing BepInEx folder. You should end up with ...\How to Fish\BepInEx\plugins\HowToFish.DeathItemRack.dll.

To verify it loaded, open BepInEx\LogOutput.log and look for:

[Info   :Death Item Rack] Death Item Rack loaded.

Multiplayer

Install it on every machine — and the host must have it.

  • The host is what notices the wipe and arranges everyone's gear. Without it there, nothing happens for anybody.
  • Each player draws the racks on their own machine. Without it, that player sees the gear laid out neatly in mid-air with nothing holding it up.

Loot is safe and reachable either way, but the racks are only visible to players who have the mod. Everyone should also be on the same version, since each machine works out the rack layout for itself rather than being told where it goes.

Configuration

After launching the game once, edit BepInEx\config\alexandre.howtofish.deathitemrack.cfg.

Setting Default What it does
Enabled true Build a rack on squad wipe at all.
SweepLooseItems true Also rack the item you were holding in your hand when you died.
SweepRadius 25 How far away that item may be before it is left where it fell.
OffsetForward 3 How many metres in front of the spawn point the rack stands.
OffsetRight 0 Nudge it sideways if it lands somewhere awkward on your island.
PinItems LongGearOnly How much of the rack is held still: None, LongGearOnly or Everything.
PinSettleSeconds 1.5 Seconds before held gear is pinned for the other players too.
LingerSeconds 180 How long the rack sticks around. Items on it are never destroyed.
PoofWhenEmptied true Vanish as soon as the last item has been collected.
ShelfCount 3 Shelves in the cabinet, for the smaller gear.
CabinetWidth 1.2 Width of the shelved part, in metres. The flanks add to this.
StandingLength 0.7 Gear at least this long stands in a flank instead of lying on a shelf.
RackSpacing 0.5 Gap between neighbouring players' racks, in metres.
WoodPrimaryColor 8A5A2B Plank colour.
WoodSecondColor C89B54 Highlight colour.
NameplateHeight 0.35 How high the names float above the rack.
NameplateScale 1 How big the names are drawn.

Notes

  • The rack is generated in code and coloured with the game's own material, so there are no art files to install and nothing to look out of place.
  • Sailing to another island removes the rack. Collect your gear before you set off.
  • Anything that sank before the squad respawned was already destroyed by the game and cannot be brought back.
  • Standing gear is held in place rather than balanced, and is let go the instant you pick it up or the rack goes. Nothing is ever locked to the rack permanently.

Uninstall

Delete BepInEx\plugins\HowToFish.DeathItemRack.dll. Your saves are untouched — the mod only moves items that the game had already dropped.

CHANGELOG

Changelog

1.1.0

Long gear stays where it is put.

  • Snipers, assault rifles and fishing rods standing in the flanks are now held in place rather than balanced there. Through 1.0.0 they were stood in a prong fork and left to physics, and physics kept finding a way out of it — the rifle rocked itself loose, the rod used its reel for leverage. They now stay standing until somebody takes them.
  • Held gear is released the moment it is picked up, when the rack poofs, when the island unloads and when the mod shuts down. Nothing is ever locked to a rack, and nothing is destroyed.
  • Gear that overflows onto the top of a cabinet is held there too, so a wide sniper rifle no longer slides off it.
  • Held gear sits flush on the plinth or shelf instead of being dropped the last few centimetres, because it has nothing to be pushed out of.
  • Rifles now stand in the flanks instead of lying across a shelf. Anything at least StandingLength (0.7 m) long is offered a flank first even where a shelf would take it. Fish and other creatures are excluded whatever their length - a gar measures as long as a rifle, and a fish standing on its tail in a gun rack is not what anybody wants to come back to.
  • Scoped rifles fit the flanks. Whether a standing item fits across a flank was judged on its overall width against the gap between the cabinet and the pocket wall, which sent every sniper rifle to the top of the cabinet over an obstacle that was never in its way — the wall is ankle high and a rifle is widest at its scope. Only the item's width below the wall's height is tested against it now, and items are placed by their inboard edge so they clear the cabinet at every height by construction.
  • Gear that cannot be stood up now falls back to a shelf when one will take it, and only then to the cabinet top. Short gear that will not lie on a shelf goes on top rather than being stood on end: a flank is for long gear, and an uzi balanced upright took a slot the rifle behind it wanted.
  • Held gear is now held for as long as the rack stands, not just while it settles. The game takes items back off us at times of its choosing - TickUpdate while the synced simulator is still unset, and OnCollision whenever something moving touches the item, which on a rack whose shelved gear is still settling is a normal thing to happen. Asking once was enough most of the time, which is the worst way for it not to be enough.
  • New Physics config section: PinItems (None, LongGearOnly, Everything — default LongGearOnly) and PinSettleSeconds. None restores the 1.0.0 behaviour exactly.

How it is held

Two stages, for two different reasons, both using mechanisms the game already has.

The hold makes the rigidbody kinematic at placement and re-asserts its pose every physics step. The re-assertion is load bearing: RigidbodySync.TickUpdate calls StartSimulateLocal on any item whose synced simulator is not set yet, and that turns kinematic back off. The simulator is set by a server RPC, so for the first few ticks the game is undoing us every tick.

The latch sets RigidbodySync._isFloating, the SyncVar the game uses to hold a fish still on the surface of the sea. Its OnChange calls SetKinematic on every machine, so one flag holds the item for everybody — unmodded clients included — with no networking of this mod's own. It is delayed by PinSettleSeconds because a floating item stops receiving position updates: latching before the racked pose had arrived would freeze a client's copy of the rifle wherever it was standing. Releasing is vanilla's job for the same reason; PickUpPatch only makes sure of it.

1.0.0

First release.

  • When the whole squad is wiped, every player gets their own wooden rack, stood in a row at the island's spawn point and labelled with their Steam name. Playing solo, your own death is the wipe.
  • Each rack is a shelved cabinet on a plinth with an open flank down each side. Handguns, melee weapons, shotguns and uzis go on the shelves; snipers, assault rifles and fishing rods are too long to lie down and stand upright in the flanks, leaning against the cabinet.
  • A rack also holds the item its owner was carrying in their hand when they died, which the game otherwise drops where they fell and forgets about.
  • Racks disappear once the last item has been taken off them, or after three minutes, with the game's own smoke-puff vanish. Items left behind drop to the ground; nothing is ever destroyed.
  • The geometry is generated at runtime and painted from the game's own colour palette, so there are no art files to install and nothing to break when the game updates.
  • Multiplayer: the host arranges the gear, and every player draws the racks locally. Install it on every machine, on the same version.

Notes from bringing it up

Recorded because each one was invisible until it wasn't, and the reasoning is in the README.

  • $"..." interpolation compiled against MonoMod.Backports, which BepInEx does not load, so the rack failed to build with a FileNotFoundException far from the apparent cause. LangVersion is pinned to 9.0.
  • The rack's material was cloned from InstanceManager, whose entries are all scenery decoration — it picked up WindyDecoration, a foliage shader that vertex-animates its mesh, so the rack swayed in the wind and rendered near-black.
  • Shader Graphs/DefaultShader has no colour property at all; it samples a _Colors palette texture through the mesh UVs. Every tint call was a silently guarded no-op and the rack rendered white.
  • Four of the cube's six faces were wound inside-out. Unity culls by winding, not by the normal vector, and the normals were correct — so shading looked right while the rack was a hollow shell you could see through.
  • Coplanar faces between the frame, shelves and lips caused z-fighting.
  • Items wider than the shelf were placed overhanging it, which meant spawning them inside a static collider; the solver flung them across the island. This is what the flanks fix.

tools/check_geometry.py now catches the last two classes offline, across every shelf count and cabinet width, without launching the game.