Varying recipy components

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

Post Reply
Nick-Nack
Inserter
Inserter
Posts: 36
Joined: Tue May 31, 2016 11:03 am
Contact:

Varying recipy components

Post by Nick-Nack »

One thing I really like about Factorio is figuring out how to best set up a factory for optimal throughput. Unfortunately, once you know the optimal setup, the game looses a lot of appeal (for example think about the 3-to-2 green circuit setup basically everyone uses before modules).
It would be great if there was a mode with random recipes. Not completely random, but for example green circuits could use and additional copper cable. Or iron gears only use 1 iron plate. Stuff like that.

User avatar
Ranakastrasz
Smart Inserter
Smart Inserter
Posts: 2124
Joined: Thu Jun 12, 2014 3:05 am
Contact:

Re: Varying recipy components

Post by Ranakastrasz »

There was a mod suggestion like this at one point.


Main issue is that it would require you to have a config file with a seed, which is used to randomize the recipes in exactly the same way each time you load the game.
My Mods:
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16

Nick-Nack
Inserter
Inserter
Posts: 36
Joined: Tue May 31, 2016 11:03 am
Contact:

Re: Varying recipy components

Post by Nick-Nack »

So there's no random number generator in mods?

User avatar
Ranakastrasz
Smart Inserter
Smart Inserter
Posts: 2124
Joined: Thu Jun 12, 2014 3:05 am
Contact:

Re: Varying recipy components

Post by Ranakastrasz »

There are, but it can't be used for that. Recipes are loaded when you start up the game. While you can use random numbers to get the recipe then, next time you start up, it needs to be the same seed, or you end up with the recipes randomized again each time you load the game.

Technically possible, but has some problems.
My Mods:
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16

Nick-Nack
Inserter
Inserter
Posts: 36
Joined: Tue May 31, 2016 11:03 am
Contact:

Re: Varying recipy components

Post by Nick-Nack »

I guess you can't access any information from the map like item counts when loading the recipes, either? That would be a work around for "saving" the seed :-/
A workaround to test the idea would be to just create multiple mods with different seeds and players could choose which mod to use randomly.

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Varying recipy components

Post by ssilk »

The problem with this is the following:
Factorio implements very, very much intelligence to avoid situations like in Minecraft, where identifiers of items needs to be fixed.
See http://www.minecraftinfo.com/idlist.htm

Instead the "ID" of any item is handled internally and is never revealed to any mod etc. You don't need to care about it. Entities can be accessed via the name of the entity and the game ensures to make that access unique.

Which means in countermove: Any entity cannot change during game.

Which means: Once a recipe, a technology, an item, or other entities are loaded (which is done while startup of game), it cannot be changed anymore. This makes much sense, cause the entities are in storage and if you change the entity, then stop playing and load another the entity would keep changed.

Of course you can do this: Cause the data-section can access any lua function (the data.lua is just another lua-program), you can create random recipes during startup. But you cannot change that depended to the game you want to start/load.

See more about this loading mechanism in: http://lua-api.factorio.com/latest/Data-Lifecycle.html



PS: I'm not saying this is not possible. It would enable a lot of interesting mods, I would apreciate. But I think it needs some more thinking to enable changing of entities during game and I think the right way to implement this would be not to enable just a change of a recipe (or any other entity) during game.

That is simply because of this: Currently we as players from other games are very used to have recipes just changed (because something happens for example). That is just implemented in the way as above described: The game just changes the recipe-entity and suddenly all machines need different items.

But I think this is too much magic. It is like "Oh, I invented the wheels" and suddenly all skids have wheels. You need to admit: This is currently in very, very much games. It shortens things.
But in my opinion there needs to happen a second thing: You need to upgrade the skids somehow. Some second event needs to happen, to enable the new skid to the old. Which means you to exchange skids with no wheels to skids with wheels. Which means: You still need and have the old skids and you also can produces the old ones.

And I think this second step is, what Factorio makes to what Factorio is. :)
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

Post Reply

Return to “Ideas and Suggestions”