Prerequisites for Recipes

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

Fedorrro
Inserter
Inserter
Posts: 34
Joined: Sat Apr 02, 2016 8:30 am
Contact:

Prerequisites for Recipes

Post by Fedorrro »

I suggest to add prerequisites to recipes, like this:
{
type = "recipe", prerequisites = {list_of_technologies}
}
instead or along with: {type = "technology", effects = {{type = "unlock-recipe", recipe = "..."}}}
It allows to add new recipes, which depend on the existing technologies (from original game), or other mods such without the need for intermediate technologies (which just used for prerequisites) or hacks, like that:
table.insert(data.raw.technology["..."].effects, {type = "unlock-recipe", recipe = "..."}).

In addition, it allows to consistently calculate the technology tree, for the technology and for the recipe.
User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: Prerequisites for Recipes

Post by bobingabout »

The only problem with recipe unlocks at the moment that I have come across, is that they're unlocked upon completion of a research, if you list the recipe on more than one research, than unlocking either will unlock the item.

Okay, fair enough, that makes sense, but what if I want it to unlock only when BOTH are researched? the only solution right now is to make a 3rd technology that has the prerequisite of the other 2 in on it.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.
Fedorrro
Inserter
Inserter
Posts: 34
Joined: Sat Apr 02, 2016 8:30 am
Contact:

Re: Prerequisites for Recipes

Post by Fedorrro »

bobingabout wrote:The only problem with recipe unlocks at the moment that I have come across, is that they're unlocked upon completion of a research, if you list the recipe on more than one research, than unlocking either will unlock the item.
Okay, fair enough, that makes sense, but what if I want it to unlock only when BOTH are researched? the only solution right now is to make a 3rd technology that has the prerequisite of the other 2 in on it.
Yes, this problem will be solved by this suggestion, I think.
Post Reply

Return to “Ideas and Suggestions”