Dropped battery charge on the floor

First of all, I never ever had this happened before, probably because I began playing somewhere around october 2019, when the new battery system was already in place.

Now, to what has actually happened. I was trying to thin out zombie horde near apartment complex to get to the stairs without risking being surrounded and eaten. Had to move back to recharge my UPS and then I noticed something lying on the ground. “Hmm, looks like a battery, I wonder if that’s a heavy disposable one by any chance?”. Nope, it was this:

I wonder if I should make a bug report or this is some known obscure mechanics interaction. Playing on latest experimental, of course.

e: I have no idea where this item came from. There wasn’t even a zombie corpse on that tile, and this happened on a freshly-generated-on-the-latest-patch piece of map.

I found one (well, “a pack”, to be more accurate) of those in a Lab (not sure if it came from a Zombie or not).
Not sure which version I was on, it’s a month or so back, but it was on a freshly generated map too (fresh standalone install, world with no mods (well, other than the already activated “No NPC Nutrition”)).

However, I don’t see this as a big problem, since they can just be reloaded into a battery…

Oh, also, I had some “item’s not found on loading” errors before, this could have had some influence on that (although I doubt it).

Edit 7. January 2020 14:35:
I Just went through the game files and searched for “battery” in locations and item groups to no avail. Now, I see a few options left on how this happens:

  • I’ve missed it in the json files.
  • It’s somewhere hardcoded.
  • It’s in the json files I didn’t check.
  • It’s inside a weapon/tool and when the object gets destroyed by a Zombie, the battery charge pours out like wine from a glass bottle.

Hi. Battery overhaul author here.

Its entirely possible that you found some free floating battery charge on the ground. If you manage to reproduce that, I’d love to know how it happened.

Regarding the free-floating battery charges in the lab finale, that was fixed back in October and the reason I didn’t catch it is on the list in your post: That particular finale was specified in the C++ code, and I didn’t (and still don’t) know how to work with it, so I left it in there.

Well hello Inglonias, thank you for the battery overhaul!

Uhm, there’s only one problem: It wasn’t in the finale, since I didn’t get even close to it. And that fix got merged about a month before I downloaded the my current version. I can check and post the exact version number this upcoming friday if it helps (it’s installed on my other computer - don’t tell my boss :innocent: ).

…I just managed to use that battery charge to “reload” my heavy disposable battery that was in a UPS. Was as easy as press “r” and select the UPS.
Why are these things in the game still? Backward compatibility?

Pretty much yeah. I think at some point they might get removed but that’s also what the battery migration mod is for.

The free floating charges are going to stay. As far as the game is concerned, the batteries are magazines and the battery charge inside are bullets. Ideally, those battery charges never appear outside of the battery containers and cannot be unloaded, so you can’t just hold raw electricity in your hand. That would be weird.

If for some reason you do find the free-floating battery charges outside of a battery, yes, you can reload batteries. That is there to prevent people’s stockpiles from becoming useless, and for the migration mod, which simply allows you to unload battery magazines.

Alright, it took me some time, but I did found at least one (more or less) consistant and reproducable battery drop.

Based on one of my assumptions, namely…

… I’ve started up a world and started smashing whatever I’ve found.

Test setup (findings below, feel free to skip this section):
I soon noticed that smashing stuff randomly takes me nowhere. So I’ve made a list of items I’ve found and smashed, so I can work faster and only smash things that are untested. The list got quite long, as I destroyed all items I came across at least once, even things that are very unlikely to drop batteries - like splintered wood, sticks and stones…

However, I found two items that drop battery charges: ultra-light disposable battery (100/100 batteries) drops 100 charges and light disposable battery (300/300 batteries) drops 300, which would explain the 300 batteries from @GiggleGrassGatherer and the 100 charges I’ve found in the lab (although not really, I’ll come back to this and expain why it’s not possible).
Now there’s a catch. Spawning those in with the debug menu and smashing them up will leave nothing behind. Also, I found that the ones I’ve found do not stack with those spawned in, at least not always.
Due to the “stay at home if you can” order, I’ve also lost access to the computer with the save file and list. However, since the list was useless anyway (I could have declared something as tested, even though the “different” version of it would drop battery charges) it wasn’t really tragic.

Now my newest test setup looks like this (Windows 64 bit Tiles, build version 0.D-10458): If I loot a overmap tile, if I kill something, if I smash something up… I’ll take all the items, drop them onto a pile marked with the name of the monster or overmap tile, take it one by one, wield it and [s]mash it against any surface or monster i find until something drops battery charges.

I found a talking doll (non creepy one) on a feral runner Zombie, and it had a ultra-light disposable battery (100/100 batteries) in it, which in turn - after smashing - left battery (100) on the ground. I also think that I’ve found one in a street sweeper that also dropped batteries, but that was before my meticulous testing, so no guarantee for that.
A spawned in doll does not drop batteries. It has to be one “found” in the game world.
I can provide a save file with said doll if you want to take a look at this problem and think it’s necessary for debugging, @Inglonias.

Now to the “bad” part: Although it is possible that @GiggleGrassGatherer acidentally shot or exploded a light disposable battery (or had it hit by an acidic zombie or thorny shambler’s shot) which then left its charge on the ground, the batteries I’ve found in the lab (if I did find them where I think I picked them up) could not be from an ultra-light disposable battery, as there were no explosives, no turrets or shooting zombies, I didn’t have a gun at that time and also didn’t throw stuff around. The only way I could think of would be that something made out of glass was crushed by a zombie and dropped the charges directly. I’ll keep testing, though.

If I find the time, I’ll take a look at the source code again and try to fix it, unless someone else is faster.

1 Like