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

How I can change container size of "secure chest" in xml?

Survager

Tester
Hello. Can you help me?

I want create xml mod for containers, but I did not find how to change the number of cells in the container "Secure Chest" using XML.

Can I do this in xml, or it impossible?

 
Hello!

in Loot.xml find line like it:

<!-- empty, storage containers the player crafts-->
<lootcontainer id="1" count="0" size="8,9" sound_open="UseActions/open_chest" sound_close="UseActions/close_chest" loot_quality_template="qualBaseTemplate">
<item name="cobweb" count="1,2"/>
</lootcontainer>


size="8,9" - this is the dimension of the grid (x,y).

(Note, that its size will only change with the spawn of a new block-container. Existing blocks will remain with the old size loot list!)

If you accurately specify the name of the "Secure Chest" - then i can accurately specify ID of the loot container in xml, or i explain how to find it yourself. 

 
Last edited by a moderator:
Thanks. This )

  • cntStorageChest
  • cntSecureStorageChest
  • cntLootChestHero
  • cntLootChestHeroInsecure
  • cntHardenedChestSecure
  • cntHardenedChestInsecure
  • cntBookcaseFull
Where I can get list ID's of all this blocks?

 
in blocks.xml:

<block name="cntStorageChest">
...
<property name="Class" value="Loot"/>
...
<property name="LootList" value="1"/>
...
</block>

Code:
<block name="cntBookcaseFull">
	...
	<property name="Class" value="Loot"/>
	<property name="LootList" value="49"/>
	...
</block>

etc.

  • cntStorageChest - 1
  • cntSecureStorageChest -1
  • cntLootChestHero - 41
  • cntLootChestHeroInsecure - 41
  • cntHardenedChestSecure - 121
  • cntHardenedChestInsecure - 121
  • cntBookcaseFull - 49

 
Last edited by a moderator:
@n2n1 Last question: how I can add new <property> to <block> with xpath.

Example:

Original

<block name="cntSecureStorageChest">
<property name="CreativeMode" value="Player"/>
<property name="Tags" value="door"/>
<property name="Class" value="SecureLoot"/>
<property name="CustomIcon" value="cntChest01"/>
<property name="Material" value="MwoodReinforced"/>
<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="LPHardnessScale" value="8"/>
<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>




Result

<block name="cntSecureStorageChest">
<property name="CreativeMode" value="Player"/>
<property name="Tags" value="door"/>
<property name="Class" value="SecureLoot"/>
<property name="CustomIcon" value="cntChest01"/>
<property name="Material" value="MwoodReinforced"/>
<property name="StabilitySupport" value="false"/>
<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="LPHardnessScale" value="8"/>
<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"/>
<property name="CanPickup" value="true"/>
<property class="UpgradeBlock">
<property name="ToBlock" value="cntLootChestHero"/>
<property name="Item" value="resourceForgedSteel"/>
<property name="ItemCount" value="2"/>
<property name="UpgradeHitCount" value="5"/>
</property>
</block>




So, how I can add this properties to <block> with XPATH?

<property class="UpgradeBlock">
<property name="ToBlock" value="cntLootChestHero"/>
<property name="Item" value="resourceForgedSteel"/>
<property name="ItemCount" value="2"/>
<property name="UpgradeHitCount" value="5"/>
</property>




I do this? but it not work (

Code:
<set xpath="/blocks/block[@name='cntSecureStorageChest']/property[@name='Class']/@value">UpgradeBlock</set>
<set xpath="/blocks/block[@name='cntStorageChest']/property[@Class='UpgradeBlock']/property[@name='ToBlock']/@value">cntLootChestHero</set>
<set xpath="/blocks/block[@name='cntStorageChest']/property[@Class='UpgradeBlock']/property[@name='Item']/@value">resourceScrapIron</set>
<set xpath="/blocks/block[@name='cntStorageChest']/property[@Class='UpgradeBlock']/property[@name='ItemCount']/@value">300</set>
<set xpath="/blocks/block[@name='cntStorageChest']/property[@Class='UpgradeBlock']/property[@name='UpgradeHitCount']/@value">20</set>
 
I have no idea - i've never used XPath...

Take a look at some sort of modlet for example. There may be a lot of tutorials here , but i can't point them out either.

 
Last edited by a moderator:
@n2n1 Last question: how I can add new <property> to <block> with xpath.

Example:

Original

<block name="cntSecureStorageChest">
<property name="CreativeMode" value="Player"/>
<property name="Tags" value="door"/>
<property name="Class" value="SecureLoot"/>
<property name="CustomIcon" value="cntChest01"/>
<property name="Material" value="MwoodReinforced"/>
<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="LPHardnessScale" value="8"/>
<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>




Result

<block name="cntSecureStorageChest">
<property name="CreativeMode" value="Player"/>
<property name="Tags" value="door"/>
<property name="Class" value="SecureLoot"/>
<property name="CustomIcon" value="cntChest01"/>
<property name="Material" value="MwoodReinforced"/>
<property name="StabilitySupport" value="false"/>
<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="LPHardnessScale" value="8"/>
<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"/>
<property name="CanPickup" value="true"/>
<property class="UpgradeBlock">
<property name="ToBlock" value="cntLootChestHero"/>
<property name="Item" value="resourceForgedSteel"/>
<property name="ItemCount" value="2"/>
<property name="UpgradeHitCount" value="5"/>
</property>
</block>




So, how I can add this properties to <block> with XPATH?

<property class="UpgradeBlock">
<property name="ToBlock" value="cntLootChestHero"/>
<property name="Item" value="resourceForgedSteel"/>
<property name="ItemCount" value="2"/>
<property name="UpgradeHitCount" value="5"/>
</property>




I do this? but it not work (

<set xpath="/blocks/block[@name='cntSecureStorageChest']/property[@name='Class']/@value">UpgradeBlock</set>
<set xpath="/blocks/block[@name='cntStorageChest']/property[@Class='UpgradeBlock']/property[@name='ToBlock']/@value">cntLootChestHero</set>
<set xpath="/blocks/block[@name='cntStorageChest']/property[@Class='UpgradeBlock']/property[@name='Item']/@value">resourceScrapIron</set>
<set xpath="/blocks/block[@name='cntStorageChest']/property[@Class='UpgradeBlock']/property[@name='ItemCount']/@value">300</set>
<set xpath="/blocks/block[@name='cntStorageChest']/property[@Class='UpgradeBlock']/property[@name='UpgradeHitCount']/@value">20</set>



You can do it this way:

blocks.xml of your mod:

Code:
<configs>
  <append xpath="/blocks/block[@name='cntSecureStorageChest']">

      <property class="UpgradeBlock">
        <property name="ToBlock" value="cntLootChestHero"/>
        <property name="Item" value="resourceForgedSteel"/>
        <property name="ItemCount" value="2"/>
        <property name="UpgradeHitCount" value="5"/>
      </property>

  </append>
</configs>
 
Back
Top