Modifying an accumulator?

Place to get help with not working mods / modding interface.
Post Reply
twinotter
Burner Inserter
Burner Inserter
Posts: 9
Joined: Thu Apr 27, 2017 5:42 pm
Contact:

Modifying an accumulator?

Post by twinotter »

Hi,

I'm developing a scenerio where the inside of a vehicle is a buildable space. This is based on the Comfy scenerio Mountain_Fortress_v3 and imports much of the code from there.

I'm trying to create an electrical interface between the inside of the car's buildable space and the outside surface.

I can do this with two accumulators: A neutral one inside the car and a player placeable one outside the car. I use an on_tick function to transfer power directly with the accumular.energy variable.

But I'm still limited to the speed which the accumulator can charge and deliver its charge: 300kW. The system doesn't let me change .electric_input_flow_limit and .electric_output_flow_limit on the entities.

How can I transfer power between two different surfaces?

Thanks!

User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 2247
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: Modifying an accumulator?

Post by boskid »

if you want to stick to soft modding then there are not a lot options, you may use electric-energy-interface and make it not operable so its gui does not open and then use electric_buffer_size to make a larger buffer than regular accumulator would have.

twinotter
Burner Inserter
Burner Inserter
Posts: 9
Joined: Thu Apr 27, 2017 5:42 pm
Contact:

Re: Modifying an accumulator?

Post by twinotter »

will electric-energy-interface work as an accumulator if you set both and electric_input_flow_limit and electric_output_flow_limit? I don't want to give the player free-electricity. Just transfer it.

While we're here, what's the thinking between soft mods and (hard?) mods? Is the danger that there's a security problem?

User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 2247
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: Modifying an accumulator?

Post by boskid »

twinotter wrote:
Sat Oct 24, 2020 10:11 pm
I don't want to give the player free-electricity. Just transfer it.
If you set power_production and power_usage to 0 then it will work just as an accumulator
twinotter wrote:
Sat Oct 24, 2020 10:11 pm
While we're here, what's the thinking between soft mods and (hard?) mods? Is the danger that there's a security problem?
No, soft mod is just reusing vanilla prototypes and doing all the changes only with control.lua inside of a save file while normal modding can also add its own graphics and add/change prototypes. First one does not require to install any mods as the control.lua of a save file is downloaded with the map itself when players join MP.

Post Reply

Return to “Modding help”