Load order mess stack sizes
Posted: Tue Aug 16, 2016 9:39 am
I'm trying to create a recipe, which using current stack size of an item.
The problem: my mod getting wrong stack sizes.
There are currently 2 mods, that modify them: bobplates and BigBags. So e.g Iron Plates have stack size of 100. bob increase them to 200. BigBags increase them to 400. And my mod, for some reason, want to think that stack size is still 100.
When i trying to(for test purposes), change item's stack size in my mod, game recognizes that my changes to it was done before bob's and BigBags'. (base>crates>bob>Bags)
The funny part is my info.json:
So my crates probably should load after this two guys.
Even more funny thing is that config.lua see proper values, so
Returns 400(in Iron Plates example), but i can't use this code in any data changes(i believe because of "game" is referencing to current game session, and cannot be called during initialization, right?)
So, comrades, what am i doing to my life? I mean, what's wrong with my code? Thanks.
Code: Select all
local StackSize = data.raw.item[Material].stack_size
data:extend(
{
{
type = "recipe",
......
result = Material,
result_count = StackSize,
},
}
)
There are currently 2 mods, that modify them: bobplates and BigBags. So e.g Iron Plates have stack size of 100. bob increase them to 200. BigBags increase them to 400. And my mod, for some reason, want to think that stack size is still 100.
When i trying to(for test purposes), change item's stack size in my mod, game recognizes that my changes to it was done before bob's and BigBags'. (base>crates>bob>Bags)
The funny part is my info.json:
Code: Select all
"dependencies": ["base >= 0.13.0", "? bobplates", "? BigBags"]
Even more funny thing is that config.lua see proper values, so
Code: Select all
local StackSize = game.item_prototypes[Material].stack_size
So, comrades, what am i doing to my life? I mean, what's wrong with my code? Thanks.
