zPaulinBRz-zPaulinsWeaponArsenal icon

zPaulinsWeaponArsenal

Adds a Desert Eagle and an FN FAL to the gun store, with solved hand IK, tuned iron sights and a working charging handle. New weapons are data, not code.

CHANGELOG

Changelog

1.0.1

Fixes how mod weapons are drawn in the hotbar, and adds the gun racks to the shop island.

Hotbar

Three distinct faults, all of which showed up as "the icon looks wrong":

  • Framing. InventorySlot.SetItem draws item.Mesh at Item._inventoryMeshPos/Rot/Scale. Those were authored for the vanilla mesh, while a mod weapon's mesh carries the first-person hand pose baked into its vertices - the FN FAL a 1.2 unit translation, a 90 degree roll and a 1.25 scale. The mod now solves its own framing from the two meshes' bounds so the model lands where the vanilla one did.
  • Material. A slot keeps one material for every item it ever shows and the game only pushes skin and cookness onto it, which works because vanilla items share one shader. Weapons using model or colors materials do not, so the slot drew them with the wrong surface.
  • Missing parts. A renderer draws one submesh per material it holds. Assigning a single material to a slot showing a 13-part weapon rendered part 0 and silently dropped the rest. The full material array is assigned now.

A weapon's material is also reverted when a vanilla item takes the slot back. Without that it persisted, and the next item selected - a fishing rod, in the report that found this - was drawn with the weapon's material and looked like it had vanished.

Shop

Two gun racks placed on the shop island, beside the weapon stands.

Props are scenery the mod introduces at absolute world coordinates. They carry no Item, no Weapon and no NetworkObject, so they need no prefab to clone and no FishNet registration: every client builds its own from the same def.

targetHeight asks for a height in metres and derives the scale from the model's real baked size, because a .glb carries no unit convention - this one arrives 104 m tall. restOnGround offsets by the mesh bounds, since model origins sit mid-geometry.

Also

  • /wa prop read its arguments one position early and never found the prop it was given.
  • WeaponRegistry no longer tries to parse props.json as a weapon def.
  • Every /wa command is logged. Say() only reaches the in-game chat, so a command that answered and did nothing left nothing to debug from.

1.0.0

First public release.

Weapons

  • Desert Eagle — semi-auto magnum on the Pistol base. 7 rounds, 9 with the extended mag, no sight or barrel attachments, bullet upgrades cost 5x.
  • FN FAL — full-auto battle rifle on the Assault Rifle base. 20 rounds, 30 extended, with a charging handle that cycles on every shot and is racked during the reload.

Both ship as AssetBundle prefabs with solved hand IK, per-model finger pose, tuned iron sights and a per-weapon fire sound.

Shop

Mod weapons are sold from the game's own gun store. On scene load the mod finds the existing weapon stands on the configured island, measures the real spacing between them, and extends the rack with one stand per weapon — display mesh swapped, price from shop.price. Nothing vanilla is moved or modified.

Configured under 03 - Shop: ShopIslandName, ShopIslandIndex, ShopFallbackSpacing.

Authoring

A weapon is still just a .json. The whole tuning pass happens in game and writes back into the def — alignment (/wa fit, /wa auto), grip (/wa grip, /wa pose), hand IK (/wa ik), charging handle (/wa slide, /wa charge), iron sights (/wa ads), plus measurement commands (/wa bones, /wa anchors, /wa part, /wa paths).

model.bundleAsset loads a prefab from an AssetBundle built with the mod kit; model.file still parses a .glb at runtime with no Unity install.

Multiplayer

Weapons register into their own FishNet collection (4100), so vanilla prefab indices never shift. Defs are sorted by id with an ordinal comparison before registration, and /wa status prints a fingerprint over that ordering to compare between players.