tnu Posted June 30, 2008 Share Posted June 30, 2008 would it be possible or legal to replicate the script of the Deepscorn NPC? and put it in a spell called "Whet-Fang Lullaby" or "Lullaby of Black Marsh"? Link to comment Share on other sites More sharing options...
nelvahin Posted June 30, 2008 Share Posted June 30, 2008 thanks to the cs, it's possible. Activate the esp file, and load. Then look after the script.I think it's possible to extrct all scripts of an file thanks to Script Dumper. Don't worry, it's legal. Warning: some moders want you to contact him to have the permission to modify or upload a part or all his mod. So, look always the readme file! Link to comment Share on other sites More sharing options...
LoginToDownload Posted June 30, 2008 Share Posted June 30, 2008 ^Deepscorn Hollow, I think, is the Vile Lair. That is to say, Bethesda's DLC. Link to comment Share on other sites More sharing options...
tnu Posted June 30, 2008 Author Share Posted June 30, 2008 well i think the Script used on Henentir in "Through a Nightmare Darkly" Is identicle so you dont have to use Deepscorn. Link to comment Share on other sites More sharing options...
tnu Posted July 11, 2008 Author Share Posted July 11, 2008 i think i found the way to replicate it. a spell that removes all AI packeges except for sleep. and a second spell that resets AI packeges Link to comment Share on other sites More sharing options...
LoginToDownload Posted July 11, 2008 Share Posted July 11, 2008 Or you could just use "AddScriptPackage MySleepPackage". Link to comment Share on other sites More sharing options...
tnu Posted July 11, 2008 Author Share Posted July 11, 2008 Or you could just use "AddScriptPackage MySleepPackage". Would that be all that t he script is made of? i do nt know how to do anything right so it's very confusing to me Link to comment Share on other sites More sharing options...
LoginToDownload Posted July 11, 2008 Share Posted July 11, 2008 I poked around in the CS a bit; here's a step-by-step tutorial for giving the player an "Eternal Sleep" spell. Testing it in the Chorrol Fighter's Guild, the subjects stayed asleep through waiting, leaving and loading the autosave, and leaving and loading the autosave then waiting. It won't work if there are no beds at the player's location, though. Preparation:First, create a new AI Package. Name it whatever you want, but for the purpose of this tutorial, it will be called "ESPackage". Under "Schedule", set the package type to "Sleep", check the "Must Complete" box on the left and, if you want, Armor Unequipped and Weapons Unequipped. (They should be self-explanatory) Also check "Skip Fallout Behavior", which will prevent them engaging in non-sleeping AI activities. Set the duration to some obscenely high number like 80000. The "AddScriptPackage" function is weird that way. Set its location to "Near Current Location", with a radius of 0.Next, create a clothing item. Make sure its "Biped Object" list is completely empty, and that its "playable" box is unchecked. Aside from that, it doesn't matter what attributes it's given. For the purposes of this tutorial, it will be named "ESGovernor".* *Using a Magic Effect script instead of throwing one of these on will mean that all NPCs of the victim's type are affected, and it's unclear how Magic Effect scripts work with such things. Thus, we'll place this on the NPC as a sort of dummy. Setting up the Spell:Create two spells. The first will be the spell given to the player, to put NPCs to sleep. Set it to a Lesser Power, Greater Power, or Spell, depending on what you want it to be. Check "Disallow Spell Absorb and Reflect". This tutorial will name it "ESSpell". The second spell is a backup to wake up the NPC later if the player wants to. Set it to an Ability. This tutorial will name it "ESChecker". They can both go without effects for now, pop-ups be damned. Now, go under Gameplay/Edit Scripts, select Script, then New. At the top should be a drop-down box. Select "Magic Effect". The script should go like this. scn ESSpellScript ;scn is short for scriptname. You can name it whatever you want, but you need to have an "scn" line at the beginning of every script. Begin ScriptEffectStart ;All of a script's actual functions have to go in a Begin/End block. Magic Effect scripts can use ScriptEffectStart... ;which runs when the spell takes;effect, ScriptEffectUpdate, which runs every frame the spell is in effect... ;and ScriptEffectFinish, which runs when the spell ends.* if (IsActor && IsCreature == 0 && GetVampire == 0) ;Checking to make sure you're casting it on a non-vampire NPC. You can remove the last "&& GetVampire == 0" if you want. if (GetItemCount ESGovernor == 0) AddItem ESGovernor 1 else RemoveItem ESGovernor 1 ;Casting this again on an NPC already under its effects will wake them up, but we'll deal with that more later. endif endif endNow, go back to ESSpell, right-click on its list of effect, and select "new". Set the effect to Script Effect, set the range to "Touch" or "Target", depending on your preference. The Effect Name shouldn't matter, but un-toggle "Effect is Hostile". If you want, you can give it a visual effect so it actually looks like the player is casting a spell, in which case I reccommend Frost Damage or Summon Undead. Set the script in question to ESSpellScript. If it's not an option, it means you didn't set it to a Magic Effect script. *Also note that, for some reason, leaving the cell of someone under the effect of a Magic Effect script seems to count as "ending" the spell, and re-entering it starts it again, even if it's a permanent effect like an ability. This is why I'm hesitant to govern the whole thing with a Magic Effect script. You are starting to feel sleepy...Go back and make a new script. This time, make it an object script. scn ESGovernorScript ;As always, name it whatever you want. ref victim ;This script will be attached to the "governor" item, and since it will naturally return itself instead of its owner, we need a variable. Begin GameMode ;Yes, GameMode blocks can run from an object inside a container/inventory. How frequently it runs depends on how close the player is. set victim to GetContainer ;GetContainer will return whatever it's in the inventory of. That includes both actors and containers. if (victim.IsActor && victim.IsCreature == 0) ;same check as before. Making sure nothing happened to the governor. if (victim.IsSpellTarget ESChecker == 0) victim.AddSpell ESChecker endif ;If the victim isn't currently subject to the ESChecker spell, give them it. if (victim.GetIsCurrentPackage ESPackage == 0) victim.AddScriptPackage ESPackage endif ;If the victim isn't currently running our sleep package, give them it. elseif (victim) RemoveMe ;If the governor got sent to a container of some kind, just not an NPC, remove it. else disable ;If it got dropped, just disable it. endif end Go back and attach this script to the clothing item. One more script to go, and the effect is finished. Another Magic Effect script, this time.scn ESCheckerScript Begin ScriptEffectUpdate ;As mentioned before, ScriptEffectUpdate blocks run every frame the effect is running. (And in the player's cell, I think) if (GetItemCount ESGovernor == 0 && GetIsCurrentPackage ESPackage) ;If the person's clothing item got removed somehow, and they're currently running our "sleep" package... RemoveScriptPackage ;RemoveScriptPackage can cause minor trouble if the subject is not, in fact, subject to a script package. RemoveSpell ESChecker ;No sense making it run if it doesn't need to. If someone else using the form is a victim, it will get replaced. endif endThe removal isn't automatically tacked on the player's spell just in case a different mod ends up doing something to the clothing item. Go back and add a new Script Effect to ESChecker, and set the script to ESCheckerScript. If it's an "Ability" spell like it should be, there shouldn't be any options for area or range and "Effect is Hostile" doesn't mean anything, but set the duration to 0. I wouldn't reccommend giving this one any visual effects. Learning the Spell:Now all that's left is to give the player the spell. Go under Character/Quests, right-click on the list on the left, and select "new". This tutorial will call it ESQuest. Check "Start Game Enabled", and open up one of the vanilla quests. Just about any of them should do. Right-click on the condition "GetIsPlayableRace == 1", select duplicate, right-click on ESQuest's condition list, and select paste. Make a new script and select "Quest" from the drop-down box. scn ESQuestScript Begin GameMode player.AddSpell ESSpell StopQuest ESQuest end A nice and small one. Just attach that to ESQuest, and you're finished. Link to comment Share on other sites More sharing options...
tnu Posted July 12, 2008 Author Share Posted July 12, 2008 Thanks a bunch man this is a godsend for my Lull of Black Marsh spell part of my maybe vampirism mod not sure how to repay you. you took alot of time in to doing this and i thank you for it. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.