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

Hulks sometimes attack nearby allies #48879

Open
SariusSkelrets opened this issue May 15, 2021 · 8 comments
Open

Hulks sometimes attack nearby allies #48879

SariusSkelrets opened this issue May 15, 2021 · 8 comments
Labels
<Bug> This needs to be fixed Monsters Monsters both friendly and unfriendly.

Comments

@SariusSkelrets
Copy link
Contributor

SariusSkelrets commented May 15, 2021

Describe the bug

While creating the hive hulk in #48876, I noticed that the hulk was attacking the flesh raptors it spawned

I tested and found that they also attack other zombies like frog mothers

Steps To Reproduce

  1. spawn a zombie hulk and a frog mother next to each other
  2. get the them to collide
  3. get away really fast (teleportation works best)
  4. get messages about the hulk attempting to kill the frog mother, despite being in the same faction

Expected behavior

Hulks not attacking their own faction

Screenshots

monster infighting

Versions and configuration

  • OS: Windows
    • OS Version: 10.0 2004
  • Game Version: 0.E-9280-g9dde4db-dirty [32-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],
    Magiclysm [magiclysm]

Edit

I changed the reported bug after Venera3 found that the hulks themselves were causing the issue and not summon blasts

@Venera3
Copy link
Member

Venera3 commented May 15, 2021

Hulks' monster push shows up in the log as an attack as well, you get the same message spammed in a lategame city center as skellyjuggs and the like push each other around. I haven't checked if theyl attack actually does damage, that would be important to look into (you see monster hp in debug mode).

Hostility is governed by factions only, there's sadly no way at present to flip factions because of an incoming attack.

@SariusSkelrets
Copy link
Contributor Author

The problem here is that something that is not an attack make them hostile to a member of their own faction

It might need some C++ to add a ‘’can’t aggro’’ flag to certain spells

@Maleclypse Maleclypse added the Monsters Monsters both friendly and unfriendly. label May 16, 2021
@actual-nh actual-nh added the <Bug> This needs to be fixed label May 16, 2021
@actual-nh
Copy link
Contributor

Hostility is governed by factions only, there's sadly no way at present to flip factions because of an incoming attack.

Possibly there's a difference between the default "in same faction friendly" and other settings of friendly? This definitely needs investigating!

@Venera3
Copy link
Member

Venera3 commented May 16, 2021

Actually this has nothing to do with spells and everything to do with hulks. Hulks and stuff that got copied from them use ATTACKMON, a janky precursor of the monster factionality system that really could use to be deprecated across the board. To recap it was used before monsters pushing each other out of the way or monster factions were a thing and basically means that in case a monster bumps into any other monster it will automatically attack them - see monmove.cpp/1505. This is supposed to prevent them being boxed in by less threatening zombos (and in the case of older monsters to have them attack other mobs at all if I had to guess), but it's completely redundant at the moment.

Removing the flag from them fixes the bug. For the record, currently Hulks, Skellyjuggs, Fungal Skellyjuggs and Zombulls use them from the zombies (where it makes very little sense and is superseded by PUSH_MON).

@SariusSkelrets
Copy link
Contributor Author

SariusSkelrets commented May 17, 2021

It’s why normal zombies weren’t hostile from the frog mother blast

I’ll change the bug report to reflect this

@SariusSkelrets SariusSkelrets changed the title Summon blast causes monster infighting Hulks sometimes attack nearby allies May 17, 2021
@SenpaiSlime
Copy link
Contributor

Actually this has nothing to do with spells and everything to do with hulks. Hulks and stuff that got copied from them use ATTACKMON, a janky precursor of the monster factionality system that really could use to be deprecated across the board. To recap it was used before monsters pushing each other out of the way or monster factions were a thing and basically means that in case a monster bumps into any other monster it will automatically attack them - see monmove.cpp/1505. This is supposed to prevent them being boxed in by less threatening zombos (and in the case of older monsters to have them attack other mobs at all if I had to guess), but it's completely redundant at the moment.

Removing the flag from them fixes the bug. For the record, currently Hulks, Skellyjuggs, Fungal Skellyjuggs and Zombulls use them from the zombies (where it makes very little sense and is superseded by PUSH_MON).

So someone should create a PR to remove the flag from all those beasts yeah?

@actual-nh
Copy link
Contributor

Actually this has nothing to do with spells and everything to do with hulks. Hulks and stuff that got copied from them use ATTACKMON, a janky precursor of the monster factionality system that really could use to be deprecated across the board. To recap it was used before monsters pushing each other out of the way or monster factions were a thing and basically means that in case a monster bumps into any other monster it will automatically attack them - see monmove.cpp/1505. This is supposed to prevent them being boxed in by less threatening zombos (and in the case of older monsters to have them attack other mobs at all if I had to guess), but it's completely redundant at the moment.
Removing the flag from them fixes the bug. For the record, currently Hulks, Skellyjuggs, Fungal Skellyjuggs and Zombulls use them from the zombies (where it makes very little sense and is superseded by PUSH_MON).

So someone should create a PR to remove the flag from all those beasts yeah?

And replace it with PUSH_MON. Until #48077 goes in, not sure about non-zombie cases of ATTACKMON.

SenpaiSlime added a commit to SenpaiSlime/Cataclysm-DDA that referenced this issue May 20, 2021
@SenpaiSlime
Copy link
Contributor

Actually this has nothing to do with spells and everything to do with hulks. Hulks and stuff that got copied from them use ATTACKMON, a janky precursor of the monster factionality system that really could use to be deprecated across the board. To recap it was used before monsters pushing each other out of the way or monster factions were a thing and basically means that in case a monster bumps into any other monster it will automatically attack them - see monmove.cpp/1505. This is supposed to prevent them being boxed in by less threatening zombos (and in the case of older monsters to have them attack other mobs at all if I had to guess), but it's completely redundant at the moment.
Removing the flag from them fixes the bug. For the record, currently Hulks, Skellyjuggs, Fungal Skellyjuggs and Zombulls use them from the zombies (where it makes very little sense and is superseded by PUSH_MON).

So someone should create a PR to remove the flag from all those beasts yeah?

And replace it with PUSH_MON. Until #48077 goes in, not sure about non-zombie cases of ATTACKMON.

Created #48942 to replace attackmon with pushmon

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 Monsters Monsters both friendly and unfriendly.
Projects
None yet
Development

No branches or pull requests

5 participants