I am relatively new to XML modding but have down modding in other games such as COD 4 and Halo. I am looking for a way, if it is possible, to add new input materials to the forge through the XML files so that it is client friendly and requires no additional downloads for them. I have gotten my new materials to show up in the forge's "available materials" window and added the materials/recipes/items to the XML files but they do not burn in when I place them in the forge. If I change the "forge_category" of my new materials to iron or lead it smelts in just fine. I was wondering if that is something that is hard coded in or if I am missing a line of code somewhere to do it.
Thanks for any help and if you need more information, please let me know!
Try making the resource you want it to burn into to be where resourceClayLump is. Then the material of the object has to line up with that name in materials.xml, and finally add that material to the item in items.xml. I haven't done this myself, but i remember that being part of it in previous alphas, as well as having to make the UI changes for it to show up.
Awesome! That is one thing I didn’t try as I saw a bunch of materials that were not smeltable and didn’t think that was necessary I’ll try it out, thank you!!
I apologize for the double post but I can't seem to find the edit post option
I tried the above and it was unsuccessful, I'll put all my code below so you can see if I'm missing something I'm not seeing. I've looked through every XML file for anything relating to the forge and modified what I thought needed it.
Thanks!
Edit: I guess there is a time limit on editing? xD I forgot to mention that for some reason this code prevents the 2nd input slot from working correctly, the item just sits there and does not burn in. I tested it on brass and other things. I'm at a complete loss as to why this happens, so any help with that would be appreciated too!
Blocks.XML
<!-- Add Chromium and Nickel to Forge accepted inputs -->
<append xpath="/blocks/block[@name='forge']/property[@class='Workstation']/property[@name='InputMaterials']/@value">,chromium,nickel</append>
I apologize for the double post but I can't seem to find the edit post option
I tried the above and it was unsuccessful, I'll put all my code below so you can see if I'm missing something I'm not seeing. I've looked through every XML file for anything relating to the forge and modified what I thought needed it.
Thanks!
Edit: I guess there is a time limit on editing? xD I forgot to mention that for some reason this code prevents the 2nd input slot from working correctly, the item just sits there and does not burn in. I tested it on brass and other things. I'm at a complete loss as to why this happens, so any help with that would be appreciated too!
Blocks.XML
<!-- Add Chromium and Nickel to Forge accepted inputs -->
<append xpath="/blocks/block[@name='forge']/property[@class='Workstation']/property[@name='InputMaterials']/@value">,chromium,nickel</append>
2-In items.xml unit_chromium should have Material = MresourceChromium and should not have this code <property name = "MeltTimePerUnit" value = "0.4" />.
You also have to add another material because resourceChromium and Nickel have the same material as unit_chromium and nickel, you can change it to MresourceChromiumFragment and MresourceNickelFragment, add the new material in Materials.xml and change it to resources.
Example:
<material id = "MresourceChromiumFragment">
<property name = "damage_category" value = "metal" />
<property name = "surface_category" value = "metal" />
<property name = "forge_category" value = "chromium" />
<property name = "Hardness" type = "float" value = "1" />
<property name = "stepsound" value = "metal" />
<property name = "stability_glue" value = "120" />
<property name = "Mass" type = "int" value = "10" />
<property name = "MaxDamage" value = "500" />
</material>
2-In items.xml unit_chromium should have Material = MresourceChromium and should not have this code <property name = "MeltTimePerUnit" value = "0.4" />.
You also have to add another material because resourceChromium and Nickel have the same material as unit_chromium and nickel, you can change it to MresourceChromiumFragment and MresourceNickelFragment, add the new material in Materials.xml and change it to resources.
Example:
<material id = "MresourceChromiumFragment">
<property name = "damage_category" value = "metal" />
<property name = "surface_category" value = "metal" />
<property name = "forge_category" value = "chromium" />
<property name = "Hardness" type = "float" value = "1" />
<property name = "stepsound" value = "metal" />
<property name = "stability_glue" value = "120" />
<property name = "Mass" type = "int" value = "10" />
<property name = "MaxDamage" value = "500" />
</material>
I'm a little confused why I would need a second material as MresourceClayLump is used for both unit_clay and resourceClayLump. I tried to add a second material for each regardless and still no dice Thanks for the help though!!
Maybe my issue is related to the forge only having one usable input when I do the above code
Edit: Just for giggles, I removed stone and clay from the accepted inputs and put the grid back to 6 and it cooks in the chromium and nickel so I'm not sure what is missing lol
This is something I haven't done personally, so I can't help. But this is a link to a mod that added new resources to the forges and stuff. Could maybe take a look at it and see how it did it. Was for A18 but it should still be current.
This is something I haven't done personally, so I can't help. But this is a link to a mod that added new resources to the forges and stuff. Could maybe take a look at it and see how it did it. Was for A18 but it should still be current.
oh sweet! I looked through some mods on here but didn't find anything. I narrowed down the "only one smelter input" working thing to this line - "<append xpath="/blocks/block[@name='forge']/property[@class='Workstation']/property[@name='InputMaterials']/@value">,chromium,nickel</append> " adding the two extra materials here seems to mess it up
oh sweet! I looked through some mods on here but didn't find anything. I narrowed down the "only one smelter input" working thing to this line - "<append xpath="/blocks/block[@name='forge']/property[@class='Workstation']/property[@name='InputMaterials']/@value">,chromium,nickel</append> " adding the two extra materials here seems to mess it up
Hello! I’m currently maintaining this modlet. I don’t remember but I think some updates (small) were made to get this to work in a19.x. I really haven’t looked at the XML other than adding others patches. Once a20 drops I’ll be in there fixing/commenting/ etc.
Edit: I do believe there are some “bugs” I have found while playing it. I made issues on GitHub to track them for fixing in a20. One that you may want to consider is the “cannot empty forge of zinc and copper”. I don’t know if it’s fixable or just needs to be added as a “forge recipe”.
I looked through the files and noticed there was a file called mining.unity3d. Do you know if this is where it changes the max input materials from 6? I already have done what is done in this mod other than this one file (and the icons and prefabs I'm not counting since I didn't make any new ones)
Edit: If it is done using that unity file I'll probably just add a second forge type workstation that only does my new resources, should work fine, but it'd be really sweet if it all could be in one
Edit 2: I tried all the files except the unity file and get a smorgasbord of errors xD I suppose it is necessary
I looked through the files and noticed there was a file called mining.unity3d. Do you know if this is where it changes the max input materials from 6? I already have done what is done in this mod other than this one file (and the icons and prefabs I'm not counting since I didn't make any new ones)
Edit: If it is done using that unity file I'll probably just add a second forge type workstation that only does my new resources, should work fine, but it'd be really sweet if it all could be in one
Edit 2: I tried all the files except the unity file and get a smorgasbord of errors xD I suppose it is necessary
I actually don’t know if this file is literally required for the forge. My guess would be that it’s for the mining machines in the mod. I don’t have the source for the unity files so I would have to have help disassembling and reassembling them. The mod author seemed like he was “done” with the game so I’m going to try to maintain it as long as possible without the source files for the unity files . If you just removed that file and loaded the mod it would likely error quite a bit. If you can’t get your mod working I can look into it this weekend to see what I can figure out.
I actually don’t know if this file is literally required for the forge. My guess would be that it’s for the mining machines in the mod. I don’t have the source for the unity files so I would have to have help disassembling and reassembling them. The mod author seemed like he was “done” with the game so I’m going to try to maintain it as long as possible without the source files for the unity files . If you just removed that file and loaded the mod it would likely error quite a bit. If you can’t get your mod working I can look into it this weekend to see what I can figure out.
I hope I didn't get you too worried I'm not 100% sure what I did differently this time (I think maybe I had the unit_nickel and resourceNickel materials backwords) but it is working correctly now! Thank you so much!!
You also have to add another material because resourceChromium and Nickel have the same material as unit_chromium and nickel, you can change it to MresourceChromiumFragment and MresourceNickelFragment, add the new material in Materials.xml and change it to resources.
Example:
<material id = "MresourceChromiumFragment">
<property name = "damage_category" value = "metal" />
<property name = "surface_category" value = "metal" />
<property name = "forge_category" value = "chromium" />
<property name = "Hardness" type = "float" value = "1" />
<property name = "stepsound" value = "metal" />
<property name = "stability_glue" value = "120" />
<property name = "Mass" type = "int" value = "10" />
<property name = "MaxDamage" value = "500" />
</material>
You were right about this part I believe, I think the issue was I had them named incorrectly when I tried it the first time, but thank you for the help!!
alffr0mm3lmac, it looks like windows.xml in the XUi folder has the code that you need for going above 6 material inputs for the forge. The comments are very helpful.
Thanks for the idea I had done this already and while it did prevent an index out of bounds error they still didn't burn in and my 2nd smelting slot was not usable xD I think it had to do with having two different materials set for each new items, one for unit and one for scrap, oddly enough