[0.18.24] Recipe prototype history shows wrong mods.
-
- Long Handed Inserter
- Posts: 66
- Joined: Thu Jun 01, 2017 6:52 pm
- Contact:
[0.18.24] Recipe prototype history shows wrong mods.
Sometimes, the prototype history for recipes indicates the wrong mod(s). As you can see from the screenshot below, it claims the recipe for the basic gun turret is modified by "Angel's Refining" and "Angel's Petro Chemical Processing". Needless to say, neither of those mods references gun-turret; as far as I can tell, it should say "Angel's Industries" and "Angel's Exploration (BETA)" instead. Save file demonstrating the bug is attached (it's just a freshly-started sandbox with all techs researched and cheat mode enabled). Only mods enabled are Angel's Industries and Angel's Exploration and their required dependencies.
- Attachments
-
- Recipe history bug confirmation.zip
- Save file demonstrating bug.
- (1.68 MiB) Downloaded 94 times
-
- Cropped screenshot demonstrating bug.
- wrong_prototype_history.png (94.39 KiB) Viewed 2106 times
Re: [0.18.24] Recipe prototype history shows wrong mods.
A mod doesn't have to directly reference the prototype by name to influence it.
For instance you can just directly loop through the raw entity list and tweak all of them.
I don't see anything here that looks like a bug, and also I don't think it matters
The mod change system does a hash of all prototypes after every mod, so the mod doing something like changing an icon size or the recipe order will show as modifying the prototype
For instance you can just directly loop through the raw entity list and tweak all of them.
I don't see anything here that looks like a bug, and also I don't think it matters
The mod change system does a hash of all prototypes after every mod, so the mod doing something like changing an icon size or the recipe order will show as modifying the prototype
Re: [0.18.24] Recipe prototype history shows wrong mods.
Base game generates this recipe for the turret:
Then angelsrefining changes it to this:
Then angelspetrochem changes it to this:
So both mods are changing recipes around to zero end effect but because they change how the definition is ordered they get marked as changing things.
Code: Select all
{
"type": "recipe",
"name": "gun-turret",
"enabled": false,
"energy_required": 8,
"ingredients":
[
[
"iron-gear-wheel",
10
],
[
"copper-plate",
10
],
[
"iron-plate",
20
]
],
"result": "gun-turret"
}
Code: Select all
{
"type": "recipe",
"name": "gun-turret",
"enabled": false,
"energy_required": 8,
"ingredients":
[
{
"name": "iron-gear-wheel",
"type": "item",
"amount": 10
},
{
"name": "copper-plate",
"type": "item",
"amount": 10
},
{
"name": "iron-plate",
"type": "item",
"amount": 20
}
],
"result": "gun-turret"
}
Code: Select all
{
"type": "recipe",
"name": "gun-turret",
"result": "gun-turret",
"enabled": false,
"energy_required": 8,
"ingredients":
[
{
"type": "item",
"name": "submachine-gun",
"amount": 1
},
{
"type": "item",
"name": "iron-plate",
"amount": 10
},
{
"type": "item",
"name": "copper-plate",
"amount": 5
}
]
}
If you want to get ahold of me I'm almost always on Discord.
-
- Long Handed Inserter
- Posts: 66
- Joined: Thu Jun 01, 2017 6:52 pm
- Contact:
Re: [0.18.24] Recipe prototype history shows wrong mods.
Then why isn't the one mod that very definitely actively changes the recipe (Angel's Exploration, which is replacing the iron gear wheels with the submachine gun and halving the copper plates) not listed?Rseding91 wrote: Fri May 15, 2020 5:59 pm So both mods are changing recipes around to zero end effect but because they change how the definition is ordered they get marked as changing things.
EDIT: In hindsight, I probably should've mentioned that the reason I reported this in the first place was because I wanted to know what mod was changing the turret recipe to use a submachine gun, and the prototype history was supremely unhelpful in this regard; I guess I just assumed that it would be obvious that the turret recipe in the screenshot wasn't the vanilla recipe.
Re: [0.18.24] Recipe prototype history shows wrong mods.
angelspetrochem is the one that makes those changes.MageKing17 wrote: Fri May 15, 2020 8:35 pmThen why isn't the one mod that very definitely actively changes the recipe (Angel's Exploration, which is replacing the iron gear wheels with the submachine gun and halving the copper plates) not listed?Rseding91 wrote: Fri May 15, 2020 5:59 pm So both mods are changing recipes around to zero end effect but because they change how the definition is ordered they get marked as changing things.For that matter, why are the fields returning in different orders anyway, and this then counting as a modification?
EDIT: In hindsight, I probably should've mentioned that the reason I reported this in the first place was because I wanted to know what mod was changing the turret recipe to use a submachine gun, and the prototype history was supremely unhelpful in this regard; I guess I just assumed that it would be obvious that the turret recipe in the screenshot wasn't the vanilla recipe.
If you want to get ahold of me I'm almost always on Discord.
-
- Long Handed Inserter
- Posts: 66
- Joined: Thu Jun 01, 2017 6:52 pm
- Contact:
Re: [0.18.24] Recipe prototype history shows wrong mods.
...Okay, so it turns out that Angel's Exploration sets up the recipe change through a utility function and then never actually tells those changes to execute, leaving them sitting in a table until the next Angel's mod happens to call the execute function, which just so happens to be petrochem. So this is, in fact, the fault of Angel's Exploration for not calling angelsmods.functions.OV.execute(). My bad; I had thought the OV.patch_recipes() function directly modified data.raw, but I must have been confusing it for RB.patch() (which OV.execute() calls).Rseding91 wrote: Sat May 16, 2020 12:03 amangelspetrochem is the one that makes those changes.MageKing17 wrote: Fri May 15, 2020 8:35 pmThen why isn't the one mod that very definitely actively changes the recipe (Angel's Exploration, which is replacing the iron gear wheels with the submachine gun and halving the copper plates) not listed?Rseding91 wrote: Fri May 15, 2020 5:59 pm So both mods are changing recipes around to zero end effect but because they change how the definition is ordered they get marked as changing things.For that matter, why are the fields returning in different orders anyway, and this then counting as a modification?
EDIT: In hindsight, I probably should've mentioned that the reason I reported this in the first place was because I wanted to know what mod was changing the turret recipe to use a submachine gun, and the prototype history was supremely unhelpful in this regard; I guess I just assumed that it would be obvious that the turret recipe in the screenshot wasn't the vanilla recipe.
Indeed, if I add an OV.execute() call to angelsexploration's data-updates.lua, the prototype history correctly shows that the recipe was modified by exploration instead of petrochem. I'll make sure to report this in the correct place: the Angel's mods subforum.