Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some Battery drop batteries (its charge) if destroyed #48147

Closed
Valares opened this issue Mar 20, 2021 · 1 comment
Closed

Some Battery drop batteries (its charge) if destroyed #48147

Valares opened this issue Mar 20, 2021 · 1 comment
Labels
<Bug> This needs to be fixed Items: Battery / UPS Electric power management

Comments

@Valares
Copy link
Contributor

Valares commented Mar 20, 2021

Describe the bug

Destroying some types of batteries (like light disposable battery) drops their charge in form of old style batteries.
However, this does not apply to all light disposable batteries, only specific ones unloaded from specific items.
One that's easy enough to reproduce is the light disposable battery (300/300 batteries) unloaded from a two-way radio (300/300) found on a killed zombie cop.
It also appears occasionally on found talking dolls and their ultra-light disposable battery.
Please note that just spawning in a light disposable battery does not show this bug.

Steps To Reproduce

  1. Load into a world and spawn in some zombie cops.
    • Optionally: Set the item spawn scaling factor to 10.00 to get a faster result.
  2. Kill the zombie cops. The method does not matter (Debug Menu -> [m]ap -> [K]ill all monsters works fine).
  3. Search their bodies until you find a two-way radio (300/300).
  4. Either unload the battery from the two-way radio (300/300) or wield it and smash it against any surface until it gets destroyed and drops its battery.
  5. Wield the light disposable battery (300/300 batteries) and [s]mash it against any surface.
    • You can speed up the process by setting the strength of your character to 1000, as well as the dexterity and the melee skill to 0.
  6. After the light disposable battery (300/300 batteries) gets destroyed, press [g] and see the battery (300) on the ground.
    • Picking these up throw an error because they don't have any weight, but you can handle them just fine. However, other than the text suggests, you can't reload them into batteries anymore.

Expected behavior

Most other batteries just vanish when they get destroyed. I'd expect this behavior to be consistent (although I'd like to see stuff drop some components on their "death" in the future, I don't expect them to drop free floating energy).

Versions and configuration

  • OS: Windows 7 [64-Bit]
  • Game Version: 0.E-10114-gd55d4a1 [64-bit]
  • Graphics Version: Tiles
  • Game Language: English [en]
  • Mods loaded: [
    Dark Days Ahead [dda],
    Disable NPC Needs [no_npc_food],
    Bionic Professions [package_bionic_professions]
    ]

Additional context

This bug is dated. I first ran into it about 2 years ago.
I've invested a lot of time to try to hunt the items down that drop batteries. Sadly, I had a setback when the COVID-19 pandemic hit and I've lost access to the save and collected data.
I've restarted my effort, but after the pull request that introduced pockets was merged, I wrongly assumed it was fixed.
This is my (reconstructed) list from before the pocket update from at most a year ago:

  • zombie brute -> handheld game system (300/300) -> light disposable battery (300/300 batteries) -> battery (300)
  • feral runner -> talking doll (100/100) -> ultra-light disposable battery (100/100 batteries) -> battery (100)
  • Automatic Street Sweeper -> talking doll (100/100) -> ultra-light disposable battery (100/100 batteries) -> battery (100)

I'm unable to verify the one with the handheld game system in the current version, and feral runners no longer exist (at least not under that name).
I did however find a talking doll in a farm house recently and its battery still did drop its charge.

Given that only batteries of very specific items drop their charges, I suspect that when it initalizes some of the loot for the itemgroup, it's either defined wrong in the JSON file (as in, counts instead of charges or the other way around), or not at all which would mean the default is causing this behavior.
I did not had the time to dive in as deep as I wished into this problem, but a shallow check did turn up nothing, so I might suspect the wrong thing.
It's reasonable to assume that there are other items out there as well that do the same thing. I remember at least one medium battery to drop it's charge pre pocket pull request, but I don't remember what it was and still have no access to my old save.


Edit 28. June 2021:
After a few more months of testing and bored smashing stuff together, I found (still in the same game version) another item that drops batteries; a talking doll (containing an ultra-light disposable battery (100/100)), found in a post office map tile.
However, the same post office also had a talking doll with a battery in it that did not drop any batteries on its destruction.

@BrettDong BrettDong added Items: Battery / UPS Electric power management <Bug> This needs to be fixed labels Mar 21, 2021
@Night-Pryanik
Copy link
Contributor

Can't confirm on 0.F-11128.

@Night-Pryanik Night-Pryanik closed this as not planned Won't fix, can't repro, duplicate, stale Sep 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bug> This needs to be fixed Items: Battery / UPS Electric power management
Projects
None yet
Development

No branches or pull requests

3 participants