Jump to content

Need help designing Spells and MagicEffects (CK, Papyrus)


gooser

Recommended Posts

Hello Masters of CreationKit and Papyrus,
 
I currently struggling trying to wrap up some work on my Apropos mod concerning Wear and Tear Effects (actor value debuffs).
 
As a matter of educating myself, I've spent time reading CreationKit.com naturally, and also looking at other SL mods that do similar things (cast spells on an actor, usually the PC to create 'debuff effects' related to sexual activities). For example - Defeat, SexLabUtil1, etc.
 
Some questions still exist in my mind about the best way to tackle this:
 
1. Do I cast the Spell via Cast or RemoteCast (e.g. oralDebuffSpell.Cast(anActor) vs oralDebuffSpell.RemoteCast(anActor, anActor, anActor)). I've seen both forms used, read the descriptions on CK.com, but still an unsure which is the best choice.
 
2. Do I use Constant Effect or Fire and Forget? My debuff effects need to stay active until my scripts cancel them (via DispelSpell). Therefore, they really should be duration-less. But when I tried Constant Effect, they never seem to take effect and show up in the Magic Tab. 
 
I'm trying to implement the following effects to tie into the Wear & Tear system in Apropos:
 

Oral
Level 0 - +15 speech
Level 1 - no stats
Level 2 - no stats
Level 3 - no stats
Level 4 - - 5% magicka regen
Level 5 - -10% magicka regen -5 Speech
Level 6 - -15% magicka regen -10 Speech
Level 7 - 20% magicka regen -15 Speech
Level 8 - 25% magicka regen -20 Speech
Level 9 - 30% magicka regen -25 Speech

Vaginal
Level 0 - +15% stamina regen
Level 1 - no stats
Level 2 - no stats
Level 3 - no stats
Level 4 - - 5% stamina/health regen
Level 5 - -10% s/h regen
Level 6 - -15% s/h regen -5% movement
Level 7 - -20% s/h regen -10% movement
Level 8 - -25% s/h regen -15% movement
Level 9 - -30% s/h regen -20% movement

anal
Level 0 - no stats
Level 1 - no stats
Level 2 - no stats
Level 3 - no stats
Level 4 - - 5% stamina/health regen
Level 5 - -10% s/h regen -5% movement
Level 6 - -15% s/h regen -10% movement
Level 7 - -20% s/h regen -15% movement
level 8 - -25% s/h regen -20% movement
level 9 - -30% s/h regen -25% movement

Oral-hardcoremode
Level 0 - +15 speech
Level 1 - no stats
Level 2 - no stats
Level 3 - no stats
Level 4 - - 5% magicka regen
Level 5 - -10% magicka regen -5 Speech
Level 6 - -20% magicka regen -10 Speech
Level 7 - -30% magicka regen -20 Speech
Level 8 - -40% magicka regen -30 Speech
Level 8 - -50% magicka regen -40 Speech

Vaginal-hardcoremode
Level 0 - +15% stamina regen
Level 1 - no stats
Level 2 - no stats
Level 3 - no stats
Level 4 - - 5% stamina/health regen
Level 5 - -10% s/h regen
Level 6 - -20% s/h regen -5% movement
Level 7 - -30% s/h regen -10% movement
Level 8 - -40% s/h regen -20% movement
Level 9 - -50% s/h regen -30% movement

anal-hardcoremode
Level 0 - no stats
Level 1 - no stats
Level 2 - no stats
Level 3 - no stats
Level 4 - - 5% stamina/health regen
Level 5 - -10% s/h regen -5% movement
Level 6 - -20% s/h regen -10% movement
Level 7 - -30% s/h regen -20% movement
level 8 - -40% s/h regen -30% movement
Level 9 - -50% s/h regen -35% movement

 
(The "levels" in the above list come from the W&T levels in Apropos, which range from 0 to 9)
 
I have created the following spells and effects to pull this off:
 
(all Spells and Effects are Fire and Forget, all included Effects configured with 1day duration*, all Effects designed as Peak Value Modifier**)
 
1. Anal Debuff Spell combining two effects for Stamina and Health regen damage
2. Anal Debuff Speed for Speed Damage
3. Oral Debuff Spell for Magicak regen damage
4. Oral Debuff Spell for Speech skill damage
5. Vaginal Debuff Spell combining two effects for Stamina and Health regen damage
6. Vaginal Debuff Spell for Speed Damage
 
* again, not sure this correct, I tried Constant Effect before but had problems so I switched to F&F using 1 day durations.
** I'm not sure why I need PVM instead of VM. I would think VM would work - yet, examples show PVM used instead of VM.
 
Some additional notes:
 
1. I initially created one DamageStamina MEF to be shared between the Anal and Vaginal debuff spells, but split into two effects, in order to have unique descriptions.
2. I initially created one DamageHealth MEF to be shared between the Anal and Vaginal debuff spells, but split into two effects, in order to have unique descriptions.
3. I'm not sure why, but the DamageHealRate MEFs target "HealRateMult" not "HealRate". That is based upon looking at the other mods I mentioned (e.g. DefeatDebuffWoundedSPL, etc.) Same for StaminaRate vs StaminaRateMult, etc.
4. In one case, the "<mag>" substitution never gets made (cf. AproposSpeedDebuff-MAGTokenNotSubstituted.jpg) when viewing the Magic Tab in game.
5. In one, the description for the effect is not shown at all in the Magic Tab (cf. AproposSpeechImpairment_DescriptionMissing.jpg)
 
I'm attaching screenshots of the 6 spells and 8 effects in CK. 
 
I would appreciate any help from experienced modders regarding this topic. I'm starting to get frustrated (more than I usually get)....
 
THANKS - Gooser

post-76197-0-95114300-1411675024_thumb.png

post-76197-0-88419400-1411675025_thumb.png

post-76197-0-22555400-1411675026_thumb.png

post-76197-0-53707900-1411675026_thumb.png

post-76197-0-86799000-1411675026_thumb.png

post-76197-0-15190300-1411675027_thumb.png

post-76197-0-41853100-1411675027_thumb.png

post-76197-0-82268600-1411675066_thumb.png

post-76197-0-87242100-1411675067_thumb.png

post-76197-0-59799200-1411675068_thumb.png

post-76197-0-06996000-1411675069_thumb.png

post-76197-0-39034400-1411675069_thumb.png

post-76197-0-72922800-1411675069_thumb.png

post-76197-0-04741300-1411675070_thumb.png

post-76197-0-31544500-1411675070_thumb.png

post-76197-0-61423300-1411675070_thumb.png

post-76197-0-38295900-1411675292_thumb.jpg

post-76197-0-50593300-1411675350_thumb.jpg

Link to comment

For scripted effects I've usually added them with actor.AddSpell(spell), with the effect set up as ability, constant effect & duration 0 in the spell iirc. That should keep them up until you remove them with scripts. It won't be reliable for NPCs though, the effects will get removed on area changes, unloads etc.

 

Durationless actually makes them disappear as soon as they're cast. The OnEffectStart event fires at least, I assume OnEffectFinish will as well. 

 

I've noticed the descriptions can be slightly buggy though. For example, in FHU I have a spell which has 3 effects: script to slow down the player different amounts depending on some conditions, PVM to decrease healrate and PVM to decrease staminarate. The heal & staminarate are two different magic effects with different descriptions. Ingame their names will show up correctly in the active effects window but both will have the same description. May or may not be related to your <mag> issue, though that I haven't seen myself.

Link to comment

Durationless actually makes them disappear as soon as they're cast. The OnEffectStart event fires at least, I assume OnEffectFinish will as well. You'll want to set them to ability, constant effect & duration 0s in the spell iirc to keep them up until your script removes them. It won't be reliable for NPCs though, the effects will get removed on area changes, unloads etc.

 

What about NPC's for which IsPlayerTeammate is true or followers?

Link to comment

For scripted effects I've usually added them with actor.AddSpell(spell), with the effect set up as ability, constant effect & duration 0 in the spell iirc. That should keep them up until you remove them with scripts. It won't be reliable for NPCs though, the effects will get removed on area changes, unloads etc.

 

Durationless actually makes them disappear as soon as they're cast. The OnEffectStart event fires at least, I assume OnEffectFinish will as well. 

 

I've noticed the descriptions can be slightly buggy though. For example, in FHU I have a spell which has 3 effects: script to slow down the player different amounts depending on some conditions, PVM to decrease healrate and PVM to decrease staminarate. The heal & staminarate are two different magic effects with different descriptions. Ingame their names will show up correctly in the active effects window but both will have the same description. May or may not be related to your <mag> issue, though that I haven't seen myself.

 

What's the difference between:

 

actor.AddSpell(spell) 

 

and 

 

spell.Cast(actor)

 

?

 

I thought the former added the to the actor's list of known spells, but didn't actually cast the spell on the actor.

 

As I've read through Other Peoples Code, i've noticed both, with variations. For instance SexLabUtil1 consistently uses spell.RemoteCast(actor, actor, actor). Not sure why. Defeat uses AddSpell (I think) and Cast(actor).

 

????

Link to comment

Well, addSpell "adds the spell to the character", so passive ones like ability & script type effects get activated. You'll also get the "spellname added" text if you don't mute it with one of the paramters.

 

RemoteCast is more like the actual casting and lets you assing a caster and someone to blame, but short of fiddling with it once, I haven't used it all.

Link to comment

Yes, yes. I see that in the docs now. I haven't bumped into Spells as Abilities until now. Was just checking out how SexLab Aroused managed its "Lover's Desire" 'effect'. It is a Spell as an ability containing several MEF's, all controlled by conditions, and each MEF is linked to a custom perk... the perk modifies how fast your skills increase as a percentage.

Link to comment

I have solved my issue #4 in the OP

 

4. In one case, the "<mag>" substitution never gets made (cf. AproposSpeedDebuff-MAGTokenNotSubstituted.jpg) when viewing the Magic Tab in game

 

I had left a Description override in one of the spells. Apparently Description overrides in spells do not perform the <mag> or <dur> substitutions reliably.

Link to comment

You can rely on the <mag> and <dur> replacements. But they will only get replaced if there is actually a duration and/or magnitude.

 

If you want your effects only be applied to the player, use perks. They are useful for durationless modifications. Even better, they allow you to manipulate the Actor Values you want way easier.

I don't see a reason why NPC's should be affected by such debuffs anyway because from what I've reading what you are planning to do they have little to no impact anyway.

Link to comment

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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