#Substitution of values into a recipe

21 messages · Page 1 of 1 (latest)

daring apex
#

Hello. I want to make a large number of similar recipes and I'm looking for ways to simplify this. Tell me if it's possible to somehow substitute the value of the liquid at the exit from the recipe depending on the input ingredients. I want the recipe to go through the type of ore (poor, normal, rich) and select the amount of output liquid (less, more).

I did something similar with item names using constants and ${} but this option doesn't work if there are more than two variables to iterate over (it duplicates recipes). And it doesn't work for numbers in recipes

I'm not very good at JS, if there's an option to simplify this, please describe it. Thanks

frail stirrupBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

pale phoenix
#

not very good at JS either, but seems like you just have to use a function, like

   event.recipes.createmetallurgy.melting
   (Fluid.of('tfc:metal/copper', fluidAmount),
    'tfc:ore/' + oreType + '_tetrahedrite', 90, 'heated')}
  metallurgy(100, "whateverOreType")

or smth like that. (theres probably a better way to do this, but idk)

daring apex
pale phoenix
#

ill try to write that in a bit

daring apex
daring apex
dark tree
daring apex
#

time

dark tree
#

I see

pale phoenix
# daring apex

ah, i think i know what happened. Im pretty sure using an array in the same function doesnt work, you would have to use the function multiple times

metallurgy(10, "poor")
metallurgy(15, "rich")``` like that
#

if you wanna make it bigger, might be easier to use something like what i did:

function removeResurrection (recipes) {
    recipes.forEach(r=>{event.remove({id:r})})}
  const cdmovesets = [
    "cdmoveset:s_ironspear","cdmoveset:s_irontachi","cdmoveset:s_diamondspear","cdmoveset:s_diamondtachi"
    ,"cdmoveset:s_ironlongsword","cdmoveset:s_diamondlongsword","cdmoveset:s_diamondgreatsword","cdmoveset:s_irongreatsword"]
removeResurrection(cdmovesets)
pale phoenix
#

np

daring apex
pale phoenix
daring apex
#

uh oh

#

got it

pale phoenix
#

glad i could help

high sandBOT
#

Please close your ticket (with </ticket close:1054771505520717835> or the button atop this thread) once you resolved your issue!
This also helps others that would like to help out, as they don't have to look into this thread to check if it has been resolved by now.

Do you have any other questions regarding your issue? Feel free to ask!
Note: You should create a new post for unrelated issues.