Is it possible to make a Mod that you allow to craft everything for free. That mean you need no ressources in your inventory to craft items in the crafting window.
Is This Mod possible and when yes how does it work?
mfg trex
is free crafting possible?
-
- Filter Inserter
- Posts: 358
- Joined: Fri Jul 25, 2014 2:53 pm
- Contact:
Re: is free crafting possible?
Yes this is possible, just remove the ingredients for the crafting recipes.
Check out my mods
-
- Filter Inserter
- Posts: 402
- Joined: Fri May 23, 2014 8:54 am
- Contact:
Re: is free crafting possible?
This will be easier in 0.11 as they have added extra loading steps for prototypes so mods can safely modify other mod prototypes
Re: is free crafting possible?
hm, is there a faster way to do this or do I have to individually override all recipes. I want to create a Mod like the Creative Mode in Minecraft. But when i have to change all recipes of vanilla and eventually dytech it's a complex work.
-
- Filter Inserter
- Posts: 358
- Joined: Fri Jul 25, 2014 2:53 pm
- Contact:
Re: is free crafting possible?
there already is a mod similar to that. You can unlock all recipes, select items from a list to your inventory, keep the sun up forever.
It even has its own subforum. look for test-mode
It even has its own subforum. look for test-mode
Check out my mods
- bobingabout
- Smart Inserter
- Posts: 7352
- Joined: Fri May 09, 2014 1:01 pm
- Contact:
Re: is free crafting possible?
Try something like.... and this is off the top of my head here so might not be right...
for index, recipe in pairs(data.raw.recipe) do
recipe.ingredients = {}
end
This should Enumerate (or Iterate, depending on programing language) through all instances of recipe, and set the ingredients tag to a list with no entries.
Just have those 3 lines in your data-final-fixes.lua file, and that's pretty much the whole mod.
for index, recipe in pairs(data.raw.recipe) do
recipe.ingredients = {}
end
This should Enumerate (or Iterate, depending on programing language) through all instances of recipe, and set the ingredients tag to a list with no entries.
Just have those 3 lines in your data-final-fixes.lua file, and that's pretty much the whole mod.
Re: is free crafting possible?
your genius, thanks for help. It works.
But i have it now in the "prototypes/base-edit.recipe.lua " file.
when i put the script in the data-final-fixes.lua nothing happend.
This works with the vanilla repices but the recipes of the mods are untouched. How can i fix this?
But i have it now in the "prototypes/base-edit.recipe.lua " file.
when i put the script in the data-final-fixes.lua nothing happend.
This works with the vanilla repices but the recipes of the mods are untouched. How can i fix this?