Fully customizable recipe in locked assembly machine WITHOUT MOD.

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

Post Reply
yagaodirac
Fast Inserter
Fast Inserter
Posts: 152
Joined: Sun Jun 16, 2019 4:04 pm
Contact:

Fully customizable recipe in locked assembly machine WITHOUT MOD.

Post by yagaodirac »

TL;DR
Once the assembly machine is set to recipe_lock, the recipe inside should be totally customizable, the ingredients, productions, energy consumption, duration. I mean, everything.
What ?
Sometimes, we want to provide some automatic item conversion for players. The shop doesn't do the job automatically. The assembly machine is not customizable. A machine with locked recipe could be utilized as a shop, like, vending machine. People could use it with loaders, inserters. Quite convenient. But with the run time now, I've got no idea how to change the input.
If I mean to change the ingredient, I have to introduce a mod. But you know, the mod means less convenient, less downloads less played.

User avatar
ickputzdirwech
Filter Inserter
Filter Inserter
Posts: 768
Joined: Sun May 07, 2017 10:16 am
Contact:

Re: Fully customizable recipe in locked assembly machine WITHOUT MOD.

Post by ickputzdirwech »

Honestly I don’t really know what you are talking about. Do you mind explaining it a bit more? Do you want to make a scenario for a server?

Also from what I gathered you might just be looking for a furnace. Furnaces automatically change the recipe.
Mods: Shortcuts for 1.1, ick's Sea Block, ick's vanilla tweaks
Tools: Atom language pack
Text quickly seems cold and unfriendly. Be careful how you write and interpret what others have written.
- A reminder for me and all who read what I write

User avatar
Silari
Filter Inserter
Filter Inserter
Posts: 489
Joined: Sat Jan 27, 2018 10:04 pm
Contact:

Re: Fully customizable recipe in locked assembly machine WITHOUT MOD.

Post by Silari »

It sounds more like they want to be able to modify a recipe's properties during the game.

The engine doesn't support anything like that. You can change what recipe something uses (LUA API has the Entity.set_recipe command for that, which AFAIK works on buildings that are recipe locked), but the ingredients/outputs/energy required for a given recipe are all part of the RecipePrototype which is only changeable during startup. Recipes don't have a duration, it's just the result of the required energy * the machine speed.

If you want something that can convert from one item to another, you're going to have to write a mod to set them up during startup (as noted elsewhere a furnace would be good for that, since it automatically changes it's recipe based on what you put into it), or get really creative with control.lua scripting as part of a scenario.

yagaodirac
Fast Inserter
Fast Inserter
Posts: 152
Joined: Sun Jun 16, 2019 4:04 pm
Contact:

Re: Fully customizable recipe in locked assembly machine WITHOUT MOD.

Post by yagaodirac »

To both of the friends replied in this page.
Actually, only the ingredients list is NOT modifiable with out a mod. The production is possible to change(first, get the inventory, then change the content). The energy is possible to change(surface -> find entity -> entity.energy+=100000000). The crafting duration is possible to change( entity.craft_processing+=0.1667). Only the ingredients are stable. I've no idea how to change the item list the inserters grab from conveyor belts.
Generally this modifiable recipe hack is usually for some neutral force, or as part of the environment. It means the input for any assembly machine has to match some exist recipe. It's not possible to make a recipe 100 iron-ore >>> 65 iron-plate (which is useful when setting up shops).
Most of the case, we create a machine with force = "neutral", lock the recipe, push it into some container in lua, tick it to ass energy for it. Some times we even control the production, the duration. If it's possible to control the very last detail, the ingredient, it would be sweet.

yagaodirac
Fast Inserter
Fast Inserter
Posts: 152
Joined: Sun Jun 16, 2019 4:04 pm
Contact:

Re: Fully customizable recipe in locked assembly machine WITHOUT MOD.

Post by yagaodirac »

ickputzdirwech wrote:
Sun Mar 07, 2021 9:35 am
Silari wrote:
Sun Mar 07, 2021 11:11 pm
Hi, I replied in 4th layer. I Hope it helps.

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

Re: Fully customizable recipe in locked assembly machine WITHOUT MOD.

Post by ssilk »

Sorry, don't understand it. I'm still missing the WHY do you need it. :) What kind of game are you playing?

I mean: It's a recipe. 🤷‍♂️ If I want to make a cake I use butter, eggs, flour. It makes no sense to change that recipe, because then something else will come out. :D If I want to make a different cake I can use another recipe instead.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

User avatar
NotRexButCaesar
Smart Inserter
Smart Inserter
Posts: 1120
Joined: Sun Feb 16, 2020 12:47 am
Contact:

Re: Fully customizable recipe in locked assembly machine WITHOUT MOD.

Post by NotRexButCaesar »

ssilk wrote:
Mon Mar 08, 2021 2:43 pm
Sorry, don't understand it. I'm still missing the WHY do you need it. :) What kind of game are you playing?

I mean: It's a recipe. 🤷‍♂️ If I want to make a cake I use butter, eggs, flour. It makes no sense to change that recipe, because then something else will come out. :D If I want to make a different cake I can use another recipe instead.
It sounds to me like he wants to create a scenario with random recipe machines spread around the map.

The recipes won’t be set by the payer, but by a script.
—Crevez, chiens, si vous n'étes pas contents!

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

Re: Fully customizable recipe in locked assembly machine WITHOUT MOD.

Post by ssilk »

Create random recipes and put them on the devices??

But, AmericanPatriot, you are guessing. :) We cannot know the why yet.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

yagaodirac
Fast Inserter
Fast Inserter
Posts: 152
Joined: Sun Jun 16, 2019 4:04 pm
Contact:

Re: Fully customizable recipe in locked assembly machine WITHOUT MOD.

Post by yagaodirac »

AmericanPatriot wrote:
Tue Mar 09, 2021 12:59 am
It sounds to me like he wants to create a scenario with random recipe machines spread around the map.
The recipes won’t be set by the payer, but by a script.
Yeah. That's it.

yagaodirac
Fast Inserter
Fast Inserter
Posts: 152
Joined: Sun Jun 16, 2019 4:04 pm
Contact:

Re: Fully customizable recipe in locked assembly machine WITHOUT MOD.

Post by yagaodirac »

I solved this problem with a very unintuitive way. I manage combinations of "filtered-inserter" and "wooden-chest". The filter sluts of filtered inserter are set to the ingredients and then items are changed in chest. Inserter gets rotated to grab items out. Now everything is under my control.

Post Reply

Return to “Ideas and Suggestions”