[MOD 0.18.x] KenirasRandomRecipes

Topics and discussion about specific mods
Kenira
Fast Inserter
Fast Inserter
Posts: 108
Joined: Fri Nov 04, 2016 10:21 am
Contact:

Re: [MOD 0.15.x] KenirasRandomRecipes 1.0.0

Post by Kenira »

What mods are you using?

EDIT: About to go to bed for today though so it'll have to wait until tomorrow

EDIT2: It's the fabrication mod, and the line 135 is "for _, ingredient in pairs(recipe.ingredients) do" so somehow there is a recipe without ingredients which shouldn't really be allowed. Not sure how much this is a bug on my end, and in the fabrication mod
EDIT3: I know what's the issue. There is a recipe that has just a "normal" set of data, but no "expensive". For a single set of recipe data it should just be in the main recipe data, and not separately in "normal". Gonna change it so that even with just a normal recipe it'll work.

Kenira
Fast Inserter
Fast Inserter
Posts: 108
Joined: Fri Nov 04, 2016 10:21 am
Contact:

Re: [MOD 0.15.x] KenirasRandomRecipes 1.0.0

Post by Kenira »

FuzzCat927 wrote:EDIT:

Code: Select all

	-- if an item has normal and expensive recipes, randomize both.
	if item.normal and item.expensive then
		item_recipes = {	item.normal,
							item.expensive,
							}
	else
		item_recipes = {	item,
							}
	end
should be

Code: Select all

	-- if an item has normal and expensive recipes, randomize both.
	if item.normal and item.expensive then
		item_recipes = {	item.normal,
							item.expensive,
							}
	else
		item_recipes = {	item.normal,
							}
	end
No it shouldn't. If a recipe has only one dataset, it should be without normal / expensive. If you look in the game files you'll see that. It's a bug in the Fabrication mod which doesn't use the generally used way of defining recipes.

User avatar
FuzzCat927
Inserter
Inserter
Posts: 23
Joined: Sat Apr 08, 2017 3:04 pm
Contact:

Re: [MOD 0.15.x] KenirasRandomRecipes 1.0.0

Post by FuzzCat927 »

No. I changed that and it fixed your mod. The crash was in your mod and not mine. If it doesn't cause a crash without the fabrication mod, I'm not sure why.

Kenira
Fast Inserter
Fast Inserter
Posts: 108
Joined: Fri Nov 04, 2016 10:21 am
Contact:

Re: [MOD 0.15.x] KenirasRandomRecipes 1.0.0

Post by Kenira »

FuzzCat927 wrote:No. I changed that and it fixed your mod. The crash was in your mod and not mine. If it doesn't cause a crash without the fabrication mod, I'm not sure why.
Just because my mod doesn't cope with data that isn't as it should be that doesn't mean my mod is at fault. Again, look at the vanilla game data. If a recipe does not have different recipes for difficulties, it doesn't use "normal" at all, it has the recipe data like it used to be before recipes depending on different difficulties get introduced.

This mod works fine for vanilla, it works fine with dozens of other mods i tested. I still added additional checks for the next version if only either "normal" or "expensive" exist, but with proper recipe data this shouldn't be necessary.

Also, with your "fix" you break (as in, won't get randomized any more) all recipes that only have the regular ingredients defined without normal/expensive, which are almost all recipes.

Kenira
Fast Inserter
Fast Inserter
Posts: 108
Joined: Fri Nov 04, 2016 10:21 am
Contact:

Re: [MOD 0.15.x] KenirasRandomRecipes 1.0.1

Post by Kenira »

1.0.1 out with some minor tweaks to how probabilities get randomized (for example, probabilities below 1 stay below 1, if they are exactly 1 only amounts get randomized) and fixed crash for bad recipes that only have either normal or expensive entries.

User avatar
FuzzCat927
Inserter
Inserter
Posts: 23
Joined: Sat Apr 08, 2017 3:04 pm
Contact:

Re: [MOD 0.15.x] KenirasRandomRecipes 1.0.1

Post by FuzzCat927 »

Sorry. I didn't understand your reply at first. Thanks for clarifying.

system
Long Handed Inserter
Long Handed Inserter
Posts: 67
Joined: Tue Oct 18, 2016 3:05 pm
Contact:

Re: [MOD 0.15.x] KenirasRandomRecipes 1.0.1

Post by system »

Would it be possible to add "difficulty" setting.
Configurable value from 0 to 10. Default is 1 - mo effect. If less than one, then recipes require usually less than normal resources. If >1, then they require more resources on average.

E.g. iron chest is 10 plates by default.
Now if i generate 100 new worlds, it would be 1-20, with average 10.
With difficulty setting 1.5, it could also be 5-50, average would be ~30.
With difficulty setting 0.5, it could also be 1-15, average would be ~7. (or higher chances to produce multiple items).

Higher difficulty would eliminate most of "cheating" items / liquids, that could be converted from one type to another and back with extra yield.

Kenira
Fast Inserter
Fast Inserter
Posts: 108
Joined: Fri Nov 04, 2016 10:21 am
Contact:

Re: [MOD 0.15.x] KenirasRandomRecipes 1.0.1

Post by Kenira »

Thanks for the suggestion. This was kinda already possible - although i hadn't made them available in the ingame mod settings, but there were a bunch of variables in the config file that you could change to adjust the possible number ranges etc.

I now added an ingame difficulty setting (0 to 10, from laughably easy to ridiculously hard), with 5 everything will be exactly as it was. Although some quick tests reveal that my hacky way of dealing with probabilities is now coming back to haunt me and i will have to make some changes or come up with something new.

As for cheating recipes: which ones did you encounter? I already exclude all barreling recipes from being randomized so that shouldn't be an issue. Kovarex enchrichment is also excluded. Generally, the blacklists in the config file are a much better way of dealing with problematic recipes like this i think.

system
Long Handed Inserter
Long Handed Inserter
Posts: 67
Joined: Tue Oct 18, 2016 3:05 pm
Contact:

Re: [MOD 0.15.x] KenirasRandomRecipes 1.0.1

Post by system »

Could you please update to 0.16?

system
Long Handed Inserter
Long Handed Inserter
Posts: 67
Joined: Tue Oct 18, 2016 3:05 pm
Contact:

Re: [MOD 0.15.x] KenirasRandomRecipes 1.0.1

Post by system »

Some mods (e.g. angel ) allow to convert fluids from vanila to own and back. Putting 2 converter valve in a row will sometime provide infinite resource. E.g. 100 AngelSulfAcid -> 121 VanilaSulfAcid, 100 VanilaSulfAcid -> 98 AngelSulfAcid; putting them in a loop, and adding overflow valve will generate infinite acid (first 100 need to be produced).

I prefer to have all mods from mod portal. If I mod setting in file, there is risk that these settings will be gone after mod updated.

Kenira
Fast Inserter
Fast Inserter
Posts: 108
Joined: Fri Nov 04, 2016 10:21 am
Contact:

Re: [MOD 0.15.x] KenirasRandomRecipes 1.0.1

Post by Kenira »

New version to support 0.16 out.

The difficulty setting is still basically broken, just updated for 0.16 for now. Also added the recipe from Angel's to the blacklist, thanks for mentioning those. I don't really play anymore myself so i didn't know about them.

vjbone
Fast Inserter
Fast Inserter
Posts: 141
Joined: Sun Feb 14, 2016 10:02 am
Contact:

Re: [MOD 0.16.x] KenirasRandomRecipes 1.0.3

Post by vjbone »

hey i made 0.14 compatible version of mod ver. 1.0.2
if anyone wants pm me in discord gildor#0256

system
Long Handed Inserter
Long Handed Inserter
Posts: 67
Joined: Tue Oct 18, 2016 3:05 pm
Contact:

Re: [MOD 0.16.x] KenirasRandomRecipes 1.0.4

Post by system »

It seems that new factorio patches did something... and now all recipes are changing with EVERY factorio update :(

I could tolerate slowdown of my belts from 90 to 10... and some factories from 8 to 0.6... and some modules from 80% to 10%... But when other various filters,frames,catalysts get rates like 11/3 (11 frames to produce 3 coal filters), I decided to take a break :D

Kenira
Fast Inserter
Fast Inserter
Posts: 108
Joined: Fri Nov 04, 2016 10:21 am
Contact:

Re: [MOD 0.16.x] KenirasRandomRecipes 1.0.4

Post by Kenira »

It should not happen again. The last few patches made changes with the order of ingredients. I assume that's why you saw the changes.

system
Long Handed Inserter
Long Handed Inserter
Posts: 67
Joined: Tue Oct 18, 2016 3:05 pm
Contact:

Re: [MOD 0.16.x] KenirasRandomRecipes 1.0.4

Post by system »

Tried to update mods and run again, got this error:

data-final-fixes.lua:321 (:323 with 1.0.4)
"attempt to compare string with number"

Kenira
Fast Inserter
Fast Inserter
Posts: 108
Joined: Fri Nov 04, 2016 10:21 am
Contact:

Re: [MOD 0.16.x] KenirasRandomRecipes 1.0.4

Post by Kenira »

Runs fine in 0.16.36 for me. I assume you're using other mods as well?

system
Long Handed Inserter
Long Handed Inserter
Posts: 67
Joined: Tue Oct 18, 2016 3:05 pm
Contact:

Re: [MOD 0.16.x] KenirasRandomRecipes 1.0.4

Post by system »

It took a while to find exact mod that were causing troubles. It is Bio_Industries_2.2.5

TheSAguy
Smart Inserter
Smart Inserter
Posts: 1449
Joined: Mon Jan 13, 2014 6:17 pm
Contact:

Re: [MOD 0.16.x] KenirasRandomRecipes 1.0.4

Post by TheSAguy »

I update some recipes in Data updates. You will probably have to take that into account.
Let me know if I can help.

Kenira
Fast Inserter
Fast Inserter
Posts: 108
Joined: Fri Nov 04, 2016 10:21 am
Contact:

Re: [MOD 0.16.x] KenirasRandomRecipes 1.0.4

Post by Kenira »

Should be fixed in 1.0.5.

Kenira
Fast Inserter
Fast Inserter
Posts: 108
Joined: Fri Nov 04, 2016 10:21 am
Contact:

Re: [MOD 0.16.x] KenirasRandomRecipes 1.0.5

Post by Kenira »

v1.1.0 out:
- added difficulty settings
- added option to round to nearest prime number
- added fuel performance randomization option

It's been over a year after the request, but i finally added a difficulty setting :P

Post Reply

Return to “Mods”