Rebsy Posted April 1, 2015 Share Posted April 1, 2015 I'm making an attempt at this seemingly-impossible mod, and I've got a few questions about scripting.For people who haven't seen the concept come up before: if you kill a named NPC using a soul-trapped weapon or the ST shout, it would be placed in the Soul Cairn, where it would sit around being sad forever. People want to do this mostly because of Nazeem.----Placing the spawn locations for the NPCs in the soul-cairn and ghost'ing them seems to be pretty straightforward, from a manual point of view. What I’ve done so far is: duplicate several NPCs (Nazeem, Ulfric)manually add the ghost effect with the CK (addspell 000d2056manually place them in the Soul Cairndisable themHowever, I'm a novice with the Skyrim CK, and I'm struggling to figure out is the scripting aspect of the mod. Telling if the NPC’s been soul trapped seems to be fairly simple, and I’m using this to do it. Event Ondeath(Actor akKiller) if akkiller == game.getplayer() If (akVictim.HasMagicEffectWithKeyword(SoulTrap) == 1)My problems start when I try to figure out which NPC’s been soul trapped, so I can spawn the correct one. If I kill Ulfric, I want to enable GhostUlfric, not GhostNazeem. At the moment, I’m thinking I might do a location check to see if Ulfric is in the Dead Body Cleanup Cell, and, if so, then enable GhostUlfric. However, I haven’t been able to figure out how to do a location check, or if it’s even possible to do one. The other option I’m toying with is setting each actor to a custom faction and doing the check that way (does actor=faction DeadSoulTrappedUlfric? does actor=faction DeadSoulTrappedNazeem?), but I’m not entirely sure how that will work yet. Sooo…any advice on this? Is such a check possible? Is the architecture for the script entirely wrong? Do you not want to hear Nazeem say “Do you get to the Boneyard very often? Oh, what am I saying, of course you don’t?” :D Link to comment Share on other sites More sharing options...
tx12001 Posted April 1, 2015 Share Posted April 1, 2015 Did you do it to the Ebony Warrior as well? I usually play evil characters who don't give a damn about the ebony warrior wanting to go to sovngarde, for them he is just another soul ripe for enchanting also changing nazeems dialogue in that manner would be impossible as I don't believe the voice type has those words in it. Link to comment Share on other sites More sharing options...
Deleted1308005User Posted April 1, 2015 Share Posted April 1, 2015 If you manage to do this.. Daym. It'd be awesome.I rarely kill named NPC's, but there are some that must be killed and it'd be awesome to make it even worse for them by being trapped in soul cairn. Link to comment Share on other sites More sharing options...
simtam Posted April 1, 2015 Share Posted April 1, 2015 You seem to have that akVictim somehow? so why not compare it with Ulfric directly (if akVictim == Ulfric ... endif). Likely you will need to fill your Ulfric property with ObjectReference Ulfric, not base Actor - which is sort of a hassle but it's easy to find it with "Use Info" in Creation Kit. Link to comment Share on other sites More sharing options...
Rebsy Posted April 1, 2015 Author Share Posted April 1, 2015 (edited) with respect to akVictim...I'm not entirely sure how that works, frankly. I'm basing the script so far on this script. http://forums.nexusmods.com/index.php?/topic/1324164-papyrus-script-to-add-items-to-any-character-on-death/ Which is designed to add items to a specific actor based upon dying with a magic effect active. So I'd be running one script for each NPC...this seems like it'd be a nasty drain on system resources, frankly. That's why I'm wondering if there's a simpler "global" way to do it, using a custom quest or per-NPC factions or something like that. (Kill Nazeem, kill Ulfric, kill Tullius...objectives can complete in any order, any completed objective triggers the correct actor being enabled in the Soul Cairn). about the NPCs to be done...suggestions are welcome! If nothing else, a good list of NPCs would be helpful to future modders who might try pursuing this mod. At the moment, these are the NPCs I'm looking at doing once I figure out a working script... the entirety of the Black-Briar familyall of the Dawnguard (Agmaer, Beleval, Celann, Durak, Florentius Baenius, Gunmar, Ingjard, Isran, Mogrul, Sorine Jurard)all of the Dark Brotherhood (Arnbjorn, Astrid, Gabriella, Festus Krex, Nazir, Veezara, Babette, Cicero). The latter two don't show up during the Destroy the DB! quest, but should be included for completeness and compatibility with other mods...though I'm really not sure on what the policy on vampire souls is per canon (which is why I didn't include the Volkihar vamps here.) Testing must be done to see if the game removes the [essential] tag from all the DB people during the Destroy! quest, or if it spawns a separate set of non-essential NPCs.General Tullius, Legate RikkeUlfric Stormcloak, Galmar Stone-FistElenwen, Rulindil, Ondolemar, AncarionNazeem, Heimskr, Nelkir, Calcemo, LydiaEbony Warrior (this guy might be tricky, since he's leveled and appears because of a quest...he'll be the last one to get done) Edited April 24, 2015 by Rebsy Link to comment Share on other sites More sharing options...
Rebsy Posted April 24, 2015 Author Share Posted April 24, 2015 This'll be my last post on the topic for a while...I changed some hardware in my computer and broke my CK somehow, and I just don't have time to fix it. However, after a lot of asking around, I found a way to do it, so I'm posting it here in case any modders want to try to pick it up. >Create second version of target NPC, ghostify it>Add the defaultEnableLinkedRefOnDeath script to the unghostified version of the NPC>Add a linked reference to the unghostified one, pointing to the ghost one This runs on the NPC's death, and enables the ghost one if the NPC is killed by any means. However, to do the check for soul trap, we need to create a variant of defaultEnableLinkedRefOnDeath... So: Using the defaultEnabLinkedRefOnDeath script, create a new script almost identical to defaultEnableLinkedRefOnDeath. Rename it to whatever name you like, but put this condition OUTSIDE the enable:If Self.HasMagicEffectWithKeyword(mykeyword)http://www.creationkit.com/Bethesda_Tutorial_Papyrus_Variables_and_Conditionals You will need to define a Keyword Property mykeyword toohttp://www.creationkit.com/Bethesda_Tutorial_Papyrus_Events_and_Properties#Casting_the_Spell This script is attached to our base NPC; the ghost dupe is added as a linked reference to the base NPC. One warning! You MAY need to create a new keyword to differentiate your linked ref from others. Make the linked ref with the keyword of yours attached. In the script you make (copy paste from defaultEnableLinkedRefOnDeath), be sure to fill in the property for the linked ref keyword as well as the myKeyword one for the MGEFhttp://www.creationkit.com/Glossary#LinkedRefall credit for this explanation goes to Mathildaswagg. I'm going to update the list of "NPCs to Kill" above this post periodically, as I run across them in my game. Good luck modding! Link to comment Share on other sites More sharing options...
Recommended Posts