Jump to content

Adding Detect Life affect to Khajit Night eye


vlaka

Recommended Posts

Nope. I'll have to look at the detect life effect more closely to see if it can be forced to refresh.

You could increase the Area values to increase the detection radius.

Link to comment
Share on other sites

i know there's a mod which refreshes magelight/candlelight every so often. Could that somehow be altered to use detect life instead of magelight/candlelight?

I found this mod: http://skyrim.nexusmods.com/mods/14609 which gives you rings to equip. One of them has a detect life which follows you through different cells (when moving around the world)

What entry should I be looking for in the mod when using the CK so i could apply it to night eye?

 

I opened up the mod in the CK and found an entry UltraVisionUberAura (had an upside down top hat next to it) and i saw a few things ticked like persist FX and no duration AND constant effect but there is a script attached to it...

 

:(

Edited by vlaka
Link to comment
Share on other sites

awesome :D

Thank you so much Steve40!

The ring mod is the closest to what I've been trying to work out but its annoying as heck equipping and unequipping a ring >.<

Eagerly awaiting your findings. In the meantime ill keep trying to do stuff, albeit poorly, in the CK :P

Edited by vlaka
Link to comment
Share on other sites

OK, well I've got it all working.

 

The DetectLife spell is basically an area attack, and the glow that you see on the actors is the "hit" effect. That's why it needs to be recast for it to work on new actors, as they haven't yet been "hit".

 

So here's what you need to do:

 

1) In the CK, load your custom nighteye mod, then type "detectlife" (no quotes) in the Filter box in the top left corner of the Object Window, then scroll all the way down the left pane and click on "*All" in the list. You should see the DetectLife spell among the entries in the right pane. Click it twice slowly so that its name can be edited. Change its name to "SuperDetectLife". Hit ENTER and when the YES//NO box appears, click YES.

 

2) Click anywhere in the Object Window and hit F5 key to refresh the window. Now double-click SuperDetectLife to open the form. Select each of the four effects in the list and delete them so that the list is empty. Now change the "Casting" type to "Fire and Forget". Untick the "Auto-calculate" box and make sure that the Spell Cost is zero. Also change the "Casting Perk" to NONE. Now right-click in the Effects part of the window and add these four effects:

 

DetectLifeEnemyExteriorSelfFF (set Area to 2000 and duration to 5s)

DetectLifeEnemyInteriorSelfFF (set Area to 1000 and duration to 5s)

DetectLifeFriendExteriorSelfFF (set Area to 2000 and duration to 5s)

DetectLifeFriendExteriorSelfFF (set Area to 1000 and duration to 5s)

 

3) Now you will need to copy-and-paste the "IsHostileToActor" Target Conditions to each of the four effects like I described in an earlier post.

 

4) Click OK to close the SuperDetectLife Spell. Now click on "Tree" in the left pane (it's just above "*All") and then type "nighteye" in the Filter box in the top left of the Object Window. Now click on "*All" again. That's a quick way of finding stuff in CK. Now open the "PowerKhajiitNightEye" which should be visible in the right pane. If you have added the four detect life effects here (like I told you to do in an earlier post) delete them now, we don't want them here anymore! Click OK to close the form.

 

5) Now double-click on "NightEyeEffect" (has a top hat icon in front of it) to open it. Right-click in the Papyrus Scripts area and click "Add Script". In the box that pops up, click [New Script] and then OK. Another box will open. In "Name" type "ConstantDetectLife" (no quotes) then click OK. You should now see the new script "ConstantDetectLife" in "Papyrus Scripts" window. Right-click it and select "Edit Source". The script editor window will open. Select all the text in this window and delete it, keeping the window open. Now copy and paste the following script into the script editor window:

 

Scriptname ConstantDetectLife extends ActiveMagicEffect  

Spell Property SuperDetectLife  Auto

Event OnEffectStart(Actor akTarget, Actor akCaster)
RegisterForSingleUpdate(5)
EndEvent

Event OnEffectFinish(Actor akTarget, Actor akCaster)
Game.GetPlayer().DispelSpell(SuperDetectLife)
EndEvent

Event OnUpdate()
RegisterForSingleUpdate(5)
SuperDetectLife.Cast(Game.GetPlayer())
EndEvent

 

Now click "File->Save" in the menu at the top of the Script Editor. The script should compile without error. Now click the red X in the top-right corner to close the script editor.

 

6) Now click the Properties button next to the "Papyrus Scripts:" box. In the window that pops up, click "Auto-Fill All" button. It should auto fill the "SuperDetectLife" property with value "SuperDetectLife (number)". Click OK. Click Ok to close the NightEyeEffect form. Now save your mod. Done :thumbsup:

 

EDIT: If you want to be REALLY fancy, you can easily make the Night Eye+Detect Life auto-activate when it is dark :cool: :

 

1) Open the PowerKhajiitNightEye spell form, double-click the Night Eye effect in the Effect window. In the Conditions box, right-click and then "New". In the Condition Item window that pops up, select "GetLightLevel" in the Condition Function drop-list. Change the "Comparison" to "<" and the Value to 40.0, then Click OK. Click OK to close the Effect Item window. Click OK to close PowerKhajiitNightEye window. Save the mod.

 

Now if you activate Night Eye in bright light conditions while in-game nothing will seem to happen (but it is in fact activated). Now, as soon as the light level gets dark enough, night eye will automagically switch on, and when the light gets brighter it will automagically switch off 8) (remember that you still have to activate the night eye initially for the auto-activation to work). You can experiment with the value "40" for the light level if you like. Also note that there are one or two environments (eg Sovengard) where the brightness doesn't correspond very well with the light level number, so you might get unexpected results in those areas.

Edited by steve40
Link to comment
Share on other sites

does it matter if the mod im editing has a script in the nighteyeffect (top hat icon) there already?

Because i've done as you instructed but the DL effect doesnt trigger when i turn on Night Eye.

its called _ccmagiceffectnighteye and is above the constantdetectlife script i created.

Link to comment
Share on other sites

No, it doesn't matter. The mod should have a nighteye script, plus my custom script.

I've only tested this using vanilla nighteye. I'll have to have a look at the modded version. Which nighteye mod are you basing your mod on?

 

I've attached a copy of my working version using the vanilla night eye. This one has the "auto-activate" in the dark feature.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...