Jump to content

Mold in the forge


Recommended Posts

Hello,
I am currently developing a small mod.

The goal is to be able to have molds in the forge to be able to melt resources, as with the crucible.

I managed to make my molds and also to make sure that the forge is the locations.

But there is a problem!
When I place a new forge it duplicates the elements of the "last" open forge!
Except the 3 1st mold.

Someone may be where it may come from.

Thank you.

 

forge.png

Link to post
Share on other sites
1 hour ago, Senzo said:

Hello,
I am currently developing a small mod.

The goal is to be able to have molds in the forge to be able to melt resources, as with the crucible.

I managed to make my molds and also to make sure that the forge is the locations.

But there is a problem!
When I place a new forge it duplicates the elements of the "last" open forge!
Except the 3 1st mold.

Someone may be where it may come from.

Thank you.

 

forge.png

 

Hi Senzo

 

If I understood you correctly, your forge accepts all the molds that appear in your image (14 molds = 14 slots), I can assume that it would be a kind of bug what happens, there are too many slots for the tools.
Regards

Link to post
Share on other sites

My forge has 4 slots for tools, I added a mold to make bricks, but it would not let me put the mold (only the 4 tools that are shown in the slots), the solution was to edit this part that is in windows.xml, I assume your mod has it and it also has windowToolsX, so edit this:

 

required_tools_only = "true"

 

Change it to "false"

 

With this, the forge allows you to put any tool or mold, but you will have to change them every time you want to make one thing or another.
Regards

Link to post
Share on other sites

Hello, thank you for your answer.

I also tested this method.

But I would really like to have the 14 slots dedicated to a mold, and also being able to leave them all in the forge.

Currently its working very well, the only concern is that when I place a new forge it duplicates the last forge that I opened.
Basically all the molds present in the last open forge are reproduced in the last. "Except the three 1st"

 

😥

here is my code used.     

   <window name="windowToolsForge" width="228" height="280" panel="Right" cursor_area="true" >
        <!--#$-IGS END.-$#-->
            <panel style="header.panel">
                <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,-46" height="75" disablefallthrough="true">
                <grid name="inventory" rows="3" cols="5" pos="3,-3" cell_width="75" cell_height="75" controller="WorkstationToolGrid" repeat_content="true"
                required_tools="mouleLingotFer,mouleLingotAcier,moulePlomb,mouleBallePlomb,mouleDouilleBalle,mouleDouilleRoquette,moulePointeRoquette,mouleClou,mouleFlecheFer,mouleFlecheAcier,mouleDart,toolBellows,toolAnvil,toolForgeCrucible," required_tools_only="true">
                    <required_item_stack name="0"/>
                </grid>
            </rect>

Edited by Senzo (see edit history)
Link to post
Share on other sites
  • 2 weeks later...
On 11/24/2020 at 11:10 PM, Senzo said:

Hello, thank you for your answer.

I also tested this method.

But I would really like to have the 14 slots dedicated to a mold, and also being able to leave them all in the forge.

Currently its working very well, the only concern is that when I place a new forge it duplicates the last forge that I opened.
Basically all the molds present in the last open forge are reproduced in the last. "Except the three 1st"

 

😥

 

 

Link to post
Share on other sites

The game usually uses arrays of a predefined size to store things like number of tool slots.  Unless you use code to edit those values to increase the array size the game wont manage the changes to those slots between instances and sessions.

Edited by xyth (see edit history)
Link to post
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...