Efficiently get a "continuous" spell to do pulsed da

Post » Wed May 11, 2016 6:50 pm

For everyone who doesn't know, so-called "concentration" damage spells actually fire off a fixed number of missiles per second (defined in the magic effect projectile). In practice, they are attached to damage effects with a duration of 1 second.


Here's the problem: The damage effect duration is always 1 second no matter how long you hold down the mouse button for - allowing players to "cheat" with rapid clicks (hold the mouse button down just long enough to inflict damage and then release it - this always causes the full amount of damage for insignificant energy cost).


If that made no sense - in a nutshell: the Flames spell could be mechanically described as "Costs 12 energy per second. Every quarter second while casting, send out a cloud of flame that inflicts 8 fire damage over 1 second." (this means that you could cast a quarter second and get the full damage - aka cheating).


The obvious solution: split the damage over the projectiles to enforce fair cost. For example, if Flames was reworked in this manner, it would look like "Costs 12 energy per second. Every quarter second while casting, send out a cloud of flame that inflicts 2 fire damage instantly." You click a quarter second and you get a quarter of the listed DPS. You click a full second and you get the listed DPS.


The problem: Skyrim appears to be hell-bent on preventing any efficient solution.


I tested continuous effects tied to a damage effect with a duration of 0 and they did almost no damage. I'm guessing that with a duration of 0, the effect runs for a frame and then expires. Is there any way to get cast duration on "concentration" casting types to work like how it did in Elder Scrolls IV: Oblivion? (in particular, a null duration would cause all effects instantly).

Also: effect duration appears to only take integers (no floats/doubles), otherwise I would just set the duration to the projectile recast interval.


My current solution is ugly and inefficient: frame the damaging part of the spell as a Script Effect with duration 0, then script the damage. (yes, this means that the Papyrus engine would have to fire off a script every quarter second.) Anyone have a better idea?
User avatar
Lucy
 
Posts: 3362
Joined: Sun Sep 10, 2006 4:55 am

Post » Wed May 11, 2016 12:07 pm

Skyrim is woefully lackadaisical with anything that has to do with precise timing or any repeat timing that is less than 1000 milliseconds.



Scripting it may get you in the ball park but will also be unreliable (at 250 milliseconds) if other scripts are fighting for their time concurrently. So you will need to either "compromise" or create the illusion of what you are after by faking it.



Otherwise if you are very comfortable with programming you could look into making a SKSE plugin that seems to handle timing in a different way (Cuts in the front of the line of other scripts?). Some of our better programmers with script heavy mods (like frost fall I think) have solved timing issues that way.



This is not a miracle solve all for skyrim scripting (they have limitations as well) but for some kinds of scripts it seems to work well for those mod authors that can make plugins.

User avatar
Amiee Kent
 
Posts: 3447
Joined: Thu Jun 15, 2006 2:25 pm

Post » Wed May 11, 2016 6:51 pm

I think problem mentioned in topic start post is no way to change spell cost through script.

User avatar
Stacy Hope
 
Posts: 3391
Joined: Thu Jun 22, 2006 6:23 am


Return to V - Skyrim

cron