Morlon Posted October 25, 2020 Share Posted October 25, 2020 Hi everyone, just started modding today and most stuff like adding new items and recipes works very well, but i got some problems i cant solve... 1. I want to change the Material (for scrapping) of books and schematics.. i tried this: <set xpath="/items/item[@name='schematicMaster']/@Material">MresourceRockSmall</set> <set xpath="/items/item[@name='skillBookMaster']/@Material">MresourceRockSmall</set> changing the attribute in data/config/items.xml works fine, but i cant find out how to change it via mod. 2. Is it possible to add own recipes to the workbench categories? f.e. adding a new desk to building-tab? 3. Is it possible to add own categorys to self-created workstations? 4. and last but not least, i have a recipe that should be unlocked by intellect10, what value should i write into UnlockedBy-property? thanks, Morlon Link to comment Share on other sites More sharing options...
Morlon Posted October 25, 2020 Author Share Posted October 25, 2020 Found my misstake in Question 1. correct is <set xpath="/items/item[@name='schematicMaster']/property[@name='Material']/@value">MresourceBlueprintSchematic</set> <set xpath="/items/item[@name='skillBookMaster']/property[@name='Material']/@value">MresourceBlueprintBook</set> But it still doesnt work... i added two items in items.xml (resourceBlueprintSchematic and resourceBlueprintBook), also added them to materials.xml as MresourceBlueprintSchematic and MresourceBlueprintBook. But how can i connect resourceBlueprintBook with MresourceBlueprintBook? The game has to know that its the same, but i cant figure out how... Link to comment Share on other sites More sharing options...
Telric Posted October 26, 2020 Share Posted October 26, 2020 6 hours ago, Morlon said: Hi everyone, just started modding today and most stuff like adding new items and recipes works very well, but i got some problems i cant solve... 1. I want to change the Material (for scrapping) of books and schematics.. i tried this: <set xpath="/items/item[@name='schematicMaster']/@Material">MresourceRockSmall</set> <set xpath="/items/item[@name='skillBookMaster']/@Material">MresourceRockSmall</set> changing the attribute in data/config/items.xml works fine, but i cant find out how to change it via mod. 2. Is it possible to add own recipes to the workbench categories? f.e. adding a new desk to building-tab? 3. Is it possible to add own categorys to self-created workstations? 4. and last but not least, i have a recipe that should be unlocked by intellect10, what value should i write into UnlockedBy-property? thanks, Morlon 1: since you found the correct xpath, you also need a scrap recipe in recipes.xml for the new item to scrap to. never done it myself, but there should be vanilla references in there. 2: yes, just add a craft_area="workbench" to the recipe to get it crafted in the workbench, then change the actual group property of the item in items.xml... 3: never tried. 4: unlockedby is just for displaying what the item in question is unlocked by. you have to add a progression recipe unlock in progression.xml. look up any passive_effect name="RecipeTagUnlocked" bit in progression for a reference. Link to comment Share on other sites More sharing options...
Morlon Posted October 26, 2020 Author Share Posted October 26, 2020 thanks Telric. But i still dont understand the scrap mechanics... what i found in vanilla is that: <recipe name="resourcePaper" count="1" tooltip="ttScrapMetalBrass" always_unlocked="true" tags="salvageScrap"> <wildcard_forge_category /> </recipe> so i added two lines with my items, but it still doesnt work. here're my files: items.xml <set xpath="/items/item[@name='schematicMaster']/property[@name='Material']/@value">MresourceBlueprintSchematic</set> <set xpath="/items/item[@name='skillBookMaster']/property[@name='Material']/@value">MresourceBlueprintBook</set> <append xpath="/items"> <item name="resourceBlueprintBook"> <!-- scrap material --> <property name="HoldType" value="45"/> <property name="Tags" value="junk"/> <property name="Meshfile" value="#Other/Items?Misc/sackPrefab.prefab"/> <property name="DropMeshfile" value="#Other/Items?Misc/sack_droppedPrefab.prefab"/> <property name="Material" value="MresourceBlueprintBook"/> <property name="Stacknumber" value="100"/> <!-- STK resource --> <property name="FuelValue" value="1"/> <property name="Weight" value="1"/> <property name="EconomicValue" value="10"/> <property name="EconomicBundleSize" value="10"/> <property name="Group" value="Resources"/> <property name="CustomIcon" value="resourcePaper"/> <property name="CustomIconTint" value="0044cc"/> </item> <item name="resourceBlueprintSchematic"> <!-- scrap material --> <property name="HoldType" value="45"/> <property name="Tags" value="junk"/> <property name="Meshfile" value="#Other/Items?Misc/sackPrefab.prefab"/> <property name="DropMeshfile" value="#Other/Items?Misc/sack_droppedPrefab.prefab"/> <property name="Material" value="MresourceBlueprintSchematic"/> <property name="Stacknumber" value="100"/> <!-- STK resource --> <property name="FuelValue" value="1"/> <property name="Weight" value="1"/> <property name="EconomicValue" value="10"/> <property name="EconomicBundleSize" value="10"/> <property name="Group" value="Resources"/> <property name="CustomIcon" value="resourcePaper"/> <property name="CustomIconTint" value="0088aa"/> </item> [...] materials.xml: <append xpath="/materials"> <material id="MresourceBlueprintBook"> <property name="damage_category" value="cloth"/> <property name="surface_category" value="cloth"/> <property name="forge_category" value="paper"/> <property name="Experience" value="4"/> </material> <material id="MresourceBlueprintSchematic"> <property name="damage_category" value="cloth"/> <property name="surface_category" value="cloth"/> <property name="forge_category" value="paper"/> <property name="Experience" value="4"/> </material> </append> recipes.xml: <recipe name="resourceBlueprintBook" count="1" tooltip="ttScrapMetalBrass" always_unlocked="true" tags="salvageScrap"> <wildcard_forge_category /> </recipe> <recipe name="resourceBlueprintSchematic" count="1" tooltip="ttScrapMetalBrass" always_unlocked="true" tags="salvageScrap"> <wildcard_forge_category /> </recipe> Link to comment Share on other sites More sharing options...
Morlon Posted October 26, 2020 Author Share Posted October 26, 2020 ok, nearly got it. the material-name has to be the same as the item. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.