[RELz]Stealthy Absorbs and Drains

Post » Wed Sep 01, 2010 4:21 pm

Just a little mod I whipped up today for myself. Just one of those things about vanilla that always irked me and I finally got around to doing something about it. Thought I'd share it in case anyone else was interested. I'm not much of a scripter, though, and this hasn't been tested very thoroughly, so let me know if you have any problems.

http://www.tesnexus.com/downloads/file.php?id=28292

Stealthy Absorbs and Drains v 1.0
=================================
Requires OBSE v 14+

This mod makes Absorb and Drain Attribute and Skill spells non-hostile if your skill in the corresponding school AND your sneak skill are both higher than the casting cost of the spell. This makes it possible to do things like absorb a merchant's mercantile skill to get better deals when buying equipment or a passing NPC's luck to get better odds at the arena without alerting anyone and causing them to go on the offensive.

This is a small mod intended to add a little bit of variety and usefulness to some otherwise pretty useless spells, and to make quests in the city a little more interesting for stealth-type characters who use magic. Because the power of the spells that the player can employ discreetly is limited by at least two skills, it does so without affecting the balance of the game significantly. These are the kinds of effects I would expect any competent occult swindler to be able to employ as a routine part of their trade and I added them primarily because I find them more realistic and immersive than the vanilla variants.

Note that this mod does not affect Absorb or Drain Fatigue, Health or Magicka which will continue to behave like ordinary attacks.

Details
-------
This mod adds one script and one quest which runs every 5 seconds and should not noticeably impact your framerate. The script only updates when you change spells, so if one of your skills has changed that will affect your ability to cast one of these spells undetected you may have to change your spell to update the script. (Done intentionally to reduce the processing overhead.) If the spell you equip can be cast without detection, you will be given notice via a message on screen; so if you don't see a message, don't cast the spell!

The script is set to test your lowest skill score against the actual magicka cost of the spell. If you want to adjust this amount you can tweak it in-game via the console command 'aaStealthyAbDr.detectMult x.xxx' where 'x.xxx' is the multiplier you would like to use. The default is 1.0. Setting it to 2.0 will double the skill requirement; setting it to 0.5 will halve it. Once you have a number you like, you can open the mod in the CS and change the line 'set detectMult to 1.0' to the new number. (Sorry, no .ini file for a single variable. :P ) If you don't change the number in the plugin you will have to set the value via the console command every time you play, but 1.0 should work for most people.

Install
-------
Place the StealthyAbsorbsAndDrains.esp in your data directory and select it in your mod list.

Uninstall
---------
Delete the StealthyAbsorbsAndDrains.esp from your data directory and deselect it from your mod list.

Known Conflicts
---------------
Other mods that change the hostile/non-hostile status of these four magic effect types. (Highly unlikely.)

Bugs
----
None known, but please contact me via the official forum post at the Bethesda Game Studio Forums if you encounter any. This is version 1.0, so it hasn't been tested very thoroughly.

Possible Extensions
-------------------
I may make the disposition of NPCs go down a little after you covertly cast a spell on them. Even if they don't consciously detect your action, your presence may make them feel uncomfortable for reasons they 'can't quite put their finger on'.

Credits
-------
LoginToDownload for a post from a couple of years ago on the TESNexus forums that was extremely helpful.
All the great modders who make this game the best.game.ever.
Bethesda for giving us the canvas and the paints. You can fault the games, but not the awesome.

Version History
---------------
1.0 Initial release

User avatar
Katharine Newton
 
Posts: 3318
Joined: Tue Jun 13, 2006 12:33 pm

Post » Wed Sep 01, 2010 11:10 pm

cool, thats always annoyed me too, but i forgot about it till just now, thanks for the mod, downloaded and will test later :D
User avatar
FABIAN RUIZ
 
Posts: 3495
Joined: Mon Oct 15, 2007 11:13 am

Post » Wed Sep 01, 2010 12:22 pm

neat concept, ill have to give it a whirl :) Thanks!
User avatar
Nikki Morse
 
Posts: 3494
Joined: Fri Aug 25, 2006 12:08 pm

Post » Thu Sep 02, 2010 3:11 am

Does it also work against you the player?

If so it is a great companion mod for Reneer's NPCs sneak mod.

not that those spells are cast much against you (but it has happened to me).
User avatar
Enie van Bied
 
Posts: 3350
Joined: Sun Apr 22, 2007 11:47 pm

Post » Wed Sep 01, 2010 7:11 pm

Does it also work against you the player?

If so it is a great companion mod for Reneer's NPCs sneak mod.


I didn't really see how NPCs could make use of it, since it does nothing to change the spell effect graphics, so the player would know they were being attacked. I suppose it could be a scripted effect, but I'm not sure how I would implement it. It would have to detect the NPCs spell, cancel it, and replace the spell with a scripted effect on the player. But since I only see NPCs using spells like this if they are attacking, it wouldn't really make any difference whether the player saw the spell effect or not. Of course, I'm not familiar with Reneer's NPCs sneak mod, so who knows. It's a good idea, if you can get NPCs to behave themselves with it. And you can always add the feature yourself if you like.

Thanks for the feedback.
User avatar
naana
 
Posts: 3362
Joined: Fri Dec 08, 2006 2:00 pm

Post » Wed Sep 01, 2010 2:55 pm

I can't believe such a useful little mod gets so little attention, but oh well...

I have some news: Another extremely useful yet not so widely known tool, http://www.tesnexus.com/downloads/file.php?id=31981, unfortunately makes this mod stop working, due to the patching it does to some OBSE commands. I don't really know what the conflict is, but I would bet it has to do with the new hostility flags OBME introduces: in regular OBSE scripting, SetSpellHostile can toggle between 0 for non hostile and 1 for hostile, which is what this mod uses. OBME changes the flags to 1 for neutral, 2 for hostile, and 4 for beneficial.
I have recently managed to script an OBME version of this mod, which toggles hostility on the individual effects rather than the whole spell, and checks for the schools associated to drain and absorb effects for doing the calculations, instead of only assuming that they are destruction and restoration. If you want I could send it to you and you could provide it along the regular version for those not using OBME. You can also check the script for some improvements to the regular version, namely just the check for absorb and drain associated skills, everything else doesn't work without the OBME_CS.dll
User avatar
Julie Serebrekoff
 
Posts: 3359
Joined: Sun Dec 24, 2006 4:41 am

Post » Wed Sep 01, 2010 3:58 pm

Thanks for the information and the work you've put into updating the mod. Tbh, I wasn't sure anyone was using it. :D

If you want to pass on the file, I'd be happy to take a look at it. I don't know the first thing about OBME since I've been busy with a stack of other projects but I'll check it out as soon as I get a chance. Once I've given it a look I'll be happy to add it as an alternate dl. With appropriate credit of course.

Thanks again. :wavey:
User avatar
Sammygirl
 
Posts: 3378
Joined: Fri Jun 16, 2006 6:15 pm

Post » Wed Sep 01, 2010 3:33 pm

This is awesome.

I would comment that you've gone a bit overboard on optimizing efficiency (at the cost of performance, IMO) - you could have that script run every single frame, and check if the spell or either of the relevant skills has changed every time (obviously the rest only needs to happen when one of them changes), and it would not affect anyone's framerate at all. That would be a very lightweight script (you could seriously have something like that running several hundred times per frame before you'd see any framerate impact; I know because I've been a part of some rather extensive performance testing of Oblivion's script engine), and I think the mod would work better if it did run every frame, so you don't get awkward situations where you have to "wait" before casting a spell stealthily (waiting for the quest to run once every five seconds), or the script doesn't reflect changes to your skills.

Just a small bit of commentary on the mod. Otherwise, pretty awesome. I just think you've been (very) overly conservative with the script, and it's hurting the mod somewhat.
User avatar
JaNnatul Naimah
 
Posts: 3455
Joined: Fri Jun 23, 2006 8:33 am

Post » Wed Sep 01, 2010 3:14 pm

I've reported the OBME incompatibility to JRoush -- that's something that should probably be fixed in OBME 2.0. Breaking a handful of scripts by authors who are almost certainly still active and guaranteed to be aware of OBME is probably better than breaking scripts by authors who may be neither.

Magician, we discussed this idea some time ago and it's still slated for inclusion in Ars... interestingly enough, your version is significantly more complex. :) But this is probably the only way it can be done without OBME. Just changing the base effects to be non-hostile causes drain poisons to become drain potions!
User avatar
Raymond J. Ramirez
 
Posts: 3390
Joined: Sun Oct 14, 2007 8:28 am

Post » Thu Sep 02, 2010 12:55 am

Darn! I didn't know about the incompatibility. I guess I'll just have to wait for Ars Gratis... uh, rest of name forgotten... Hurry up, Tejon! :)
User avatar
Causon-Chambers
 
Posts: 3503
Joined: Sun Oct 15, 2006 11:47 pm

Post » Wed Sep 01, 2010 12:48 pm

...you've gone a bit overboard on optimizing efficiency (at the cost of performance, IMO)...

Yeah. Scripting is not my strong point, and this was my first serious attempt at it. Even though the script is lightweight, I got worried about people running hundreds of scripts at the same time. For someone like me, with an old PC, who doesn't know a lot about script optimization, that seemed like it could be an issue. Still, if I ever get around to updating the mod, I'll be sure to crank it up a notch. Thanks for the feedback. :)


Magician, we discussed this idea some time ago and it's still slated for inclusion in Ars...

How's that coming, btw?
User avatar
michael danso
 
Posts: 3492
Joined: Wed Jun 13, 2007 9:21 am


Return to IV - Oblivion