• If you have a mod, tool or prefab, please use the Resources section. Click Mods at the top of the forums.

need help adding new materials to forges

PastelHarmonics

New member
I am trying to add new materials to forges, here is what I have, but I was hoping for a step by step or some explanation as to what exactly the code for the forge is looking for so I can understand what I need to give it. I've found a bunch of people having the problems as me and then they say "nvm fixed it" and don't say what they did. askldjfas;dkl

here is what I have.

sVmPFRz.png
XqO4Ia0.png
cJlfg6H.png
Nb7ay0t.png
9K66pYc.png


 
I am trying to add new materials to forges, here is what I have, but I was hoping for a step by step or some explanation as to what exactly the code for the forge is looking for so I can understand what I need to give it. I've found a bunch of people having the problems as me and then they say "nvm fixed it" and don't say what they did. askldjfas;dkl

here is what I have.





Hi PastelHarmonics

This should go in Discussion and Request and not in Mods.
What is the problem you have?

Does it show you the nickel at the input of the forge or not?
Do you have a 3 slot enabled in the forge?

Can you upload an image of how your forge is displayed?

Checking your xml code detect this, unit_nickel and resourceNickel should not have the same type of Material, it has to be different.

An example is in unit_iron = Material = Mmetal
                           resourceForgedIron = Material = MresourceForgedIron

You have to have two types of material for each thing, so I have it in my mod and it works without problems.

 <material id = "MresourceGrafenoFragment">
            <property name = "damage_category" value = "stone" />
            <property name = "surface_category" value = "stone" />
            <property name = "forge_category" value = "graphene" />
            <property name = "Experience" value = "4" />
  </material>

 <material id = "Mgrafeno">
<property name = "damage_category" value = "stone" />
<property name = "surface_category" value = "stone" />
<property name = "forge_category" value = "graphene" />
<property name = "Hardness" type = "float" value = "1" />
<property name = "stepsound" value = "stone" />
<property name = "stability_glue" value = "120" />
<property name = "Mass" type = "int" value = "10" />
<property name = "MaxDamage" value = "500" />
<property name = "Experience" value = "2" />
 </material>

Hope this helps you.
Regards

 
omg I forgot to add the problem lmfao. whoops.

SO. okay. let me screen shot it. I changed my materials to be in line with what you described, let me screenshot the forge and explain the issue.

PCZ6ndk.png


so, y'know how the forge timer number counts down and then it melts an item and adds it to the forge? when mine hits 0, the text disappears and the item does not melt.

this is the resourceNickel item btw. it just. stays there. and doesn't go into the forge at all.

also I'm going to repost this in the place you mentioned

 
omg I forgot to add the problem lmfao. whoops.

SO. okay. let me screen shot it. I changed my materials to be in line with what you described, let me screenshot the forge and explain the issue.



so, y'know how the forge timer number counts down and then it melts an item and adds it to the forge? when mine hits 0, the text disappears and the item does not melt.

this is the resourceNickel item btw. it just. stays there. and doesn't go into the forge at all.

also I'm going to repost this in the place you mentioned




In materials.xml did you add the other material?

It should have it like this in material.xml:

<material id = "MresourceNickelFragment">
            <property name = "damage_category" value = "metal" />
            <property name = "surface_category" value = "metal" />
            <property name = "forge_category" value = "nickel" />
            <property name = "Experience" value = "4" />
  </material>

 <material id = "Mnickel">
<property name = "damage_category" value = "metal" />
<property name = "surface_category" value = "metal" />
<property name = "forge_category" value = "nickel" />
<property name = "Hardness" type = "float" value = "1" />
<property name = "stepsound" value = "metal" />
<property name = "stability_glue" value = "300" />
<property name = "Mass" type = "int" value = "10" />
<property name = "MaxDamage" value = "300" />
<property name = "Experience" value = "5" />
 </material>

In items you must change resourceNickel    property name = Material  value=MresourceNickelFragment

and in unit_nickel    property name = Material  value= Mnickel.

Tell me if it works like this for you.
Regards

 
tm511p1.png
R2I0m9x.png


I have it like this now, nothing is changed :<

no other mods either.

and I saw what you said in my repost of this, thank you for the info on protocol, first time ever using a forum.

 


I have it like this now, nothing is changed :<




In materials.xml in MresourceNickelFragment change to metal (it should not be stone) in this property name = damage_category value = metal and property name = surface_category value = metal.
I hope that works, because it is strange that the material does not melt.
Regards

 
did as you advised, no change :(

hopefully a wizard will find my plea for help




Another thing I noticed is that my resourceGrafeno item looks like this:

<item name = "resourceGrafeno"> <! - scrap material ->
<property name = "Tags" value = "graphene" />
<property name = "HoldType" value = "40" />
<property name = "CustomIcon" value = "Graphene" />
<property name = "DescriptionKey" value = "resourceGrafenoDesc" />
<property name = "Meshfile" value = "# Other / Items? Crafting / rock_smallPrefab.prefab" />
<property name = "DropScale" value = "6" />
<property name = "Material" value = "MresourceGrafenoFragment" />
<property name = "Stacknumber" value = "6000" /> <! - STK resource ->
<property name = "Weight" value = "5" />
<property name = "EconomicValue" value = "40" />
<property name = "SellableToTrader" value = "true" />
<property name = "Group" value = "Resources" />
<property name = "CraftingIngredientTime" value = "20" />
</item>

It is different from yours, mine applies like stone and yours is just an object without asset, you can try to change your item like mine, adjusting it to your item and check if it works for you.

 
did as you advised, no change :(

hopefully a wizard will find my plea for help


PastelHarmonics, everything works fine.
I already did it mod and I just tested it, the nickel melts correctly in the forge.

I would put the image, but it does not let me upload it, it gets stuck.
Regards

 
What!!! okay that's. bizarre. thank you though that gives me more places to look for an issue!

PastelHarmonics, check this out, it works fine, I don't know why you got an error.

View attachment 21330

Thanks Doughphunghus
The code I gave him is the correct one, I don't know why he gave it an error.
Thank you so much ! this is extremely helpful for my bug hunting. big thank you!

 
OKAY! it tentatively appears to be working now, I validated my files, no files failed to validate; I then took all the files out of my mod and added them back one at a time, now the nickel melts. The fact that I changed nothing does make me worry that there is still some underlying problem, but right now it appears to be working. I'm honestly fairly confused about it.

I was testing dozens of times too, the closest thing I can tell to the fix was literally removing the files from the mod folder and then. putting them right back in. I tested immediately before doing that; failed to melt. and then immediately after, just to affirm that the problem was still there, somehow it? suddenly works..? but I have literally no idea how to account for that.

 
Last edited by a moderator:
OKAY! it tentatively appears to be working now, I validated my files, no files failed to validate; I then took all the files out of my mod and added them back one at a time, now the nickel melts. The fact that I changed nothing does make me worry that there is still some underlying problem, but right now it appears to be working. I'm honestly fairly confused about it.

I was testing dozens of times too, the closest thing I can tell to the fix was literally removing the files from the mod folder and then. putting them right back in. I tested immediately before doing that; failed to melt. and then immediately after, just to affirm that the problem was still there, somehow it? suddenly works..? but I have literally no idea how to account for that.
Sometimes workstations can be tricky like that. Customised versions don't always seem to fully cache their contents until you leave the workstation and come back to it, and then it stabilises. If you change some code, things can get weird. In your case you needed to remove the files which may have cleared any cached data with the old code issue. It feels like it's written to the workstation like loot/items are written into storage crates or player inventories. Snufkin's custom miners are well coded but could also be a bit unstable like that as well as he commented about. Good to hear @Gouki helped you work through it. Nice custom materials for the forge as well!

 
I remember the first time I modded the forge... I was sure everything was right and for whatever reason it wasn't quite working the way it should... I gave up after a long night... the next day I load up the game, made a new forge, and it worked, lol... after messing with the UI, etc all I needed to do was make a new forge... the code was all right the very first time but I needed to craft a new forge is all >_<

 
Last edited by a moderator:
Back
Top