Items as "building blocks"?

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
lyravega
Long Handed Inserter
Long Handed Inserter
Posts: 66
Joined: Mon Jan 06, 2014 4:41 pm
Contact:

Items as "building blocks"?

Post by lyravega »

Is there a way to use one item as the "building block" for multiple entities? Mining result of multiple entities can be one item, but one item capable of building multiple types of entities is not possible from what I see. /edit: should be a bit more clear; this question is for blueprints and construction robots more specificly. Unless they have an exact match, they won't comply. Being able to use some items as "building blocks", they may take those items and construct the entities with them instead. /edit

I noticed that a LuaEntityPrototype has something called as "items_to_place_this", and it returns a table of LuaItemPrototype's. So I assume multiple items can be used to construct one type of entity. What I seek is "opposite", though. One item that can be used to construct multiple types of entities. But seeing that LuaItemPrototype has "place_result" which is singular, I guess there is no way to achieve what I'd like to do?
Last edited by lyravega on Sat Mar 19, 2016 2:40 pm, edited 1 time in total.

Choumiko
Smart Inserter
Smart Inserter
Posts: 1352
Joined: Fri Mar 21, 2014 10:51 pm
Contact:

Re: Items as "building blocks"?

Post by Choumiko »

How would you determine which entity should be placed? If it's depending on neighboring entities, maybe you can use the event on_built_entity to replace it with the one you actually want

lyravega
Long Handed Inserter
Long Handed Inserter
Posts: 66
Joined: Mon Jan 06, 2014 4:41 pm
Contact:

Re: Items as "building blocks"?

Post by lyravega »

Nah, the problem is with blueprints and construction robots in general. When constructing stuff manually, you can replace the newly built entity, but construction robots look for an exact match.

For example, on K&L Inserters mod, there are tens of basic-inserter entities. However, there is only one recipe, and you carry around only one item - as all of the mineable results are the same; this craftable item. After placing one, the entity is replaced via a GUI, based on selections. However, construction robots look for an exact match. If the item is not available in the network, then they cannot proceed.

To explain it a bit more: the basic inserter is called "candle-basic-inserter" in the mod. But the blueprint ghost is for example, "candle-basic-inserter_8_18_near". Unless you have this in your inventory, construction robots cannot proceed. I was looking for a way to make "candle-basic-inserter" a building block to tackle this issue.

Some other mod (examples) that can utilize this feature:
-Building "slowly": Instead of crafting a placeable and putting it down, you put a blueprint ("construction site") down. You and construction robots bring it the required raw&middle materials; the "building blocks". Then you or the robots work on the construction site to finish the building. For bigger placeable entities, makes sense. For small ones (inserters, chests), maybe redundant.
-Using matter to build: In late game, a placeable entity extracts "matter" from anything, and allows the player to use matter as a building block to directly construct anything. Instead of having chests filled with numerous materials, you will have matter storage tanks where this extracted matter is stored, and can be used to build anything. Balancing this could be a beast though :P
Last edited by lyravega on Wed Mar 23, 2016 6:16 pm, edited 1 time in total.

User avatar
Impatient
Filter Inserter
Filter Inserter
Posts: 883
Joined: Sun Mar 20, 2016 2:51 am
Contact:

Re: Items as "building blocks"?

Post by Impatient »

sounds interesting

Post Reply

Return to “Modding interface requests”