Crackpot Idea

Post » Fri May 04, 2012 1:44 pm

I've made a lot of threads concerning crazy ideas that may or may not be possible/insanely difficult/etc., and so I figured that for future ones, I'll just present them in one thread. Others are welcome to do the same, it'll be like the official "Would this work?" thread.

Anyway, I was thinking about limitations presented by hard-coding, and came up with a way in which we might be able to get around the ones concerning Soul Gems. Most specifically, the kind you can acquire in Oblivion and Skyrim (I think): Black Soul Gems.

Normally, NPCs don't have souls to trap, but that doesn't have to mean that we can't Soul Trap them, right? For instance, I've hit NPCs with a Soul Trap, on accident, and it indeed stuck to them like any other spell with a duration beyond 1 second, it just didn't fill any of my empty Soul Gems after I killed them. So obviously NPCs aren't immune to being hit by such spells.

I also know that we have the "GetSpellEffect" function available to us, which can detect if any object, including an NPC, is under the effect of a certain spell. And modded creatures can be Soul Trapped, so long as their soul is given some kind of value, which means that that aspect is not hard-coded, so it should possible to, through scripting, to fill a Soul Gem with whatever soul we wish to, including one that is from a modded creature that doesn't exist in-game, but is labeled as belonging to an NPC.

Meaning, it should be possible to assemble a script that detects that the NPC in question has been struck with a Soul Trap spell, which then triggers, upon death, the addition of a Soul Gem (Grand, Greater, Common, etc.) to the player's inventory that contains the soul of a creature named after that NPC.

I imagine this script would need to be applied to every NPC in the game, although perhaps not if one made it like the script that disables levitation in Mournhold. Which I don't know if that's possible/the best method.

Am I on to something, or just dreaming?
User avatar
Matthew Warren
 
Posts: 3463
Joined: Fri Oct 19, 2007 11:37 pm

Post » Fri May 04, 2012 5:05 am

Didn't see this post before I posted my question in your other post. In one way it seems contradictory that one could soul trap an NPC when some of the lore I've read in the modded games indicates that doing so is not possible. I'm not claiming it's against lore because IDK.

OTOH, your question reminds me of a quest in the LGNPC Telvanni related mod that does what I think you're describing. You'd need to look at it to see how they did it or maybe PM Cyrano. I don't remember the exact name or spelling, just something like Uvilith.
User avatar
Marcus Jordan
 
Posts: 3474
Joined: Fri Jun 29, 2007 1:16 am

Post » Fri May 04, 2012 7:46 am




Am I on to something, or just dreaming?
This sounds good to me; the black soul thing. If a rat has a soul, why wouldn't a humanoid?
User avatar
Stay-C
 
Posts: 3514
Joined: Sun Jul 16, 2006 2:04 am

Post » Fri May 04, 2012 5:12 am

There's actually somewhat established thread on this- http://www.gamesas.com/topic/1356950-your-morrowind-mod-wishlist/.
User avatar
louise hamilton
 
Posts: 3412
Joined: Wed Jun 07, 2006 9:16 am

Post » Fri May 04, 2012 4:07 am

There are actually mods with black soul gems in them, look up necromancy realism and blasphemous revenants, though I'd be careful when using Fliggerty's mods.
User avatar
matt white
 
Posts: 3444
Joined: Fri Jul 27, 2007 2:43 pm

Post » Thu May 03, 2012 9:34 pm

It would be nice to eventually see some features like this get implemented in OpenMW as an option you can turn off or on.
User avatar
Katy Hogben
 
Posts: 3457
Joined: Mon Oct 30, 2006 12:20 am

Post » Fri May 04, 2012 4:49 am

This might be possible, especially with the help of MWSE. You should be able to make a script that reads when an NPC has the soul trap effect placed upon it. Then whenever that NPC dies you could make the script place an invisible creature with the desired soul value somewhere near the player and have a script automatically place the soul trap spell effect upon it and then immediately kill it off. I'm not sure if simply adding the soul trap spell effect to the creature would get it to fill a soul gem correctly, but you could try it. It would be hard to get the gem to accurately read the NPC's name though. Perhaps through the use of the MWSE functions xGetName and xSetName you could get it to read the NPC's name then set the invisible creature's name to it so that when the soul gem fills up, it would have the NPC's name written down. An alternative would be to simply make one new invisible creature named after each race so that at least the soul gem could accurately tell you if it is the soul of a dark elf, imperial, ect. You could avoid having to hand-place a script on each individual NPC by using the xFirstNPC and xNextRef functions provided by MWSE ( this is how my combat mod handles scripts on NPCs if you wish to crack it open and look at it ) . This is just theory, but I don't see any obvious flaws with this setup atm.

Of course, this method would probably only work for the original soul gems. I don't know if it is possible to add brand new functional soul gems (like a Black Soul Gem ) to Morrowind through mods alone as I've never looked into it.
User avatar
Emmi Coolahan
 
Posts: 3335
Joined: Wed Jan 24, 2007 9:14 pm

Post » Fri May 04, 2012 6:28 am

Actually its possible without MWSE if you know what you're doing.
User avatar
Natasha Callaghan
 
Posts: 3523
Joined: Sat Dec 09, 2006 7:44 pm

Post » Fri May 04, 2012 5:31 am

I tested this script out, and it didn't work, though i'm not surprised, since my scripting skills are feeble:

Begin BlackSoulForyn

short NoLore
short done

if ( Done == 0 )
if ( GetSpellEffects, "black soul trap" == 1 )
if ( "foryn gilnith"->GetHealth = 0 )
MessageBox, "You have acquired the soul of this person."
player->AddSoulGem "Black_Soul_Foryn", Misc_SoulGem_Grand
set done to 1
endif
endif
endif

end BlackSoulForyn


Try not to laugh. :P
User avatar
DAVId MArtInez
 
Posts: 3410
Joined: Fri Aug 10, 2007 1:16 am

Post » Fri May 04, 2012 11:58 am

Quick question, are you wanting to make it so that any NPC in the game can have their souls trapped in a black soul gem or just a few specific ones such as during a particular quest?
User avatar
Beast Attire
 
Posts: 3456
Joined: Tue Oct 09, 2007 5:33 am

Post » Fri May 04, 2012 12:00 am

Quick question, are you wanting to make it so that any NPC in the game can have their souls trapped in a black soul gem or just a few specific ones such as during a particular quest?

I'm thinking that with my approach, the latter would be more feasible. If I can get it working, it would also allow me to do certain things in Sunfall, in as controlled a fashion as possible.

For actually implementing the creation of Black Soul Gems in Morrowind, to the extent that it exists in Oblivion, it's probably best to wait for OpenMW.
User avatar
Jesus Duran
 
Posts: 3444
Joined: Wed Aug 15, 2007 12:16 am

Post » Fri May 04, 2012 11:54 am

I could so do this. All you would need are creatures in the creature tab that correspond to the NPC. All npcs with a detect soul trap spell script on. Then etect when they die. When dead add a grand soul gem with the creature id to the players inventory granted that they have an empty grand soul gem to begin with. Yes it would mean EVERY NPC in game with new scripts and a new creature ID for EVERY NPC.

Gonna work on a test script now :D
User avatar
Gaelle Courant
 
Posts: 3465
Joined: Fri Apr 06, 2007 11:06 pm

Post » Thu May 03, 2012 9:17 pm

Oh sure, hog all the glory. :P

I'm just playing, work your magic there MA. :)
User avatar
Keeley Stevens
 
Posts: 3398
Joined: Wed Sep 06, 2006 6:04 pm

Post » Thu May 03, 2012 9:19 pm

For a quest regarding filling a black soul gem with a given certain NPC/NPCs, you could simply use a global script that would continuously test for the death of the NPCs, the soul trap spell effect on them, and the corresponding presence of a soul gem in one's inventory. With all conditions fulfilled the script it would wrap itself up by pulling the old switcheroo (replacing the unfilled black soul gem with a filled black soul gem to give the illusion that it's the same gem) though I'm sure we all know that here...

For the world wide black-soul-filling phenomenon, which would be what we REALLY want to achieve, I think that there would be something simpler than MA's proposition of corresponding creature IDs for every NPC. Something with MWSE, but unfortunately I haven't been in the CS for so long (college, damn) that I'd have to get my bearings again before coming back with something substantive.

No offence to MA, but the mod would carry an inherent deal-breaker: nearly no compatibility w/ other mods!
User avatar
Andy durkan
 
Posts: 3459
Joined: Fri Aug 03, 2007 3:05 pm

Post » Fri May 04, 2012 10:02 am

I could so do this. All you would need are creatures in the creature tab that correspond to the NPC. All npcs with a detect soul trap spell script on. Then etect when they die. When dead add a grand soul gem with the creature id to the players inventory granted that they have an empty grand soul gem to begin with. Yes it would mean EVERY NPC in game with new scripts and a new creature ID for EVERY NPC.

Gonna work on a test script now :biggrin:

Not possible. I needed a script for something that needed to start up when enemy dies and one of the gurus here enlightened me that once a creature/NPC dies it can't use the script that's attached to it. You'd need something more global.
User avatar
Allison Sizemore
 
Posts: 3492
Joined: Wed Jul 19, 2006 6:09 am

Post » Thu May 03, 2012 10:42 pm

Not possible. I needed a script for something that needed to start up when enemy dies and one of the gurus here enlightened me that once a creature/NPC dies it can't use the script that's attached to it. You'd need something more global.

I have several NPCs that run their scripts after they are dead, as long as the corpse is there, as a modification of the script that inhabits Processus Vitellius as found in the vanilla game. The NPC starts out dead, in fact, and the script clearly still functions.
User avatar
Spooky Angel
 
Posts: 3500
Joined: Thu Aug 10, 2006 5:41 pm

Post » Fri May 04, 2012 6:25 am

I have several NPCs that run their scripts after they are dead, as long as the corpse is there, as a modification of the script that inhabits Processus Vitellius as found in the vanilla game. The NPC starts out dead, in fact, and the script clearly still functions.

Guess I was misinformed. :P
User avatar
Sarah MacLeod
 
Posts: 3422
Joined: Tue Nov 07, 2006 1:39 am

Post » Fri May 04, 2012 12:55 pm

I have ascript attached to a half-dozen NPCs that causes them to be deleted a few seconds after they die, and a script that causes dead Bull Netch to float away into the sky...

The problem I see with the soul gem idea is simply that the script would have to be attached to every NPC in the game to get around the hard-coding. What makes it so difficult is the lack of an object ID that would tell when an NPC died, and if he was currently effected by the soul trap. A script can be written to tell when a particular NPC is dead, but not when random NPCs die.

Edit: I just remembered that the netch script had to be attached to a separate objct... so maybe scrpits can't run on dead creatures...
User avatar
Amiee Kent
 
Posts: 3447
Joined: Thu Jun 15, 2006 2:25 pm

Post » Fri May 04, 2012 9:25 am

I once looked into making a global script that would detect when an NPC died and would add something to its inventory. As far as I could tell, such a thing is not possible. The reason is that you have to actualy have a script attached to the NPC and a global one would not work. At least this is what I found, I would really like it if I was wrong.
User avatar
Kim Bradley
 
Posts: 3427
Joined: Sat Aug 18, 2007 6:00 am

Post » Fri May 04, 2012 7:11 am

My ideas:
You could just change a "blackened soulgem", into a "filled" varients, with removeitem and additem.
You could have one filled variant for each race, and maybe a few for special npcs, such as Divayth Fyr, and an add-on for Vivec npc replacer.

Edit/note: A lot of good code is in blasphemous revenants, although a lot can be dumned down to non-mwse variants.
User avatar
Rachel Hall
 
Posts: 3396
Joined: Thu Jun 22, 2006 3:41 pm

Post » Fri May 04, 2012 3:50 am

Not possible. I needed a script for something that needed to start up when enemy dies and one of the gurus here enlightened me that once a creature/NPC dies it can't use the script that's attached to it. You'd need something more global.
Thats the idea.
The function "ondeath" is a brilliant little tool :wink:

EDIT: gonna work on a test esp and see seyda neen become my play ground.
User avatar
how solid
 
Posts: 3434
Joined: Mon Apr 23, 2007 5:27 am

Post » Fri May 04, 2012 1:29 pm

Begin BlackSoulForyn

short NoLore
short done

if ( Done == 0 )
if ( "foryn gilnith" -> GetSpellEffects, "black soul trap" == 1 )
if ( "foryn gilnith" -> GetHealth < 1 )
MessageBox, "You have acquired the soul of this person."
player->AddSoulGem "Black_Soul_Foryn", Misc_SoulGem_Grand
set done to 1
endif
endif
endif

end BlackSoulForyn

- added "foryn gilnith" before getSpellEffects (if the script is attached to Foryn Gilnith, disregard this);
- changed getHealth = 0 (which should have been '==') to getHealth < 1. AFAIK, NPC's health can go below zero like fatigue.

I Haven't tested it, let me know if it works.
User avatar
lolly13
 
Posts: 3349
Joined: Tue Jul 25, 2006 11:36 am

Post » Fri May 04, 2012 12:42 am

- added "foryn gilnith" before getSpellEffects (if the script is attached to Foryn Gilnith, disregard this);
- changed getHealth = 0 (which should have been '==') to getHealth < 1. AFAIK, NPC's health can go below zero like fatigue.

I Haven't tested it, let me know if it works.

intresting we both have diffrent scripts which essentially do thew same thing - This is going to be awesome!
User avatar
marie breen
 
Posts: 3388
Joined: Thu Aug 03, 2006 4:50 am

Post » Fri May 04, 2012 1:38 pm

Thats the idea.
The function "ondeath" is a brilliant little tool :wink:

EDIT: gonna work on a test esp and see seyda neen become my play ground.

No, don't kill Fargoth!
User avatar
NEGRO
 
Posts: 3398
Joined: Sat Sep 01, 2007 12:14 am

Post » Thu May 03, 2012 11:08 pm

Perhaps I am under thinking this, but what if you just changed every npc into a creature like vivec, dagoth ur, and almalexia? then again, that could be much more work that what you guys are proposing
User avatar
Suzy Santana
 
Posts: 3572
Joined: Fri Aug 10, 2007 12:02 am

Next

Return to III - Morrowind