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

how to reduce crafting time of concrete mix?

darchon

Refugee
i've tried:

<append xpath="/items/item[@name='resourceConcreteMix']">
<property name="CraftingIngredientTime" value="0.01"/>
</append>


but that doesnt do anything.

 
I see what you're trying to do, since it looks like it's  set to craft at a default speed. The best workaround I think of offhand would be to add some kind of  new turbo ConcreteMix recipe by copying the existing recipe and just multiplying  both the output and ingredients by say 10 or 100 for a similar increase in speed. It's not very granular, but when you're making mix, you're probably looking to do 6000 at one shot instead of 17.

Code:
<recipe name="resourceConcreteMix" count="100" craft_area="cementMixer" tags="cementMixerCrafting">
	<ingredient name="resourceCrushedSand" count="100"/>
	<ingredient name="resourceRockSmall" count="100"/>
	<ingredient name="resourceCement" count="100"/>
</recipe>
 
Hi darchon

You can add this to the original recipes.xml file, look for the recipe and add it:  craft_time="2"

With this the concreteMix is done in 2 seconds.

Or add it to the code that Cranberry Monster told you.

Regards

 
Below is a part of crafting recipe for 9mm ammo bundle. It has a craft time in it.

<recipe name="ammoBundle9mmBulletBall" count="1" craft_time="240" craft_area="workbench" tags="learnable,workbenchCrafting">

You can try adding the craft time to the concrete mix like below to see if that works. If not just change it back.

You should be able to adjust the crafting time by changing the 240 to something smaller. That number may be seconds.

<recipe name="resourceConcreteMix" count="1"  craft_time="240" craft_area="cementMixer" tags="cementMixerCrafting">

EDIT: Gouki, your post popped up as I was typing lol you ninja.

 
Last edited by a moderator:
thanks Cranberry Monster, why didnt i think of that? 😆

and thanks Gouki and Gamida, great idea except i couldn't make this xpath version of your idea work, does this look right?

<append xpath="/recipes/recipe[@name='resourceConcreteMix']/@craft_time">0.01</append>


interestingly enough editing the original recipes.xml works but i dont want to be messing around with the original xml as making changes in mod versions is cleaner.

 
I am a bit shaky in the modding department so not sure how to make it a modlet but and interested if someone else has the answer. I would like to know myself and am sure then it can be used to adjust craft time of other items.

I too rather have a modlet made than edit the original if I can.

 
Last edited by a moderator:
I have finished the mod, if you are interested here is the code.

This deletes the recipe and puts it back but with the crafting time at 4 seconds (original 13 seconds), you can change it according to your criteria.
Regards

<Gouki>

    <remove xpath="/recipes/recipe[@name='resourceConcreteMix']"/>
    
    
    <append xpath="/recipes">
    
        <recipe name="resourceConcreteMix" count="1" craft_time="4" craft_area="cementMixer" tags="cementMixerCrafting">
            <ingredient name="resourceCrushedSand" count="1"/>
            <ingredient name="resourceRockSmall" count="1"/>
            <ingredient name="resourceCement" count="1"/>
        </recipe>
        
    </append>

</Gouki>

A19.2_2020-11-24_12-42-25.jpg

 
Gouki said:
I have finished the mod, if you are interested here is the code.

This deletes the recipe and puts it back but with the crafting time at 4 seconds (original 13 seconds), you can change it according to your criteria.
Regards

<Gouki>

    <remove xpath="/recipes/recipe[@name='resourceConcreteMix']"/>
    
    
    <append xpath="/recipes">
    
        <recipe name="resourceConcreteMix" count="1" craft_time="4" craft_area="cementMixer" tags="cementMixerCrafting">
            <ingredient name="resourceCrushedSand" count="1"/>
            <ingredient name="resourceRockSmall" count="1"/>
            <ingredient name="resourceCement" count="1"/>
        </recipe>
        
    </append>

</Gouki>

View attachment 17007
Your way is amateurish. My way is professional and better:

Code:
<setattribute xpath="//recipe[@name='resourceConcreteMix']" name="craft_time">200</setattribute>
 
Your way is amateurish. My way is professional and better:

<setattribute xpath="//recipe[@name='resourceConcreteMix']" name="craft_time">200</setattribute>



A 'cleaner' way i would say CrazyAluminium   .....  there are multiple ways to accomplish the same goal in Xpath so if it works it works whatever but not amateurish just different.

Ragsy !!

 
Back
Top