No More Gambling


4 Quality Tier 1 modules now give you a full +100% Quality chance. But also +900% Crafting Cost.

Overhaul
7 months ago
2.0
3.29K
Factorio: Space Age Icon Space Age Mod
Manufacturing

g ✔ Failed to load

8 months ago
(updated 8 months ago)

Your Mod sounds great, yet i get this Error message on startup.
Failed to load mods: Error while loading recipe prototype "factory-3-upcrafting-4" (recipe): Value (75000) outside of range. The data type allows values from 0 to 65535 in property tree at ROOT.recipe.factory-3-upcrafting-4.ingredients[0].amount
Modifications: No More Gambling

EDIT: Looks like that error comes from:
https://mods.factorio.com/mod/factorissimo-2-notnotmelon
The Factory Building 3 costs alot of Ressources(2000 Tungsten Plates and 5000 Concrete), and it seems your multiplier exceeds the limit Factorio can handle.


And another Error when i start with your Mod and Voidcraft. Maybe you can take a look, if not, that's fine too.
https://mods.factorio.com/mod/Voidcraft
https://mods.factorio.com/mod/VoidBlock

Failed to load mods: no-more-gambling/prototypes/upcrafting.lua:30: bad argument #1 of 2 to 'ipairs' (table expected, got nil)
stack traceback:
[C]: in function 'ipairs'
no-more-gambling/prototypes/upcrafting.lua:30: in function 'generate_upcrafting_recipe'
no-more-gambling/prototypes/upcrafting.lua:52: in function 'generate_recipe_variants'
no-more-gambling/data-final-fixes.lua:7: in main chunk

8 months ago
(updated 8 months ago)

Ah both are quite interesting cases.

Obviously, you can't craft things that go beyond engine limitations, and there is no balanced way of capping the amount of resources. It's also easy to reach this with less extreme examples simply by bumping up the settings.

So now, when the mod detects a recipe that goes beyond the cap it will instead replace it with the base recipe again, but with allow_quality = false. This should mean if you select the "impossible" recipe it will auto-eject the quality modules, just like it happens with productivity modules on recipes that don't allow for productivity.


The other case is recipes that don't cost any resources. Balance would be poor if you could just craft these recipes at higher quality without downside.

So as a fix I have decided that the primary resource of ingredient-recipe is the time itself (or more accurately: the electricity to run the machine), so this is what will be affected by the crafting cost multiplier instead.


All this to say: Fixed.

8 months ago

Thanks for the fast response and fix.
I see your points and agree. For the Voidcraft machines they do not require ingredients, just way more time. And those machines do not take quality modules anyway.

Now i tested around in editor mode a bit and came up with another problem.
When i place a recycler, i can recycle normaly(get 25% of ressources back).
But when i insert any quality module in the recycler i get a ingame error of "<item-name> can not be recycled."
So "upcycling" no longer works.

8 months ago

Ooh... yeah. My bad, that happened because I set the recipe to not be enabled in the last update so that you need to research first, but recyling recipes are not researched, and need to be always active.

8 months ago

Ah, i see.

And i have another Bug report for you ;)
For my edge case of the Factorissimo 3 Mod, the Factory Building 3 recipe. When your Mod detects that the receipe uses more then 65535 ressources it changes back to the default receipe, so far so good. But in that moment it just deletes the Quality Modules that are in the assembling machine. I assumed they would land back in my inventory.

8 months ago

Ooph, yeah that's a bit more involved. The mod silently replaces entities to implement the crafting cost increase, and to be able to work with undo, redo and blueprints it needs to do quite a few things behind the scenes, including preventing inserting certain items in the players inventory. Will fix another day.

8 months ago

Oh, interesting to see how it works behind the curtains. No need to hurry, just wanted to let you know.
Thanks for making and fixing this Mod.
Merry Christmas

New response