How to add flaming sun damage to PC vampires?

Post » Wed Jun 20, 2012 8:23 pm

Ok So I'm trying to make PC vampires light on fire in the sunlight. The sun damage is an ability, and I can't seem to find any ability magic effect which damages health constantly. There are fire traps and hazzard effects, but those cannot be applied as an ability.

Do I just need to create a new spell effect that is an ability that damages health? There already are some but all they do is drain the health attribute a certain amount once, not actually do constant damage. Even the ability abdamagehealthconstant doesn't do what it says.
User avatar
Becky Cox
 
Posts: 3389
Joined: Thu Jun 22, 2006 8:38 am

Post » Wed Jun 20, 2012 9:51 pm

if you know how script(I don't) under papyrus, this can be achieved through a script.

EffectShader property FireFXShader auto

For things like this a magic effect is best for the spell.

It looks something http://zassyen.net/images/ScreenShot74.png

For constant damage, you can check out poison and see how that works. And having no duration to it.
User avatar
Hazel Sian ogden
 
Posts: 3425
Joined: Tue Jul 04, 2006 7:10 am

Post » Wed Jun 20, 2012 10:19 pm

Yeah I know how to add effects via a script, and spells, remove them, etc, how to set up conditions, etc. What I can't figure out is how to make a health drain that lowers the health to zero if you are out in the sun long enough. Oblivion had a basic "drain health" you could add to an ability and it worked fine.

Seems to me though a properly set up ability would have the fire shader built in though and not need a PlayMagicShaderVisuals added via scripting.
User avatar
Imy Davies
 
Posts: 3479
Joined: Fri Jul 14, 2006 6:42 pm

Post » Wed Jun 20, 2012 6:52 pm

You don't need a script for any of this. in your spell conditions create an ability that uses a MGEF that damages health. For the MGEF, set the hitshader to the fire FX (don't recall off the top of my head) and make sure that FX Persist is checked on the MGEF. The spell should be of type ability, and constant effect. Then just use conditions similar to the sundamage conditions in the vanilla game. It's something along the line of:

IsInInterior == 0 and
GetGlobalVariable GameHour >= 5 and
GetGlobalVariable GameHour <= 19 and
IsInWorldSpace Sovengarde == 0

You will, however, find that you can no longer fast travel or wait. You might be able to get by with adding the same conditions to the MGEF itself, but if that doesn't work you will need a slightly more complicated setup. Again, no scripting involved for that but it involves a spell that adds an effect under those conditions, the effect adds a perk, the perk adds another spell which damages the player and has the fire effect associated with it.

-MM
User avatar
{Richies Mommy}
 
Posts: 3398
Joined: Wed Jun 21, 2006 2:40 pm

Post » Wed Jun 20, 2012 7:36 pm

You will, however, find that you can no longer fast travel or wait. You might be able to get by with adding the same conditions to the MGEF itself, but if that doesn't work you will need a slightly more complicated setup. Again, no scripting involved for that but it involves a spell that adds an effect under those conditions, the effect adds a perk, the perk adds another spell which damages the player and has the fire effect associated with it.

Isn't that how it should be?
User avatar
Laura Wilson
 
Posts: 3445
Joined: Thu Oct 05, 2006 3:57 pm

Post » Wed Jun 20, 2012 9:04 am

You don't need a script for any of this. in your spell conditions create an ability that uses a MGEF that damages health. For the MGEF, set the hitshader to the fire FX (don't recall off the top of my head) and make sure that FX Persist is checked on the MGEF. The spell should be of type ability, and constant effect. Then just use conditions similar to the sundamage conditions in the vanilla game. It's something along the line of:

IsInInterior == 0 and
GetGlobalVariable GameHour >= 5 and
GetGlobalVariable GameHour <= 19 and
IsInWorldSpace Sovengarde == 0

You will, however, find that you can no longer fast travel or wait. You might be able to get by with adding the same conditions to the MGEF itself, but if that doesn't work you will need a slightly more complicated setup. Again, no scripting involved for that but it involves a spell that adds an effect under those conditions, the effect adds a perk, the perk adds another spell which damages the player and has the fire effect associated with it.

-MM
So do I need to create a custom perk? Do I assign that perk under assoc. Item 1?

Then how do you differentiate between a negative and positive perk? The assoc. Item is just "health".

What type of effect archtype would you use?

I've done quite a bit of screwing around with all this already, (tried an ability with a constant effect and it wasn't constant) which is why I'm here asking specifically how to do it. I need something that applies damage every second, from what I can tell most magic effects are applied in one frame and that is the end of it until they are removed or expire by duration.
User avatar
joeK
 
Posts: 3370
Joined: Tue Jul 10, 2007 10:22 am

Post » Wed Jun 20, 2012 7:54 am

Sun damage is automatically applied to vampires in Vanilla based on a perk that gets assigned once something becomes a vampire. The damage is actually applied as part of the weather in a given region so that more sunlight = more damage.
User avatar
Claudia Cook
 
Posts: 3450
Joined: Mon Oct 30, 2006 10:22 am

Post » Wed Jun 20, 2012 10:39 pm

Sun damage is automatically applied to vampires in Vanilla based on a perk that gets assigned once something becomes a vampire. The damage is actually applied as part of the weather in a given region so that more sunlight = more damage.
I know how the vanilla system works. The vampire perk is on the player at game start, with conditions on it to work if the player becomes a vampire. The problem is all it does is stunt attribute regen and damage the stats a little.

What I want to know is how to damage the players health each SECOND, as if standing in one of those fire traps in a dungeon. Just like vanilla Oblivion did to vampires.

I tried adding another ability to the sundamage01 ability, the abdamagehealthconstant with a magnitude of 50 and nothing happened.
User avatar
BrEezy Baby
 
Posts: 3478
Joined: Sun Mar 11, 2007 4:22 am

Post » Wed Jun 20, 2012 11:52 pm

if the MGEF is set to constant effect, and a duration value set to 1 (1 sec) it will damage your damage amount (magnitude) each second (duration)



heres what i have on a working drain stamina effect:



in the MGEF record


Archetype: peak value modifier
casting type: constant effect
delivery: self

Assoc item 1: stamina (for yours, put health)


Flags:
detrimental
no area





in the spell record

type: Ability

then link your MGEF in the window with Magnitude as your damage per second, and Duration as 1

your daylight conditions would go in here, in this entry




then in your perks record

add a new perk entry and select Ability and point to your spell.
User avatar
Nicole Coucopoulos
 
Posts: 3484
Joined: Fri Feb 23, 2007 4:09 am

Post » Wed Jun 20, 2012 2:11 pm

if the MGEF is set to constant effect, and a duration value set to 1 (1 sec) it will damage your damage amount (magnitude) each second (duration) heres what i have on a working drain stamina effect: in the MGEF record Archetype: peak value modifier casting type: constant effect delivery: self Assoc item 1: stamina (for yours, put health) Flags: detrimental no area in the spell record type: Ability then link your MGEF in the window with Magnitude as your damage per second, and Duration as 1 your daylight conditions would go in here, in this entry then in your perks record add a new perk entry and select Ability and point to your spell.
This worked! Thank you very much! The part that was messing me up was the duration, as most abilities you set a zero duration and its on forever, and then if you give them a duration, they only last that long. But I guess since it's damage health constant.... that makes all the difference! Now I just need an effect and I'm good to go.
User avatar
Rachell Katherine
 
Posts: 3380
Joined: Wed Oct 11, 2006 5:21 pm

Post » Wed Jun 20, 2012 10:23 pm

Isn't that how it should be?

You miss the point. You will NEVER be able to fast travel if you don't take my approach because the game will constantly think you're taking damage even when you're not. Of course you shouldn't be able to fast travel when taking damage in the sun. :)

Sorry about the late replies MadMole. At least some other people have gone through the same trials and tribulations of implementing this unique approach to sun damage.

-MM
User avatar
victoria johnstone
 
Posts: 3424
Joined: Sat Oct 14, 2006 9:56 am

Post » Thu Jun 21, 2012 12:02 am

You miss the point. You will NEVER be able to fast travel if you don't take my approach because the game will constantly think you're taking damage even when you're not. Of course you shouldn't be able to fast travel when taking damage in the sun. :smile:

Sorry about the late replies MadMole. At least some other people have gone through the same trials and tribulations of implementing this unique approach to sun damage.

-MM
Yes and this is my latest dilemma. I can no longer wait or fast travel. I know roughly WHAT I need to do, but not HOW. I could write this in Oblivion, but I'm still learning Skyrim scripting.

I need to make a script (or function) that runs fast (every frame or whatever) and add/remove sun damage on the fly with conditions in the script.

The problem is, fquestdelaytime is gone. I am pretty sure it is now RegisterForUpdateGameTime now, but the syntax appears to only work in hours? Or can I use a decimal?

Can a quest have multiple RegisterForUpdateGameTime at various speeds?

So can someone write me an example function that adds a spell called VampireSunDamageBurning01 that uses these conditions and Registers for Updates once every 5 seconds?

IsInInterior = 0
IsGameHour < 18
IsGameHour > 7
GetInWorldSpace Sovngard = 0

I will still have these conditions on the spell itself so damage is removed when I go inside, so it doesn't have to be really fast. Maybe poll every 5 or so seconds would suffice. The only reason to add/remove the spell via script is so I can wait when indoors.
User avatar
Petr Jordy Zugar
 
Posts: 3497
Joined: Tue Jul 03, 2007 10:10 pm

Post » Wed Jun 20, 2012 9:24 am

i don't recommend using a polling script for this.

i would do what mofomojo suggested and expand on your existing sun damage system but only applies the actual damage MGEF when the conditions apply, using an extra "perk layer" to administer the damage effect when needed.

currently the damage effect is "enabled" 100% of the time which is what is causing your lack of travel.

using the guide i posted above, you can have that perk/ability be applied to the player by a spell that uses the "perk to add" dropdown.


it's basically going one more layer deeper into Perkception (cue gong sound effect)
User avatar
quinnnn
 
Posts: 3503
Joined: Sat Mar 03, 2007 1:11 pm

Post » Wed Jun 20, 2012 10:14 am

i don't recommend using a polling script for this. i would do what mofomojo suggested and expand on your existing sun damage system but only applies the actual damage MGEF when the conditions apply, using an extra "perk layer" to administer the damage effect when needed. currently the damage effect is "enabled" 100% of the time which is what is causing your lack of travel. using the guide i posted above, you can have that perk/ability be applied to the player by a spell that uses the "perk to add" dropdown. it's basically going one more layer deeper into Perkception (cue gong sound effect)
This is a separate spell and effect from the regular vanilla sun damage system. I am using an ability, and a magic effect set up as described above, but I am not using a perk. How would using a perk fix it? Are perk conditions treated differently than spell conditions? Like will I be able to fast travel?

P.S. I tried the conditions on the magic effect itself and it performed identical to having the conditions on the spell itself.
User avatar
NeverStopThe
 
Posts: 3405
Joined: Tue Mar 27, 2007 11:25 pm

Post » Wed Jun 20, 2012 2:50 pm

This is a separate spell and effect from the regular vanilla sun damage system. I am using an ability, and a magic effect set up as described above, but I am not using a perk. How would using a perk fix it?

The reason you can't fast travel is because your ability is hostile, and the game considers you as being under attack. Even when the ability is not active, as long as you still have the ability, you can't fast travel.

The point of using a perk is that the perk is not hostile. You aren't considered to be under attack, and you can fast travel. So you set the same conditions on the perk as you would have on the ability. When those conditions are met, the perk gives you the sun damage ability. When those conditions are no longer true, the perk takes away the damaging ability.


Nevermind. Thought that you could apply conditions to perks linked to abilities. Check Amethyst's post instead.
User avatar
Louise Andrew
 
Posts: 3333
Joined: Mon Nov 27, 2006 8:01 am

Post » Wed Jun 20, 2012 10:24 am

because using perks gives you an extra layer of manipulation.

you can use the perk to toggle your sun damage ability on/off in a much better way than a polling script would (i never recommend using update() polling scripts, unless you absolutely have to)


make a new perk called something like SunDamageEffect and make it an ability perk (by creating a new perk entry at the bottom). point the ability to your sun damage ability.


make another Magic Effect and call it something like SunDamageControllerMGEF

set the archetype to script (don't worry this is just a way of having a null archetype)

casting type: constant effect
delivery: self

set the Perk To Apply to your SunDamageEffect perk

you may also want to select Hide in UI under flags


now make another spell and call it SunDamageController.

set it to ability and apply the SunDamageControllerMGEF in the window. leave magnitude and duration at 0

set your daylight conditions here



give the new SunDamageController spell/ability to the player (remove the old one you had before).


what this does is it now toggles the sun damage on off by automatically adding and removing its perk each time (as governed by the conditions). you should be able to fast travel when its "off"
User avatar
danni Marchant
 
Posts: 3420
Joined: Sat Oct 07, 2006 2:32 am

Post » Wed Jun 20, 2012 3:45 pm

The reason you can't fast travel is because your ability is hostile, and the game considers you as being under attack. Even when the ability is not active, as long as you still have the ability, you can't fast travel.

The point of using a perk is that the perk is not hostile. You aren't considered to be under attack, and you can fast travel. So you set the same conditions on the perk as you would have on the ability. When those conditions are met, the perk gives you the sun damage ability. When those conditions are no longer true, the perk takes away the damaging ability.
Ok I am sold if it works. I am looking under perk entry point but I don't see anything which would add an ability. I made a new perk which is added by my spell but I don't know where to add my magic effect to the perk.
User avatar
Angus Poole
 
Posts: 3594
Joined: Fri Aug 03, 2007 9:04 pm

Post » Wed Jun 20, 2012 7:59 am

don't use Entry point. ability is a radio button to the left of Entry point
User avatar
butterfly
 
Posts: 3467
Joined: Wed Aug 16, 2006 8:20 pm

Post » Wed Jun 20, 2012 4:29 pm

don't use Entry point. ability is a radio button to the left of Entry point
OH crap I didn't even see it! Thank you so much. Hopefully I can get this working :)
User avatar
Marnesia Steele
 
Posts: 3398
Joined: Thu Aug 09, 2007 10:11 pm

Post » Wed Jun 20, 2012 9:18 pm

I was wrong when I made that post. Apparently you can only add conditions when you use a perk entry point. So instead of trying to do what I said (which is impossible), follow the suggestion in Amethyst's post.
User avatar
RObert loVes MOmmy
 
Posts: 3432
Joined: Fri Dec 08, 2006 10:12 am

Post » Wed Jun 20, 2012 9:34 am

Phew! Success! Thanks everyone for all the help. Least I didn't have to write a script, but wow, two magic effects, two spells, and one perk for such a simple thing!

One last question...
Is there an easy way to adjust the amount of sun damage I get? I'd like to magnify the sun damage based on how hungry my vampire is, without making a boatload of new spells to add and remove all the time.
User avatar
Lalla Vu
 
Posts: 3411
Joined: Wed Jul 19, 2006 9:40 am

Post » Wed Jun 20, 2012 9:36 pm

im not familiar with the vampire values, but if you can return a value for your hunger in the conditions, you can use that to control multiple versions of the system you just made each one differing in magnitude (on the spell that actually does the damage) as well as conditions on the perk that is given to the player.

but in this case it might be tangling a web larger than necessary. so adding a script on the magic effect that deals the damage may be the simpler solution, rather than copying the entire chain of perk/spell/mgef multiple times for different damage values
User avatar
Albert Wesker
 
Posts: 3499
Joined: Fri May 11, 2007 11:17 pm

Post » Wed Jun 20, 2012 1:37 pm

im not familiar with the vampire values, but if you can return a value for your hunger in the conditions, you can use that to control multiple versions of the system you just made each one differing in magnitude (on the spell that actually does the damage) as well as conditions on the perk that is given to the player.

but in this case it might be tangling a web larger than necessary. so adding a script on the magic effect that deals the damage may be the simpler solution, rather than copying the entire chain of perk/spell/mgef multiple times for different damage values
Yeah I want to avoid that. I was thinking that perks could multiply damage, like when you select a base skill perk your damage increases, I was hoping to make perk ranks or something but I'm not real familiar with perks, and documentation seems pretty scarce yet.
User avatar
Mrs Pooh
 
Posts: 3340
Joined: Wed Oct 24, 2007 7:30 pm

Post » Wed Jun 20, 2012 10:59 pm

I'm glad you got this all sorted!
User avatar
Victoria Vasileva
 
Posts: 3340
Joined: Sat Jul 29, 2006 5:42 pm

Post » Wed Jun 20, 2012 12:27 pm

i think this may help (without having to use scripts or make multiple perk chains), but this will only work if you can return a value for vampire hunger through the conditions


open your sun damage ability (not the controller, the original ability that actually causes the dmg per second)


here you should already have one mgef entry in the window, where you set the magnitude and duration for the dmg per second.

double click on it to edit the conditions. it might still have your daylight conditions in here from last time. delete them (they are no longer needed since daylight conditions should now be handled by the "controller" perk chain)

add new conditions that would return the desired value range for your vampire's hunger.

something like this (of course this is hypothetical because i don't know anything about vampire hunger or what value would return it)


GetActorValue VampireHunger > 0 AND
GetActorValue VampireHunger <= 10 AND

hit ok to save it


then right click the mgef window to add another of the same mgef sun damage effect.

set the magnitude to a higher damage rating, leave duration at 1 sec


and in conditions add another set of value range for your vampire hunger.

GetActorValue VampireHunger > 10 AND
GetActorValue VampireHunger <= 20 AND


etc

do this as many times as you need, as long as your conditions don't overlap values, it will only fire one of the magic effect entries depending on your vampires level of hunger
User avatar
Katharine Newton
 
Posts: 3318
Joined: Tue Jun 13, 2006 12:33 pm

Next

Return to V - Skyrim