How to change other mod's research?
Posted: Wed Aug 10, 2022 11:49 pm
I have been developing a mod to modify bob's adjustable inserters mod to make the tier two technologies go after Logistics 2 instead of Logistics 3, as it is more useful then. This is my first time using the Lua language. I made it dependent on bob's inserters to have my code override it, made the data and info files, and made a file where I copied the bob's inserters technology file's tier 2 research, and changed them to only red and green science, and have Logistics 2 instead of 3 as a prerequisite. However, in game, it doesn't do anything. Here's all my (janky) code:
Data:
Info:
My technology code:
the file tree:
zip file
|main file
||prototypes
|||technology
||changelog
||data
||info
||thumbnail
How could I change it to work? am I missing something? I didn't really understand the mod tutorial page on the wiki. I saw something about a control document, but I don't understand it.
the mod portal link:
https://mods.factorio.com/mod/BobInsert ... 2-Research
Source code:
https://github.com/SesameSlayer/Bob-Ins ... ource-code
Data:
Code: Select all
require("prototypes.technology")
Info:
Code: Select all
{
"name": "BobInserters-Early-T2-Research",
"version": "0.1.3",
"title": "Bob Inserters Earlier T2 Research",
"author": "Sesame_Slayer",
"factorio_version": "1.1",
"dependencies": ["base >= 1.1", "bobinserters >= 1.1.5"],
"description": "Makes the long inserters and more inserters tier 2 researches from Bob's Adjustable Inserters line up with Logistics 2 instead of logistics 3, as at logistics 3 it is no longer needed. Report bugs on the mod portal."
}
My technology code:
Code: Select all
if settings.startup["bobmods-inserters-long2"].value == true and not data.raw.technology["long-inserters-2"] then
data:extend(
{
{
type = "technology",
name = "long-inserters-2",
icon = "__bobinserters__/graphics/icons/technology/long-inserters.png",
icon_size = 128,
effects =
{
},
prerequisites =
{
"long-inserters-1",
"logistics-2",
},
unit =
{
count = 50,
ingredients =
{
{"automation-science-pack", 1},
{"logistic-science-pack", 1},
},
time = 10
},
order = "a-f-a-2",
},
}
)
end
if settings.startup["bobmods-inserters-more2"].value == true and not data.raw.technology["more-inserters-2"] then
data:extend(
{
{
type = "technology",
name = "more-inserters-2",
icon = "__bobinserters__/graphics/icons/technology/more-inserters.png",
icon_size = 128,
effects =
{
},
prerequisites =
{
"more-inserters-1",
"logistics-2",
},
unit =
{
count = 50,
ingredients =
{
{"automation-science-pack", 1},
{"logistic-science-pack", 1},
},
time = 10
},
order = "a-f-c-2",
},
}
)
end
zip file
|main file
||prototypes
|||technology
||changelog
||data
||info
||thumbnail
How could I change it to work? am I missing something? I didn't really understand the mod tutorial page on the wiki. I saw something about a control document, but I don't understand it.
the mod portal link:
https://mods.factorio.com/mod/BobInsert ... 2-Research
Source code:
https://github.com/SesameSlayer/Bob-Ins ... ource-code