poly Posted February 12, 2022 Share Posted February 12, 2022 Hi all, Just want to throw out a question to more experienced modders as I've ran into a dilemma while updating something. In materials.xml I can write the following command: <set xpath="/materials/material[@id='MresourceForgedSteel']/property[@name='forge_category']/@value">clay</set> This enables me to put Forged Steel into the Forge and it converts it to clay (just as an exercise in practicality). I can also Scrap the item for clay. However, simply changing it from 'clay' to 'lead' seems to break it and it no longer works - ie it doesn't convert to lead in the Forge. Is there any other line(s) of code that factor in to this conversion? I have created a new Forge input category as 'Steel' and I'm trying to get it so that you can put Forged Steel into the Forge and then create something else, at the moment I can only do it with workarounds (creating a new item, which you convert Forged Steel too), but I'd like to be able to put Forged Steel itself into the Forge - Is this possible? Secondly, is there any rule (case sensitivity for example) when creating new input materials in XUi/windows.xml? This is a part of the code I'm referring too: <window name="windowForgeInput" width="228" height="204" panel="Right" controller="WorkstationMaterialInputWindow" materials_accepted="iron,brass,lead,glass,stone,clay" valid_materials_color="[green]" invalid_materials_color="[red]" cursor_area="true" > I have tried spaces: materials_accepted="forged steel,iron,brass,lead,glass,stone,clay" Gives errors It only seems to work when using single words. If that's the limitation - can you customize this section in a localization file? Thanks! Link to comment Share on other sites More sharing options...
Cranberry Monster Posted February 14, 2022 Share Posted February 14, 2022 In my experience, xml is case sensitive and will throw an error if the capitalization doesn't match exactly. And it seems to get wonky when you put spaces in things. And yes, the localization lets you make everything pretty, get your spaces in there and what-not. 1 Link to comment Share on other sites More sharing options...
BFT2020 Posted February 14, 2022 Share Posted February 14, 2022 On 2/12/2022 at 12:20 PM, poly said: However, simply changing it from 'clay' to 'lead' seems to break it and it no longer works - ie it doesn't convert to lead in the Forge. Maybe try changing it from MresourceForgedSteel to maybe MresourceScrapLeadMedium instead of changing the MresourceForgedSteel value? Also, is it because lead is not used in the recipe for Forged Steel so it wouldn't output that back to you, even if you changed the value to lead? Just some thoughts on my end. 1 Link to comment Share on other sites More sharing options...
poly Posted February 14, 2022 Author Share Posted February 14, 2022 1 hour ago, BFT2020 said: Maybe try changing it from MresourceForgedSteel to maybe MresourceScrapLeadMedium instead of changing the MresourceForgedSteel value? Also, is it because lead is not used in the recipe for Forged Steel so it wouldn't output that back to you, even if you changed the value to lead? Just some thoughts on my end. Hadn't considered the recipe ingredients as a factor, interesting. I will try and have a play around with a few edits. I have tried switching the material in items.xml <set xpath="/items/item[@name='resourceForgedSteel']/property[@name='Material']/@value">MresourceSteelFragment</set> 'MresourceSteelFragment' is a new material I have made which is tested and working with other new items. However, when using the set command on Forged Steel it doesn't seem to produce any results - it doesn't scrap any more, and no longer smelts - but strangely produces no red lines, so not sure what's going on there. I also tried editing materials.xml and setting it there too but neither work Link to comment Share on other sites More sharing options...
BFT2020 Posted February 15, 2022 Share Posted February 15, 2022 How are you defining MresourceSteelFragment? Link to comment Share on other sites More sharing options...
poly Posted February 15, 2022 Author Share Posted February 15, 2022 18 hours ago, BFT2020 said: How are you defining MresourceSteelFragment? materials.xml <material id="MresourceSteelFragment"> <property name="damage_category" value="metal"/> <property name="surface_category" value="metal"/> <property name="forge_category" value="steel"/> <property name="Experience" value="20"/> </material> Link to comment Share on other sites More sharing options...
BFT2020 Posted February 15, 2022 Share Posted February 15, 2022 (edited) Would changing forge_category from steel to iron do anything? When I checked the forgedSteel, it has iron in the forge_category which plays a part in determining the scrap / smelt result (copied from the xml file). I wonder if having steel there is confusing the game. 🤷♂️ I might make up a small modlet to see if I can assist you in troubleshooting this issue. <material id="MresourceForgedSteel"> <property name="damage_category" value="metal"/> <property name="surface_category" value="metal"/> <property name="forge_category" value="iron"/> <property name="Experience" value="20"/> </material> Edited February 15, 2022 by BFT2020 (see edit history) Link to comment Share on other sites More sharing options...
poly Posted February 15, 2022 Author Share Posted February 15, 2022 Changing it back to iron works as in vanilla, however the 'steel' refers to a new forge category which I am trying to create just for Forged Steel. At the moment I have to convert Forged Steel to a new item that I have created with the above properties and it smelts to 'steel', but this is convoluted, ideally I'd just put Forged Steel into a forge and it would smelt to 'steel' Link to comment Share on other sites More sharing options...
Cranberry Monster Posted February 16, 2022 Share Posted February 16, 2022 I'd highly recommend taking a look at the excellent Mean Cloud Mining mod, as it shows how to alter the forge window in the XUI subfolder to display new materials (that one adds copper, you'd want an entry for steel). You'll also probably need a unit_steel entry in items.xml to hold the stuff you've smelted/run it out of the forge again. The mining mod is a pretty good road map for that as well. Link to comment Share on other sites More sharing options...
poly Posted February 16, 2022 Author Share Posted February 16, 2022 17 hours ago, Cranberry Monster said: I'd highly recommend taking a look at the excellent Mean Cloud Mining mod, as it shows how to alter the forge window in the XUI subfolder to display new materials (that one adds copper, you'd want an entry for steel). You'll also probably need a unit_steel entry in items.xml to hold the stuff you've smelted/run it out of the forge again. The mining mod is a pretty good road map for that as well. Thanks for reply. I have been consulting MeanCloud's Mining mod for the initial edits and it has been a great help. However, the mod deals with new items being added to the Forge, not existing items. I have made a second forge with 10 new ores, and this works fine. However, making an existing item smelt is causing all kinds of confusion. 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