Modding Accumulators
-
- Manual Inserter
- Posts: 2
- Joined: Fri Apr 28, 2017 1:40 am
- Contact:
Modding Accumulators
Apologies, this is a super basic question but I know basically nothing about modding or the lua language. All I am looking to do is buff accumulators. Ideally I would like each basic accumulator to store 50 GJ rather than 5 MJ and also I would like accumulators to charge/discharge x10 faster than normal. I've messed around with the syntax and I managed to get the game not to crash when I run it but whatever garbage code I'm putting in isn't doing anything. I figured rather than suffer trying to make this work one of you would be able to give me the lines of code I need to add with little to no effort.
- Ranakastrasz
- Smart Inserter
- Posts: 2179
- Joined: Thu Jun 12, 2014 3:05 am
- Contact:
Re: Modding Accumulators
Zip your current mod and attach it please. I would prefer to.help you learn instead of just doing it.
My Mods:
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
-
- Manual Inserter
- Posts: 2
- Joined: Fri Apr 28, 2017 1:40 am
- Contact:
Re: Modding Accumulators
Someone on reddit responded to me but the issue was that I was missing the bolded pieces of information in the text below:
data.raw["accumulator"]["accumulator"].energy_source.buffer_capacity = "50GJ"
data.raw["accumulator"]["accumulator"].energy_source.input_flow_limit = "500MW"
data.raw["accumulator"]["accumulator"].energy_source.output_flow_limit = "500MW"
I knew that it was going to be something simple like that. In the future, do you know of a good resource I can refer to if I want to make any other changes like this? Thanks for volunteering to help.
data.raw["accumulator"]["accumulator"].energy_source.buffer_capacity = "50GJ"
data.raw["accumulator"]["accumulator"].energy_source.input_flow_limit = "500MW"
data.raw["accumulator"]["accumulator"].energy_source.output_flow_limit = "500MW"
I knew that it was going to be something simple like that. In the future, do you know of a good resource I can refer to if I want to make any other changes like this? Thanks for volunteering to help.
- Ranakastrasz
- Smart Inserter
- Posts: 2179
- Joined: Thu Jun 12, 2014 3:05 am
- Contact:
Re: Modding Accumulators
Well, generally, looking at the factorio data-files is enough.
the first accumulator is the "Type".
the second accumulator is the name.
.energy_source is the sub-tablenamed energy_source
buffer_capacity is a variable in the subtable.
data.raw indicates the game's base database, holding all of the objects the game has.data.raw["accumulator"]["accumulator"].energy_source.buffer_capacity = "50GJ"
the first accumulator is the "Type".
the second accumulator is the name.
.energy_source is the sub-tablenamed energy_source
buffer_capacity is a variable in the subtable.
My Mods:
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16