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.