For the idea to build a storage for better organisation.
if you open the building interface there should be a small storage window and on the upper side there are some tabs with which you could browse through the storage parts. is there a mod or coding for that? help me please
Tab container for storage
Tab container for storage
Check out my "TrueBuildings" - Mod
Re: Tab container for storage
modifying (or replacing) the GUIs used by the game (ie, the inventory management system) isn't actually possible. However,
Theoretically it might be possible to use the GUIs Factorio does provide access to (see the wiki Lua/Gui page) similar to how the testing mode mod gives a list of items to spawn in (except you'd do it by a listing of what that container has). I believe (but haven't tested) it is possible to prevent the opening of the normal gui for entities by setting their operable property to false (during runtime, so probably through the onentitybuilt event), at which point you'd just need to know when the player wants to open the container so that you can create the gui (which can be done with the onputitem event by scanning the provided position (player clicks with an item to open their chests), or by scanning the game.player.cursorposition in which case game.player.screen2realposition might be useful (player hovers mouse over chests). And by scan I mean game.findentities[filtered]).
edit: if you mean for the inventory menu where the player crafts things then...that's a bit easier, you'd have to make a mod that uses data.raw to overwrite all of the "subgroup" properties for item prototypes. data.raw.item["item_name"].subgroup = "name_of_desired_subgroup", subgroups are just prototypes defined as seen in data\base\prototypes\item\item-groups.lua. The rest of the code for that feature is hardcoded.
Theoretically it might be possible to use the GUIs Factorio does provide access to (see the wiki Lua/Gui page) similar to how the testing mode mod gives a list of items to spawn in (except you'd do it by a listing of what that container has). I believe (but haven't tested) it is possible to prevent the opening of the normal gui for entities by setting their operable property to false (during runtime, so probably through the onentitybuilt event), at which point you'd just need to know when the player wants to open the container so that you can create the gui (which can be done with the onputitem event by scanning the provided position (player clicks with an item to open their chests), or by scanning the game.player.cursorposition in which case game.player.screen2realposition might be useful (player hovers mouse over chests). And by scan I mean game.findentities[filtered]).
edit: if you mean for the inventory menu where the player crafts things then...that's a bit easier, you'd have to make a mod that uses data.raw to overwrite all of the "subgroup" properties for item prototypes. data.raw.item["item_name"].subgroup = "name_of_desired_subgroup", subgroups are just prototypes defined as seen in data\base\prototypes\item\item-groups.lua. The rest of the code for that feature is hardcoded.
Re: Tab container for storage
That was my though too. The problem will be the entity who doesn't know in which container they put their items.
I thought that this storage should only be used by the player itself. I try to do some coding and hope it works. I let you know, if i got something
I thought that this storage should only be used by the player itself. I try to do some coding and hope it works. I let you know, if i got something
Check out my "TrueBuildings" - Mod