Page 2 of 5

Re: [MOD 0.15.x] KenirasRandomRecipes 1.0.0

Posted: Thu May 25, 2017 9:45 pm
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.

Re: [MOD 0.15.x] KenirasRandomRecipes 1.0.0

Posted: Fri May 26, 2017 6:39 am
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.

Re: [MOD 0.15.x] KenirasRandomRecipes 1.0.0

Posted: Fri May 26, 2017 12:56 pm
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.

Re: [MOD 0.15.x] KenirasRandomRecipes 1.0.0

Posted: Fri May 26, 2017 1:03 pm
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.

Re: [MOD 0.15.x] KenirasRandomRecipes 1.0.1

Posted: Fri May 26, 2017 2:41 pm
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.

Re: [MOD 0.15.x] KenirasRandomRecipes 1.0.1

Posted: Fri May 26, 2017 7:01 pm
by FuzzCat927
Sorry. I didn't understand your reply at first. Thanks for clarifying.

Re: [MOD 0.15.x] KenirasRandomRecipes 1.0.1

Posted: Sun Nov 26, 2017 2:56 pm
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.

Re: [MOD 0.15.x] KenirasRandomRecipes 1.0.1

Posted: Sun Nov 26, 2017 9:37 pm
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.

Re: [MOD 0.15.x] KenirasRandomRecipes 1.0.1

Posted: Sat Dec 23, 2017 5:54 am
by system
Could you please update to 0.16?

Re: [MOD 0.15.x] KenirasRandomRecipes 1.0.1

Posted: Sat Dec 23, 2017 8:20 am
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.

Re: [MOD 0.15.x] KenirasRandomRecipes 1.0.1

Posted: Sat Dec 23, 2017 6:25 pm
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.

Re: [MOD 0.16.x] KenirasRandomRecipes 1.0.3

Posted: Sat Jan 13, 2018 4:31 pm
by vjbone
hey i made 0.14 compatible version of mod ver. 1.0.2
if anyone wants pm me in discord gildor#0256

Re: [MOD 0.16.x] KenirasRandomRecipes 1.0.4

Posted: Fri Mar 23, 2018 5:15 pm
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

Re: [MOD 0.16.x] KenirasRandomRecipes 1.0.4

Posted: Fri Mar 23, 2018 5:20 pm
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.

Re: [MOD 0.16.x] KenirasRandomRecipes 1.0.4

Posted: Fri Mar 30, 2018 8:19 am
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"

Re: [MOD 0.16.x] KenirasRandomRecipes 1.0.4

Posted: Fri Mar 30, 2018 11:57 am
by Kenira
Runs fine in 0.16.36 for me. I assume you're using other mods as well?

Re: [MOD 0.16.x] KenirasRandomRecipes 1.0.4

Posted: Sun Apr 01, 2018 11:45 am
by system
It took a while to find exact mod that were causing troubles. It is Bio_Industries_2.2.5

Re: [MOD 0.16.x] KenirasRandomRecipes 1.0.4

Posted: Sun Apr 01, 2018 2:31 pm
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.

Re: [MOD 0.16.x] KenirasRandomRecipes 1.0.4

Posted: Sun Apr 01, 2018 4:51 pm
by Kenira
Should be fixed in 1.0.5.

Re: [MOD 0.16.x] KenirasRandomRecipes 1.0.5

Posted: Tue Jan 15, 2019 3:16 pm
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