Page 1 of 1

"Tournament" NPC flag

Posted: Sat Jan 10, 2004 5:04 am
by Max aka Moscow Dragon
What is its meaning? Seems to be Serpent-Isle-only.

Re: "Tournament" NPC flag

Posted: Sat Jan 10, 2004 6:01 am
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.

Re: "Tournament" NPC flag

Posted: Sat Jan 10, 2004 12:31 pm
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.

So, this means - invincibility?

Posted: Sun Jan 11, 2004 7:02 am
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?

Re: "Tournament" NPC flag

Posted: Sun Jan 11, 2004 1:46 pm
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.