Holy crap. Sometimes they come back.
chimeric
Member Posts: 1,163
I've always wanted something like a real Animate Dead spell, but you know how that's impossible, right? Well, I didn't know it quite as confidently, so just to be absolutely sure I went and added this to baldur.bcs:
And Sarevok got back on his feet.
There were a couple of Sarevoks lying around, actually custom creatures, but I like that avatar. And one stood up. And then another one. They walked up to me, just as they had done in their former life. Then... nothing. The spell goes off with a sound, and it rumbled a few more times, but no one else pushed off the pavement. Well, the code is awful, and relying on sight isn't the best idea, and so on and so forth.
Still...
IF NextTriggerObject(Protagonist) See(SecondNearest) HP(LastSeenBy(Protagonist),0) THEN RESPONSE #100 ActionOverride(Protagonist,ReallyForceSpellRES("NIK---",LastSeenBy(Myself))) ENDI wrote "SecondNearest," because I had thought I remembered someone telling me that Nearest without further specifications is always going to be the active creature itself. "NIK---" is a spell I had thrown together, with Dead actor as the target and Raise Dead in the effects. The code, I agree, is crap. Still, I put this in baldur.bcs and had my character walk around the middle of Beregost, which is my experimentation lab, strewn with bodies and equipment of... unsuccessfuls. I had to shoo the other party members away so the hero could maneuver to a point where one of the bodies would be a SecondNearest. It was going to be completely useless, but I gave it a minute of my time...
And Sarevok got back on his feet.
There were a couple of Sarevoks lying around, actually custom creatures, but I like that avatar. And one stood up. And then another one. They walked up to me, just as they had done in their former life. Then... nothing. The spell goes off with a sound, and it rumbled a few more times, but no one else pushed off the pavement. Well, the code is awful, and relying on sight isn't the best idea, and so on and so forth.
Still...
2
Comments
I don't even have to choose "Dead actor" for a creature with the Sarevok animation. I can leave it at "Any point within range" ("Living actor" doesn't work) and just put Raise Dead in the effects - or even Current Hit Points Bonus with the "Raise dead" box checked. That's a very interesting box.
What can be so different about those files? The secret of immortality is in there somewhere. Something about the avatar mechanics of Sarevok lets him come back.
I know it's not in the ini file of the animation - I had the entire text there replaced from another file, and it made no visible difference vis-a-vis resurrection.
I also know the game takes account of the creature's death. It counts off the dying creatures by the script name, with NumDead, and if I raise some, the total drops.
Mysterious.
Seriously, this is absolutely amazing. Necromantic research at its finest (an apt description, really, given that you're working with twenty year old code). Perhaps, in time, this animation effect could become a much more interesting Animate Dead spell than the standard one, which mysteriously summons skeletons out of the ground.
If raised and killed again, and kicked out of the party, a Sarevok can be resurrected again by targeting the body, and so on ad infinitum; like all creatures who had been in the party he receives the standard "So do you want me back in the party?" dialogue afterwards. But if killed with a Kill opcode or forced to do a Kill(Myself) action, the creature dies forever. This suggests that whatever makes the Sarevok animation special has something to do with hit points. Either he never goes below 0 hp and/or he "subsists" at 0 hp.
I should also correct myself: regular corpses, without this sarevocity, are not seen or detected. They do not count as Nearest, SecondNearest or anything else. The spell that I had set up to go off automatically and make a noise was simply fired off too quickly by the engine. The game does that. But it was only thrown at the Sarevoks...
But this is as far as I can take this myself. I've never poked inside creature animations and don't know how they work. There are people around here who have, so they are better placed to look at what makes Sarevok tick.
Edit: Just now I was going through the different animations, killing and raising them one by one to see if anyone else will come back as Sarevok does. It's too much work this way, but I discovered that Volo is immune to killing with Ctrl+Y. He doesn't notice it, even though the bottom window declares the creature's death - and this can be done any number of times.
I don't want this thread to go off course and turn into shoulder-shrugging about all of the irregularities of the IE and animations in particular, and then end nowhere. I mention these things because there has to be an explanation in there somewhere. There is no magic here, that's for sure. Animations are just images for different movements, you and I can draw them. But then they are somehow combined and edited so that any creature with that avatar can have extra "natural" properties like certain sounds or, say, magic resistance. That is over and above anything in the INI file for the animation or what the CRE file contains. So if you want someone to be immune to magic, use Ctrl +6/7 to scroll to the Burning Man animation and then try to blast that one. These and other properties - and the reason why Sarevok lives in death - are buried in this stuff like Pharod's Bronze Sphere, but it's going to take an expert on animations to dig them up.
I've done all I can and I'm going to rest my case here.
If merely switching the animation gives the resistance, as you say, then as baffling as it is to me, I suppose it was hardcoded for some unknown reason. Unknown because the same effect is usually achieved by applying the resistance via EFF, without bloating the executable with more checks.
ToB's limit of one planetar/deva and seven traps was enforced exactly like that, via hardcode. Only it was checking for CRE/PRO file names rather than ids entries.
Edit: ninja'd
I did something else, too: put a non-existent number against Volo's animation in ANIMATE.IDS. Well, he shows up normally and keeps his property, which is, more exactly, complete immunity to damage from anything. Try it out next time you're in Nashkel.
Anyway, this is obviously a moot point.
Animate.ids.