Induction Charging

by Raeon
Power your equipment grid whilst in range of power poles, albeit at a price.
10 months ago
0.15 - 0.16
11057
Owner: Raeon
Source: raeon/Induction_Charging
Homepage: https://github.com/raeon/Induction_Charging
License: MIT
Created: 1 year, 6 months ago
Latest Version: 1.5.14 (10 months ago)
Factorio version: 0.15 - 0.16
Downloaded: 11057 times

Induction Charging

Are you tired of running around with solar panels for a long time until you can unlock those precious portable fusion reactors? Or did you perhaps ever wish you could just charge your power armor from your electricity network?
Then this mod is for you!

Features

Induction Charging adds five tiers of research, from early game to endgame. With the first tier you unlock the Induction Coil recipe, which is the only thing you will need to craft. The coil has 1x1 dimensions but very little throughput on its own. You need to have batteries in your equipment grid for the induction coils to charge; otherwise you will not receive power. From there on out you can just research the next tiers to get improved throughput and efficiency!

Did I mention they also work in vehicle grids (provided you have a mod installed that adds those)? They do! If you combine this mod with the Electric Vehicles mod by Semaphor & leoch, then you can use Induction Coils inside the vehicles equipment grid to power your vehicles! Or, if you only want to charge the equipment grid and not necessarily power the vehicles themselves, then you can just use the Vehicle Grid mod by Optera to get equipment grids on your vehicles! Not to mention that if you ever feel like you need denser energy storage, then you can also throw in the Bigger Batteries mod in there!

Review

Xterminator was kind enough to review my mod! I don't think it's possible for me to embed the video here, but you can follow this link to watch the video: Factorio Mod Spotlight - Induction Charging. Thanks Xterminator!

Research

The research tiers are currently balanced as follows:

Description Tier 1 Tier 2 Tier 3 Tier 4 Tier 5
Throughput 15 kW 30 kW 60 kW 120 kW 240 kW
Efficiency 10% 20% 30% 40% 50%
Usage from grid 150kW 150kW 200kW 300kW 480kW

Note that in vanilla Factorio, the Fusion Reactor provides a throughput of 750kW / 16 = 47kW per tile.

Throughput multiplier

Since throwing in a few tiny coils left and right at random places is inefficient, it also is in this mod. The coils in your equipment grid will be given a color based on their throughput multiplier. To calculate the multiplier for any given coil, apply the following formula:

Description Assigned score
Base score 0.50
Per adjacent coil 0.05
Per adjacent coil that is entirely surrounded by coils 0.12

Take the sum of the scores you get for the coil, and you have the throughput multiplier for that coil. Multiply (your current technology tier)'s base throughput with the throughput multiplier you just calculated to get the effective throughput. This means it IS possible to get throughput higher than might initially seem possible. On default settings, the maximum is 0.5 + (8 * 0.05) + (8 * 0.12) = 1.86, so almost twice as much throughput as advertised! It's currently balanced so that a 4x4 grid of coils averages exactly 100%; anything more than that will go higher. Note again that the multiplier only affects the 'throughput' metric. Costs will scale up accordingly, and efficiency will stay the same.

Usage

Using the mod is as easy as inserting the induction coil into your power armor grid, and you're done! Now, whenever you stand within range of power poles, the induction coils will automatically charge the batteries in your equipment grid. Do note however that it comes at a price! Per the technology tiers table above, we can see that on Tier 1 you will only have 10% efficiency. This means that (at Tier 1) with a single coil you will drain 15kW (base throughput per coil) * 0.5 (coil throughput multiplier) / 10% (efficiency) = 75kW from your power grid, but will only charge your batteries for 75kW * 10% (efficiency) = 7.5kW. The rest is lost to the inefficiency of wireless power transfer.

Optimisation

If you're short on UPS and you'd like to get as much as you can, then you can change the mod settings (Options > Mods > Map > Induction Charging) to update less frequently. Here you can change either Update every ... ticks or Update GUI every ... updates. The former can be increased to 30 or even 60 without too much of a noticable impact. However, if you are actually short on UPS, then I recommend you increase the GUI update setting to a higher value. Updating the GUI is (somehow) the most expensive operation, whereas the regular mod update should be virtually unnoticable in your UPS.

Additional configuration

Several balancing considerations have been made when it comes to this mod. There are currently three gameplay related settings that can be changed from within the game. I strongly believe the mod is balanced as-is, and therefore do not recommend you change these settings unless you know what you're doing. If you feel that this mod isn't as overpowered as it should be, or you think it is too overpowered, then you can change the coil score calculation numbers mentioned earlier under Efficiency in the options menu: Options > Mods > Map > Induction Charging.

Feature / Change request

I'd love to hear your feedback! If you have some, or you would like to see a new functionality added, then please use the discussion page! I'm looking forward to reading what your thoughts are.

Credits

The following people can be found on the Factorio Discord server.

First, hats off to the amazing person by the name of IronCartographer. He's contibuted tons and tons to the development of this mod, from bringing ideas to the table, to balancing or helping me debug it. Be sure to thank him when you see him around!

Then, a big shoutout to the awesome people who helped me a lot with modding:
- Nexela
- Rseding91
- Bilka - Helpful Wiki Admin
- Gangsir - Head Wiki Admin

And last but not least the people who helped me here and there with small contributions:
- drch
- Rivers
- unique_2
- Rhamphoryncus
- Cruus
- JustTom
- FrozenCorgi

Let me know if I forgot you!

Changelog

Version Notes
1.5.14 Removed forgotten debug message.
1.5.13 Fixed crash when interacting with equipment grids per 0.16.40 update.
1.5.12 Fixed technology research effects not being displayed.
1.5.11 Fixed incompatability from 0.16.25 onwards related to incorrect player detection.
1.5.10 Fixed incomplete validity check before deleting old GUI during model migrations.
1.5.9 Fixed crash when placing any vehicle.
1.5.8 Minor locale changes to be clearer and more in line with the mod description page.
1.5.7 Updated for 0.16 and fixed GUI not hiding when un-equipping power armor.
1.5.6 Fixed accidental dependency on Bob's mods.
1.5.5 Fixed incompatability with different types of equipment grids. You should now be able to place induction coils in vehicles added by Bob's mods.
1.5.4 Extended the changes of v1.5.3 to also apply to vehicles being driven by players.
1.5.3 Added automatic disabling of charging whilst the user has any form of power pole selected in order to prevent Factorio from having glitchy behaviour when placing rows of power poles.
1.5.2 Removed 10MJ charge capacity from induction coils, and released a separate mod to address power storage capacity concerns here: the Bigger Batteries mod!
1.5.1 Changed mod description.
1.5.0 Removed more logging messages (really?). Fixed GUI to be visible by default, and reduced GUI size from 5 lines to 3. Induction coils now have 10MJ of stored energy (included in GUI), and the recipe is changed to produce 2 induction coils, and now also costs a MK1 equipment battery.
1.4.2 Removed logging messages (again.. whoops), changed default hotkey for toggling the GUI to "i", and fixed bug when entity is unexpectedly invalidated (namely when using the Vehicle Wagon mod)
1.4.1 Changed default hotkey for toggling the GUI to U, and fixed 1.4.0 migrations not running.
1.4.0 Added hotkey to toggle GUI visibility (default key: F) and fixed bug where GUI would remain visible when equipped power armor was destroyed without the player dying.
1.3.7 Fixed accidentally recursive structure causing stack overflow during save file load when using a large amount of induction coils in a single equipment grid.
1.3.6 Fixed another crash related to code execution order.
1.3.5 Fixed crash related to code execution order.
1.3.4 Fixed several crashes related to userdata invalidation. This fixes the crash when using the Vehicle Wagon mod.
1.3.3 Fixed crash when loading game after the installed mods changed, removed unused startup settings
1.3.2 Fixed error when creating new game
1.3.1 Minor code cleanup and removed background logging
1.3.0 Added support for vehicle equipment grids
1.2.4 Fixed bug where the first research does not unlock 10% efficiency
1.2.3 Removed debugging code
1.2.2 Drastic overhaul of the mod. Added research tiers, multiple coils with throughput calculations. Also updated the mod portal page.
1.1.0 Added global state and (hopefully) full multiplayer support
1.0.1 Fixed technology recipe
1.0.0 Initial release