Simple script to turn NPCs to vampire races. Is it working?

Post » Sat Oct 18, 2014 11:09 pm

Edit: Uh can a mod please move this to the Creation Kit subforum? I should've put this thread here... I didn't mean to post this in the mod section.

Guess what I'm doing in my Morrowind Vampires mod update?... Or attempting at least? The ability to turn NPCs into vampires of your bloodline, a 24 hour cooldown ability of course. Complete with all the strengths, weaknesses, and faction membership. The spell effects were all easy enough to add. Only one problem though... That whole race change thing.

Here's a script I made, based off of a script attached to the main quest- the main quest, and vanilla scrips have not been altered at all, it's just a copied/duplicate version. Here's the script iself.

Scriptname ALectraNPCVampChangeEffect extends activemagiceffect  Message Property VampireFeedMessage AutoMessage Property VampireStageProgressionMessage AutoRace Property ArgonianRace  Auto  Race Property ArgonianRaceVampire  Auto  Race Property BretonRace  Auto  Race Property BretonRaceVampire  Auto  Race Property DarkElfRace  Auto  Race Property DarkElfRaceVampire  Auto  Race Property HighElfRace  Auto  Race Property HighElfRaceVampire  Auto  Race Property ImperialRace  Auto  Race Property ImperialRaceVampire  Auto  Race Property KhajiitRace  Auto  Race Property KhajiitRaceVampire  Auto  Race Property NordRace  Auto  Race Property NordRaceVampire  Auto  Race Property OrcRace  Auto  Race Property OrcRaceVampire  Auto  Race Property RedguardRace  Auto  Race Property RedguardRaceVampire  Auto  Race Property WoodElfRace  Auto  Race Property WoodElfRaceVampire  Auto  Race Property CureRace AutoFunction VampireChange(Actor Target)		if (Target.GetActorBase().GetRace() == ArgonianRace)		CureRace = ArgonianRace		Target.SetRace(ArgonianRaceVampire)	elseif (Target.GetActorBase().GetRace() == BretonRace)		CureRace = BretonRace		Target.SetRace(BretonRaceVampire) 	elseif (Target.GetActorBase().GetRace() == DarkElfRace)		CureRace = DarkElfRace		Target.SetRace(DarkElfRaceVampire) 	elseif (Target.GetActorBase().GetRace() == HighELfRace)		CureRace = HighELfRace		Target.SetRace(HighELfRaceVampire) 	elseif (Target.GetActorBase().GetRace() == ImperialRace)		CureRace = ImperialRace		Target.SetRace(ImperialRaceVampire) 	elseif (Target.GetActorBase().GetRace() == KhajiitRace)		CureRace = KhajiitRace		Target.SetRace(KhajiitRaceVampire) 	elseif (Target.GetActorBase().GetRace() == NordRace)		CureRace = NordRace		Target.SetRace(NordRaceVampire) 	elseif (Target.GetActorBase().GetRace() == OrcRace)		CureRace = OrcRace		Target.SetRace(OrcRaceVampire) 	elseif (Target.GetActorBase().GetRace() == RedguardRace)		CureRace = RedguardRace		Target.SetRace(RedguardRaceVampire) 	elseif (Target.GetActorBase().GetRace() == WoodElfRace)		CureRace = WoodElfRace		Target.SetRace(WoodElfRaceVampire) 	endif	EndFunction

I was so pleased when the NPC I casted it on, burst into flames in front of the sun... But uh, how do I know if the script is working right? Is there some console command to check an NPCs race? How do I test to see if the NPC really did become a vampire as far as the ingame vampire race effects are concerned? One thing I am worried about was, that the NPCs eyes did not get that reddish/orange glow, that vampires eyes in Skyrim generally have... And I don't know if that's my script failing, or the appearance just not updating.

Btw the script compiled perfectly, no errors at all... I just cannot tell if the NPC really was turned into a vampire by this script or not. (And the bursting into flames is a non-vanilla feature so that's not evidence either).

Is there even maybe some console command I can use to see if it didn't? And if this script doesn't work in spite of compiling any recommended alternatives?

User avatar
Monika
 
Posts: 3469
Joined: Wed Jan 10, 2007 7:50 pm

Return to V - Skyrim