[RELz] Oblivion Magic Extender v1.0

Post » Tue Mar 29, 2011 9:57 pm

I see _effect_ icon handlers, but no spell icon handler.

They're the same thing. IIRC, a spell's icon is set to the icon for its dominant effect, i.e. the one that costs the most magicka. (It's either that or the spell's first effect. I honestly forget, but it'd be easy to test.) Anyway, what you're looking for is the effect override fields, described on page 9 and 10. You just need to override the icon for the effect that the spell's icon is inherited from.
User avatar
Nicole M
 
Posts: 3501
Joined: Thu Jun 15, 2006 6:31 am

Post » Wed Mar 30, 2011 7:45 am

They're the same thing. IIRC, a spell's icon is set to the icon for its dominant effect, i.e. the one that costs the most magicka. (It's either that or the spell's first effect. I honestly forget, but it'd be easy to test.) Anyway, what you're looking for is the effect override fields, described on page 9 and 10. You just need to override the icon for the effect that the spell's icon is inherited from.

The spell icon replacer only replaces the spell's icon, it doesn't touch any of the effects unless it's a 1-effect scripted spell - then the script effect shares the main icon. I'd like to avoid changing the icons for effects if at all possible - that way you can still tell at a glance what each item is, it's more coherent that way.
User avatar
Allison C
 
Posts: 3369
Joined: Mon Dec 18, 2006 11:02 am

Post » Tue Mar 29, 2011 11:48 pm

I just had a quick look through the documentation - is it possible to set spell icons yet? I enjoy using the customspellicons mod and I'm also interested in developing something using OBME. I was thinking of porting the customspellicons scripts over to use the OBME set spell icon function, but I can't seem to find it. I see _effect_ icon handlers, but no spell icon handler.

As you and tejon noted, you can indirectly set the spell icon by overriding the icon of the dominant effect. If you want to set *just* the spell icon, I'm afraid you'll have to wait for v2.

The next version of Custom Spell Icons ought to compatible with OBME v2 anyway - provided I can get a hold of statttis, from whom I have not heard in quite some time.
User avatar
Sophie Louise Edge
 
Posts: 3461
Joined: Sat Oct 21, 2006 7:09 pm

Post » Tue Mar 29, 2011 10:36 pm

As you and tejon noted, you can indirectly set the spell icon by overriding the icon of the dominant effect. If you want to set *just* the spell icon, I'm afraid you'll have to wait for v2.

The next version of Custom Spell Icons ought to compatible with OBME v2 anyway - provided I can get a hold of statttis, from whom I have not heard in quite some time.

Ok, that's what I was asking - I'm looking forward to v2.
User avatar
Alisha Clarke
 
Posts: 3461
Joined: Tue Jan 16, 2007 2:53 am

Post » Wed Mar 30, 2011 3:36 am

It seems like I'm having a problem in a script using GetNthEffectItemCode, the script doesn't seem to work at all. It is from http://www.tesnexus.com/downloads/file.php?id=28292.
Spoiler
scn aaStealthyAbsorbsAndDrainsScriptfloat detectMultshort doOnceref playerSpellref oldPlayerSpellshort ABATplayershort DRATplayershort playerSneakshort lowestSkilllong DRATCodelong DRSKCodelong ABATCodelong ABSKCodeshort nthEffectlong nthEffectCodefloat spellMagickaCostshort totalEffectsshort isDrainshort isAbsorbint DRATSchoolint ABATSchoolBegin GameMode	; set the detection multiplier	if doOnce == 0		set oldPlayerSpell to getPlayerSpell		set detectMult to 1.0		set doOnce to 1	endif			; get the equipped spell	set playerSpell to getPlayerSpell	; if the player hasn't changed their spell, skip	if playerSpell == oldPlayerSpell		return	; otherwise, update the script	else		set oldPlayerSpell to playerSpell	endif	; get the player's current skill scores	set playerSneak to player.getAV sneak	; set the codes we're checking	set DRATCode to getMagicEffectCode DRAT	set DRSKCode to getMagicEffectCode DRSK	set ABATCode to getMagicEffectCode ABAT	set ABSKCode to getMagicEffectCode ABSK	set DRATSchool to 20 + getMagicEffectSchoolC DRATCode	set ABATSchool to 20 + getMagicEffectSchoolC ABATCode	set ABATplayer to Player.GetAVC ABATSchool	set DRATplayer to Player.GetAVC DRATSchool	; set other variables	set isDrain to 0	set isAbsorb to 0		; check the spell to see if it has one of the target affects	if magicHasEffectC DRATCode playerSpell || magicHasEffectC DRSKCode playerSpell || magicHasEffectC ABATCode playerSpell || magicHasEffectC ABSKCode playerSpell			; if it has one of the effects, we now need to check if other effects disqualify it				; set the limits for the loop		set totalEffects to getMagicItemEffectCount playerSpell		set nthEffect to 0				; loop through the spell effects		SaveIP		set nthEffectCode to getNthEffectItemCode playerSpell nthEffect		if nthEffect < totalEffects			if nthEffectCode == DRATCode || nthEffectCode == DRSKCode				set isDrain to 1 ; record the spell effect type so we know what skill to test				set nthEffect to nthEffect + 1				RestoreIP			elseif nthEffectCode == ABATCode || nthEffectCode == ABSKCode				set isAbsorb to 1 ; record the spell effect type so we know what skill to test				set nthEffect to nthEffect + 1				RestoreIP			elseif isMagicEffectHostileC nthEffectCode				; if the spell has a hostile effect we don't want to change, abort and clear out variables				set isDrain to 0				set isAbsorb to 0				return			else				; skip over any other spell effects				set nthEffect to nthEffect + 1				RestoreIP			endif		endif		; set the sneak skill to be the lowest skill by default		set lowestSkill to playerSneak				; compare the sneak to the destruction and/or restoration skills to get the lowest skill score		if isDrain == 1 && isAbsorb == 0			if DRATplayer < lowestSkill				set lowestSkill to DRATplayer			endif		elseif isDrain == 0 && isAbsorb == 1			if ABATplayer < lowestSkill				set lowestSkill to ABATplayer			endif		elseif isDrain == 1 && isAbsorb == 1			if DRATplayer < ABATplayer && DRATplayer < lowestSkill				set lowestSkill to DRATplayer			elseif ABATplayer < DRATplayer && ABATplayer < lowestSkill				set lowestSkill to ABATplayer			endif		endif		; get the cost of the current spell		set spellMagickaCost to (player.getSpellMagickaCost playerSpell * detectMult)				; compare the cost of the spell to the lowest skill		if spellMagickaCost > lowestSkill			; if the magicka cost exceeds the skill, abort, and make sure the spell stays hostile			setSpellHostile playerSpell 1			return		else			; otherwise, change the hostility to non-hostile			setSpellHostile playerSpell 0			; and let the player know it is safe to cast			message "This spell can be cast without detection"		endif	endifEnd

I rewrote the script a bit, but basically what it does is toggling the hostile flag on a spell off if it has an absorb or drain effect and the player's sneak and corresponding school skill are higher than the cost. With no OBME.dll it works as expected in a test save, but as soon as I add OBME.dll, the spell will remain hostile, even though the end message "This spell can be cast without detection" appears.
Since GetNthEffectItemCode seems to be the only command which OBME explicitly patches as per the documentation, and everything else seems compatible, are there any alternatives to GetNthEffectItemCode, even with OBME-added commands? I really need this mod to get better deals with merchants...
User avatar
Dawn Porter
 
Posts: 3449
Joined: Sun Jun 18, 2006 11:17 am

Post » Wed Mar 30, 2011 5:59 am

migck raised an issue http://www.gamesas.com/index.php?/topic/1056666-relzstealthy-absorbs-and-drains/ about SetSpellHostile... it seems your override is runtime-incompatible with the base OBSE version, so non-OBME-aware mods that use this command actually break when OBME is added.
User avatar
Charles Weber
 
Posts: 3447
Joined: Wed Aug 08, 2007 5:14 pm

Post » Wed Mar 30, 2011 5:12 am

I'm glad to see this progressing nicely.
I was wondering about the item consuming/requiring spell effects that was discussed a while back.
User avatar
Skivs
 
Posts: 3550
Joined: Sat Dec 01, 2007 10:06 pm

Post » Wed Mar 30, 2011 9:04 am

One quick question, have you planned or would you mind unlocking scripted effects' magnitude stat, if that's possible? Even if that value does nothing, I'd really appreciate it, it would be of great help.
User avatar
Gemma Flanagan
 
Posts: 3432
Joined: Sun Aug 13, 2006 6:34 pm

Post » Wed Mar 30, 2011 12:24 am

I've noticed this mod tends to break when used with vampirism in some cases. Not sure about all, but I'm using the LTD vampires mod and most saves simply crash upon loading when using it with OBME. Removing OBME fixes the problem. My guess is that it is the handling of the vampire bonuses that causes the problem with OBME, cause what else could it be? It's a shame, cause I really miss the spell overwriting and partial dispel. :(
User avatar
Gavin boyce
 
Posts: 3436
Joined: Sat Jul 28, 2007 11:19 pm

Post » Wed Mar 30, 2011 3:42 am

It seems like I'm having a problem in a script using GetNthEffectItemCode
migck raised an issue http://www.gamesas.com/index.php?/topic/1056666-relzstealthy-absorbs-and-drains/ about SetSpellHostile... it seems your override is runtime-incompatible with the base OBSE version, so non-OBME-aware mods that use this command actually break when OBME is added.

Thank you for pointing that out. I apparently overlooked that function when writing my patches. I will obviously fix this in v2, but if that looks like it will take too long I will release a v1.1 patch to address it as well.

I'm glad to see this progressing nicely.
I was wondering about the item consuming/requiring spell effects that was discussed a while back.
This will be possible in OBME v2. Magic effects aren't going to have a material cost, per se, but you will be able to fake one very convincingly using a combination of the new handlers and script callbacks.

One quick question, have you planned or would you mind unlocking scripted effects' magnitude stat, if that's possible? Even if that value does nothing, I'd really appreciate it, it would be of great help.
This is already possible. Open the 'Magic Effects' dialog, select "Script Effect", and check the box labeled 'Has a Magnitude'.

I've noticed this mod tends to break when used with vampirism in some cases. Not sure about all, but I'm using the LTD vampires mod and most saves simply crash upon loading when using it with OBME. Removing OBME fixes the problem. My guess is that it is the handling of the vampire bonuses that causes the problem with OBME, cause what else could it be? It's a shame, cause I really miss the spell overwriting and partial dispel. :(
This may be the same issue that caused CTDs for a number of other people as well. Could you email me (jroush.tesmods@gmail.com) a copy of your savegame and the debugging logs (OBME.log, found in your Oblivion\ folder)?
User avatar
Siobhan Wallis-McRobert
 
Posts: 3449
Joined: Fri Dec 08, 2006 4:09 pm

Post » Wed Mar 30, 2011 1:44 am

Cross-quote from the OBSE thread:

I've tried everything, SetAV Silence 1, Silence on a disease, on an ability, even emptied out their inventory (of anything spell related, minus base spells) and they still cast stuff. I'm certain I'm not the only one with this peeve. I've seen bandits using Silence AoE arrows and getting hit theirselves and two seconds later, casting a spell to summon monsters... I checked their base leveled spell list and none of them were "ignores silence". I also have some magic spell mods that add new spells, one of which is an overpowered 1000hp draining hit, so I went in and upped the requirements to an enormous amount of magicka (over 10k) and yet, I see lowly level 20 Conjurers using it freely...

If this is really true -- NPCs are ignoring silence and even magicka restrictions -- OBME seems like the place to fix it. (Edit: or maybe AVUncapper, depending on exactly what's up.)

Definitely needs some more rigorous testing, though. I'm especially confused by the silence situation. Wouldn't that be mentioned on UESP? Maybe it only checks the "damage" part of the Silence AV, or suchlike?
User avatar
Sarah Bishop
 
Posts: 3387
Joined: Wed Oct 04, 2006 9:59 pm

Post » Wed Mar 30, 2011 2:21 am

Cross-quote from the OBSE thread:


If this is really true -- NPCs are ignoring silence and even magicka restrictions -- OBME seems like the place to fix it. (Edit: or maybe AVUncapper, depending on exactly what's up.)

Definitely needs some more rigorous testing, though. I'm especially confused by the silence situation. Wouldn't that be mentioned on UESP? Maybe it only checks the "damage" part of the Silence AV, or suchlike?

Silence seems to work fine for me. I agree, this needs more testing.
User avatar
Emma Parkinson
 
Posts: 3401
Joined: Wed Jul 26, 2006 5:53 pm

Post » Wed Mar 30, 2011 5:01 am

Talking about silence, I'm having a strange issue with it, the duration of any silence spell cast at me gets increased dramatically. Things like a silence effect lasting for 1000 sec or so, and i have no mods that alter the silence spells in such a way nor was my character weak to magic. Though I did alter the silence effect's resistance to None in a non-OBME mod (made without the OBME_CS.dll). I will try to debug it more thoroughly.

And now an actual issue, changing the cure disease handler to the dispel one works perfectly, except that it cannot remove effects with no magnitude. I got infected with Astral vapors and can't remove the stunted magicka effect no matter how many cure disease potions or spells I use.
User avatar
Chica Cheve
 
Posts: 3411
Joined: Sun Aug 27, 2006 10:42 pm

Post » Wed Mar 30, 2011 12:53 am

Talking about silence, I'm having a strange issue with it, the duration of any silence spell cast at me gets increased dramatically. Things like a silence effect lasting for 1000 sec or so, and i have no mods that alter the silence spells in such a way nor was my character weak to magic. Though I did alter the silence effect's resistance to None in a non-OBME mod (made without the OBME_CS.dll). I will try to debug it more thoroughly.

And now an actual issue, changing the cure disease handler to the dispel one works perfectly, except that it cannot remove effects with no magnitude. I got infected with Astral vapors and can't remove the stunted magicka effect no matter how many cure disease potions or spells I use.

Let me know if you can pin down the silence problems.

The issue with the disease handler is indeed a bug - the new Dispel handler does not affect anything that has no magnitude and no duration (and disease effects have no duration). I'm surprised I made such a terrible oversight. Thank you very much for reporting this migck, it needs to be fixed asap.
User avatar
Robyn Howlett
 
Posts: 3332
Joined: Wed Aug 23, 2006 9:01 pm

Post » Wed Mar 30, 2011 6:06 am

Forget the issue with silence, whatever obscure thing it was, it went away when I reverted the change I made to silence. The vanilla effects are better left free of fancy stuff...

The good news is, I've gotten around to doing something I should have done a long time ago: implementing the automated icon assignment from Custom Spell cons into an OBME mod. Problem is, CSI does it in an extremely elegant manner with its own custom functions, changing the icon displayed by the spell itself. I've had to work with SetNthEIIconPath, so what is altered is the icon of the first effect in the spell. It seems to be that the spell fails to show the correct icon if it has more than 1 effect, with the effects following the first one being more expensive than it, and the player changes the spell icon while playing. Due to the icon of a spell apparently being that of the higher cost magic effect in it, but this seems to be a bit flexible at game load (or maybe I'm just imagining things...)
And since OBME lacks something like HasAssignedIcon, I can't really check whether the spell already has a custom icon, so I'm afraid only values from the .ini will really "persist" between game loads. Otherwise it's fine. And the best is I can at last use the wonderful MenuQue icon menu from CSI with OBME!
Unless I'm mistaken, the only way to do such a thing with OBME is indeed with (Get|Set|Clear)NthEIIconPath, or are there more functions I should be aware of? is there a list of OBME functions BTW? I don't recall seeing it in the pdf , and right now Foxit reader is dying on me.
Anyway, would it be a good idea to release it or provide it any other way (you could include it with the OBME package if you want) or v2 will get rid of the CSI incompatibility anyway?
User avatar
Sian Ennis
 
Posts: 3362
Joined: Wed Nov 08, 2006 11:46 am

Post » Wed Mar 30, 2011 11:47 am

Forget the issue with silence, whatever obscure thing it was, it went away when I reverted the change I made to silence. The vanilla effects are better left free of fancy stuff...

The good news is, I've gotten around to doing something I should have done a long time ago: implementing the automated icon assignment from Custom Spell cons into an OBME mod. Problem is, CSI does it in an extremely elegant manner with its own custom functions, changing the icon displayed by the spell itself. I've had to work with SetNthEIIconPath, so what is altered is the icon of the first effect in the spell. It seems to be that the spell fails to show the correct icon if it has more than 1 effect, with the effects following the first one being more expensive than it, and the player changes the spell icon while playing. Due to the icon of a spell apparently being that of the higher cost magic effect in it, but this seems to be a bit flexible at game load (or maybe I'm just imagining things...)

Spell icons are (and have always been) the icon of the strongest effect. CSI did some fancy footwork to change that, but OBME hasn't as of yet.
And since OBME lacks something like HasAssignedIcon, I can't really check whether the spell already has a custom icon, so I'm afraid only values from the .ini will really "persist" between game loads. Otherwise it's fine. And the best is I can at last use the wonderful MenuQue icon menu from CSI with OBME!
Unless I'm mistaken, the only way to do such a thing with OBME is indeed with (Get|Set|Clear)NthEIIconPath, or are there more functions I should be aware of? is there a list of OBME functions BTW? I don't recall seeing it in the pdf , and right now Foxit reader is dying on me.
Anyway, would it be a good idea to release it or provide it any other way (you could include it with the OBME package if you want) or v2 will get rid of the CSI incompatibility anyway?

OBME v2 will hopefully be compatible with CSI, and will also include a SetSpellIcon function in it's own right. HasAssignedIcon, or something that serves that purpose, will also be added. Sorry for the inconvenience :blush:
User avatar
sexy zara
 
Posts: 3268
Joined: Wed Nov 01, 2006 7:53 am

Post » Wed Mar 30, 2011 12:47 am

Ya, the duration of silence seems to be getting multiplied by 100. It's brutal.

I was just playing chicken with a mystical imp with my pathetic lv 1 char. The first silence hit I got was 200 duration, ended up dying, etc. Reloaded, got hit this time and there is no duration at all. No number, just the silence effect.

...waited 2 hours, silence effect doesn't go away!
User avatar
Siobhan Wallis-McRobert
 
Posts: 3449
Joined: Fri Dec 08, 2006 4:09 pm

Post » Tue Mar 29, 2011 9:33 pm

Minor bug report: The formID list in the EffectSetting dialog seems to have its horizontal scrollbar disabled.
User avatar
+++CAZZY
 
Posts: 3403
Joined: Wed Sep 13, 2006 1:04 pm

Post » Wed Mar 30, 2011 1:36 am

One quick question, have you planned or would you mind unlocking scripted effects' magnitude stat, if that's possible? Even if that value does nothing, I'd really appreciate it, it would be of great help.

This is already possible. Open the 'Magic Effects' dialog, select "Script Effect", and check the box labeled 'Has a Magnitude'.


oh thanks, I missed that. Btw, a mod made with OBME that only uses that specific feature will require the mod-user to play OBME as well? I guess it'll do, but just to make sure.
User avatar
Sabrina Schwarz
 
Posts: 3538
Joined: Fri Jul 14, 2006 10:02 am

Post » Wed Mar 30, 2011 4:02 am

Ya, the duration of silence seems to be getting multiplied by 100. It's brutal.
Thanks for reporting. I'll look into this.

Minor bug report: The formID list in the EffectSetting dialog seems to have its horizontal scrollbar disabled.
That's unfortunate, although not mission critical. I'll put it on the list.

oh thanks, I missed that. Btw, a mod made with OBME that only uses that specific feature will require the mod-user to play OBME as well? I guess it'll do, but just to make sure.
For that one specific feature? No.
But in general - yes.
User avatar
Fluffer
 
Posts: 3489
Joined: Thu Jul 05, 2007 6:29 am

Post » Wed Mar 30, 2011 4:21 am

Another strange issue, when Oblivion.esm is loaded in the CS with OBME_CS.dll, all the sigil stones seem to lose their EditorIDs. Nothing happens if they are not directly touched, but it makes it quite difficult to work with sigil stones.
User avatar
Marilú
 
Posts: 3449
Joined: Sat Oct 07, 2006 7:17 am

Post » Wed Mar 30, 2011 10:23 am

It looks like an OBME record can still show up while using only features that are available with the vanilla CS, at least on a script effect. Presumably harmless, but I got a report of Wrye Bash giving a warning:
BareNecessities.esp: Unexpected subrecord: SPEL.OBMEError loading SPEL record and/or subrecord: 01002358  eid = BNCampSpell  subrecord = OBME  subrecord size = 32

http://www.tesnexus.com/downloads/file.php?id=36795 if you need to take a peek.
User avatar
Zoe Ratcliffe
 
Posts: 3370
Joined: Mon Feb 19, 2007 12:45 am

Post » Wed Mar 30, 2011 4:54 am

Another strange issue, when Oblivion.esm is loaded in the CS with OBME_CS.dll, all the sigil stones seem to lose their EditorIDs. Nothing happens if they are not directly touched, but it makes it quite difficult to work with sigil stones.

Geeze, that's a nasty bug. Thanks for pointing it out migk, I'll fix that asap.

It looks like an OBME record can still show up while using only features that are available with the vanilla CS, at least on a script effect.

This has been reported before. It's not a bug, per se, just a case of simplistic design. The additional chunks don't do any harm until you try to use Wryebash, which was not something I took into consideration in v1.
User avatar
Smokey
 
Posts: 3378
Joined: Mon May 07, 2007 11:35 pm

Post » Wed Mar 30, 2011 12:25 pm

Hey!

This does look like a great tool!

As per your suggestion, I'd like to submit a formal request for feature.

I'd like to be able to hide a certain magic effect and replace it with a "placeholder" - for example hide a burden and replace it with "unknown effect". That is change the text and the icon to the generic script one.

The effect would still function normally, but it would appear as "unknown effect" in the "active effects" tab as well. It will also retain duration, magnitude, etc.

There's no particular urgent need for this, so I wouldn't want you losing sleep over it. But it's out there now :)

Much obliged!

cc
User avatar
Eire Charlotta
 
Posts: 3394
Joined: Thu Nov 09, 2006 6:00 pm

Post » Tue Mar 29, 2011 11:04 pm

I'd like to be able to hide a certain magic effect and replace it with a "placeholder" - for example hide a burden and replace it with "unknown effect". That is change the text and the icon to the generic script one.

The effect would still function normally, but it would appear as "unknown effect" in the "active effects" tab as well. It will also retain duration, magnitude, etc.

You can already do that. :)
User avatar
Adrian Powers
 
Posts: 3368
Joined: Fri Oct 26, 2007 4:44 pm

PreviousNext

Return to IV - Oblivion