Fix invisible boxes: use real SeaChest model + cargo grid

The placeholder model path (dz\structures\wood\wooden_crate.p3d) does not exist,
so boxes spawned invisible with no selection geometry - hence not visible and no
action (nothing to look at/target). Server logic was fine (8 boxes, proximity
msgs fired). YALootBoxes_Base now uses the vanilla SeaChest model
(\DZ\gear\camping\sea_chest.p3d) plus a 10x10 Cargo grid so the crate renders,
is targetable, and can hold loot. Verified model + texture paths exist locally.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
smthspec 2026-06-20 01:11:10 +03:00
parent f490d45001
commit c6f6cea9ad

View file

@ -68,15 +68,13 @@ class CfgMods
// crate resolves to the YALootBoxes_Base script type. The old
// "simulationModule" line did NOT do this and has been removed.
//
// BASE CLASS: these inherit from vanilla "Container_Base" (a real
// lootable container base). "ContainerObject" used previously is
// not a vanilla class. >>> VERIFY against your SDK <<< and, if the
// crate spawns with no cargo space, add a Cargo grid definition
// (e.g. itemsCargoSize[] = {x,y};) to YALootBoxes_Base below - the
// wooden_crate model + Container_Base may need it to hold loot.
//
// MODEL: wooden_crate.p3d path is a placeholder; replace with a
// real p3d you have. >>> VERIFY model path against your SDK <<<
// BASE CLASS / MODEL / CARGO: inherits vanilla "Container_Base" and
// reuses the vanilla SeaChest model + a matching 10x10 cargo grid, so
// the crate is visible, has selection geometry (needed for the player
// to look at it and get the action), and can actually hold loot via
// CreateInInventory. Swap 'model' and the cargo size for your own p3d
// if you have one. (The earlier "wooden_crate.p3d" path did not exist,
// so boxes spawned invisible with no geometry -> no action.)
// ------------------------------------------------------------
class CfgVehicles
{
@ -88,7 +86,20 @@ class CfgVehicles
{
scope = 0;
vehicleClass = "Containers";
model = "\dz\structures\wood\wooden_crate.p3d";
model = "\DZ\gear\camping\sea_chest.p3d";
weight = 10000;
itemSize[] = {10, 10};
itemBehaviour = 0;
carveNavmesh = 1;
hiddenSelections[] = { "camoGround" };
hiddenSelectionsTextures[] = { "\dz\gear\camping\data\sea_chest_co.paa" };
class Cargo
{
itemsCargoSize[] = {10, 10};
openable = 0;
allowOwnedCargoManipulation = 1;
};
};
class YALootBoxes_Crate_Military : YALootBoxes_Base