Whistle Stop Factories


Spawns massive furnaces and assembly machines around the map to make the game all about building trains to connect them

Content
3 years ago
0.16 - 1.1
2.74K
Manufacturing

b Value outside range

5 years ago

AllAboutMoney mod triggers error within Whistle Stop Factory due to crafting recipes it has results in large amount of items (thousands of coins in some instances), a multiplier added to this by WSF causes the game to crash on booting.
Suggest blacklisting/stack-overflow preventing with regard to recipe-generation for the large factories.

5 years ago

one method is to check a recipe's results, and if exceeds a certain value, like, say 20? don't generate a recipe for the large factory at all.

5 years ago

Could you paste in the error message and also tell me what version you're running? Most errors tell me exactly what line of my code is causing the problem and help me fix it faster.

I already have some checks in place to make sure recipes don't exceed the maximum 65k input/output count limits, and this sounds a little like that, but the current check must not be working.

My current method limits the multiplicative factor to make sure each recipe doesn't go over any of the many limits the game has in place (can't produce more than a stack of items, can't produce more than 65k or take more than 65k, etc), but it is clearly failing somehow and I'm not sure how without more specifics (or testing the mod combination myself).

5 years ago
(updated 5 years ago)

v0.1.5 (most recent).

"failed to load mods: Error while loading recipe prototype "sell-nuclear-reactor-big" (recipe): difficulty normal: value outside range in property tree at root.recipe.sell-nuclear-reactor-big.result_count
Modifications: Whistle stop factories
Mods to be disabled:
Whistle stop factories.

5 years ago

Alright, so the issue was that I have a check to make sure none of the ingredients have a count > 65535. I also have a check to make sure the results don't exceed the stack size (since in such a recipe anything above the stack size just disappears). But I don't have a check to also make sure results don't exceed 65535. Normally, since stack size is usually way below 65535, this has never been an issue since the check I do have is usually more stringent.

In this case we had both a stack size larger than 65535 (stack size of coin item is 1,000,000) as well as a recipe that, when applying the 50x multiplier tries to produce > 65535 as a result. So it passed my check, but failed the game engine's 65535 limit.

This issue will be fixed in version 0.1.6 and the mods now load together.

5 years ago
(updated 5 years ago)

awesome! and thanks for the response. helps me understand a little more about how lua / the game works, and what limitations can cause errors when certain things combine in this way. so no crafting result can exceed 65535, regardless of what the built-in stack size of the item is. interesting. guessing that's cause that's the largest number two bytes of data can have in whatever data-type is being used. a 16bit binary. ah, fun nerd stuff :)

New response