On DayzUnderground we have containers that are smaller than their cargosize. For instance we have cigarette packs and collectable card boxes. However starting with the stable update of today items stored inside of those in your inventory appear on the ground or disappear completely upon login. If you hold the pack in your hand it's no problem.
For instance the cigarette pack is 1x1 and internally it's 10x2 and can hold certain kinds of items, that's how we balance these things through ItemBase.c:
modded class ItemBase extends InventoryItem { override bool CanPutInCargo( EntityAI parent ) { if ( parent ) { if( parent.IsKindOf("DUG_CigarettePack_ColorBase") && !(IsKindOf("DUG_Cigarette_Base") || IsKindOf("DUG_PetrolLighter") || IsKindOf("DUG_Zippo") || IsKindOf("Paper"))) { return false; } if( parent.IsKindOf("DUG_CollectCard_Box") && !IsKindOf("DUG_CollectCard_Base")) { return false; } if (parent.IsKindOf("DUG_CassetteCase") && !IsKindOf("DUG_CassetteTape_Base")) { return false; } } return super.CanPutInCargo(parent); } }
And the config for the pack:
class DUG_CigarettePack_ColorBase: Container_Base { displayName = "Pack of Cigarettes"; descriptionShort = "An old pack of cigarettes, a bit damaged, but can still hold many cigarettes."; model = "\dz\gear\medical\cigarette_pack.p3d"; itemSize[] = {1, 1}; itemsCargoSize[] = {10, 2}; weight = 2; absorbency = 0.700000; lootTag[] = {"Hygiene", "Civilian"}; lootCategory = "Medical"; hiddenSelections[] = {"camoGround", "zbytek"}; class DamageSystem { class GlobalHealth { class Health { hitpoints = 100; healthLevels[] = {{1.000000, {"DZ\gear\medical\data\Pack_of_cigs.rvmat"}}, {0.700000, {"DZ\gear\medical\data\Pack_of_cigs.rvmat"}}, {0.500000, {"DZ\gear\medical\data\Pack_of_cigs_damage.rvmat"}}, {0.300000, {"DZ\gear\medical\data\Pack_of_cigs_damage.rvmat"}}, {0.000000, {"DZ\gear\medical\data\Pack_of_cigs_destruct.rvmat"}}}; }; }; }; }; class DUG_CigarettePack_Chernamorka: DUG_CigarettePack_ColorBase { scope = 2; displayName = "Pack of Chernamorka Cigarettes"; hiddenSelectionsTextures[] = {"DZ\gear\medical\Data\pack_of_cigs_cherno_co.paa", "DZ\gear\medical\Data\pack_of_cigs_cherno_co.paa"}; };
This all worked fine before, and I would like to have this functionality back. I have a feeling we're running into some kind of glitch protection? What can I do to fix it or is it something you guys need to do? Please help!