Jump to content

[Help/Modlet] Forge smelting


FringeRecall

Recommended Posts

Hello,

 

I've been working on this modlet to add copper and zinc to the game; in effort to create a brass and tin recipe. This modlet of course is incomplete.

 

I'm having problems adding the new items to the "materials_accepted" via the Forge so that when I put Copper and Zinc into the forge, they begin smelting and storing as do lead, iron, glass, etc...

 

Here is a link to my modlet in its current state.

https://github.com/ethernetweb/7dtd-WildTerra-Modlets/tree/master/WildTerra-CopperZinc

 

Thank you in advance for any help.

Link to comment
Share on other sites

Are you adding anything else in the window for forge input? Because if not I think the problem is that you don't allow a 7th input. Try this for content2 for <window name="windowForgeInput"

 

<rect name="content2" depth="0" pos="78, -49" width="150" height="224">

<sprite depth="1" color="[mediumGrey]" type="sliced" on_press="true"/>

<grid rows="7" cols="1" pos="3,-3" cell_width="185" cell_height="30" repeat_content="true">

<forge_material name="0"/>

</grid>

</rect>

Link to comment
Share on other sites

After looking again at your files. The Forge is missing the added materials:

 

<property name="InputMaterials" value="iron,brass,lead,glass,stone,clay"/>

 

=> <property name="InputMaterials" value="iron,brass,lead,glass,stone,clay, xx,xx"/>

Link to comment
Share on other sites

After looking again at your files. The Forge is missing the added materials:

 

<property name="InputMaterials" value="iron,brass,lead,glass,stone,clay"/>

 

=> <property name="InputMaterials" value="iron,brass,lead,glass,stone,clay, xx,xx"/>

 

Thank you kindly for your response and suggestions.

 

I have done as you suggested. The repository on github reflects the change. I also tested the 'content2' change via windows.xml but it is not currently included in my modlet code.

 

It still appears to have not worked. Two things. It isn't counting down the timer to smelt the resources and neither Zinc or Copper show in the list next to the input slots.

 

 

-- Stand by, this may be due to a mistake on my part. Fixing now to test again.

Link to comment
Share on other sites

Okay, I figured out the problem. The rows actually needs to be 8 instead of 7 or 6(default) because I'm adding two items rather than one.

 

The UI will also need some adjustments on positioning as to make it look nice but that is easy enough.

 

The new forge items however, do not smelt. Will have to figure this out next. Working on it now :)

 

Thanks for your help thus far. Progressing slowly but surely.

Link to comment
Share on other sites

Maybe?

 

I would look at <item name="unit_iron"> notably <property name="ResourceUnit" value="true"/>, I believe this is what let's it smelt into the forge, though I'm not 100% how. The <item name="resourceIronFragment"> your extending is the raw iron you get from rocks and what have you, so this is what gets smelted into "unit_iron" and held in the forge. Hope this gets you on the right path!

Link to comment
Share on other sites

I would look at <item name="unit_iron"> notably <property name="ResourceUnit" value="true"/>, I believe this is what let's it smelt into the forge, though I'm not 100% how. The <item name="resourceIronFragment"> your extending is the raw iron you get from rocks and what have you, so this is what gets smelted into "unit_iron" and held in the forge. Hope this gets you on the right path!

 

Thank you for your reply. I had already set up the unit_copper and unit_zinc items and also correlated them with the materials. I have made some modifications and redid my comparisons but unfortunately, to no avail. I wonder what I'm missing... probably something simple lol.

 

I have updated the code on github for further review.

https://github.com/ethernetweb/7dtd-WildTerra-Modlets/tree/master/WildTerra-CopperZinc/Config

Link to comment
Share on other sites

Thank you for your reply. I had already set up the unit_copper and unit_zinc items and also correlated them with the materials. I have made some modifications and redid my comparisons but unfortunately, to no avail. I wonder what I'm missing... probably something simple lol.

 

I have updated the code on github for further review.

https://github.com/ethernetweb/7dtd-WildTerra-Modlets/tree/master/WildTerra-CopperZinc/Config

 

Ah I think you should not be extending custom items you want to smelt from something else. My guess right now would be that it is smelting into iron?

 

CraftingIngredientTime might be missing to show the time. Try this:

 

<append xpath="/items">

<item name="resourceCopper">

<property name="CreativeMode" value="Dev"/>

<property name="CustomIcon" value="resourceIronFragment" />

<property name="CustomIconTint" value="b87333" />

<property name="Meshfile" value="Items/Misc/sackPrefab" />

<property name="Material" value="MresourceCopperFragment"/>

<property name="HoldType" value="45" />

<property name="Stacknumber" value="6000"/>

<property name="Weight" value="5"/>

<property name="EconomicValue" value="20"/>

<property name="EconomicBundleSize" value="10"/>

<property name="CraftingIngredientExp" value="2"/>

<property name="CraftingIngredientTime" value="20"/>

<property name="Group" value="Resources"/>

</item>

 

Test this for the other one as well and let me know if it works.

Link to comment
Share on other sites

I'm on the stable build 17.0 and your mod works just fine for me. [ATTACH=CONFIG]27065[/ATTACH]

 

Edit: When stacking with my UI mod it breaks. Do you have other mods installed?

 

Nope, no other mods.

isp@kali:~/.steam/steam/steamapps/common/7 Days To Die/Mods$ ls

WildTerra-CopperZinc

 

However, I am running 17.1b8 so maybe this is the issue? It still doesn't work for me. In fact I get weird results. If I put one item in, it will count down to smelt but will not add any resource and does not repeat. Also, if I put the 2nd resource in, it does not have a timer and also does not smelt.

Link to comment
Share on other sites

Nope, no other mods.

 

 

However, I am running 17.1b8 so maybe this is the issue? It still doesn't work for me. In fact I get weird results. If I put one item in, it will count down to smelt but will not add any resource and does not repeat. Also, if I put the 2nd resource in, it does not have a timer and also does not smelt.

 

Did you start a fresh game after patching to 17.1? Nvm doesnt work for me either on 17.0. Let me try to debug it.

 

So it didn't work for me - then it worked for me. ;) Without doing anything...

Link to comment
Share on other sites

Try starting a new save game. Sometimes previous saves cause issues

 

I'll second this. When you change properties of blocks, and that block has already been established in a save game, the game goes broke. I've always made new blocks in order to be any kind of back words compatible. If you're gonna play with the nilla blocks, always start w/ a fresh game. Items are far more forgiving.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...