Seeds Or Mash


Changes fruit processing to only yield mash/jelly. Adds a recipe for processing fruit directly into seeds.

Tweaks
4 months ago
2.0
333

b [Fixed] Midgame Recipe Unlock BUG

4 months ago

Hey! When installing this mod mid-game there is no recipe for crafting seed. I used GPT to add a new research to unlock them and it worked)

4 months ago

Will check on this. Do you have other mods that change gleba fruit processing?

4 months ago

Turns out in my script for unlocking the recipe midgame, I had mixed up the recipe and technology names, oops.

Should work fine now, thanks for reporting :)

4 months ago

Nope, no other Gleba mods. It does not work( Maybe making a new researchable tech for seed smashing will do it? GPT version making it that way worked great.

4 months ago

I'll paste here the part of the code that GPS changed to make a new research for smashing fruits to seeds. Just in case you will wont to take a look.

local seed_effects = {
{ type = "unlock-recipe", recipe = "som_yumako-seed-processing" },
{ type = "unlock-recipe", recipe = "som_jellynut-seed-processing" },
}

data:extend({
{
type = "technology",
name = "som-seed-processing",
icon = "SeedsOrMash/graphics/technology/seed-processing.png",
icon_size = 128,
-- let him demand both fruit technologies
prerequisites = { "yumako", "jellynut" },
unit = {
count = 50,
ingredients = {
{ "automation-science-pack", 1 },
{ "logistic-science-pack", 1 },
},
time = 30
},
effects = seed_effects,
order = "d-a-d", -- find preferable order
}
})

4 months ago
(updated 4 months ago)

Adding a tech is unnecessary

To fix this, disable the mod then load and save your game, then enable the mod once again. When you load your game again after that point, the recipe will be unlocked as expected.

For the curious: The code that enables the recipes midgame only gets called when a game is first loaded/created and the mod is enabled. Since sarmaxir loaded the game with the version which did not correctly unlock the recipes, further mod updates won't run the correct code without first disabling -> saving -> re-enabling *because* on_init has already been run once while the mod was enabled for that save.

4 months ago

Question: is a quasi-migration script really necessary? I noticed when doing similar things, that Factorio seems to do that check itself now. That is to say, if I add a recipe as an unlock condition to a tech that the player has already researched, loading the save file will still enable the recipe. From my experience, the game does its own check for "what should be unlocked", though possibly only on mod config changed (new mods added, old mods removed, mod settings changed, etc.).

Not criticism or anything, just making sure I understand what's going on.

3 months ago

That may be the case, when I made the mod initially it was still necessary when installing midway through the game. Haven't tested to see if it is still necessary

For sarmaxir's problem 17 days ago, the game did not automatically make that check / enable the recipe.

3 months ago

Roger. Wonder if it makes a difference what stage the recipes are added on. Either way - thanks for the response.

New response