Is your feature request related to a problem? Please describe.
Batteries in this game are a little abstract at the moment. I find that kind of annoying and would like to propose an overhaul of the battery system. The major problems I currently see are as follows:
After doing some research, it turns out that tools that run off of batteries can be modded to accept magazines with no extra C++ code whatsoever. I've created this mod as a proof of concept:
Describe the solution you'd like
All battery powered tools should be converted to run off of magazines rather than raw batteries. My proposal involves three types:
Describe alternatives you've considered
The battery system works well enough right now, but it's kind of silly. Since it seems like all we would need is some JSON for the lion's share of this proposal to work, this might not be as hard as you'd think.
Additional context
MagazineFlashlight.zip
Additionally, this is a link for a comparison from my branch to the master branch.
Risks and Challenges
While code-wise, this may not be too challenging, this proposal has a number of problems I haven't actually worked out yet.
It would be neat if we could also have battery mods to convert any of the 3 types to run off of batteries from any other type.
Car batteries already function very sensibly and are used in real life to power stuff other than cars, so I would probably leave them as they are. However, I agree with the rest. Right now batteries seem to function as individual "energy units" that aren't actually contained by anything-- and while realism shouldn't affect gameplay, it is honestly pretty weird how they work right now. Changing batteries into magazines that contain individual energy units makes a lot more sense, and I don't think would create significant micromanaging by making it more sensible.
I'd go for standard bartery sizes instead of abstract names. https://en.m.wikipedia.org/wiki/List_of_battery_sizes
My own opinion is the the battery system should differentiate between the different classes of batteries in use:
Since the game is set in the near future it would be reasonable to assume primary batteries are now rare, so all devices should be rechargeable without any kind of mod, either directly or by unloading the batteries in to a battery charger, even in the case of finding a rare device that uses primary batteries almost all of these will accept a secondary battery without problem.
As for the different types of removable batteries simplifying them in to three categories would make sense, using real battery types would be extremely unwieldy since there are at least a dozen in common usage, not including custom batteries common in laptops and power tools.
To make things a bit more realistic batteries could degrade over time and with recharge cycles, most batteries will self-discharge within a few years depending on the chemistry and can only be recharged a certain number of times before their maximum capacity starts to drop to unusable levels.
A quick update before I respond to Chryseus: I've decided that since so much of this can be done with JSON, and trying to migrate existing saves over to a new system would be very complex, this can and should be done first as an optional JSON mod.
Now, getting to Chryseus. I don't feel that battery degradation is in scope for what I'm doing here. Since so much of what I want is JSON right now, no new C++ code will be applied for now.
As for batteries built into devices, I'm going to make an executive decision and say that since most battery-powered devices in this game have user-swappable batteries, humanity decided that's how it should be in the future. (Cell phones in game already have user-swappable batteries, while high-end smartphones require a UPS) To be frank, if batteries are standardized to the degree that they seem to be in this game, there's no reason _not_ to have the ability for anyone to just swap them out.
I'm using this as my compatibility chart for the mod. I am not an electrical engineer. I am a computer science major, so these numbers are balanced for what I feel would make good gameplay and a smooth transition for now.

This all sounds pretty good. I might suggest for the existing save problem that you just leave the old batteries as-is overall, but remove them from spawn lists and such.
That way legacy games would have their weird battery-liquid items still around and usable (no vanishing stockpiles), but they would slowly be used up and eventually the player would have to switch over to the new batteries, and as the player moved into new areas or collected monster drops, he'd find the new batteries popping up to fill the gap.
This is a good oportunity to turn the UPS and atomic variants into battery variants instead of an item variant. That would also deprecate UPS mods