Hey there,
Was looking into doing this myself but I have no modding experience what so ever... ended up finding the task too daunting especially when what I want to ask probably takes no time at all for an experienced modder to set up.
Returned to Factorio after about 5-6 months of playing other games and found that the Gun Turrets had become quite a bit more expensive to build. Or perhaps they always had that cost and I've just forgotten?
Either way, I wanted to ask if it might be possible for someone to whip up a mod that removes the need for copper and lowers the amount of iron plates needed to craft them?
Now, I don't mean to make it sound as if modding is easy by saying that I think it'd be a walk in the park to put something together that merely alters the resource amount of Gun Turrets. So please don't take it in that way, you modders are fantastic and I sure as hell don't have the skill or patience to do what you guys do.
Would really appreciate if someone could make this happen as I find the cost of turrets being quite a bit too high when adding in resource costs for ammunition, loaders and belts to ferry the stuff around.
Thanks in advance for any help you can provide!
//"Meade"
Small Mod For Turrets
Re: Small Mod For Turrets
The changing of some recipe is really easy mod. Can you write which ingredients are you want and amount of them for one gun turret.
Do you want to make it by yourself?
Do you want to make it by yourself?
Re: Small Mod For Turrets
Well... I would like to be able to write easy mods like that but I have no experience as I said.
No idea how or what to write in terms of code. I tried learning by looking at the setup of another mod I have which lowers the cost of landfill but I think they just changed the amount of landfill given from 1 to 20.
Hence it didn't have what I would've needed to re-write it.
No idea how or what to write in terms of code. I tried learning by looking at the setup of another mod I have which lowers the cost of landfill but I think they just changed the amount of landfill given from 1 to 20.
Hence it didn't have what I would've needed to re-write it.
Re: Small Mod For Turrets
It's not so complicated. Vanilla code is table OR just parameters:Meade wrote: ↑Tue Oct 30, 2018 2:51 pmWell... I would like to be able to write easy mods like that but I have no experience as I said.
No idea how or what to write in terms of code. I tried learning by looking at the setup of another mod I have which lowers the cost of landfill but I think they just changed the amount of landfill given from 1 to 20.
Hence it didn't have what I would've needed to re-write it.
Table:
Code: Select all
data:extend({
{
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
data.raw.recipe["gun-turret"].type = "recipe"
data.raw.recipe["gun-turret"].name = "gun-turret"
data.raw.recipe["gun-turret"].enabled = false
data.raw.recipe["gun-turret"].energy_required = 8
data.raw.recipe["gun-turret"].ingredients[1][1] = "iron-gear-wheel"
data.raw.recipe["gun-turret"].ingredients[1][2] = 10
data.raw.recipe["gun-turret"].ingredients[2][1] = "copper-plate"
data.raw.recipe["gun-turret"].ingredients[2][2] = 10
data.raw.recipe["gun-turret"].ingredients[3][1] = "iron-plate"
data.raw.recipe["gun-turret"].ingredients[3][2] = 20
data.raw.recipe["gun-turret"].result = "gun-turret"
You can change this recipe just so:
Code: Select all
data.raw.recipe["gun-turret"].ingredients =
{
{"iron-gear-wheel", 10},
{"iron-plate", 20}
}
Setup info.json (just take it from another mod and change mod name, version, author and mod description).
For mod MyTestMod you are need folder with the name MyTestMod_0.0.1, place there file info.json with this content:
Code: Select all
{
"name": "MyTestMod",
"version": "0.0.1",
"title": "My Test Mod",
"author": "Author Name",
"description": "I want to test new features",
"dependencies": ["base"],
"factorio_version": "0.16"
}
Re: Small Mod For Turrets
Thanks for setting up this mod Darkfrei and the information you provided, really appreciate it!
Re: Small Mod For Turrets
You can get whole data.lua table with this mod: viewtopic.php?f=135&t=45107
If you want to change only one parameter, then enough:
Code: Select all
data.raw.recipe["gun-turret"].ingredients[1][2] = 1