Page 1 of 1
hiding crafting recipes from player
Posted: Wed Mar 13, 2013 9:26 pm
by 15Cyndaquil
how do you hide recipes from the player/ only let certine types of automatic crafting things access to them
Re: hiding crafting recipes from player
Posted: Wed Mar 13, 2013 10:00 pm
by ficolas
Create a new crafting categorie, add that category to the machines that can craft it, and then, change the crafting category from the recipes to the crafting category you created.
Re: hiding crafting recipes from player
Posted: Thu Mar 14, 2013 7:57 am
by drs9999
or use:
Code: Select all
local recipelist = glob.player.force.getrecipes()
recipelist["iron-plate"].enable()
and disable(), respectively
Re: hiding crafting recipes from player
Posted: Thu Mar 14, 2013 8:18 am
by FreeER
I don't think that would do what he was asking for. Correct me if i'm wrong but wouldn't .disable() prevent even the assembling machines from using them (since they have the recipe list of their creator)?
15Cyndaquil wrote:only let certine types of automatic crafting things access
Re: hiding crafting recipes from player
Posted: Thu Mar 14, 2013 8:31 am
by drs9999
FreeER wrote:I don't think that would do what he was asking for. Correct me if i'm wrong but wouldn't .disable() prevent even the assembling machines from using them (since they have the recipe list of their creator)?
Yes yxou are right they disable() do this.
But then I think that I gave him a good explanation, how he can solve that in my treefarm-thread.
https://forums.factorio.com/forum/vie ... 2&start=10
If the explanation isnt clear enough. Then maybe someone can explain it again.
EDIT: Ok, just saw that ficolas allready explained how to deal with that situation
Re: hiding crafting recipes from player
Posted: Thu Mar 14, 2013 8:40 am
by FreeER
yep that's a good explanation, about the only way i can see to make it any better would be to actually specify where the files are like, 'add the new category to the categories.json file within recipe-category and then use "category": "your_new_category" in the recipe json' (i'm also assuming that if you don't specify the category the game defaults to crafting).
Pretty self-explanatory once you get started with modding and see all of the files however.
Re: hiding crafting recipes from player
Posted: Thu Mar 14, 2013 8:48 am
by drs9999
Ok thanks. Now it should be absolutly clear.
Also I can just advise anyone to read the control.lua files of the missions ( can be found into the data/campaigns/.. folders)
You can find very useful stuff in them that arent explained at the wiki,yet.
Re: hiding crafting recipes from player
Posted: Thu Mar 14, 2013 8:53 am
by FreeER
drs9999 wrote:You can find very useful stuff in them that arent explained at the wiki,yet.
Quite true

And of course to check out all of the mods, even if you don't intend to use them yourself it is useful to see what/how some else managed to do something
Admitedly I still haven't gotten around to really looking at the CC mod yet, I've been intending to and keep getting sidetracked

Re: hiding crafting recipes from player
Posted: Thu Mar 14, 2013 12:27 pm
by kovarex
drs9999 wrote:Ok thanks. Now it should be absolutly clear.
Also I can just advise anyone to read the control.lua files of the missions ( can be found into the data/campaigns/.. folders)
You can find very useful stuff in them that arent explained at the wiki,yet.
Yes, but the story mechanism doesn't work very good as tutorial.
Once the lua/json interface stabilises we will complete the reference on wiki and make some small series of tutorials.
Re: hiding crafting recipes from player
Posted: Thu Mar 14, 2013 8:13 pm
by 15Cyndaquil
Thank you all and with this information i have made an electronic furnace
Re: hiding crafting recipes from player
Posted: Thu Mar 14, 2013 8:59 pm
by FreeER
Glad to be of service

Now you'll have to update (hopefully with 2.11) when the furnace can acutally be electric

Re: hiding crafting recipes from player
Posted: Thu Mar 14, 2013 9:04 pm
by 15Cyndaquil
Yup but even if they dont add dyamic furnaces my mod will still work