hiding crafting recipes from player

Place to get help with not working mods / modding interface.
Post Reply
15Cyndaquil
Long Handed Inserter
Long Handed Inserter
Posts: 63
Joined: Fri Feb 15, 2013 10:34 pm
Contact:

hiding crafting recipes from player

Post by 15Cyndaquil »

how do you hide recipes from the player/ only let certine types of automatic crafting things access to them
The more complicated the game the better

ficolas
Smart Inserter
Smart Inserter
Posts: 1068
Joined: Sun Feb 24, 2013 10:24 am
Contact:

Re: hiding crafting recipes from player

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

drs9999
Filter Inserter
Filter Inserter
Posts: 831
Joined: Wed Mar 06, 2013 11:16 pm
Contact:

Re: hiding crafting recipes from player

Post by drs9999 »

or use:

Code: Select all

  local recipelist = glob.player.force.getrecipes()
  recipelist["iron-plate"].enable()
and disable(), respectively

User avatar
FreeER
Smart Inserter
Smart Inserter
Posts: 1266
Joined: Mon Feb 18, 2013 4:26 am
Contact:

Re: hiding crafting recipes from player

Post 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
<I'm really not active any more so these may not be up to date>
~FreeER=Factorio Modding
- Factorio Wiki
- My Factorio Modding Guide
- Wiki Modding Guide
Feel free to pm me :)
Or drop into #factorio on irc.esper.net

drs9999
Filter Inserter
Filter Inserter
Posts: 831
Joined: Wed Mar 06, 2013 11:16 pm
Contact:

Re: hiding crafting recipes from player

Post 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

User avatar
FreeER
Smart Inserter
Smart Inserter
Posts: 1266
Joined: Mon Feb 18, 2013 4:26 am
Contact:

Re: hiding crafting recipes from player

Post 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.
<I'm really not active any more so these may not be up to date>
~FreeER=Factorio Modding
- Factorio Wiki
- My Factorio Modding Guide
- Wiki Modding Guide
Feel free to pm me :)
Or drop into #factorio on irc.esper.net

drs9999
Filter Inserter
Filter Inserter
Posts: 831
Joined: Wed Mar 06, 2013 11:16 pm
Contact:

Re: hiding crafting recipes from player

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

User avatar
FreeER
Smart Inserter
Smart Inserter
Posts: 1266
Joined: Mon Feb 18, 2013 4:26 am
Contact:

Re: hiding crafting recipes from player

Post 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 :)
<I'm really not active any more so these may not be up to date>
~FreeER=Factorio Modding
- Factorio Wiki
- My Factorio Modding Guide
- Wiki Modding Guide
Feel free to pm me :)
Or drop into #factorio on irc.esper.net

kovarex
Factorio Staff
Factorio Staff
Posts: 8078
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: hiding crafting recipes from player

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

15Cyndaquil
Long Handed Inserter
Long Handed Inserter
Posts: 63
Joined: Fri Feb 15, 2013 10:34 pm
Contact:

Re: hiding crafting recipes from player

Post by 15Cyndaquil »

Thank you all and with this information i have made an electronic furnace
The more complicated the game the better

User avatar
FreeER
Smart Inserter
Smart Inserter
Posts: 1266
Joined: Mon Feb 18, 2013 4:26 am
Contact:

Re: hiding crafting recipes from player

Post by FreeER »

Glad to be of service :) Now you'll have to update (hopefully with 2.11) when the furnace can acutally be electric :)
<I'm really not active any more so these may not be up to date>
~FreeER=Factorio Modding
- Factorio Wiki
- My Factorio Modding Guide
- Wiki Modding Guide
Feel free to pm me :)
Or drop into #factorio on irc.esper.net

15Cyndaquil
Long Handed Inserter
Long Handed Inserter
Posts: 63
Joined: Fri Feb 15, 2013 10:34 pm
Contact:

Re: hiding crafting recipes from player

Post by 15Cyndaquil »

Yup but even if they dont add dyamic furnaces my mod will still work
The more complicated the game the better

Post Reply

Return to “Modding help”