new and need help with giving a machine custom functionality

Place to get help with not working mods / modding interface.
Post Reply
Red Toast
Manual Inserter
Manual Inserter
Posts: 2
Joined: Tue Jul 02, 2024 2:48 am
Contact:

new and need help with giving a machine custom functionality

Post by Red Toast »

okay so sorry if i say or do something stupid i am entirely new to modding factorio( but i am already good at lua )

What im trying to do:
im trying to make a machine that stores a dynamically increasing amount of one item type,
and that increases that storage amount when provided a specific item (dynomite),
example, 5 bombs will increase the machines capacity by 10 ( numbers will probably be different )

any help appreciated, sorry if im just dumb.

GrumpyJoe
Filter Inserter
Filter Inserter
Posts: 480
Joined: Fri Apr 06, 2018 7:10 pm
Contact:

Re: new and need help with giving a machine custom functionality

Post by GrumpyJoe »

If you're already good with Lua, you need to get yourself familiar with the Data Life Cycle and the API

I'm no expert in either of those, but it seems that dynamicly changing inventory size is only possible for the player through inventory size bonus, which seems exclusive to player armor and research, while containers (chests) get their inventory size set in the prototype stage.

There might be a hack around it for what you need with non container entities that have inventory, but im not sure if that could help you, if it's even possible.

Red Toast
Manual Inserter
Manual Inserter
Posts: 2
Joined: Tue Jul 02, 2024 2:48 am
Contact:

Re: new and need help with giving a machine custom functionality

Post by Red Toast »

GrumpyJoe wrote:
Wed Jul 03, 2024 4:01 am
If you're already good with Lua, you need to get yourself familiar with the Data Life Cycle and the API

I'm no expert in either of those, but it seems that dynamicly changing inventory size is only possible for the player through inventory size bonus, which seems exclusive to player armor and research, while containers (chests) get their inventory size set in the prototype stage.

There might be a hack around it for what you need with non container entities that have inventory, but im not sure if that could help you, if it's even possible.
As it turns out, you absolutely can resize a inventory with LuaInventory, in fact LuaInventory can do everything i needed it to.
Thanks for the help!

Post Reply

Return to “Modding help”