Laptop battery

This is the place to request new mods or give ideas about what could be done.
Post Reply
Airat9000
Smart Inserter
Smart Inserter
Posts: 1418
Joined: Fri Mar 28, 2014 12:32 am
Contact:

Laptop battery

Post by Airat9000 »

it would be great if somebody made a portable battery, ie the electricity that is produced from all generation (solar, diesel generators) and accumulated in acummulator shove in the batteries, and then the right moment to take them out and convert into electricity at special device

было бы здорово если бы кто нибудь сделал портативные батареи, то есть электричество, что получается от разных генерации (солнце, дизель генераты) и копится в acummulator засовывать в батарейки и потом нужном моменте вынимать их и превращать в электричество, в спец устройства

User avatar
bigyihsuan
Filter Inserter
Filter Inserter
Posts: 299
Joined: Thu Jan 01, 2015 12:57 pm
Contact:

Re: Laptop battery

Post by bigyihsuan »

So a rechargable, movable Accumulator?

You're better off just connecting everything to the same electric network. I'm not even sure if you can even store electricity in items in your inventory yet.

Airat9000
Smart Inserter
Smart Inserter
Posts: 1418
Joined: Fri Mar 28, 2014 12:32 am
Contact:

Re: Laptop battery

Post by Airat9000 »

bigyihsuan wrote:So a rechargable, movable Accumulator?

You're better off just connecting everything to the same electric network. I'm not even sure if you can even store electricity in items in your inventory yet.
not understand me

idea electricity in convert to battery
and battery - convert electricity

kevsgrove
Manual Inserter
Manual Inserter
Posts: 4
Joined: Sun Jul 24, 2016 1:51 am
Contact:

Re: Laptop battery

Post by kevsgrove »

If I understand correctly what he's requesting, I may have a use case.

When doing the lazy bastard achievement, I wanted to get power armor mk2, but didn't have enough artifacts. I brought all the ingredients with me, as well as a solar panel and an assembler. When I got enough artifacts, plopped down the panel, assembler, and a pole, and crafted it.

I think the most sensible solution would just be to make it so that accumulators store their charge when picked up, though I'm not sure this is possible. I'll take a look and see what can be done.

thomasross
Manual Inserter
Manual Inserter
Posts: 2
Joined: Mon Jun 20, 2016 4:08 am
Contact:

Re: Laptop battery

Post by thomasross »

kevsgrove wrote:I think the most sensible solution would just be to make it so that accumulators store their charge when picked up, though I'm not sure this is possible. I'll take a look and see what can be done.
If there's no 'standard' way of doing it, you can do the hack-y way that Factorissimo uses to store factory contents -- Modify the health of the item before it is picked up and use that as a unique identifier:

Code: Select all

 -- Workaround to not really being able to store information in a deconstructed entity:
 -- I store the factory information in the factory item by modifying its health value right before it is picked up, and storing all relevant
 -- information in a global table indexed by the new unique health value (including the factory's actual health). When the damaged factory item is
 -- placed down again, I look for its health value in the table and retrieve the information from there, restoring its name, health,
 -- stored energy, and most importantly the link to the surface acting as its interior.
 -- This has the neat side effect of making initialized factories non-stackable.
 -- However things may break a little if some other mod has the bright idea of changing health values of my items,
 -- or aborting factory deconstruction, or, well, you get the point.
(Taken from control.lua, line 465: https://github.com/MagmaMcFry/Factoriss ... l.lua#L465)

Airat9000
Smart Inserter
Smart Inserter
Posts: 1418
Joined: Fri Mar 28, 2014 12:32 am
Contact:

Re: Laptop battery

Post by Airat9000 »

:? example

:D
Attachments
пример-для-факторио.gif
пример-для-факторио.gif (59.54 KiB) Viewed 3224 times

User avatar
Goufalite
Manual Inserter
Manual Inserter
Posts: 4
Joined: Tue Oct 11, 2016 8:05 am
Contact:

Re: Laptop battery

Post by Goufalite »

Seconded, and I have a use case :

When I have found the train research, I build a green circuit outpost factory because it is a HUGE demand ! It only requires iron and copper, but I want it to be autonomous on energy, thus using the combo solar panel/accumulator.

Solar panel are very expensive to produce (15 green circuits and steel bars), but hey! I am on a standalone green circuit factory! So I'll just use my output to build solar panel directly on the outpost. Oh wait, energy...

The idea is to use the train to ship portable energy from my main base to the outpost, during the time I need to build enough solar panels!

Picture expanded on Airat9000's concept :
Image
I used the armor battery as model but it can be anything else or a new object.

With this schema the accumulator should have 3 switchable states :

- standard accumulator (no reciepe)
- battery charger (input : empty battery)
- battery consumer (input : full battery)

There could also be a possibility for the accumulator to have a unique state and behave directly on what is in the input slot. For example if the accumulator is not full, a full battery will instantly give it 100% charge. It will then be at the player's discretion to provide the full battery at a specific moment by monitoring the accumulator's charge with the brand new circuit network system!

Yinan
Fast Inserter
Fast Inserter
Posts: 130
Joined: Sun Feb 14, 2016 2:40 pm
Contact:

Re: Laptop battery

Post by Yinan »

You might as well just use big power poles instead of the railroad way to connect the green circuit factory with the other factory where energy is produced.

Post Reply

Return to “Ideas and Requests For Mods”