[RELz] Oblivion Magic Extender v1.beta4

Post » Sat Sep 25, 2010 9:57 am

Name: Oblivion Magic Extender
Version: v1.beta4
Date: 2010-08
Category: Magic - Gameplay
Author: JRoush
Source: http://www.tesnexus.com/downloads/file.php?id=31981
Previous Version Thread: http://www.gamesas.com/index.php?/topic/1107315-relz-oblivion-magic-extender-v1beta3
Contact: jroush.tesmods@gmail.com

Requirements:
=============
NOTE: using OBME with the wrong verison of Oblivion or the CS will, *at best*, cause it to crash.
  • Oblivion v1.2.0416
  • TESCS v1.2.404 (only if you are planning to make mods using OBME)
  • OBSE v0018 or higher
  • AddActorValues, a small auxiliary plugin that is bundled with OBME


Description:
============
OBME extends the Oblivion magic system to make it more general and open to mod makers. In a nutshell, it is a pair of plugin libraries for OBSE that hack the game/CS code to change it's behavior. Note that this is the same principle behind OBSE itself - it's quite safe, and will not alter Oblivion.exe or TESConstructionSet.exe in any way. In this version, the key features are:

  • More control in editing Magic Effects in the CS, and the ability to create new magic effects, both in the CS and in-game from scripts
  • Support for 'dynamic' effect codes that are (almost) automatically managed by OBME.
  • Expanded ModifyActorValue handler to allow custom AV ranges, and to specify exactly what part/modifier is affected.
  • Expanded SummonActor effect handler to allow custom summoning limits
  • Expanded ScriptEffect handler to allow useable magnitudes, and scripts specified for an entire EffectSetting rather than each individual effect item.
  • Expanded Dispel effect handler to allow partial dispelling of effects, and to selectively target effects based on their effect code, effect handler, hostility, and the type of magic item that applied them.
  • "Reclaiming" of some of the lost magicka when an effect is removed by recasting its spell, or when a summoning limit is broken.
  • Expansion of 'extra' data for EffectItems - *any* effect item (not just script effects) may now have a custom name, school, VFXcode, hostility, *icon*, base cost, resistance AV, and a number of other flags.

For more info, please see the accompanying document 'OBME Features.pdf'. This file has background information and technical details. For examples of how to actually use OBME, see the accompanying "OBME_*_example" mods.

IMPORTANT NOTES:
======================
  • This is the last planned beta. Bugs will be fixed in 'Hotfix' patches as they are found, until the mod is stable enough to release. If you (yes, you) have noticed any problems while using OBME, please report them so I can work on a fix.
  • The following v0018 OBSE script functions will not work with dynamic effect codes: GetMagicEffectCounters, GetNthEffectItemScriptVisualEffect, and GetActiveEffectCodes. This will change with the release of obse v0019.
  • Because this is a beta version, I have left the debugging output on. This means that long sessions in the game or CS will generate rather large log files.


Additional Details:
=============
Spoiler
:
Questions & Bug Reports:
========================
If you have a question, *look in the included 'Features' pdf*. It has a table of contents; you don't have to read the whole thing to find what you're looking for. If your question isn't answered there, I would be more than glad to answer it on the forum thread.
If you encounter problem, something that is confusing or doesn't seem to work as expected, *please* *please* *please* do the following:

1. Read the readme carefully. Often I've addressed the problem already, or at least included a warning.
2. Reproduce the problem. If it's a crash, restart the game or CS and try to make it crash again.
3. Narrow down the cause. Try to figure out the circumstances that lead to the problem. Specific bug reports are easy to fix, while bug reports like "the game crashed after I installed OBME" are just a waste of my time.
4. Send me a private message on TESNexus or the Forum, or an email to the address above. Include the details, and attach the log files "OBME.log" and "OBME_CS.log", which can be found in your "Oblivion\" folder.

Installation & Uninstallation:
====================
Please see the included 'Readme' file.

Compatibility with other mods:
==============================
OBME doesn't add any actual content to the game, so there is no chance of conflicts with any traditional mods. Mods made with OBME are playable by everyone, even players without OBME (although they will obviously be unable to use any of the new magic features). Savegames made with OBME will continue to be playable after it is uninstalled, provided you follow the 'Uninstallation' directions.
OBME is known to be incompatible with Custom Spell Icons (CSI), because both use obse plugins to patch the same game code.
Because this is a beta-version, however, it is STRONGLY RECOMMENDED that you not distribute mods based on OBME until further notice.

Compatibility with other Editing programs (TES4Edit, WryeBash, etc):
====================================================================
Because OBME alters the save file format, it is not compatible with TES4Edit or Bash in their current versions. The maintainers of these programs (Elminster and Waruddar, respectively) are currently working on compatible versions, to be released soon (I hope). If you get the chance, please be sure to thank them for this.

=== v1.beta4 2010/08 ===
- Fixed issue with Icon & Model file dialogs causing CS crashes (now uses the built-in dialogs)
- Fixed issue where starting game while CS was running might cause a CTD
- Added complete version info to all OBME-modified records
- Fixed issue of broken Chameleon,Invisibility,NightEye,Darkness,Paralyze,Calm,Frency,DetectLife, and Telekinesis effect items created prior to v1.beta3.Hotfix.
- Fixed issue where duplicating an effect setting in CS or using CreateMgef wouln't copy some handler-specific parameters
- Changed Dispel handler targeting so that it applies to all magic targets (vanilla handler only works on PC & NPCs)
- Changed file formats for compatibility with new versions of WryeBash and TES4Edit
- Disabled automatic recalculation of player's AVs on reload - code didn't work well in vanilla, would be utterly broken with obme
- Added script functions Get(Set)MagicEffectHandlerParamC, Get(Set/Clear)NthEffectItemHandlerParam, Get(Set/Clear)NthEffectItemSchool, Get(Set/Clear)NthEffectItemVFXCode.

Credits
=======
- Bethesda Softworks, whose game has svcked up far, far too much of my free time
- The OBSE team for their incredible modding resource.
- scruggsywuggsy the ferret, for answering even my dumbest questions promptly and with admirable patience.
- everyone on the TESNexus and Bethesda forums who took an active interest in the first beta - your enthusiasm make the project much easier to handle.
- special thanks to SpeedyB and Kamikaze, who helped to track down and solve several bugs
- statttis, for doing the extensive legwork necessary to implement effectitem icon overrides. All I had to do was copy+paste from his source.

Tools Used
==========
- Oblivion Script Extender (OBSE): http://obse.silverlock.org
- TES4Edit: http://www.tesnexus.com/downloads/file.php?id=11536
- TES Construction Set: http://www.tesnexus.com/downloads/file.php?id=11367
- Microsoft Visual Studio 2008: find a download yourself ;)
- IDA Pro v4.9: http://www.datarescue.com/idabase/ida.htm

User avatar
Leilene Nessel
 
Posts: 3428
Joined: Sun Apr 15, 2007 2:11 am

Post » Fri Sep 24, 2010 11:25 pm

The following v0018 OBSE script functions will not work with dynamic effect codes: GetMagicEffectCounters, GetNthEffectItemScriptVisualEffect, and GetActiveEffectCodes. This will change with the release of obse v0019.

Is GetAECodes functional with the current 0019 beta?

Edit: Did you intend to leave AddActorValues.ncb in the source folder? HUGE...
User avatar
Nick Pryce
 
Posts: 3386
Joined: Sat Jul 14, 2007 8:36 pm

Post » Sat Sep 25, 2010 2:41 am

Is GetAECodes functional with the current 0019 beta?

Edit: Did you intend to leave AddActorValues.ncb in the source folder? HUGE...

Haven't tested GetAECodes, but I doubt it's any more compatible than the other functions listed (GetMagicEffectCounters, GetActiveEffectCodes, etc.). They will work fine for static effect codes, but don't return dynamic effect codes properly.

The AddActorValues.ncb file was definitely not supposed to be included, although it doesn't do any harm. I just re-uploaded the package without it.
User avatar
Andrew Lang
 
Posts: 3489
Joined: Thu Oct 11, 2007 8:50 pm

Post » Sat Sep 25, 2010 12:34 am

Haven't tested GetAECodes, but I doubt it's any more compatible than the other functions listed (GetMagicEffectCounters, GetActiveEffectCodes, etc.). They will work fine for static effect codes, but don't return dynamic effect codes properly.

GetAECodes is the abbreviated alias for GetActiveEffectCodes. ;) So this fix is not in 0019 beta 2, then?

What happens if I call GetAECodes (from a non-OBME mod) on an actor with a dynamic-code active effect? Does that effect just not appear in the resulting array? Or is there a crash?

And to be sure I've got the terminology straight: "dynamic code" applies to your load-order-adjusted system for preventing code conflicts between non-vanilla magic effect, right? Basically any new effect, not just ones created in scripts at runtime?

The AddActorValues.ncb file was definitely not supposed to be included, although it doesn't do any harm.

Yeah, I was just curious how the archive jumped from under a megabyte to over four. Might not have even noticed, except for the 2-meg "you must log in" threshold on Nexus!
User avatar
James Hate
 
Posts: 3531
Joined: Sun Jun 24, 2007 5:55 am

Post » Fri Sep 24, 2010 10:49 pm

If you look at the TURN effect the counter effects lists an unrecognized MGEF code "RYCR". It only happens when Oblivion.esm is loaded.
User avatar
phil walsh
 
Posts: 3317
Joined: Wed May 16, 2007 8:46 pm

Post » Sat Sep 25, 2010 11:29 am

GetAECodes is the abbreviated alias for GetActiveEffectCodes. ;) So this fix is not in 0019 beta 2, then?

Err ... whoops. I'm a little burned out on script functions atm, sorry.

'Dynamic Effect Codes' are load-order adjusted. They can be given to any new effect, not just those made via CreateMgef (the new effects in the OBME example plugins all use dynamic codes). You can tell an effect code is dynamic because it's greater than 0x80000000.

As of obse v0019 beta2, if you call GetNthAECode & the returned code is dynamic you'll get 0x7FFFFFFF or 0x80000000 instead of the actual effect code. It's the same with the other functions listed as incompatible - in fact, it's true of any obse function that tries to return an integer greater than 0x80000000. Scruggs has graciously agreed to fix this, but I can't say when it will happen.

If you look at the TURN effect the counter effects lists an unrecognized MGEF code "RYCR". It only happens when Oblivion.esm is loaded.

This is an artifact in Oblivion.esm itself. Probably a reference to some effect that was scrapped during development ("Rally Creature"?).
User avatar
adame
 
Posts: 3454
Joined: Wed Aug 29, 2007 2:57 am

Post » Sat Sep 25, 2010 10:57 am

- Fixed issue with Icon & Model file dialogs causing CS crashes (now uses the built-in dialogs)
Would you be doing any hooking in those subroutines ?
User avatar
KIng James
 
Posts: 3499
Joined: Wed Sep 26, 2007 2:54 pm

Post » Sat Sep 25, 2010 11:19 am

Would you be doing any hooking in those subroutines ?

No, just calling them.
User avatar
Luis Longoria
 
Posts: 3323
Joined: Fri Sep 07, 2007 1:21 am

Post » Sat Sep 25, 2010 1:38 am

No, just calling them.
Good to know. Just to confirm (the Nexus is acting up for me - sorry about this), you call sub_0049BD50 and sub_004A40A0 ?
User avatar
Sheeva
 
Posts: 3353
Joined: Sat Nov 11, 2006 2:46 am

Post » Sat Sep 25, 2010 12:36 pm

Good to know. Just to confirm (the Nexus is acting up for me - sorry about this), you call sub_0049BD50 and sub_004A40A0 ?

Actually, I directly call the subroutines that open the file dialogs (0x00446CA0 & 0x00446C60 for icons & models, respectively). I'd love to redo this so that it's compatible with CSE's 'select resource' scheme, but the functions you mentioned do some additional work to setup the control text and display the chosen icon. This isn't bad, per se, but my original attempts to use it ended in frustration.
User avatar
gemma king
 
Posts: 3523
Joined: Fri Feb 09, 2007 12:11 pm

Post » Fri Sep 24, 2010 11:59 pm

Actually, I directly call the subroutines that open the file dialogs (0x00446CA0 & 0x00446C60 for icons & models, respectively). I'd love to redo this so that it's compatible with CSE's 'select resource' scheme, but the functions you mentioned do some additional work to setup the control text and display the chosen icon. This isn't bad, per se, but my original attempts to use it ended in frustration.
Well, if you end up giving it another go, I place my hooks around the calls to the common dialog/wrapper function at 0x004A414B and 0x0049BDAB. Additionally, I have another at the instruction that lea's the buffer.
User avatar
Oscar Vazquez
 
Posts: 3418
Joined: Sun Sep 30, 2007 12:08 pm

Post » Sat Sep 25, 2010 11:09 am

Fun: upon launching the CS, before the splash screen even goes away, I get the following dialog:

Chunk size 659 too big in chunk SNAM_ID in form TES4_ID. Max size is 512, data truncated to "<< description text from OBME_EIOverrides_example.esp, truncated partway through Feature 2 >>".

Continue Running Executable?

Regardless of the option I select (even No), TESCS then crashes. Removing the EIOverrides example ESP from the Data directory fixes this. None of the examples are active, I guess it must just pre-scan descriptions...

I've also got the latest CSE build installed; haven't checked without it.
User avatar
Je suis
 
Posts: 3350
Joined: Sat Mar 17, 2007 7:44 pm

Post » Sat Sep 25, 2010 1:51 am

Fun: upon launching the CS, before the splash screen even goes away, I get the following dialog:

Right, the description for that file exceeds the maximum length. Apparently the CS doesn't warn you about that when you save it, just when you load it ... Anyway, if you select 'yes' you should be able to continue as normal. I'll upload another version with a shorter description, but in the meantime you might want to check if it really is a problem with CSE and report it if so.
User avatar
lolly13
 
Posts: 3349
Joined: Tue Jul 25, 2006 11:36 am

Post » Sat Sep 25, 2010 2:49 am

Confirmed that the resulting crash is CSE-specific. shadeMe, you copy?
User avatar
des lynam
 
Posts: 3444
Joined: Thu Jul 19, 2007 4:07 pm

Post » Sat Sep 25, 2010 3:09 am

Confirmed that the resulting crash is CSE-specific. shadeMe, you copy?
Yeah. Do you also have Annotation Extractor running by any chance ? If you do, try removing it.
User avatar
Gisela Amaya
 
Posts: 3424
Joined: Tue Oct 23, 2007 4:29 pm

Post » Sat Sep 25, 2010 12:13 am

Edit: The crash is caused Pluggy, at least version 125b. Haven't tried the beta yet.
User avatar
Colton Idonthavealastna
 
Posts: 3337
Joined: Sun Sep 30, 2007 2:13 am

Post » Fri Sep 24, 2010 11:42 pm

I vaguely recall that you may have mentioned this before... are there any plans for a "multiple handler" handler, which would apply multiple effects (probably limited to already-defined MGEFs) simultaneously?

With or without such a handler, could the Shield (more importantly, Fire/Frost/Shock Shield) handler somehow be rolled into ModifyActorValue as an "affect multiple AVs" option? Doesn't have to be exactly this, I'm just looking for a solution which e.g. lets me keep FISH but change the Shield half to Resist Normal Weapons.

Finally, while keeping my previous stack-by-magnitude idea on the shelf, would it be possible to add an option which completely prevents stacking multiple spells using the same MGEF, giving priority to the spell with the highest (remaining) effect cost?
User avatar
Veronica Martinez
 
Posts: 3498
Joined: Tue Jun 20, 2006 9:43 am

Post » Fri Sep 24, 2010 11:00 pm

I vaguely recall that you may have mentioned this before... are there any plans for a "multiple handler" handler, which would apply multiple effects (probably limited to already-defined MGEFs) simultaneously?

Finally, while keeping my previous stack-by-magnitude idea on the shelf, would it be possible to add an option which completely prevents stacking multiple spells using the same MGEF, giving priority to the spell with the highest (remaining) effect cost?

A means to apply multiple effects as a single effect will be something introduced in v2. A modAV handler with alternate stacking behavior is also planned, as per your request.

I've not yet quite decided how to implement the 'multiple effects at once' handler - there are some complications with labeling the Active Effects. It will probably end up applying an entire magic item as a single effect. To get an equivalent of fire shield, one would simply make a spell with Resist Fire and Shield effects, and then reference that spell with the new handler.
User avatar
Nicole Mark
 
Posts: 3384
Joined: Wed Apr 25, 2007 7:33 pm

Post » Sat Sep 25, 2010 3:56 am

Bug report:

OBME breaks Weakness effects on abilities (like birthsigns), maybe spells too but I haven't tested that. In the active effects menu it shows 0 Weakness to X and GetAV ResistWhatever also returns 0. It doesn't matter if the magic effect items were created with OBME or not. Just make a new character with the Apprentice or Lord birthsign and you'll see.

Edit: Actually I think it's because weakness effects can cause the resist AVs to become negative. In an ability they affect the base AV value, but if you look in OBME/RSH/EffectHandlers/_ModAVEffects.cpp around line 122 you don't allow base values to go below zero:
    switch (avPart)    {    case Actor::kAVPart_Base:        // don't allow Base part to fall below zero; don't decrease it further if already below zero        cur = tgtActor->GetAVfBase(GetAV());        if (modMag < 0 && cur + modMag < 0)        {            modMag = (cur > 0) ? -cur : 0;        }


Edit 2: Yup, the workaround is to uncheck "special treatment for abilities" in the magic effect item, but it doesn't seem to help if you uncheck it in the magic effect itself. If I'm not mistaken the resist AVs are the only ones where negative values have meaning.
User avatar
Rhi Edwards
 
Posts: 3453
Joined: Fri Jul 28, 2006 1:42 am

Post » Sat Sep 25, 2010 11:49 am

Bug report time.

After countless hours of debugging, I've narrowed down AddActorValues.dll to be incompatible with bgBalancingEVCore.esp. As long as both are in place, I experience crashing on starting a new game after clicking "Done" in the race menu, and crashing upon loading any save. I don't know if this problem is just on my end or not, but the problem persists no matter what I do as long as the DLL and ESP are both in place. This appears to be a problem introduced in the new version, as in the earlier ones I could load everything fine.
User avatar
Michael Korkia
 
Posts: 3498
Joined: Mon Jul 23, 2007 7:58 pm

Post » Sat Sep 25, 2010 11:44 am

Bug report: OBME breaks Weakness effects on abilities (like birthsigns)

Thanks for pointing this out. You're quite right about the cause - that check was intended to protect skills and abilities, for which the base value can't be negative. I must have forgotten at the time that resistances and other AVs can have base values <0. I've removed the check for the next patch.

After countless hours of debugging, I've narrowed down AddActorValues.dll to be incompatible with bgBalancingEVCore.esp.

Thanks for reporting this, but I'm afraid I'm not familiar with that file. Can you tell me what mod it's from, or better yet post a link?
User avatar
Bellismydesi
 
Posts: 3360
Joined: Sun Jun 18, 2006 7:25 am

Post » Sat Sep 25, 2010 1:04 am

Thanks for reporting this, but I'm afraid I'm not familiar with that file. Can you tell me what mod it's from, or better yet post a link?


It's the main esp for http://theelderscrolls.info/?go=dlfile&fileid=215.
User avatar
kelly thomson
 
Posts: 3380
Joined: Thu Jun 22, 2006 12:18 pm

Post » Sat Sep 25, 2010 2:11 am

It's the main esp for http://theelderscrolls.info/?go=dlfile&fileid=215.

Thanks.

I've narrowed down AddActorValues.dll to be incompatible with bgBalancingEVCore.esp.

I've installed the race balancing project (the core files & resources anyway), but I can't reproduce the problem. Would you mind sending me (jroush.tesmods@gmail.com) a copy of OBME.log and AddActorValues.log (from your Oblivion directory). Your load order and a copy of one of the savegames would help as well.
User avatar
Doniesha World
 
Posts: 3437
Joined: Sun Jan 07, 2007 5:12 pm

Post » Sat Sep 25, 2010 12:31 pm

Bug report:

OBME breaks Weakness effects on abilities (like birthsigns), maybe spells too but I haven't tested that. In the active effects menu it shows 0 Weakness to X and GetAV ResistWhatever also returns 0. It doesn't matter if the magic effect items were created with OBME or not. Just make a new character with the Apprentice or Lord birthsign and you'll see.

Edit: Actually I think it's because weakness effects can cause the resist AVs to become negative. In an ability they affect the base AV value, but if you look in OBME/RSH/EffectHandlers/_ModAVEffects.cpp around line 122 you don't allow base values to go below zero:
    switch (avPart)    {    case Actor::kAVPart_Base:        // don't allow Base part to fall below zero; don't decrease it further if already below zero        cur = tgtActor->GetAVfBase(GetAV());        if (modMag < 0 && cur + modMag < 0)        {            modMag = (cur > 0) ? -cur : 0;        }


Edit 2: Yup, the workaround is to uncheck "special treatment for abilities" in the magic effect item, but it doesn't seem to help if you uncheck it in the magic effect itself. If I'm not mistaken the resist AVs are the only ones where negative values have meaning.

i experienced it also with altmer weaknesses. when i unchecked "special treatment for abilities" in EFFECT HANDLER of the individual magic effect, lord birthsign was correctly shown but altmer weaknesses remained at zero. maybe i don't understand where else should i uncheck...where is actually the "magic effect item"?
User avatar
Thema
 
Posts: 3461
Joined: Thu Sep 21, 2006 2:36 am

Post » Sat Sep 25, 2010 4:27 am

i experienced it also with altmer weaknesses. when i unchecked "special treatment for abilities" in EFFECT HANDLER of the individual magic effect, lord birthsign was correctly shown but altmer weaknesses remained at zero. maybe i don't understand where else should i uncheck...where is actually the "magic effect item"?

Either way does the trick. Unchecking the flag in the Effect Setting (in the 'Magic Effects' dialog) will disable the special treatment for all instances of that magic effect. Unchecking it in the Effect Item (in the 'Effect Item' dialog that pops up when you edit the nth effect on a spell, etc.) will disable the special treatment for just that one instance.

There are a number of such 'Effect Item Overrides' that can be used to replace/change the underlying behavior for a single effect instance. See the features pdf for details.

Of course, once the bug is fixed, neither approach should be necessary.
User avatar
naomi
 
Posts: 3400
Joined: Tue Jul 11, 2006 2:58 pm

Next

Return to IV - Oblivion