SauronTheSorcerer Posted February 1, 2009 Share Posted February 1, 2009 Hi all, :thumbsup: I've tried to find an equivalent for a spell I've thought of without any luck. It would be great if you had a spell that would be able to change any person into a mindless worm thrall like Mucianus Allias. Upon this transformation the character would act as Mucianus Allias does, not attacking anyone or following you or anything but doomed to just walk and moan in that undead state for eternity (or until killed'). Maybe the spell would work as does the 'banish flesh' spell works in the mod by JX3, The Sixth Element - The Sacred Art of Necromagic (willpower having to exceed hit points or something). I thought it'd be great for a necromancer type person who could in theory punish an entire town of village changing people into these horrible walking dead as a display of your vast dark power. :biggrin: I'd love to try and create this mod myself but I'm only just starting to learn how to do this and it'll be years before I succeed on my own. Just a thought anyway,Cheers. :thanks: S.T.S. Link to comment Share on other sites More sharing options...
LoginToDownload Posted February 2, 2009 Share Posted February 2, 2009 Actually, that's comparatively simple. It definitely wouldn't take years to learn the necessary scripting. In fact, here's a tutorial. Step 1: Creating your Worm ThrallFirst, we'll need to create a new Zombie creature to "transform" the victims into. Open up the CS, click the Data tab, check the box beside Oblivion.esm, and click OK, just like when starting all mods. In the Object window, expand the Actors branch if necessary and select the Creatures branch. If you want, you can expand the Creatures branch and Undead branches to look at only the Zombie branch, but it isn't necessary. Find a zombie you want to base yours off. one of the CreatureZombie zombies would be a good choice if you don't want your zombie to level with the player, or MG12MucianusZombie if you do want it to. Open your "base" zombie up. On the left of the window is its basic information. Name, ID, level, and various flags. You'll want No Low Level processing to be checked; low level processing determines whether their AI continues to update when the player isn't around, which is totally unnecessary for these things and will bloat your save if you make too many, slowing the game down and causing glitches. The Essential flag, if checked, will stop the zombies dying. When they would otherwise die, they'll go unconscious instead. Feel free to set it however you want. Can Corpse Check determines if they specifically react when they encounter a corpse. Once again, do whatever you want with this one. Leave the rest as they were before for now. Give it a unique ID (for the purposes of this tutorial, it will be called MyWormThrall) and whatever name you want. If its level isn't what you want, pick a different zombie or change it yourself, as well as the stats on the right if you want. You'll probably want to leave the Speed alone, or change it very little; it affects creatures much more dramatically than NPCs. The PC Level Offset flag determines if it levels with the player or not. If it's checked, the Level box will change to Offset, and will determine how much higher or lower level the zombie is than the player. Calc Min and Calc Max boxes determine the minimum and maximum level, with a Calc Max of 0 being no limit. If the zombie has a script, remove it. Make sure your zombie looks like you want it to. Clicking the "Preview full" checkbox should display your zombie on the right. If it looks fine, skip the rest of the paragraph. If you want to change it, go to the ModelList tab (you may need to scroll through the list of tabs). Here's a list of all models the zombie can use. The checked ones are actually being used for this zombie. Check and uncheck various models until you get a combination that you like. If you've removed or added a limb, change the flags on the left to reflect this. A few more tabs to look at: If the Inventory tab has anything other than Mort Flesh, you'll probably want to right-click and remove it. We'll be giving the zombies the inventories of their previous selves, so loot won't be an issue. The Factions tab will probably read UndeadFaction and NecromancerFaction. If you don't want them friendly to undead/necromancers, feel free to delete either one. If you want them friendly to any faction they're not in, feel free to open up Character/Factions and give them the appropriate one. If the SpellList tab has a leveled disease and you don't want the zombies to be diseased, remove it. If it doesn't have a disease and you do want them to be diseased, open the Magic/LeveledSpell branch of the Object Window (keep your Zombie's window open, though), and drag LL0DiseaseZombie25 or LL0DiseaseZombieHeadless33 from the object window to your zombie's spell list (you might need to move the zombie's window so they don't overlap). You'll probably want to keep AbUndeadFleshResist; it governs the traditional zombie weakness to fire, immunity to disease and poison, "water breathing", etc. Now, let's move on to AI. Click the AI button on the zombie's window to bring up a new window and take a look at the AI Attributes up top. Aggression determines under what conditions an actor will attack. If an actor's Aggression is higher than their Disposition towards another actor (or vice versa) the two will enter combat on sight. If their Aggression is less than 20, they'll only fight to defend themselves, not attacking people just because they don't like them. If their Aggression is 0, they won't even fight back if attacked. Most creatures you see have an Aggression of 100, so they'll attack any creature that aren't affiliated with them via factions with huge positive reactions. Set it to whatever you want. If an Actor's health percentage lost is greater than or equal to their Confidence, they'll flee combat. You'll probably want to keep this one at 100 so they'll never flee. Their energy level just determines how active they are. If their AI Packages tell them to wander, it determines how often they stand in place and how often they walk around the Wander radius. Once again, feel free to set this to whatever. Responsibility determines their respect for the law, so you'll probably want to keep it at 0. If it's above 30, they'll report crimes they see. The bunch of flags in the middle only matter for NPCs, so you can ignore them. AI Packages are what governs the rest of Actor behavior, aside from dialogue. They're what tell actors to sleep, hunt the player down, or wander around not doing much of anything. Most Creatures' AI Packages tell them to wander at the location they were placed in the CS, which is fine in our case, since this will be wherever they were reanimated. They have quite a high radius when outside, though. If you want them to stay closer to where they died, delete aaaCreatureExterior1500 from the list if you have it, open up Character/Packages, and click and drag aaaCreatureExterior512 from the grand package list to your zombie's package list. They'll almost always have an aaaCreatureInterior and an aaaCreatureExterior package, but if you picked a zombie that didn't, you may want to delete any existing packages and give them one of each of those types of packages from the grand list. And that's it for your Zombie. I promise the rest of the tutorial will move much faster. Click Save on the AI window, then OK on the zombie's main window. Answer yes when it asks you if you want to make a new form. Step 1a: Creating an AfterlifeThe Disable function is unreliable when used on a dead NPC. If you want to be able to turn corpses as well as the living into zombies, we need an empty cell to dump the old corpses out of the game's way. Right click on any cell in the Interiors Cell List and select Duplicate Cell. Click on the copy's editor ID, wait a second or so, then click again. Change its ID to whatever you want (for the purposes of this tutorial, MyWormThrallHoldingCell). Delete everything in this cell, either by selecting it in the Render Window and pressing the Delete key, or by deleting the objects from the Cell View window. Step 2: Creating the ScriptSelect Gameplay/Edit Scripts, then Script/New to create a new script. You'll notice that this is basically a text editor. First off, select Magic Effect from the Script Type drop-down box, since it will be using commands specific to Magic Effect scripts and we'll be attaching it to a spell when it's done. The actual text should go something like... scn MyWormThrallSpellScript ;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 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 && IsCreature == 0 && GetVampire == 0 && IsEssential == 0 && GetAV Health < player.GetAV Willpower) ;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. set NewZombie to PlaceAtMe MyWormThrall ;PlaceAtMe places something (in this case, MyWormThrall) 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. PositionCell 0, 0, 0, 0, MyWormThrallHoldingCell ;Teleporting the victim to the co-ordinates 0/0/0, with a facing of 0, of our holding cell. 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. endif end Step 3: Attaching the Script to a SpellBack in the standard CS, open up the Magic/Spell branch of the Object Window. Right-click on any spell and select New. Give it whatever ID (for the purposes of this tutorial, MyWormThrallSpell) and name you want. You can leave its type as Spell, or change it to Lesser Power/Power as you want. Feel free to set Disallow Spell Absorb/Reflect, Script Effect Always Applies (basically the same thing as Disallow Spell Absorb/Reflect in this case), and Immune to Silence to whatever you want. PC Start Spell doesn't do what one would think it does, and should be left unchecked. If you leave the Spell Level and Cost to be auto-calculated, the spell will be pretty much free and castable by novices, since Script Effects don't have a real cost. Once that's done, time to give the spell an effect. Right-click on the Effects list and select New. Set the effect to Script Effect, and the range to Touch or Target, unless you just want the caster to zombify themself. Changing the Duration won't change anything, since the spell's effects occur when the spell first hits (though, if you wanted, you could change the ScriptEffectStart in the script to ScriptEffectFinish and it would take effect when the spell ends). Aside from the traditional stuff you see in the spellmaker, Script Effects get a few other options. Script determines what script it runs, and should be set to MyWormThrallSpellScript; if it doesn't show up on the list, it's not set as a Magic Effect script, so go back and do that. The Effect Name text shows up where Fire Damage would show up on a Fireball spell. The effect's School is used for training and skill requirements. Visuals Effect determines what the spell looks like when cast. If Effect is Hostile is checked, hitting an Actor with one will constitute an attack. Once everything is set to your preference, all we need to do is let the player cast it. Step 4: Giving the Player the SpellThis method will give the player the spell within five seconds of loading the mod up. There are plenty of other ways which I can cover if you'd like, but this will get it into the game and usable right away. To do this, we'll make a Quest. Quests are a lot more than a bunch of journal entires. For one thing, they govern all dialogue in the game. In this case, we're attaching a script to an otherwise meaningless quest so the game will run it right away. Open up Character/Quests, right-click on the Quest list on the left of the window, and select New. For the purposes of this tutorial, its ID will be MyWormThrallSpell. The name doesn't matter, since there are no journal updates for the player to see, but it's considered good form to use names of such quests to note its purpose. Make sure Start Game Enabled is checked, and give it the condition GetIsPlayableRace == 1 to stop it running during character creation. Every Quest has this condition, so you can copy/paste it from a different quest or make it manually by right-clicking on the Conditions List. Once that's done, make a new Script and set its type to Quest. The script in question should go like... scn MyWormThrallQuestScript Begin GameMode ;On objects, GameMode blocks run with varying speeds depending on how close the player is to them. ;On Quests, GameMode blocks run every five seconds unless specified otherwise. player.AddSpell MyWormThrallSpell StopQuest MyWormThrallQuest end It's a much more basic script than the last one. It gives the player the spell, then deactivates itself. Go back to your quest and select this script in the drop-down box. Once again, if it isn't an option, it's the wrong type of script. Save your mod, load up Oblivion, find some victims, and have fun. Link to comment Share on other sites More sharing options...
6Degrees Posted February 2, 2009 Share Posted February 2, 2009 Nice of you to reply so thoroughly. Someone should make polymorph, too. Link to comment Share on other sites More sharing options...
gdarknight Posted February 2, 2009 Share Posted February 2, 2009 I've found that using refraction effects and other pme commands enhance the transition from NPC to Zombie. I plan on having a very visual spell like this in Darkness Unleashed. Link to comment Share on other sites More sharing options...
LoginToDownload Posted February 2, 2009 Share Posted February 2, 2009 Try searching Polymorph. :P Link to comment Share on other sites More sharing options...
SauronTheSorcerer Posted February 2, 2009 Author Share Posted February 2, 2009 LoginToDownload - Wow and wow again. :thanks: I really appreciate you taking the time to do this tutorial for me :thumbsup: . I have begun to have a dabble, following your tutorial. However I have come across a problem that I can't seem to solve. On the first script, upon saving it I received the following message, 'Syntax error Unknown Command 'IsCreature' Forgive my ignorance but this is all so new (I haven't got a clue what this means or how to rectify this) but if you could suggest how to solve this I'd be most grateful! Once again, thanks for your help! I really appreciate it. :thumbsup: :thanks: GdarkKnight - As I've said in pm, I can't await your new mod (I'm sure I'm not the only one! :biggrin: ) S.T.S. Link to comment Share on other sites More sharing options...
LoginToDownload Posted February 3, 2009 Share Posted February 3, 2009 Oh, right. IsCreature is an OBSE-only function. That completely slipped my mind. :sweat:Sorry about that. Always embarrassing to have someone apologizing for their ignorance when following a mistake I made. :P In that case, I guess we can sort of cheat to determine if it's an NPC or not. Instead of "IsCreature == 0", use "GetAV Speechcraft > 0". It's not perfect, and I haven't tested to see how the game reacts when checking a Creature's Speechcraft score, but it should work for all cases where a modder didn't manually set an NPC's Speechcraft skill to 0. If that's ever happened. Link to comment Share on other sites More sharing options...
SauronTheSorcerer Posted February 3, 2009 Author Share Posted February 3, 2009 OK then :biggrin: ... Success! I managed to get the mod to work. There was only one other problem which I did have and that was when it came to creating a new Quest it wouldn't let me have a new one with the ID of 'MyWormThrallSpell' (saying that it wasn't unique). After a little head scratching I figured maybe changing it to MyWormThrallQuest - That worked fine. It's all a learning curve :biggrin: I even added a little to the mod. I decided to give the Worm thralls the 'WormThrallSpell' themselves. I did create a second script for this as follows, ________________________________________________________________________________ scn MyWormThrallSpellScript2 ref NewZombie Begin ScriptEffectStart if (IsActor && GetAV Speechcraft > 0 && GetVampire == 0 && IsEssential == 0 && GetAV Health < player.GetAV intelligence)*10 set NewZombie to PlaceAtMe MyWormThrall PositionCell 0, 0, 0, 0, MyWormThrallHoldingCell RemoveAllItems NewZombie kill ToggleActorsAI endif end________________________________________________________________________________ One of many questions though before I go further if I may? (If I can phrase it properly) if (IsActor && GetAV Speechcraft > 0 && GetVampire == 0 && IsEssential == 0 && GetAV Health < player.GetAV intelligence)*10 If a WormThrall has the spell with this in its script, is the intelligence that the spell checks against a NPC its own intelligence or my characters' intelligence? Either way when I tried it in the Imperial City, my Worm Thralls attacked anyone and changed some of them into Worm Thralls as well. Thus soon there were lots of em runnin amok - quite fun really! I howevr was unharmed as I was wearing Necromancer robes :thumbsup: . I did notice that sometimes the Worm Thrall would appear behind me when I cast the spell on a NPC but the main thing is I got it to work (with your help - Cheers!). There are so many things I wanted to ask and of course now I'm writing this I can't remember half of them :rolleyes: . I know you said about perhaps accessing the spell by some sort of quest rather than just having it added straight away. I wouldn't mind the idea of the spell being in some sort of spell book as in some of the other mods. I guess this is how I'll grow in knowledge and experience, taking this idea and adding a little to it at a time and growing like that. Any help is most appreciated though anyway :thanks: S.T.S. Link to comment Share on other sites More sharing options...
LoginToDownload Posted February 4, 2009 Share Posted February 4, 2009 Always glad to answer questions. ...when it came to creating a new Quest it wouldn't let me have a new one with the ID of 'MyWormThrallSpell' (saying that it wasn't unique).Yup, that was another mistake on my part. MyWormThrallQuest was what I had in mind. Either way when I tried it in the Imperial City, my Worm Thralls attacked anyone...What did you set their Aggression to? Or did you want it that way? ...and changed some of them into Worm Thralls as well.I have no idea why that would be happening, unless you changed it with that intent. Did you give the Worm Thralls the spell? :confused: If a WormThrall has the spell with this in its script, is the intelligence that the spell checks against a NPC its own intelligence or my characters' intelligence?Player is a specific NPC, being the player-character, so it checks your character's intelligence. As a side-note, you'll probably want to put *10 in the brackets. Brackets tell the game what order to perform the actions in, and is usually only important when doing math or multi-layered checks, like if the victim was either dead or had both a lower intelligence and willpower than the player. You need to encircle the bits checking intelligence and willpower in brackets so it doesn't think it goes something else, like...if (GetDead || GetAV Intelligence < player.GetAV Intelligence) && GetAV Willpower < player.GetAV willpowerIn that case, the willpower *has* to be less than the player's, and the victim either needs to be dead or stupider than the player as well.Encircling if-lines with brackets is just a habit I picked up. With the brackets in place as they are in your line, the multiplication is gibberish, since it isn't actually applied to a number. I did notice that sometimes the Worm Thrall would appear behind me when I cast the spell on a NPC...I'm not sure if this will work, but it might help if you declare a ref variable named Self at the beginning of the script and, right after the PlaceAtMe function, add... set self to GetSelf ;This assigns the victim of the spell to Self. NewZombie.MoveTo Self I know you said about perhaps accessing the spell by some sort of quest rather than just having it added straight away. I wouldn't mind the idea of the spell being in some sort of spell book as in some of the other mods.You already used a Quest to add it straight away, but adding it via spellbook would be easy. Assuming you already know how to make a book and place it in the world, just attach the following Object script to the book in question. scn MyWormThrallBookScript Begin OnActivate Player ;OnActivate blocks run when the specified object activates the scripted object in the world. ;If you don't give it an object and just use OnActivate, it will run when anyone activates it. player.AddSpell MyWormThrallSpell end Begin OnEquip player ;OnEquip blocks run when the scripted object is activated from an inventory. ;It doesn't work on potions, and like OnActivate, doesn't need to take a specific object. player.AddSpell MyWormThrallSpell end Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.