Page 1 of 1

Missing item stat: inventory stack size

Posted: Tue Jun 21, 2016 9:54 pm
by Frightning
So I noticed that the templated stat panel for the various items in the game does not have an entry for inventory stack size. It's an important piece of info because inventory stack size determines how many of that item will fit in a given storage item, and the number varies from item to item (I know of at least one item with each of the following inventory stack sizes 2, 5, 10, 20, 50, 100, 200, and 500). Every non-fluid item in the game has this stat, so it would make sense to alter the templates to include it, and then fill in the specific values for each item in the same manner that everything else on the template gets filled (by wiki users).

Re: Missing item stat: inventory stack size

Posted: Thu Jul 07, 2016 12:24 pm
by Kruparker
item stack size is available through prototype.
http://lua-api.factorio.com/0.13.6/LuaI ... stack_size

Code: Select all

 local item  = inventory[some_index]
item.prototype.stack_size -- do whatever you want here