Survager Posted April 29, 2020 Share Posted April 29, 2020 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? Link to comment Share on other sites More sharing options...
n2n1 Posted April 29, 2020 Share Posted April 29, 2020 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. Link to comment Share on other sites More sharing options...
Survager Posted April 29, 2020 Author Share Posted April 29, 2020 Thanks. This ) cntStorageChest cntSecureStorageChest cntLootChestHero cntLootChestHeroInsecure cntHardenedChestSecure cntHardenedChestInsecure cntBookcaseFull Where I can get list ID's of all this blocks? Link to comment Share on other sites More sharing options...
n2n1 Posted April 29, 2020 Share Posted April 29, 2020 in blocks.xml: <block name="cntStorageChest"> ... <property name="Class" value="Loot"/> ... <property name="LootList" value="1"/> ... </block> <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 Link to comment Share on other sites More sharing options...
Survager Posted May 1, 2020 Author Share Posted May 1, 2020 @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> Link to comment Share on other sites More sharing options...
n2n1 Posted May 1, 2020 Share Posted May 1, 2020 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. Link to comment Share on other sites More sharing options...
mr.devolver Posted May 1, 2020 Share Posted May 1, 2020 32 minutes ago, Orsey said: @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: <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> Link to comment Share on other sites More sharing options...
Survager Posted May 1, 2020 Author Share Posted May 1, 2020 2 hours ago, mr.devolver said: You can do it this way: blocks.xml of your mod: Thanks!!! It's work! ) Link to comment Share on other sites More sharing options...
mr.devolver Posted May 1, 2020 Share Posted May 1, 2020 25 minutes ago, Orsey said: Thanks!!! It's work! ) You're welcome, I'm glad to hear it works. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.