I have a problem, and i have no idea how to fix it. The game says that for my technology, it wants a normal.recipe member (i think that's what you call it) of my technology. However, the normal Member (which i deliberately set to nil after copying Processing Unit's technology) doesn't have any recipe property attached to it, according to the API docs. I try adding it and it brings a new error, that i tried to index a nil value: nil.recipe
Here is the error:
Failed to load mods: Error while loading technology prototype "bmd:computing" (Technology): Difficulty normal: Key "recipe" not found in property tree at ROOT.technology.bmd:computing.effects[0]
Modifications: Bigger Mining Drills
Mods to be disabled:
BiggerMiningDrills (0.1.0)
BiggerMiningDrills is the name of my mod, which is version 0.1.0. (Initial Release once uploaded to Mod Portal)
Luckily, my mod now prints the contents of the "bmd:computing" Technology in the log file:
{
effects = {
{
name = "bmd:computing-unit",
type = "unlock-recipe"
},
{
name = "bmd:advanced-computing-unit",
type = "unlock-recipe"
}
},
icon = "__base__/graphics/technology/advanced-electronics-2.png",
icon_mipmaps = 4,
icon_size = 256,
name = "bmd:computing",
order = "a-d-c",
prerequisites = {
"advanced-electronics-2",
"chemical-science-pack",
"bmd:steel-bending",
"laser-turret"
},
type = "technology",
unit = {
count = 175,
ingredients = {
{
"automation-science-pack",
3
},
{
"logistic-science-pack",
2
},
{
"chemical-science-pack",
2
}
},
time = 45
}
}
Error! (Fixed)
-
- Long Handed Inserter
- Posts: 76
- Joined: Mon Jan 15, 2024 10:10 pm
- Contact:
Error! (Fixed)
- Attachments
-
- factorio-current.log
- Factorio Log from the error.
- (4.73 KiB) Downloaded 28 times
Last edited by BraveCaperCat on Mon Jan 15, 2024 11:01 pm, edited 1 time in total.
Re: Error!
The error message means that the "effects" property of your new technology requires a property with the key "recipe" (see here) that it couldn't find. Now look again at your definition:BraveCaperCat wrote: ↑Mon Jan 15, 2024 10:20 pmFailed to load mods: Error while loading technology prototype "bmd:computing" (Technology): Difficulty normal: Key "recipe" not found in property tree at ROOT.technology.bmd:computing.effects[0]
Modifications: Bigger Mining Drills
Code: Select all
{
effects = {
{
name = "bmd:computing-unit",
type = "unlock-recipe"
},
{
name = "bmd:advanced-computing-unit",
type = "unlock-recipe"
}
},
…
}
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!
-
- Long Handed Inserter
- Posts: 76
- Joined: Mon Jan 15, 2024 10:10 pm
- Contact:
Re: Error!
That feels so obvious now.