• If you have a mod, tool or prefab, please use the Resources section. Click Mods at the top of the forums.

How do I add inventory space to a custom storage container?

Noisy Pants

Refugee
I made a variation of the default chest for players that want to secure their loot at their leisure, thing is; I would like to increase the inventory space inside the container which is something I do not know how to do because I do not know the loot container id that the game assigned my container. I thought of modding the loot table then adding "Steelwood Chest" as a loot container id even though I see #numbers# only in the loot id value; then making the necessary adjustments to add room, not certain what to do. Is there a way too find out what the loot container id the game assigns to custom containers?
 

<config>
<append xpath="/blocks">

<block name="Steelwood Chest">
<property name="CreativeMode" value="Player"/>
<property name="MaxDamage" value="10000"/>
<property name="explosionresistance" value="2"/>
<property name="LPHardnessScale" value="24"/>
<property name="Tags" value="door"/>
<property name="Class" value="SecureLoot"/>
<property name="CustomIcon" value="cntChest01"/>
<property name="Material" value="MwoodReinforced_v2"/>
<property name="StabilitySupport" value="false"/> <!-- build restriction -->
<property name="Shape" value="Ext3dModel"/> <property name="Texture" value="293"/>
<property name="Mesh" value="models"/>
<property name="IsTerrainDecoration" value="true"/>
<property name="FuelValue" value="300"/>
<property name="Model" value="LootContainers/chest01" param1="main_mesh"/> <property name="HandleFace" value="Bottom"/>
<property name="ImposterExchange" value="imposterQuarter" param1="154"/>
<property name="Collide" value="movement,melee,bullet,arrow,rocket"/>
<property name="LootList" value="1"/>
<property class="RepairItems"> <property name="resourceWood" value="10"/> </property>
<drop event="Destroy" name="resourceWood" count="1,3"/>
<drop event="Fall" name="terrDestroyedWoodDebris" count="1" prob="0.75" stick_chance="1"/>
<property name="DowngradeBlock" value="cntStorageChest"/>
<property name="Group" value="Basics,Building,advBuilding"/>
<property name="DescriptionKey" value="cntSecureStorageChestDesc"/>
<property name="EconomicValue" value="10"/>
<property name="EconomicBundleSize" value="10"/>
<property name="FilterTags" value="floot"/>
</block>

</append>
</config>


Steelwood Chest Mod

 
Last edited by a moderator:
Hi Noisy Pants

The assigned number is the lootcontainer id = "1" in loot.xml, now that if you want to increase the size of the container it is in size = "8,9" (it is also edited in loot.xml), you can change it like me in my mod to "10,9 which would be 90 slots".
Or you can download my ready-made mod.

Regards

 
Last edited by a moderator:
I would download a ready made mod, they are default boxes. Default boxes are easy to break then loot thus players can loose some/all of their loot depending on how much they remember. Maybe I'm a bit paranoid... that's another topic - lol. I did try assigning a loot id to the custom box - didn't work.
 

Code:
<config>

	<append xpath="/loot">
		<lootcontainer id="144" count="0" size="10,9" sound_open="UseActions/open_chest" sound_close="UseActions/close_chest" loot_quality_template="qualBaseTemplate">
			<item name="cobweb" count="1,2"/>
		</lootcontainer>
	</append>
	
</config>
 
If you changed the number of Lootlist to your chest, because you had it in number 1 and in loot.xml you put 144....

 
First off, thank you very much for responding - much appreciated. The reason I made a custom container (mod) is to prevent a ripple effect of all storage chest becoming OP in durability and having the lock pick option removed. I have two custom containers; the default names for them are "cntSecureStorageChest" and "cntHardenedChestSecure", the "cntHardenedChestSecure" is my main concern, that is my pet. I named the mod Armored Chest to keep it simple, it is 8,8 thus making it 10,8 would suffice. The same principle would be applied to it regarding expanding it's inventory space. The picture is to help put into words what I cannot regarding the loot ids.
 

customcontainer.jpg

 
You say that you have 2 chests with the same name as the ones that already exist in the game, then that is conflicting, because the cntHardenedChestSecure chest already has a Lootlist that is 121 (I think) and you are putting it at 144 (and it is chest loot, not normal storage like the other one), that may be the problem or you can change it to id = "1" like the other chest.

 
I made some custom containers in my modlets. Here's what I have for one of them, if it helps troubleshoot. I know you're trying to make a more secure container, and mine aren't locked but the principle of block -> Loot list is similar and this is a pretty minimal working example

Here's the block in blocks.xml

Notes:

The block name must be unique, so generally you put your name or some text in front of it. I chose "doughs_" even though I made a custom block name of "cntGameBoardTicTacToe" as I prefix all my custom blocks with "doughs_"

The "secureLoot" section is how you link a LootList (the container size and contents) to your block with a specific ID

The "Model" is what the block looks like in game HOWEVER, I would choose *only* Models that are designated "#Entities/LootContainers?..." as I'm not sure any other option will work (meaning I don't think you can easily make a light pole be a loot container with just simple XML as a light pole isn't a container in the game)

<Doughs>
<append xpath="/blocks">
<block name="doughs_cntGameBoardTicTacToe">
<property name="Extends" value="cntMedicineCabinetFaucetClosed"/>
<property name="DescriptionKey" value="doughs_cntGameBoardTicTacToeDesc"/>
<property name="CustomIcon" value="cntMedicineCabinetFaucetClosed"/>
<property name="CustomIconTint" value="1ac6ff"/>
<property name="CreativeMode" value="Player"/>
<property name="Class" value="SecureLoot"/>
<property name="LootList" value="591"/> <!-- DOUGH: CUSTOM loot container -->
<property name="Model" value="#Entities/LootContainers?medicine_cabinet_closedPrefab.prefab"/>
</block>
</append>
</Doughs>


Here's the container/loot in loot.xml:

Notes:

Notice I used this to insert my custom lootcontainer even though I have a lootcontainer ID of 591 (I randomly chose the number)

<insertAfter xpath="/lootcontainers/lootcontainer[@id='1']">




count="0" means the box is empty when it it spawned. Normally game containers have a loot list (well, this does, its the cobweb) to populate the box with items.  By making it 0 the box spawns empty.  I believe the cobweb is just a placeholder, as one item may be required as a loot list.

size="3,3" means the container is a 3x3 box (making 9 slots).  I don't know if the first number is rows or columns, but I think the first number likely is rows.

Code:
<Doughs>
	<!-- Append these NEW containers ... errr.  at the beginning? -->
    <insertAfter xpath="/lootcontainers/lootcontainer[@id='1']">

      <!-- 3 by 3 board -->
      <lootcontainer id="591" count="0" size="3,3" sound_open="UseActions/open_suitcase" sound_close="UseActions/close_suitcase" loot_quality_template="qualBaseTemplate">
          <item name="cobweb" count="1"/>
      </lootcontainer>
  </insertAfter>
</Doughs>
 
Last edited:
Back
Top