Jump to content

Custom forge, and workstation


VENOM2019

Recommended Posts

Hi venom2019

 

I have seen your images and there are several things.

1. In XUi delete the ruleset line you put, at the beginning it should be like this <append xpath = "/ xui / ruleset"> I have it that way.

 

2. In windows put windowToolsForge not as you put windowToolsWoodBurningFurnace.

 

3. You need to add ui_display so that the icons appear as in the normal forge (resources, building, tools, etc).

 

4. I think that in windows you also need to add windowFuel, windowForgeInput and windowOutpot.

 

I hope that helps you.

Happy start of the year for everyone

Link to comment
Share on other sites

convergent, I'm happy to see that my tries helped you with your block, and hope that it will work as you want, and modding 7dtd can blow your mind sometimes, because 1 wrong capital letter for example <property name="model" ..../> is not the same with <property name="Model" ..../>... Or, material_input and input are matter a lot for the game. So be careful with the codes.

Link to comment
Share on other sites

Okay guys, the problem was at this part:

<property class="Workstation">

<property name="CraftingAreaRecipes" value="forge"/>

<property name="Modules" value="tools,output,fuel,input"/>

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

</property>

 

And the correct that I needed:

<property class="Workstation">

<property name="CraftingAreaRecipes" value="forge"/>

<property name="Modules" value="tools,output,fuel,material_input"/>

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

</property>

 

So that small "material_" caused all of my problems hooooollly mooooollly

my code now:

 

<block name="WoodBurningFurnace">

<property name="Class" value="Forge"/>

<property name="UnlockedBy" value="perkAdvancedEngineering,forgeSchematic"/>

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

<property name="MaxDamage" value="800"/>

<property name="StabilitySupport" value="true"/>

<property name="Shape" value="ModelEntity"/>

<property name="Path" value="solid"/>

<property name="Model" value="#@modfolder:Resources/Testfurnace.unity3d?Testfurnace" />

<property name="Place" value="TowardsPlacerInverted"/>

<property name="OnlySimpleRotations" value="true"/>

<property name="IsTerrainDecoration" value="true"/>

<property name="ParticleName" value="forge"/>

<property name="ParticleOffset" value="0.5,0,0.5"/>

<property name="ImposterDontBlock" value="true"/>

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

<property name="HeatMapStrength" value="6"/>

<property name="HeatMapTime" value="5000"/>

<property name="HeatMapFrequency" value="1000"/>

<property name="BuffsWhenWalkedOn" value="buffBurningEnvironment"/>

<property name="ActiveRadiusEffects" value="buffCampfireAOE(5)"/>

 

<property class="Workstation">

<property name="CraftingAreaRecipes" value="forge"/>

<property name="Modules" value="tools,output,fuel,material_input"/>

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

</property>

<property name="WorkstationIcon" value="ui_game_symbol_forge"/>

<property name="OpenSound" value="forge_open"/>

<property name="CloseSound" value="forge_close"/>

<property name="CraftSound" value="forge_smelt_click"/>

<property name="CraftCompleteSound" value="forge_item_complete"/>

<property name="WorkstationJournalTip" value="forgeTip"/>

 

<property class="RepairItems">

<property name="resourceRockSmall" value="50"/>

<property name="resourceClayLump" value="60"/>

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

</property>

<drop event="Harvest" name="resourceRockSmall" count="30" tag="allHarvest"/>

<drop event="Harvest" name="terrStone" count="0" tool_category="Disassemble"/>

<drop event="Harvest" name="resourceRockSmall" count="20" tag="salvageHarvest"/>

<drop event="Harvest" name="resourceClayLump" count="20" tag="salvageHarvest"/>

<drop event="Harvest" name="resourceLeather" count="5" tag="salvageHarvest"/>

<drop event="Destroy" count="0"/>

<drop event="Fall" name="terrDestroyedStone" count="1" prob="0.75" stick_chance="1"/>

<property name="TakeDelay" value="15"/>

<property name="Group" value="Building,advBuilding"/>

<property name="DescriptionKey" value="forgeDesc"/>

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

<property name="FilterTags" value="fdecor,fother,ffurniture"/>

<property name="SortOrder1" value="70i0"/>

</block>

 

and it works in the original files....

 

https://imgur.com/atiRRSx

 

THANKS FOR HELP EVERYONE!!!

 

And I have a question.. how to position the smoke effect on the top? My furnace is 2 block high, and looks like this: https://skfb.ly/6Mpup I want to make the smoke come out of the chimney, and the light from the top and the bottom bars.(the smoke neccessary, but the light not. how is it possible?)

 

Hi venom2019 and congrats,You managed to make it work.

Put the code in that part that caused you error was fine, well the important thing is that it worked.

 

You only need to add ui_display to have the icons as in the normal forge.

Link to comment
Share on other sites

Actually, the particle effect is the smoke and the fire too!!!!

 

Hi venom2019

 

Yes, the effect must be like that.

 

Hi venom2019

 

I have my files like that

 

Blocks.xml

 

<configs>

<append xpath="/blocks" >

<block name="BigForge">

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

<property name="DescriptionKey" value="BigForgeDesc"/>

<property name="Extends" value="forge" />

<property name="Shape" value="ModelEntity" />

<property name="Model" value="#@modfolder:Resources/Workstations.unity3d?BigForge.prefab" />

<property name="MultiBlockDim" value="2,3,1" />

<!-- <property name="ParticleName" value="campfire" />

<property name="ParticleOffset" value="0,1.2,0.5" /> -->

<property name="ImposterDontBlock" value="true" />

<property name="Class" value="Forge"/>

<property name="UnlockedBy" value="BigForgeSchematic"/>

</block>

</append>

</configs>

 

XUi.xml

 

<configs>

<append xpath="/xui/ruleset" >

<window_group name="workstation_BigForge" controller="XUiC_WorkstationWindowGroup">

<window name="windowCraftingList"/>

<window name="craftingInfoPanel"/>

<window name="windowCraftingQueue"/>

<window name="windowToolsBigForge" />

<window name="windowFuelBigForge" />

<window name="windowBigForgeInput" />

<window name="windowBigForgeOutput" />

<window name="windowNonPagingHeader" />

</window_group>

</append>

</configs>

 

Windows.xml

 

<configs>

<append xpath="/windows">

<window name="windowToolsBigForge" width="228" height="121" panel="Right" cursor_area="true" >

<!--#$-IGS END.-$#-->

<panel style="header.panel" pos="0,77">

<sprite style="header.icon" sprite="ui_game_symbol_wrench"/>

<label style="header.name" text="TOOLS" text_key="xuiTools" />

</panel>

 

<rect name="content" depth="0" pos="0,32" height="75" disablefallthrough="true" >

 

<grid name="inventory" rows="2" cols="2" pos="3,-3" cell_width="75" cell_height="75" controller="WorkstationToolGrid" repeat_content="true" allow_sort_order="false"

required_tools="toolAnvil,toolForgeCrucible,toolAndDieSet,toolBellows" required_tools_only="true">

<required_item_stack name="0"/>

</grid>

</rect>

 

</window>

 

<window name="windowFuelBigForge" width="228" height="166" panel="Right" cursor_area="true">

<!--#$-IGS END.-$#-->

<panel style="header.panel" pos="0,2">

<sprite style="header.icon" sprite="ui_game_symbol_fire"/>

<label style="header.name" text="FUEL" text_key="xuiFuel" />

<label style="header.timer"/>

</panel>

 

<rect name="content" depth="0" pos="0,-43" height="79" >

<rect disablefallthrough="true">

<grid rows="1" cols="3" pos="3,-3" cell_width="75" cell_height="75" controller="WorkstationFuelGrid" repeat_content="true" allow_sort_order="false">

<item_stack name="0"/>

</grid>

</rect>

<grid name="slot_preview" depth="1" rows="1" cols="3" pos="3,-3" cell_width="75" cell_height="75" controller="SlotPreview">

<rect>

<sprite name="slot" depth="2" width="64" height="64" sprite="resourceWood" atlas="ItemIconAtlasGreyscale" pos="35,-35" pivot="center" foregroundlayer="true"/>

</rect>

<rect>

<sprite name="slot" depth="2" width="64" height="64" sprite="resourceWood" atlas="ItemIconAtlasGreyscale" pos="35,-35" pivot="center" foregroundlayer="true"/>

</rect>

<rect>

<sprite name="slot" depth="2" width="64" height="64" sprite="resourceWood" atlas="ItemIconAtlasGreyscale" pos="35,-35" pivot="center" foregroundlayer="true"/>

</rect>

</grid>

</rect>

 

<panel name="buttonContent" depth="5" pos="0, -119" height="40" backgroundcolor="[black]" bordercolor="[black]">

<sprite depth="5" name="backgroundMain" sprite="menu_empty3px" color="[black]" type="sliced" fillcenter="false" />

<rect depth="1" pos="3,-3" width="225" height="34">

<button name="button" sprite="menu_empty" defaultcolor="[mediumGrey]" disabledcolor="[mediumGrey]" hoversprite="ui_game_select_row" hovercolor="[white]" type="sliced" width="222" hoverscale="1.0" />

<sprite depth="2" name="flameIcon" style="icon32px" pos="5,0" sprite="ui_game_symbol_fire" />

<label depth="2" name="onoff" pos="0,-6" justify="center" text="TURN ON" text_key="xuiTurnOn" font_size="26" />

</rect>

</panel>

</window>

 

<!--#$-IGS BEGIN: Adding cursor area. -$#-->

<window name="windowBigForgeInput" width="228" height="229" panel="Right"

controller="WorkstationMaterialInputWindow" materials_accepted="iron,brass,lead,glass,stone,clay" valid_materials_color="[green]" invalid_materials_color="[red]" cursor_area="true" >

<panel style="header.panel" pos="0,2">

<sprite style="header.icon" sprite="ui_game_symbol_forge"/>

<label style="header.name" text="INPUT" text_key="xuiSmelting" />

</panel>

 

<sprite depth="3" name="backgroundMain" sprite="menu_empty3px" pos="0,-43" height="228" color="[black]" type="sliced" fillcenter="false" on_press="true" />

<rect name="content" depth="1" pos="0,-121" height="153">

 

<grid depth="7" rows="3" cols="1" pos="3,75" cell_width="75" cell_height="75" controller="WorkstationMaterialInputGrid" repeat_content="true">

<item_stack name="0"/>

</grid>

 

</rect>

 

<rect name="content2" depth="0" pos="78, -46" width="147" height="223">

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

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

<forge_material name="0"/>

</grid>

</rect>

</window>

 

<window name="windowBigForgeOutput" pos="0,-48" width="228" height="152" anchor="CenterTop" panel="Right" cursor_area="true" >

<panel style="header.panel" pos="0,-38">

<sprite style="header.icon" sprite="ui_game_symbol_loot_sack"/>

<label style="header.name" text="OUTPUT" text_key="xuiOutput" />

</panel>

 

 

<rect name="content" depth="0" pos="0,-83" height="150" disablefallthrough="true" on_press="true">

<sprite depth="2" name="backgroundMain" sprite="menu_empty3px" height="150" color="[black]" type="sliced" fillcenter="false" on_press="true" />

<grid name="inventory" rows="2" cols="3" pos="3,-3" cell_width="75" cell_height="75" controller="WorkstationOutputGrid" repeat_content="true">

<item_stack name="0"/>

</grid>

</rect>

</window>

</append>

</configs>

 

To my forge I also added it to melt copper and zinc, I struggled to do it but I made it work, it also has 3 slots in the input.

 

I hope that helps you.

Happy start of the year for everyone

Link to comment
Share on other sites

Gouki, that's really nice job man! Keep it up, and I will try that

and as I see this :<property name="ParticleName" value="campfire" />

Am I able to put a custom particle effect there for example: <property name="ParticleName" value="#@modfolder:Resources/Smoke.unity3d?smoke" /> ?

Link to comment
Share on other sites

How can I remove the fire effect? or separate it, or mak a custom effect to the game?

 

In that part I don't know much, but maybe it would be edit

<property name = "ParticleOffset" value = "0,1.2,0.5" /> ->

It would be a matter of trial and error,Or maybe it's not there.

 

 

You should leave it that way, I don't see what the problem is or it's because of having your unique forge.

I just made a functional wall oven of the hernanxx mod and when activated it has the sound of the campfire and then it goes out, but it still works, it does not show me any type of fire or smoke.

 

Check my pictures,the mod is called Unnecessary but Beautiful Mod from hernanxx.

Link to comment
Share on other sites

Gouki, that's really nice job man! Keep it up, and I will try that

and as I see this :<property name="ParticleName" value="campfire" />

Am I able to put a custom particle effect there for example: <property name="ParticleName" value="#@modfolder:Resources/Smoke.unity3d?smoke" /> ?

 

 

Thank you, the idea is to help us all, every day you learn something new.

I don't know for sure, venom2019, but you could try.

I think not

 

 

Your prefab of the forge is beautiful, old style, like the stove before.

Keep it up

Link to comment
Share on other sites

Actually guys, my "version" for custom particle effect is works.

 

https://i.imgur.com/B9Yde41.png

 

This is a bit out positioned, but I will fix it. but it works.

the code:

 

<property name="ParticleName" value="#@modfolder:Resources/Smoke.unity3d?Smoke"/>

And I think why: The game uses campfire or forge as the effect, because that's how the effect called in the file, and the original code don't need the path for that effect. so the original can use campfire or forge. but we modders we have to put the exact path for that.

Link to comment
Share on other sites

Actually guys, my "version" for custom particle effect is works.

 

https://i.imgur.com/B9Yde41.png

 

This is a bit out positioned, but I will fix it. but it works.

the code:

 

<property name="ParticleName" value="#@modfolder:Resources/Smoke.unity3d?Smoke"/>

And I think why: The game uses campfire or forge as the effect, because that's how the effect called in the file, and the original code don't need the path for that effect. so the original can use campfire or forge. but we modders we have to put the exact path for that.

 

Congrats venom2019,wanting is power.

 

Just lower the brightness of the smoke a little.

Regards

Link to comment
Share on other sites

Actually in unity that smoke is grey XD the game shows that it's white.

 

"wanting is power." what do you mean with that?

 

I will try to lower that brightness if I can. and I want to make a big extention to the game, so I will make some workbenches, som more furnaces, and maybe a dyeing bench where you can craft different kind of colours :D And when Im done completely, I will publish that.

 

And I will make some videos, so if you are interested in that,

https://www.youtube.com/channel/UCXEVkuBX8tb1MU1utmWlvXw?view_as=subscriber

 

this is my gaming channel, and I will upload them to this channel, but thats gonna be a lot of time, but I will write a reply to this post, when a block is ready.

 

Good luck with modding.

Link to comment
Share on other sites

Actually in unity that smoke is grey XD the game shows that it's white.

 

"wanting is power." what do you mean with that?

 

I will try to lower that brightness if I can. and I want to make a big extention to the game, so I will make some workbenches, som more furnaces, and maybe a dyeing bench where you can craft different kind of colours :D And when Im done completely, I will publish that.

 

And I will make some videos, so if you are interested in that,

https://www.youtube.com/channel/UCXEVkuBX8tb1MU1utmWlvXw?view_as=subscriber

 

this is my gaming channel, and I will upload them to this channel, but thats gonna be a lot of time, but I will write a reply to this post, when a block is ready.

 

Good luck with modding.

 

Hi venom2019

 

"wanting is power." what do you mean with that?

 

It is a phrase from Mexico that means that if you try something, you get it.

 

Thanks for the link,it's interesting.

 

Good luck with modding.

Cheers

Link to comment
Share on other sites

Venom, if you want my data on dye colors, I created a mod with 64 colors grouped into light, medium, and dark tint bases. It also has a dye tub workstation and includes military colors and true black. I never got around to packing it up and publishing it but the hard work of getting the hex colors figured out is done. You are free to do what you want with it, just let me know.

Saber es poder

Link to comment
Share on other sites

Okay guys, there is a problem whith the workbench, because I don't find it in the windows.xml... how should I have to make my block to act like a workbench?

 

Hello venom2019, your new worbench extends to the original worbench ?, because that would be a little easier, it would take everything from the original and you would only add windows.xml in case you are going to add tools.

Upload an image

regards

 

 

XUi.xml

 

<Gouki>

<append xpath="/xui/ruleset" >

<window_group name="workstation_NewWorkbench" controller="XUiC_WorkstationWindowGroup">

<window name="windowCraftingList"/>

<window name="craftingInfoPanel"/>

<window name="windowCraftingQueue"/>

<window name="windowOutput" />

<window name="windowNonPagingHeader" />

</window_group>

</append>

</Gouki>

 

 

 

Also add ui_display.xml to show you the icons of resources, construction, etc.

Link to comment
Share on other sites

I have to put my model to T_Mesh_B to make it work... i almost forgotted that

and now its not working cause that...

 

And now I fixed it, and now the two working useable block:

 

https://i.imgur.com/Mh94xvN.png

 

And there is a question: how to make the workbench's and the forge's to be separated, so my blocks could have some custom recipes?

 

And guys, thank you all the help, because my project and all in one, my modlet couldn't be here now without you.

Thank you again, and I hope that we could help each other in the future too. :fat:

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...