Jump to content

[LE] Quick Questions, Quick Answers


Recommended Posts

The alias only fills one time at quest start unless filled manually afterwards. This means that if there are no actors in a loaded area that has your magic effect attached when you load your mod for the first time, then the alias will never fill and the quest will probably fail to run.

 

Don't try to fill your alias via conditions. Just have an empty alias marked as Optional instead, then have your magic effect manually fill the alias with the affected actor and run the scene OnEffectStart - and clear the alias and stop the scene OnEffectFinish. If you want to be able to do this to a certain number of actors at once, you need to copy your alias and your scene that many times, and somehow make sure via the script that only one of the currently empty aliases are attempted refilled.

Link to comment
Share on other sites

Here's a quicky:

I want to have an effect that damages the player's HP when using a specific spell (a set amount - 10) without changing the spell itself.

I also want to note that I want to avoid using scripts as much as possible.

I tried applying various variations of the "Value Modifier" magic effect with "Health", but it only seems to have a constant effect (it just starts and doesn't stop...)

Any thoughts?

Link to comment
Share on other sites

Here's a quicky:

I want to have an effect that damages the player's HP when using a specific spell (a set amount - 10) without changing the spell itself.

I also want to note that I want to avoid using scripts as much as possible.

I tried applying various variations of the "Value Modifier" magic effect with "Health", but it only seems to have a constant effect (it just starts and doesn't stop...)

Any thoughts?

You need to provide more info on the spell. If it's a FF, self targeting spell, you can just add another effect that will damage health on self. That might scale with difficulty though.

Or you could stop being script-phobic and use a basic script. I know you've probably heard some stories about some scripts but I'd like to give you some seemingly obvious information: #NotAllScripts

 

Here's 3 options.

 

1.

Scriptname ICuredMyScriptPhobia extends ActiveMagicEffect  

Event OnEffectStart(Actor Target, Actor Caster)

Game.GetPlayer().DamageActorValue("Health", 10)

EndEvent

2.

Scriptname ICuredMyScriptPhobia extends ActiveMagicEffect  

Event OnEffectStart(Actor Target, Actor Caster)

Caster.DamageActorValue("Health", 10)

EndEvent

3. My favourite one would be this. It allows you to go into the properties and change the value. It's far more flexible than the other two because it can be used more than once without changing the original script.

Scriptname ICuredMyScriptPhobia extends ActiveMagicEffect  

Int Property HealthDamageValue Auto

Event OnEffectStart(Actor Target, Actor Caster)

Game.GetPlayer().DamageActorValue("Health", HealthDamageValue)

EndEvent

Link to comment
Share on other sites

 

Here's a quicky:

I want to have an effect that damages the player's HP when using a specific spell (a set amount - 10) without changing the spell itself.

I also want to note that I want to avoid using scripts as much as possible.

I tried applying various variations of the "Value Modifier" magic effect with "Health", but it only seems to have a constant effect (it just starts and doesn't stop...)

Any thoughts?

You need to provide more info on the spell. If it's a FF, self targeting spell, you can just add another effect that will damage health on self. That might scale with difficulty though.

Or you could stop being script-phobic and use a basic script. I know you've probably heard some stories about some scripts but I'd like to give you some seemingly obvious information: #NotAllScripts

 

Here's 3 options.

 

1.

Scriptname ICuredMyScriptPhobia extends ActiveMagicEffect  

Event OnEffectStart(Actor Target, Actor Caster)

Game.GetPlayer().DamageActorValue("Health", 10)

EndEvent

2.

Scriptname ICuredMyScriptPhobia extends ActiveMagicEffect  

Event OnEffectStart(Actor Target, Actor Caster)

Caster.DamageActorValue("Health", 10)

EndEvent

3. My favourite one would be this. It allows you to go into the properties and change the value. It's far more flexible than the other two because it can be used more than once without changing the original script.

Scriptname ICuredMyScriptPhobia extends ActiveMagicEffect  

Int Property HealthDamageValue Auto

Event OnEffectStart(Actor Target, Actor Caster)

Game.GetPlayer().DamageActorValue("Health", HealthDamageValue)

EndEvent

 

I already tried scripted versions and I have the same problem with them as non-scripted versions.
Plus, the only reason I asked for non-scripted is that I wanted to make it slicker with the magic effect that already exists.
If it's not too much problem and making sure you understand I'm not scriptophobic, here's more info:
I want the player to be damaged whenever he uses a spell with a specific keyword - "MagicSummonUndead".
I made a magic effect that applies a perk entry point type spell with the condition "EPMagic_SpellHasKeyword: MagicSummonUndead == 1" and the spell is a Fire&Forget variation of the DamageHealth magic effect that is in every other way identical to the one Equilibrium uses.
I tried putting the condition on the magic effect itself or on the spell, but for some reason the game doesn't accept that and crashes when I equip that effect.
As I said, I don't want to alter the spells themselves cuz that's pointless and just the wrong way to go.
The problem with what I already did is that even though the perk entry point that fires the spell has the condition, it's still constantly fired - even though it's Fire&Forget and not constant.
So if anyone can shed some light on how I can make this possible without subject the player to a inevitable death, I'll be very thankful.
Thanks again!
Link to comment
Share on other sites

The alias only fills one time at quest start unless filled manually afterwards. This means that if there are no actors in a loaded area that has your magic effect attached when you load your mod for the first time, then the alias will never fill and the quest will probably fail to run.

 

Don't try to fill your alias via conditions. Just have an empty alias marked as Optional instead, then have your magic effect manually fill the alias with the affected actor and run the scene OnEffectStart - and clear the alias and stop the scene OnEffectFinish. If you want to be able to do this to a certain number of actors at once, you need to copy your alias and your scene that many times, and somehow make sure via the script that only one of the currently empty aliases are attempted refilled.

 

Ok. A couple questions:

 

If I shouldn't fill the alias via conditions, what Fill Type should I select for my Reference Alias? Specific Reference and then just not select anything?

 

As far as the script attached to the Magic Effect goes, would something like this work in OnEffectStart?

 

 

BedrollToPlace = akCaster.PlaceAtMe(BedrollGround)   ; change to invisible bedroll after testing
SleepAlias_01.ForceRefTo(akCaster)
akCaster.EvaluatePackage()

 

 

 

For some reason it isn't working, although I'm hoping it's because the alias isn't getting filled properly (which I think has something to do with using the wrong reference alias fill type....).

Link to comment
Share on other sites

 

The alias only fills one time at quest start unless filled manually afterwards. This means that if there are no actors in a loaded area that has your magic effect attached when you load your mod for the first time, then the alias will never fill and the quest will probably fail to run.

 

Don't try to fill your alias via conditions. Just have an empty alias marked as Optional instead, then have your magic effect manually fill the alias with the affected actor and run the scene OnEffectStart - and clear the alias and stop the scene OnEffectFinish. If you want to be able to do this to a certain number of actors at once, you need to copy your alias and your scene that many times, and somehow make sure via the script that only one of the currently empty aliases are attempted refilled.

 

Ok. A couple questions:

 

If I shouldn't fill the alias via conditions, what Fill Type should I select for my Reference Alias? Specific Reference and then just not select anything?

 

As far as the script attached to the Magic Effect goes, would something like this work in OnEffectStart?

 

 

BedrollToPlace = akCaster.PlaceAtMe(BedrollGround)   ; change to invisible bedroll after testing
SleepAlias_01.ForceRefTo(akCaster)
akCaster.EvaluatePackage()

 

 

 

For some reason it isn't working, although I'm hoping it's because the alias isn't getting filled properly (which I think has something to do with using the wrong reference alias fill type....).

 

As long as an alias is marked as optional, you don't have to fill the alias with anything - I usually just go with what you suggest; Specific Reference pointing to nothing at all. A good way to check whether your quest has failed running, and whether any aliases have failed to fill, is to use console command "sqv myQuestName" in-game. This is a very useful debugging command.

 

Actually, as I looked back on your earlier messages, it occured to me that you might want to make the spell work with the player too. The package method only works on NPCs, so you should definitely check if akCaster is the player first, then either make akCaster activate the bedroll or put akCaster into the alias depending on the return value.

 

Apart from that, just the usual stuff - remember to check if your properties are filled, and use debug.notification or similar to debug your script and find out if anything goes wrong during the runtime of the script.

Link to comment
Share on other sites

 

As long as an alias is marked as optional, you don't have to fill the alias with anything - I usually just go with what you suggest; Specific Reference pointing to nothing at all. A good way to check whether your quest has failed running, and whether any aliases have failed to fill, is to use console command "sqv myQuestName" in-game. This is a very useful debugging command.

 

 

Actually, as I looked back on your earlier messages, it occured to me that you might want to make the spell work with the player too. The package method only works on NPCs, so you should definitely check if akCaster is the player first, then either make akCaster activate the bedroll or put akCaster into the alias depending on the return value.

 

Apart from that, just the usual stuff - remember to check if your properties are filled, and use debug.notification or similar to debug your script and find out if anything goes wrong during the runtime of the script.

 

Ok, I must have done something wrong with assigning the alias. I will try out the console command tonight to see where I messed up.

 

I actually got the sleep effect to work for the player first (by activating the bedroll, as you said) and then added the check for if akCaster == PlayerRef. It's only the Else portion of my OnEffectStart (i.e. everyone other than the player) where I'm still having issues.

Link to comment
Share on other sites

Well, some progress. I've narrowed it down a bit. My bedroll is being placed and the alias is being filled. My sleep package is attached to the alias (in the Alias Package Data section of the Reference Alias form), so it should be getting added to the NPCs I'm using for testing. That leads me to believe that there is something wrong with my Sleep Package. Here is what I have for settings for that:

 

 

 

Owner quest: none

Combat style: default

Interrupt Override: none

 

Public Package Data

Name Type Value Public

Sleep Location Location Near editor location, radius 500 Y

Search Criteria Target Selector Furniture: Beds Y

Lock Doors? Bool False Y

Warn Before Locking? Bool False Y

RideHorseIfPossible Bool False Y

AllowEating Bool False Y

AllowSleeping Bool True Y

AllowConversation Bool False Y

AllowIdleMarkers Bool False Y

AllowSitting Bool False Y

AllowSpecialFurniture Bool True Y

AllowWandering Bool False Y

MinWanderingDistance Float 300 Y

Energy Float 50 Y

 

FLAGS

Observe combat behavior

Reaction to player actions

Friendly fire comments

Aggro Radius Behavior

World Interactions

 

SCHEDULE

Day of week: any

Month: any

Date: any

Hour: 0

Mins: any

Duration 24 hours

 

 

 

Any help with this would be greatly appreciated, especially since this is literally the first package I have ever made for Skyrim.

Edited by candlepin
Link to comment
Share on other sites

  • Recently Browsing   0 members

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