NPC Flag 13 - cant_die

NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
Forum rules
NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
Locked
Ezric
Posts: 55
Joined: Thu May 14, 2020 1:34 pm

NPC Flag 13 - cant_die

Post by Ezric »

In BG, what is the function of flag 13 for NPCs?

As near as I can tell, invulnerable NPCs seem to have it set (Horance, Lord British, and Batlin), but it doesn't seem that Exult respects the flag itself. For example, if I unset the flag for Batlin, he still can't be slain, while setting it for an NPC that normally does NOT have it doesn't make them invulnerable (tried it with Klog in Trinsic just now).

Mind you, I'm using 1.2 rather than 1.4 (see my other thread about the 1.4 snapshot apparently being broken at the moment), but if memory serves, the same was true of an older build of 1.4. In fact, I'm certain of it because I once had to modify actors.cc to make it so I could kill Batlin (just for the fun of it; knowing nothing of C programming, that was a fun experience).
drcode
Site Admin
Posts: 2267
Joined: Thu May 14, 2020 1:34 pm

Re: NPC Flag 13 - cant_die

Post by drcode »

It doesn't apply directly to the NPC, but, instead, means "Test the 'cant_die' flag in 'Monster_info'". Seems convoluted, but we're pretty sure that's how the original works.
Ezric
Posts: 55
Joined: Thu May 14, 2020 1:34 pm

Re: NPC Flag 13 - cant_die

Post by Ezric »

Ah, okay.

If that's how it works, though, shouldn't unsetting the NPC flag mean that the flag in "Monster_info" never gets checked, and so the invulnerable NPC should be killable?

I ask because with flag 13 set OR unset, I can't kill Batlin. That makes it seem like the flag serves no actual purpose (in other words, the flag in "Monster_info" gets checked regardless of what NPC flag 13 says). Is this a bug in Exult, perhaps?
drcode
Site Admin
Posts: 2267
Joined: Thu May 14, 2020 1:34 pm

Re: NPC Flag 13 - cant_die

Post by drcode »

The trouble is that we probably never set or unset the Monster_info flag. Probably what we should do is honor the actual flag on NPC's.
D

Re: NPC Flag 13 - cant_die

Post by D »

Maybe it has something to do with the Amageddon spell?
Locked