"Tournament" NPC flag

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
Max aka Moscow Dragon

"Tournament" NPC flag

Post by Max aka Moscow Dragon »

What is its meaning? Seems to be Serpent-Isle-only.
Dominus
Site Admin
Posts: 5656
Joined: Thu May 14, 2020 1:34 pm

Re: "Tournament" NPC flag

Post by Dominus »

So the NPC can't kill themselves while for example training in Monitor. A lot of scripted stuff in SI uses it AFAIK.
--
Read the documentation and the FAQ! There is no excuse for not reading them! RTFM
Read the Rules!
We do not support Piracy/Abandonware/Warez!
drcode
Site Admin
Posts: 2267
Joined: Thu May 14, 2020 1:34 pm

Re: "Tournament" NPC flag

Post by drcode »

Look in our "actors.cc" file, and search for "tournament". Like Dominik said, if an actor is about to die and has this flag set, his usecode script is called with a special eventid. This is how the List Field is implemented.
Max aka Moscow Dragon

So, this means - invincibility?

Post by Max aka Moscow Dragon »

Unlike BG, SI has invincible characters. Luther and Draygan, for instance. Possibly Rabindranath too (though he dies according to plot line too soon to check). Dunno on Moonshade mages, maybe at least some of them.

I tried this on Luther. You can damage him in melee combat - but you cannot kill him! You really cannot kill him even in a cheat mode, while constantly adding hitpoints to Avatar and team!

His hitpoints drop very low, but never to zero! If I'm correct, then the explosive spells cannot kill him too!

Am I right that this is the "tournament" flag in action?

OK, let's take Rotoluncia. She is weak and easy to kill, but speaks some words at the moment of her death (and this is really the usecode event). Is it the same "tournament" flag?

In BG, I remember only Hook and the dragon in FoV to have scripts attached to their deaths (Hook's script causes Batlin to speak and to disappear). Any more such NPCs in BG?
drcode
Site Admin
Posts: 2267
Joined: Thu May 14, 2020 1:34 pm

Re: "Tournament" NPC flag

Post by drcode »

Hook and the dragon are the only ones we know of in BG; not that calling their usecode scripts is hardcoded.

We also interpret the "tournament" flag to mean "invincible". If the usecode script doesn't turn off the flag, then we always restore the NPC's hit points. Of course, this is a guess in Exult.
Locked