Jump to content

need help adding new materials to forges


Recommended Posts

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.

spacer.pngspacer.pngspacer.pngspacer.pngspacer.png

Link to comment
Share on other sites

1 hour ago, PastelHarmonics said:

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.

spacer.pngspacer.pngspacer.pngspacer.pngspacer.png

 

 

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

Link to comment
Share on other sites

18 minutes ago, Gouki said:

 

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.

spacer.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

Link to comment
Share on other sites

13 minutes ago, PastelHarmonics said:

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.

spacer.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

 

 

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

Link to comment
Share on other sites

9 minutes ago, PastelHarmonics said:

spacer.pngspacer.png

 

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

Link to comment
Share on other sites

10 minutes ago, PastelHarmonics said:

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.

Link to comment
Share on other sites

3 hours ago, PastelHarmonics said:

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

Link to comment
Share on other sites

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

 

 

A19.6_2021-11-13_16-53-49.jpg

10 minutes ago, doughphunghus said:

This mod has new ores that can be smelted in the forge. Maybe you can find some answers in here?  https://community.7daystodie.com/topic/15288-meanclouds-mining-with-copper-zinc-and-excavators

 

Thanks Doughphunghus
The code I gave him is the correct one, I don't know why he gave it an error.

Link to comment
Share on other sites

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

4 hours ago, Gouki said:

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

 

 

A19.6_2021-11-13_16-53-49.jpg

 

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!

Link to comment
Share on other sites

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.

Edited by PastelHarmonics (see edit history)
Link to comment
Share on other sites

25 minutes ago, PastelHarmonics said:

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!

Link to comment
Share on other sites

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 >_<

Edited by LittleMonstersTV (see edit history)
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...