Modding Accumulators

Place to get help with not working mods / modding interface.
archbishopjabber
Manual Inserter
Manual Inserter
Posts: 2
Joined: Fri Apr 28, 2017 1:40 am
Contact:

Modding Accumulators

Post by archbishopjabber »

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.
User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2905
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: Modding Accumulators

Post by darkfrei »

What exactly you done?
User avatar
Ranakastrasz
Smart Inserter
Smart Inserter
Posts: 2179
Joined: Thu Jun 12, 2014 3:05 am
Contact:

Re: Modding Accumulators

Post by Ranakastrasz »

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
archbishopjabber
Manual Inserter
Manual Inserter
Posts: 2
Joined: Fri Apr 28, 2017 1:40 am
Contact:

Re: Modding Accumulators

Post by archbishopjabber »

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.
User avatar
Ranakastrasz
Smart Inserter
Smart Inserter
Posts: 2179
Joined: Thu Jun 12, 2014 3:05 am
Contact:

Re: Modding Accumulators

Post by Ranakastrasz »

Well, generally, looking at the factorio data-files is enough.
data.raw["accumulator"]["accumulator"].energy_source.buffer_capacity = "50GJ"
data.raw indicates the game's base database, holding all of the objects the game has.
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
Post Reply

Return to “Modding help”