SaintZ

Custom Crafting - Tutorial

46 posts in this topic

55 minutes ago, Chernaruski said:

any OR operators can do the job?

No operators, but you could make two separate recipes that do the same thing. One recipe requiring the knife, and another recipe that requires a can opener. If you're wanting to open canned food with a knife or can opener then you'd have to make a lot of extra recipes and it wouldn't look very attractive in the tablet-recipe menu. If players double-click the item while in their inventory they wouldhave two separate entries and would have to choose the recipe for which tool they have. Or you could alter the original script.

Share this post


Link to post
Share on other sites

Yeah I know you can make a second recipe , but as you said it looks bad at cookbook & its unnecessary code clutter.
I'm pretty sure its possible to make the OR check. Like it was  on one of the servers , where you can open cans with Knife OR Can Opener OR Toolbox. Do you know where I can find the original code for opening cans?

Edited by Chernaruski

Share this post


Link to post
Share on other sites
Advertisement

Hi All,

Apologies if this has been asked. I have a similar question. If 'Or' can't be used, am I able to create items using any parent asset classes? For instance, if I wanted to make matches using sticks, pliers and say 'Exile_Item_Bullets'? which would then allow using the 556 and 762 rounds?

Best Regards,

Lucifarius

Edited by Lucifarius

Share this post


Link to post
Share on other sites
On 9/29/2017 at 10:55 AM, Chernaruski said:

Yeah I know you can make a second recipe , but as you said it looks bad at cookbook & its unnecessary code clutter.
I'm pretty sure its possible to make the OR check. Like it was  on one of the servers , where you can open cans with Knife OR Can Opener OR Toolbox. Do you know where I can find the original code for opening cans?

Could you possibly provide an example of how you would implement the 'OR' operator and do you think it is possible to do the same with components used in the recipe? From what I understand it would look something like this:

class CraftGlue: Exile_AbstractCraftingRecipe
{
    name = "Craft Glue";
    pictureItem = "Exitem_glue";
    requiresFire = 1;
    returnedItems[] =
    {
        {1, "Exitem_glue"},
        {1, "Exile_Item_PlasticBottleEmpty"}                           //In this event one bottle is consumed to act as the bottle for the glue
    };
    tools[] =
    {
        {"Exile_Item_CookingPot"},
        {"Exile_Item_WoodSticks"}
    };
    components[] =
    {
        {1, "Exitem_rice"},
        {2, "Exile_Item_PlasticBottleDirtyWater" | "Exile_Item_PlasticBottleSaltWater" | "Exile_Item_PlasticBottleFreshWater" }
    };
};

Share this post


Link to post
Share on other sites

I don't know how to use "OR" in Exilemod recipes. I was telling that I saw somewhere its possible, but how it was done ... thought  someone here may know.

Edited by Chernaruski

Share this post


Link to post
Share on other sites
Advertisement

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

  • Recently Browsing   0 members

    No registered users viewing this page.