John Black Posted April 21, 2021 Share Posted April 21, 2021 Hi Years ago I used to generate wrappers to mod 7d2d xmls. It allowed me to create recipes and blocks and re-apply changes after game updates. I'm now trying to accomplish the same as below by using modlets but am already running into issues. Spoiler public static void CreateRecipeAndAllowPickup() { /* donotuse */ var doNotUseSign = new RecipeWrapper(Item.doNotUse, false); doNotUseSign.ClearComponents(); doNotUseSign.AddDistributed(Item.plantChrysanthemum, 1, Item.leather, 3, Item.leather, 3, Item.leather, 3); doNotUseSign.Count = 9; doNotUseSign.CraftTime = 9; doNotUseSign.Clone("doNotUse"); // clone + remove to get in same place in xml doNotUseSign.Remove(); var doNotUseSignBlock = new BlockWrapper(Block.doNotUse); doNotUseSignBlock.CanPickup = true; } I started out with the stop sign, trying to allow player to pick it up but ... yeah, can't even get that to work. 😃 The modlet seems to load just fine so I guess the culprit is my blocks.xml. Is there any way, in-game, to look at the current attributes of items? ...\7 Days To Die\Mods\TJL\Config\blocks.xml <configs> <setattribute xpath="/blocks/block[@name='signRoadStop']" name="CanPickup">true</setattribute> </configs> Link to comment Share on other sites More sharing options...
bdubyah Posted April 21, 2021 Share Posted April 21, 2021 (edited) Looking at that block, it doesn't have that property, so it would need to be an append, not setattribute. Something like: <append xpath="/blocks/block[@name='signRoadStop']"> <property name="CanPickup" value="true"/> </append> And also, this should probably go into the Discussion and Requests forum. This one is mostly used for released mods. Edited April 21, 2021 by bdubyah (see edit history) 1 Link to comment Share on other sites More sharing options...
John Black Posted April 21, 2021 Author Share Posted April 21, 2021 Thank you, was messing with this between other work and never picked up it was node rather than an attribute. Anyway, all sorted so a mod can move/delete if they want. 👍👍 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now