[Usefull Class] A class to remove a recipe from the game without changing the vanilla mod file

Due to human (non-bot) spam the first contribution of a user has to be reviewed and activated manually, all further contributions do not require this.
As long as a user does not have at least one reviewed and activated contribution, the user is unable to edit his profile, set a avatar, title picture or a signature.
  • Hello everyone,
    There is many modder that remove some vanilla recipe, or sometime just change some vanilla recipe
    But removing a vanilla recipe means changing the default vanilla file and it's a pain to update at each update of eco.
    Or when there is 2 different mods that want to change the same file.
    The solution is to remove the vanilla recipe from the game then add another recipe with your ingredients from your mods instead of changing the vanilla file.

    This is a small class, you just need to copy it inside your project and call the function inside the initialize function of your mod plugin.
    The class is available on my github: https://github.com/Kirthos/Kirtho…ecipeRemover.cs

    I will try to add this class inside asphalt MDK for the next release but if people want to add the file as a standalone directly inside their mods it's possible, but remember if 2 mods add it that can make problem (think about changing the namespace if you wish to prevent this problem)

    After adding the file to your mod you just need to do this (don't forget using the namespace) inside your mod plugin class

    C#
    public void Initialize(TimedTask timer)
    {
        RecipeRemover.RemoveRecipe(typeof(IronIngotRecipe));
        RecipeRemover.RemoveRecipe(typeof(SmeltIronRecipe));
    }

    Enjoy, and hope that will permit modder to make awesome mods.
    If you have any question about how it work you can ask me on discord.

  • Hello, Kirthos.
    I'm using your RecipeRemover and it works as amazingly.

    Today, I've found a bit more thing to be removed in addition to your RecipeRemover.
    I share it with you.

    I'm not expert for LINQ, so shortly:
    [ICODE]SkillModifiedValueManager.skillBenefits.TryGetValue(typeof(Recipe.Ingredients.First.skillType), out)[/ICODE]
    returns recipe even after remove.


    ( I took this after removed SmeltIronRecipe )

    I hope this helps. :)

  • Hello, Kirthos.
    I'm using your RecipeRemover and it works as amazingly.

    Today, I've found a bit more thing to be removed in addition to your RecipeRemover.
    I share it with you.

    I'm not expert for LINQ, so shortly:
    [ICODE]SkillModifiedValueManager.skillBenefits.TryGetValue(typeof(Recipe.Ingredients.First.skillType), out)[/ICODE]
    returns recipe even after remove.


    ( I took this after removed SmeltIronRecipe )

    I hope this helps. :)


    Thanks for your feedback, seems the reference for the recipe is keep in another place, I need to add the code to remove it.
    I will try to make a update to fix this issue

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!