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

Cocoon Samples #63791

Open
Grubleafeater opened this issue Feb 25, 2023 · 8 comments
Open

Cocoon Samples #63791

Grubleafeater opened this issue Feb 25, 2023 · 8 comments
Labels
<Bug> This needs to be fixed (S2 - Confirmed) Bug that's been confirmed to exist

Comments

@Grubleafeater
Copy link
Contributor

Describe the bug

So, according to Venera, this is a bug. If you kill something and let it become a cocoon, killing it leaves behind some samples.

Attach save file

N/a

Steps to reproduce

Kill razorclaws, wait, kill cocoons

Expected behavior

Apparently, not samples dropping?

Screenshots

No response

Versions and configuration

  • OS: Windows
    • OS Version: 10.0.19044.2604 (21H2)
  • Game Version: 95521e0 [64-bit]
  • Graphics Version: Tiles
  • Game Language: System language []
  • Mods loaded: [
    Dark Days Ahead [dda],
    Disable NPC Needs [no_npc_food],
    Portal Storms Ignore NPCs [personal_portal_storms],
    No Fungal Growth [no_fungal_growth],
    Bionic Professions [package_bionic_professions],
    Xedra Evolved [xedra_evolved],
    Magiclysm [magiclysm],
    Blaze Industries [blazeindustries],
    SpeedyDex [speedydex],
    Stats Through Kills [stats_through_kills],
    Stats Through Skills [StatsThroughSkills],
    My Sweet Cataclysm [my_sweet_cataclysm]
    ]

Additional context

No response

@Grubleafeater Grubleafeater added the (S1 - Need confirmation) Report waiting on confirmation of reproducibility label Feb 25, 2023
@ehughsbaird
Copy link
Contributor

Confirmed on dc8a598

Going to a shipwreck and killing the razorclaws there, then waiting for them to turn into cocoons will result in the cocoon dropping fish and insect samples when killed.

@ehughsbaird
Copy link
Contributor

This is because they don't leave a corpse behind, so the dissectables are just dropped,

Cataclysm-DDA/src/monster.cpp

Lines 2683 to 2690 in dc8a598

for( const item &it : dissectable_inv ) {
if( corpse ) {
corpse->put_in( it, item_pocket::pocket_type::CORPSE );
} else {
get_map().add_item( pos(), it );
}
}
}

@anothersimulacrum anothersimulacrum added <Bug> This needs to be fixed (S2 - Confirmed) Bug that's been confirmed to exist and removed (S1 - Need confirmation) Report waiting on confirmation of reproducibility labels Feb 27, 2023
@alp7292
Copy link
Contributor

alp7292 commented Mar 2, 2023

oh i always tought it was a feature

@MNG-cataclysm
Copy link
Contributor

What if we just make this a feature, instead of considering it a bug?

@Venera3
Copy link
Member

Venera3 commented Mar 8, 2023

Why would we? Nothing says "extract the characteristic parts of X" quite like "hey what if we melted it down to gloop but exploded before finishing"

On the design side getting to bypass dissection like this is immensely abuseable. It's a bug with the dissection samples living in a corpse pocket and the "no corpse" setting not erasing the contents.

@RenechCDDA
Copy link
Member

RenechCDDA commented Jan 2, 2024

I think this can be cleared up by adding a check during zombify_into, something like this (please excuse the syntax, written without access to a compiler)

for ( item this_item : corpse_pocket_contents ) {
if ( std::find(harvest_results) == this_item {
i_rem this_item;
      }
}

The brute force way is to simply clear that pocket entirely during zombify into, but that pocket is also used for bionics and things like embedded arrows I think. So we don't really want to do that, we want our removal to be as precise as possible.

@GuardianDll
Copy link
Member

GuardianDll commented Jan 2, 2024

So apparently it is not about monster dropping the sample when it left no corpse, but it's about zombify_into carrying the sample of the original monster, no matter does monster has defined sample or not
image
Ren already posted the possible fix for this

@TheSaddestGoomba
Copy link
Contributor

I've encountered this again while testing #71475
As established here, it seems to only occur when a living creature (with samples dropped by dissection) dies and zombifies into something that leaves no corpse. I've encountered it only in the "warted monstrosity" when it zombifies from a "gargantuan toad" corpse. Debug spawning the "warted monstrosity" and then killing it leaves the intended scrap body parts. Interestingly, when it drops the "frog samples" it only drops the samples (in large numbers) and not the contents of the "explode_toad" death drop object.

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 (S2 - Confirmed) Bug that's been confirmed to exist
Projects
None yet
Development

No branches or pull requests

9 participants