SauronTheSorcerer Posted March 23, 2009 Share Posted March 23, 2009 Hi all, This is in regard to the mod, "Request - Worm Thrall Spell, A spell to turn npc's into worm thralls", which LoginToDownload has been so much help to me compiling. I have over the last few weeks asked for his aid of which he has been more than helpful :thanks: . I took the decision not to keep asking questions to him alone and thought I'd throw these questions open to all the community here. I have largely got the mod to do exactly what I wanted it to do but I have run into two problems. Firstly, if I cast this spell on a character that has "bound a weapon or armour" then the game freezes and crashes. Secondly, although I have tried to modify it so that the spell kills the character if successful cast, it won't trigger the character as dead if that character has to be killed for a quest completion. ****************************** Possible spoiler for those who haven't done this quest ***************************************** I noticed this when Audens Avidius, the crooked imperial guard who breaks out and comes after you for revenge. I cast this spell on him and although he was transformed into a Worm Thrall it didn't trigger the "quest update / completion". Here is the script for the spell, _____________________________________________________________________________ scn WormThrallSpellScript;scn stands for Scriptname. All scripts need to be named on their first line.;Anything coming after a semicolon (;) is a comment or note. The script doesn't run it. ref self ref spell ref NewZombie;This is declaring a variable for use in the script.;Ref variables return a CS item like a spell or creature Begin ScriptEffectStart;All of a script's functions need to take place in a Begin/End block that determines when they run.;The contents of a ScriptEffectStart block run when the spell effect is first added to its target. if (IsActor && GetAV Speechcraft > 0 && GetVampire == 0 && IsEssential == 0 && GetAV Health < player.GetAV Intelligence/2 && player.getitemcount Blacksoulgem > 0 && getdead == 0);The contents of an if/endif loop only run if the conditions are true.;IsActor && IsCreature == 0 make sure we're dealing with an NPC, not a creature or inanimate object.;GetVampire == 0 makes sure the victim isn't a vampire, since they're already undead.;IsEssential == 0 makes sure the victim isn't Essential. Feel free to delete this and/or GetVampire == 0 if you want. kill player set NewZombie to PlaceAtMe WormThrall;PlaceAtMe places something (in this case, WormThrall) at the calling actor's position.;Since this is a magic effect script, it assumes we're talking about the subject if we don't specify an actor.;By setting NewZombie to the result of this function, we can use the zombie later in the script. set self to GetSelf;This assigns the victim of the spell to Self. NewZombie.MoveTo Self;Positions the Worm Thrall at the victims position NewZombie.pme MYTH ;Creates shimmering effect around the Worm Thrall PositionCell 0, 0, 0, 0, WormThrallHoldingCell;Teleporting the victim to the co-ordinates 0/0/0, with a facing of 0, of our holding cell. message "The victim has been Worm Thralled and its soul is captured!" player.removeitem BlackSoulGem 1;removes an empty black soul gem to player player.additem Blacksoulgemfilled 1;adds a full black soul gem to player RemoveAllItems NewZombie;Dump all of the victim's inventory into NewZombie. kill;To stop this messing up quests by teleporting NPCs out of existance that you're supposed to kill, kill them. ToggleActorsAI;For all rights and purposes, de-activate the victim. They can't do anything. elseif (IsActor && GetAV Speechcraft > 0 && GetVampire == 0 && IsEssential == 0 && GetAV Health < player.GetAV Intelligence/2 && player.getitemcount Blacksoulgem < 1 && getdead == 0) kill player set NewZombie to PlaceAtMe WormThrall;PlaceAtMe places something (in this case, WormThrall) at the calling actor's position.;Since this is a magic effect script, it assumes we're talking about the subject if we don't specify an actor.;By setting NewZombie to the result of this function, we can use the zombie later in the script. set self to GetSelf;This assigns the victim of the spell to Self. NewZombie.MoveTo Self;Positions the Worm Thrall at the victims position NewZombie.pme MYTH ;Creates shimmering effect around the Worm Thrall PositionCell 0, 0, 0, 0, WormThrallHoldingCell;Teleporting the victim to the co-ordinates 0/0/0, with a facing of 0, of our holding cell. message "The victim has been Worm Thralled but you don't have an empty black soul gem to capture its soul!" RemoveAllItems NewZombie;Dump all of the victim's inventory into NewZombie. kill;To stop this messing up quests by teleporting NPCs out of existance that you're supposed to kill, kill them. ToggleActorsAI;For all rights and purposes, de-activate the victim. They can't do anything. elseif ( IsActor && GetAV Speechcraft > 0 && GetVampire == 0 && IsEssential == 0 && GetAV Health < player.GetAV Intelligence/2 && getdead == 1 ) set NewZombie to PlaceAtMe WormThrall;PlaceAtMe places something (in this case, WormThrall) at the calling actor's position.;Since this is a magic effect script, it assumes we're talking about the subject if we don't specify an actor.;By setting NewZombie to the result of this function, we can use the zombie later in the script. set self to GetSelf;This assigns the victim of the spell to Self. NewZombie.MoveTo Self;Positions the Worm Thrall at the victims position NewZombie.pme MYTH ;Creates shimmering effect around the Worm Thrall PositionCell 0, 0, 0, 0, WormThrallHoldingCell;Teleporting the victim to the co-ordinates 0/0/0, with a facing of 0, of our holding cell. message "You have raised a Worm Thrall but there is no soul to capture!!" RemoveAllItems NewZombie;Dump all of the victim's inventory into NewZombie. kill;To stop this messing up quests by teleporting NPCs out of existance that you're supposed to kill, kill them. ToggleActorsAI;For all rights and purposes, de-activate the victim. They can't do anything. else Message "You have failed to Worm Thrall your target!" endif end _____________________________________________________________________ Interestingly, if i take out the line, PositionCell 0, 0, 0, 0, WormThrallHoldingCell, it will trigger the quest completion but then the dead body remains along with the new zombie. Any help would be most appreciated, although I have to say that I'm very new to all this modding business so please be gentle with me when talking jargon :smile: Thank you S.T.S. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.