Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign up[READY] Battery overhaul 2 electric boogaloo #29651
Conversation
Inglonias
added some commits
Dec 27, 2018
ifreund
added
[JSON]
Battery / UPS
Magazines
Mods
Game: Mechanics Change
labels
Apr 16, 2019
This comment has been minimized.
This comment has been minimized.
|
This comment has been minimized.
This comment has been minimized.
|
I like the sound of this, seems pretty well thought out, though it sounds like light and light minus type batteries shouldn't have the RECHARGE flag. I think they should remain the "disposable" type batteries. There's also the possibility of a disposable variant of the medium size battery, to model D/9V/Lantern batteries. Sounds like the legacy batteries should still be reloadable by default, so those with ongoing games will be able to use up their legacy batteries without requiring the mod for a while. |
This comment has been minimized.
This comment has been minimized.
|
So, let's say I have a soldering iron and three batteries (assuming it uses medium ones, irrelevant here) for it, medium(13), medium(24) and medium(7). Will I be able to craft a recipe that needs soldering iron (40 charges) under the current implementation? Logically, I should be able to, and preferably without manually clicking the tool reload button twice. |
This comment has been minimized.
This comment has been minimized.
Incremental charge consumption is coming up next in #29210 and will make that possible. |
This comment has been minimized.
This comment has been minimized.
This is incorrect. You will need the mod immediately to use your legacy batteries. |
This comment has been minimized.
This comment has been minimized.
...I don't actually know what the recharge flag does.
I guess the UPS is just a really fancy extra battery pack in this new system. Isn't that what it was before anyhow? |
This comment has been minimized.
This comment has been minimized.
I'm saying you should make it that way. People shouldn't be able to obtain more legacy batteries, but anyone with an ongoing save will likely have a bunch in storage and lots more lying around in houses and such. If you make it so the batteries can be loaded but not unloaded, then it can't be exploited, and anyone with an existing save is covered without needing to download a mod. Tl:Dr Legacy batteries need "NO_UNLOAD" but should not have "NO_RELOAD". Then you don't need the mod. |
This comment has been minimized.
This comment has been minimized.
Human-Shield
commented
Apr 17, 2019
|
Magazines are a good concept. It would be great if "charge units" were real world measures like kwh and scale with vehicle power. Does the car battery mod still work for tools? Need a way to charge without a UPS, should be doable with copper wires if you need to transfer charges over time between magazines (with % lost). |
This comment has been minimized.
This comment has been minimized.
|
Car battery mod should still work, yes. One unit of battery already represents 1 kJ of energy. Charging without a ups might require new C++ code, which I don't think is in scope. |
This comment has been minimized.
This comment has been minimized.
|
Good idea @Vasyan2006 but IMHO for a separate PR. This one is plenty big already. |
This comment has been minimized.
This comment has been minimized.
|
I agree. Those are definitely things to look at for a rebalance later. Not for this PR, though. |
This comment has been minimized.
This comment has been minimized.
paulenka-aleh
commented
Apr 24, 2019
|
If smartphones are going to have 30 charges their battery consumption should be revised too. I have 2500mAh battery and able to surf internet for 4 hours without caring about power saving. In-game cellphone on-screen flashlight uses up 10 charges every 30 minutes. I suppose it's valid for all the other tools. |
This comment has been minimized.
This comment has been minimized.
One thing to note is that the game happens in 2050, from now until them the battery tech could have advanced. |
This comment has been minimized.
This comment has been minimized.
I'm not going to use that as an argument. Currently, batteries are balanced around lighter tools having roughly 100 charges and I'm not going to mess with that in this PR. If someone wants to implement Vasyan's numbers later in a balance pass, great. I'll happily help them if they need it. For now, I'm not going to affect balance that much if I can avoid it. |
This comment has been minimized.
This comment has been minimized.
No, it's not. Actually it's present time, maybe plus-minus a few years. |
kevingranade
merged commit 3565150
into
CleverRaven:master
Apr 26, 2019
Inglonias
referenced this pull request
Apr 26, 2019
Closed
Hydroponics and Modular Turrets mods cause errors related to an apparently missing item, 'lightstrip_dead' #29950
This comment has been minimized.
This comment has been minimized.
adamkad1
commented
Apr 26, 2019
|
plutonium cells stay as normal? |
This comment has been minimized.
This comment has been minimized.
|
UPS mod can't be attached to pre-patch tools. Is this deserves issue? |
This comment has been minimized.
This comment has been minimized.
|
Ok now my survivor headlamp doesn't consume batteries but works, cool. |
This was referenced Apr 27, 2019
This comment has been minimized.
This comment has been minimized.
adamkad1
commented
Apr 28, 2019
|
you know, this should probally be a separate mod untill everything is done, because its way more work than they think it is |
This comment has been minimized.
This comment has been minimized.
|
It's not a good idea for project to present feature that will be mainlined eventually in form of a mod. People might not be wanting to activate this mod, so we don't get a feedback for new mechanics. |
This comment has been minimized.
This comment has been minimized.
adamkad1
commented
Apr 28, 2019
•
|
there is? where? Also you should buff ups charger, its PATHETIC and since everything is gonna use it now... |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was not one but TWO threads on Reddit asking for review. If you wanted to test it, you had every opportunuty. |
This comment has been minimized.
This comment has been minimized.
adamkad1
commented
Apr 28, 2019
do i look like a person who uses reddit? |
This comment has been minimized.
This comment has been minimized.
adamkad1
commented
Apr 28, 2019
thats just reloading batteries with legacy cells, doesnt help for stuff that pop errors because invalid mag. guess ill hang off playing the game |
This comment has been minimized.
This comment has been minimized.
Entitlement level and bad idea quotient checks out, yea. |
CleverRaven
locked as resolved and limited conversation to collaborators
Apr 28, 2019
Inglonias
deleted the
Inglonias:battery_overhaul_2_electric_boogaloo
branch
May 1, 2019
Inglonias
restored the
Inglonias:battery_overhaul_2_electric_boogaloo
branch
May 1, 2019
This comment has been minimized.
This comment has been minimized.
|
This pull request has been mentioned on Cataclysm: Dark Days Ahead. There might be relevant details there: https://discourse.cataclysmdda.org/t/how-to-recharge-the-new-battery-cells/20081/2 |
This comment has been minimized.
This comment has been minimized.
|
Hey there. I'm working on plutonium cells and came across the "atomic" battery. What is this meant to be? It shows up in a lot of places and has limited charges, which doesn't seem to make sense with atomic. |
Inglonias commentedApr 16, 2019
•
edited
Summary
SUMMARY: Balance "Overhauls how the game handles batteries"Purpose of change
This is a complete overhaul of how battery powered tools are handled, with the intent of making that aspect of the game less abstract and more realistic.
Implements #29536
Describe the solution
All batteries are now magazine-style, and all tools that formerly accepted batteries now accept these magazines instead. You cannot unload or reload these batteries directly, but they do have the RECHARGE flag. There are 3.5 different categories of batteries, and they're detailed in the compatibility chart below:

Ultralight: Think of these as coin cell batteries. Used where size is important or the manufacturers are cheap bastards (which is why it's standard in the talking doll, for instance). Note that while tools in this category have batteries that are compatible with light tools, light batteries cannot fit into ultralight devices.
Light: Think of this like a smartphone battery. The high-capacity variant is a high-end one for consumer goods that need a bit more juice like professional camera equipment. Note that tools in this category can fit ultralight batteries.
Medium: These are equivalent to the batteries you'll find on modern cordless tools. The high capacity ones are for things like military-grade equipment (mess kits) and fancier electronics (L-sticks)
Heavy: These are car batteries in all but name. The high capacity heavy batteries currently only come standard on a UPS
Describe alternatives you've considered
The battery system as-is works well enough, but it's pretty abstract and has needed a serious upgrade for a while. Since electrical tools can already accept battery magazines no problem, this is the logical conclusion. This solution involves no new C++ code, only JSON.
Additional context
I made a light balance pass on any existing tools in the base game. I tried to keep things about the same in terms of overall performance, but this probably needs balance work before it can be merged. It also needs testing. If you find any places where batteries still spawn, let me know. There's no real rush on this PR, and I suspect that fully removing the old battery spawns will take a while.
What will happen to my existing games and any batteries I may have?
Good question! As far as I'm aware, you'll keep the charges and magazines will sprout.
Still, I realize this might be inconvenient for those of you with long-running games. For those, magazine-style batteries can be reloaded (but not unloaded). This will likely go away a few weeks after this PR is merged.