Soul Trap Scripts

Post » Mon Nov 19, 2012 11:50 am

I'm hoping to build a set of spells that will fill a soul gem. It's primarily for roleplaying purposes, since many of my characters can't justify the possibility of trapping someone's immortal soul and binding it to a weapon for all eternity. There was a rather well-argued thread on the morality of the soul Trap spell somewhere out there on the web; I'm sure Google can find it if you're interested. My spells will require an investment of magicka, obviously, and also carry some kind of "diminshed soul" debuff for one in-game day. I'm gonna mix in a bit of Dresden lore here and say that a soul can regenerate if only part of it is removed, but it'll still be a sacrifice on the player's part.

My problem is that, while I could easily work this spell the same way the Ore Transmutation spell does (check the player's inventory for an empty gem, replace it with a full one), that won't work for Azura's Star. I searched the script manager for the word "soul", but I can't find anything that looks like it manipulates the player inventory. There's one to handle the visual effects, and one that checks whether the target died under the appropriate conditions, but nothing that I think actually FILLS the gem.

Does anyone know how I can fill a soul gem the same way soul Trap does, just minus a dead target? Where's the script for it? And is there any way to automatically adjust the length of the soul debuff to match the timescale, so that it always lasts 24 hours?
User avatar
Prue
 
Posts: 3425
Joined: Sun Feb 11, 2007 4:27 am

Post » Mon Nov 19, 2012 5:42 am

You're probably looking for the http://www.creationkit.com/TrapSoul_-_Actor function.

Cipscis
User avatar
No Name
 
Posts: 3456
Joined: Mon Dec 03, 2007 2:30 am

Post » Mon Nov 19, 2012 2:11 pm

You're probably looking for the TrapSoul function.

Cipscis

I saw that one, but it requires an actor as an argument. I can try to remove the is-the-target-dead checks from the magicSoulTrapFXScript and see if the player can trap themselves that way. It'd even fill a gem with a soul appropriate to the players level, which is a nice touch. But if the player can't soul trap themselves using that function, even with the dead-checks removed, then I need to recreate the function TrapSoul. Unfortunately, the Actor script only gives a prototype for the TrapSoul function.

Is there a function for soul gems to load a soul into them? Armed with that, I could handle the rest of the logic myself. Again, my concern here is Azura's Star. I can't simply remove it and replace it with a full version.
User avatar
Stay-C
 
Posts: 3514
Joined: Sun Jul 16, 2006 2:04 am

Post » Mon Nov 19, 2012 5:44 am

I haven't used this function myself (and can't test it at the moment), but I expect the soul would only be trapped when the actor is killed. However, couldn't you use an actor you create (via http://www.creationkit.com/PlaceAtMe_-_ObjectReference) and kill via script to get the soul you need?

Cipscis
User avatar
GabiiE Liiziiouz
 
Posts: 3360
Joined: Mon Jan 22, 2007 3:20 am

Post » Mon Nov 19, 2012 3:19 pm

It wouldn't exactly be within the spirit of the mod, but it could work, assuming the actor could be summoned, trapped, killed, and the body removed without the player noticing. I'll give it a shot.

I suppose, if nothing else works, I can do the ore-transmutation method and simply write in something about Azura not letting the player use her star that way. It still seems like an ugly way to go about it.
User avatar
Astargoth Rockin' Design
 
Posts: 3450
Joined: Mon Apr 02, 2007 2:51 pm

Post » Mon Nov 19, 2012 7:34 am

It wouldn't exactly be within the spirit of the mod, but it could work, assuming the actor could be summoned, trapped, killed, and the body removed without the player noticing. I'll give it a shot.

I suppose, if nothing else works, I can do the ore-transmutation method and simply write in something about Azura not letting the player use her star that way. It still seems like an ugly way to go about it.

Create a new race that uses a null texture, it'll be completely invisible to the player, but you can still manipulate it via script.

Also, don't forget to .Disable() .Delete() it after you've killed it and svcked it's soul. Just because you can't see it, doesn't mean it's not there. :-P
User avatar
Kirsty Collins
 
Posts: 3441
Joined: Tue Sep 19, 2006 11:54 pm

Post » Mon Nov 19, 2012 9:03 am

My problem is that, while I could easily work this spell the same way the Ore Transmutation spell does (check the player's inventory for an empty gem, replace it with a full one), that won't work for Azura's Star. I searched the script manager for the word "soul", but I can't find anything that looks like it manipulates the player inventory. There's one to handle the visual effects, and one that checks whether the target died under the appropriate conditions, but nothing that I think actually FILLS the gem.
My named soul gems mod adds a filled version of Azura's/Black Star. If filled at full capacity the game will give the player the new item if links are properly setted up. To give the empty star back upon use I had to track the player taking/removing the filled star and if the item wasn't removed and player ends up without it it means it used it to enchant/fill an item and I add the empty one in the inventory...I'm still curious if there's a better way to do it.
Does anyone know how I can fill a soul gem the same way soul Trap does, just minus a dead target? Where's the script for it? And is there any way to automatically adjust the length of the soul debuff to match the timescale, so that it always lasts 24 hours?
Soul trap is handled by the game engine upon calling trapsoul on actor. You can try to have a spell that when is cast upon an NPC it will actually create a dummy npc somewhere, call soultrap on it and kill it via script...no Azura star issues this way I believe, you won't need the first part I wrote if you make it this way.
I don't understand what you mean by soul debuff
User avatar
Haley Cooper
 
Posts: 3490
Joined: Wed Jun 14, 2006 11:30 am

Post » Mon Nov 19, 2012 12:02 pm

Well. I've finally gotten my Soul Weave spell to work as I wanted. It summons, kills, traps, disables, and deletes an invisible and inaudible wisp on demand. Hoorah!

What's the best way to get the spell tomes for this spell onto the regular spell vendors without conflicting with other magic-adding mods? I assume it's more complicated than just adding my tomes to the LItemSpellTomes lists.
User avatar
MatthewJontully
 
Posts: 3517
Joined: Thu Mar 08, 2007 9:33 am


Return to V - Skyrim

cron