Jump to content

Recommended Posts

现在我有这样一个角色配方:

AddCharacterRecipe("ancient_gem",
    { Ingredient("ancient_soul", 10), Ingredient("nightmarefuel", 8), Ingredient("purplegem", 2) },
    TECH.NONE, { product = "ancient_gem", builder_tag = "fhl" })

我尝试了以下方法,但都不能按预期工作。

1.

-- Can't deconstruct
AddRecipe2("ancient_gem",
    { Ingredient("ancient_soul", 10), Ingredient("nightmarefuel", 8), Ingredient("opalpreciousgem", 1) },
    -- tech level
    TECH.NONE,
    { -- config
        -- this var makes the recipe not craftable by normal means
        -- but still allows it to be deconstructed
        is_deconstruction_recipe = true
    }
)
AddCharacterRecipe("ancient_gem",
    { Ingredient("ancient_soul", 10), Ingredient("nightmarefuel", 8), Ingredient("purplegem", 2) },
    TECH.NONE, { product = "ancient_gem", builder_tag = "fhl", no_deconstruction = true })

2.

-- Can't find the recipe
AddCharacterRecipe("ancient_gem",
    { Ingredient("ancient_soul", 10), Ingredient("nightmarefuel", 8), Ingredient("purplegem", 2) },
    TECH.NONE, { product = "ancient_gem", builder_tag = "fhl", no_deconstruction = true })
AddDeconstructRecipe("ancient_gem",
    { Ingredient("opalpreciousgem", 1), Ingredient("ancient_soul", 10), Ingredient("nightmarefuel", 8) })

3.

-- Can't enter
AddCharacterRecipe("ancient_gem",
    { Ingredient("ancient_soul", 10), Ingredient("nightmarefuel", 8), Ingredient("purplegem", 2) },
    TECH.NONE, { product = "ancient_gem", builder_tag = "fhl" })
require("recipe")
DeconstructRecipe("ancient_gem", { Ingredient("opalpreciousgem", 1), Ingredient("ancient_soul", 10), Ingredient("nightmarefuel", 8) })
Edited by yanecc
AddCharacterRecipe("ancient_gem_recipe", {Ingredient("ancient_soul", 10), Ingredient("nightmarefuel", 8), Ingredient("purplegem", 2)}, TECH.NONE, {builder_tag = "fhl", product = "ancient_gem"})

AddDeconstructRecipe("ancient_gem", {Ingredient("ancient_soul", 10), Ingredient("nightmarefuel", 8), Ingredient("opalpreciousgem", 1)})

The solution is to give the real recipe a different name, this name can be anything but I made it "ancient_gem_recipe".

2 hours ago, ClumsyPenny said:
AddCharacterRecipe("ancient_gem_recipe", {Ingredient("ancient_soul", 10), Ingredient("nightmarefuel", 8), Ingredient("purplegem", 2)}, TECH.NONE, {builder_tag = "fhl", product = "ancient_gem"})

AddDeconstructRecipe("ancient_gem", {Ingredient("ancient_soul", 10), Ingredient("nightmarefuel", 8), Ingredient("opalpreciousgem", 1)})

The solution is to give the real recipe a different name, this name can be anything but I made it "ancient_gem_recipe".

Wow, this really works, thanks so much

  • GL Happy 1

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...