Magic "fix"?

Post » Sun Dec 11, 2011 9:53 am

Is there any mod that upgrades the magic system (maybe the whole combat system?) to do fractional damage?
I'm trying to play a Damage-over-time themed warlock, and I've discovered the game doesn't do partial effects well AT ALL. A 2 dmg for 10 second spell will only do 1 dmg/sec if your casting effectiveness is anything below 100%; likewise, if that spell was, say, "shock" and your target had 10% shock resistance, it would also only do 1 dmg/sec (10 total). Weaknesses are even worse, since the game always rounds down to the next lowest whole number; 2dmg/25sec spell cast on something with 25% weakness will still only do 50 total damage.

Basically any sort of resistance at all reduces my damage by ~33-50% (currently anyway; my current spells do 1-3 dmg/sec over 15-25 seconds)

Is this fixable? Has it been done? I know it's somewhat obscure since DoT's are not really present in Oblivion, but it'd be nice if it was possible :D
User avatar
Charlotte Buckley
 
Posts: 3532
Joined: Fri Oct 27, 2006 11:29 am

Post » Sun Dec 11, 2011 7:22 pm

Bump
User avatar
Kara Payne
 
Posts: 3415
Joined: Thu Oct 26, 2006 12:47 am

Post » Sun Dec 11, 2011 5:39 pm

I doubt it's possible to edit magic weaknesses and resistances, but the obme team has done great things, you might want to ask them.

If it's not possible to edit them then maybe it could be fixed by adding a script to each actor checking whether or not they have an active and harmful magical effect on them, and then calculating if the damage has been rounded down and deducing the difference the game truncates due to rounding, but that would only work if the active effect keeps it's real magnitude (not rounded) and the rounding down is done when 'translating' magic effect's magnitude into actual damage, otherwise it sounds like it'd require some hard calculations.
User avatar
NAtIVe GOddess
 
Posts: 3348
Joined: Tue Aug 15, 2006 6:46 am

Post » Sun Dec 11, 2011 8:08 am

I think this is a big problem of Oblivion.
EXAMPLE: damage "4 points for 35 seconds. It's clear that a 5% resistance must reduce the duration to reduce the total damage by about 5%.
But the Bethesda programmers mess up the game.
The game will reduce the magnitude and so the total damage will decrease by 25%

Maybe with the right OBSE plugin Oblivion will calculate better the weaknesses/resistances.
But now you can only use some little trick.


I'm not sure but try this:

The magnitude should be reduced to 0 only with a 100% resistance.
So with a "1 point for X seconds" the magnitude should remain 1.
Maybe it will reduce the duration instead.

Test this: apply a "1 point for X second" damage and apply a 99% resistance.
If the resistance won't affect the magnitude (or if affect the duration), keep reading.

You say you use a spell "3 points for 10 seconds": try instead 3 spells "1 damage for 10 seconds" and see what happens.
If the resistance will apply separately on every single damage, good.
If instead it apply on the whole damage, bad, and I don't have more ideas.
User avatar
Andrew
 
Posts: 3521
Joined: Tue May 08, 2007 1:44 am

Post » Sun Dec 11, 2011 8:54 pm

I think this is a big problem of Oblivion.
EXAMPLE: damage "4 points for 35 seconds. It's clear that a 5% resistance must reduce the duration to reduce the total damage by about 5%.
But the Bethesda programmers mess up the game.
The game will reduce the magnitude and so the total damage will decrease by 25%

Maybe with the right OBSE plugin Oblivion will calculate better the weaknesses/resistances.
But now you can only use some little trick.


I'm not sure but try this:

The magnitude should be reduced to 0 only with a 100% resistance.
So with a "1 point for X seconds" the magnitude should remain 1.
Maybe it will reduce the duration instead.

Test this: apply a "1 point for X second" damage and apply a 99% resistance.
If the resistance won't affect the magnitude (or if affect the duration), keep reading.

You say you use a spell "3 points for 10 seconds": try instead 3 spells "1 damage for 10 seconds" and see what happens.
If the resistance will apply separately on every single damage, good.
If instead it apply on the whole damage, bad, and I don't have more ideas.




Three 1dmg for 10 seconds spells would work fine (the game doesn't round down to zero) but that's a pain in the ass to actually play. Try killing highlevel trolls with 1dmg/sec spells. You'd have to stack up like 10 of them to get anywhere. (I've mostly been using weakness to fire and three different fire DoTs to take them down, and it still svcks)
The game doesn't change duration at all. (I've been playing with debugtext 8 on a LOT)

Re: grmblf
The game doesn't keep the original value, sadly. If I tag someone with a 3dmg/20sec spell and they have minor resistance, it shows up in the debug text as 2 dmg.
User avatar
Chase McAbee
 
Posts: 3315
Joined: Sat Sep 08, 2007 5:59 am

Post » Sun Dec 11, 2011 1:26 pm

The game doesn't keep the original value, sadly. If I tag someone with a 3dmg/20sec spell and they have minor resistance, it shows up in the debug text as 2 dmg.


That's a pity.... The problem here is only that Bethesda chose to use integer values instead of float to keep track of character's stats so fractional results are lost. If that could be changed all this problems would be solved, but I guess that may be even harder to achieve than editing resistances and weaknesses themselves.

What about multiplying everyone's health and every damage done by a constant value, like 10 or 100? It'd be like gaining one or two decimal values.... lol it kinda sounds ridiculously greedy, such big mess just for fractions of damage points... but in the end they all count.

Out of curiosity now, how many mb of ram would take to use floats instead of integers for character's stats to justify not doing so? is that the kind of thing that has an impact on performance or so?
User avatar
Juanita Hernandez
 
Posts: 3269
Joined: Sat Jan 06, 2007 10:36 am

Post » Sun Dec 11, 2011 4:39 pm

"Float" and "integer" are very general terms and don't have any meaning when it comes to size. Presumably, they used 16 or 32 bit integers for health, mana, and fatigue. The typical floating point value is also 32 bits on a 32 bit system, which is what oblivion was coded for. Coincidentally, the standard int is 32 bits as well. The problem with float calculations is their compounding inaccuracies, but for stats that continually cap out, I doubt it would matter. That and the speed.

I guess I should mention that having resists affect damage or duration depending on which includes less inaccuracies in the total damage dealt would be completely within the realm of OBME's capabilities. However, JRoush seems pretty burnt out on it at the time.
User avatar
Kortknee Bell
 
Posts: 3345
Joined: Tue Jan 30, 2007 5:05 pm

Post » Sun Dec 11, 2011 12:05 pm

The game is probably using "byte" types for stats, which is equivalent to "short" types in the games scripting language. (ie, 0 to 255)

You might try Elys Uncapper, its an OBSE plugin, it removes the limits on attributes and skills, which means it had to change those values from byte to something a bit bigger. (The source code should be available. You could probably change it to use floating point numbers instead. Not sure this would be helpful, but it does change the values in question, so I thought I would mention it.)

As for resistances, try Supreme Magicka, I think it makes these a bit more useful..
User avatar
Bigze Stacks
 
Posts: 3309
Joined: Sun May 20, 2007 5:07 pm

Post » Sun Dec 11, 2011 4:55 pm

JRoush's http://tesnexus.com/downloads/file.php?id=34841 is probably a better choice compared to the elys uncapper. I doubt HP/mana/fatigue are bytes, as they have a tendency to go over 255. I'm pretty sure attributes are stored as bytes, though.
User avatar
Mr. Allen
 
Posts: 3327
Joined: Fri Oct 05, 2007 8:36 am

Post » Sun Dec 11, 2011 6:29 pm

I'm trying to play a Damage-over-time themed warlock, and I've discovered the game doesn't do partial effects well AT ALL. A 2 dmg for 10 second spell will only do 1 dmg/sec if your casting effectiveness is anything below 100%; likewise, if that spell was, say, "shock" and your target had 10% shock resistance, it would also only do 1 dmg/sec (10 total). Weaknesses are even worse, since the game always rounds down to the next lowest whole number; 2dmg/25sec spell cast on something with 25% weakness will still only do 50 total damage.

Basically any sort of resistance at all reduces my damage by ~33-50% (currently anyway; my current spells do 1-3 dmg/sec over 15-25 seconds)

Is this fixable? Has it been done? I know it's somewhat obscure since DoT's are not really present in Oblivion, but it'd be nice if it was possible :D


I think this is a big problem of Oblivion.
EXAMPLE: damage "4 points for 35 seconds. It's clear that a 5% resistance must reduce the duration to reduce the total damage by about 5%.
But the Bethesda programmers mess up the game.
The game will reduce the magnitude and so the total damage will decrease by 25%


EDIT - I was mostly incorrect here, see post below

That's a pity.... The problem here is only that Bethesda chose to use integer values instead of float to keep track of character's stats so fractional results are lost.

Actor values are stored as 32-bit floating point numbers. They fully support fractional values. The notable exceptions are the base values of attributes and skills, which are stored as unsigned 8-bit integers. However, the only things that operate on these base values are skill experience levelups and Abilities. Normal spells, regular damage, etc. all operate on floating point modifiers to these values. So fractional damage done to attributes and skills is almost always correctly handled as well.

EDIT: actually, the base values for health, magicka, fatigue, and a number of other stats are also stored as integers of varying precision. However, as with skills/attributes, spells and regular damage/use operate on floating point modifiers.
User avatar
KiiSsez jdgaf Benzler
 
Posts: 3546
Joined: Fri Mar 16, 2007 7:10 am

Post » Sun Dec 11, 2011 8:40 pm

my bad... I assumed wrong then, I guess. I ran once into an issue with this and maybe it was only a problem of display, but maybe not entirely as I was working with very very low decimal numbers... anyway thanks for bringing some light to the subject, as for the OP request concerns it seems it's already handled correctly. Sorry for the confusion.

@insaneShadow: so you got it man! it seems the only thing that needed to be changed is that debugging tool to make it shows decimal values :P
User avatar
Sara Lee
 
Posts: 3448
Joined: Mon Sep 25, 2006 1:40 pm

Post » Sun Dec 11, 2011 9:15 am

I have just tried this on an unmodified installation of Oblivion, and found that the game clearly does properly track fractional damage. All multipliers - resistances, casting effectiveness, and difficulty penalties to health damage - are accounted for. You can see this yourself using the 'GetAV Health' console command, which prints the decimal places properly. If you cast a damaging spell with a fractional effective magnitude (after all multipliers), the target's health and other stats are damaged accordingly. Note, though, that the Active Effects menu tab will display only integer magnitudes, truncating anything after the decimal point. This can give the illusion that the spell is not doing the correct amount of damage.


Again, a 5% resistance will only block 5% of the total damage regardless of any misleading numbers shown in the menus.


Actor values are stored as 32-bit floating point numbers. They fully support fractional values. The notable exceptions are the base values of attributes and skills, which are stored as unsigned 8-bit integers. However, the only things that operate on these base values are skill experience levelups and Abilities. Normal spells, regular damage, etc. all operate on floating point modifiers to these values. So fractional damage done to attributes and skills is almost always correctly handled as well.

EDIT: actually, the base values for health, magicka, fatigue, and a number of other stats are also stored as integers of varying precision. However, as with skills/attributes, spells and regular damage/use operate on floating point modifiers.




Hmmm. Unless my mods have screwed up the damage calculation, I don't think this is true. While getav may return a decimal, it doesn't mean the game engine is actually *calculating* any of those decimals, and the reason I started USING tdt/8 is because I noticed such a dramatic reduction on damage on certain mobs / when using armor (I changed Supreme Magicka's ini to remove all casting penalties if armor skill is high enough because even at 99% casting effectiveness it "felt" much worse than using robes)

I'll do a few runs on mobs with ~10% resistance / wearing light armor (I'm not skilled in it) and checking actor health values before&after to compare expected damage with actual damage.
User avatar
Tyrel
 
Posts: 3304
Joined: Tue Oct 30, 2007 4:52 am

Post » Sun Dec 11, 2011 12:24 pm

Yup. Tested on Arquen in the DB sanctuary.
she has 2k health and 25% elemental resistances.

On first game load with 100% casting effectiveness I used a custom 2part fire nuke/DoT (20 dmg+2/15sec) and it she ended up at 1945 health, which is what I expected (20*1.25=25)+(2*15=30)=55

Then I used the next rank down of that spell, (10dmg+1/15sec, 25 total) she ended at 1975 (which is reaaally wierd since the 10 damage should have gained at least 2)

Then, with 98% casting effectiveness (tossed on light armor boots) and a 2/25sec poison dot (should be 50 damage, 49 after penalty, she has no poison resist) she ended at 1975 damage (dot became 1/25)

Mostly what I expected, although I'm not sure what to make of the second test.
User avatar
Enny Labinjo
 
Posts: 3480
Joined: Tue Aug 01, 2006 3:04 pm

Post » Sun Dec 11, 2011 10:44 pm

Hmmm on the Mod note I'll try an unmodded character and see what happens then. Maybe it is just my mods... which would be sad(and strange!)

Ok, a few tests done, strange results.

from my ESPfree save, made a 3dmg/20sec fire dot and a 10%/25sec fire weakness spell (both on self, zero fire resist baseline and 100% casting)

"should be" damage: 66
Expected damage: 60
actual damage: 61

Then, 3dmg/20sec dot and 98% casting (put on a piece of armor)
"should be" damage: 59 or so
Expected damage: 40
Actual damage: 40

I didn't try resistances.
User avatar
Guy Pearce
 
Posts: 3499
Joined: Sun May 20, 2007 3:08 pm

Post » Sun Dec 11, 2011 7:53 pm

Hmmm. Unless my mods have screwed up the damage calculation, I don't think this is true.

I had a much more thorough look this time, and it appears that you were correct after all. My apologies for dismissing your claim so quickly; I guess I was biased by how little sense it makes.

After looking at the dissassembly (and doing the actual math rather than just a quick check for decimal values), active effect magnitudes are definitely rounded down to the nearest integer after resistance and spell effectiveness penalties. If you have both resistance and effectiveness penalties, then the magnitude gets rounded after each, so a 1% effectiveness penalty and a 1% resistance can take a magnitude of 3 down to a magnitude of 1. The other side of the coin is that the rounding step has an absolute minimum of 1.0, so no matter how low your effectiveness gets or how high the target's resistance is (as long as it's < 100%), the spell will always do at least 1 damage per second.

It may be that Bethesda had some good reason for this bizarre mechanic, but I can't imagine what it was. I can definitely see why it caused you so much grief, InsaneShadow.
The good news is that it would be very simple for an obse plugin to fix. As I said above, the game engine itself can handle fractional damage just fine, this is just an idiosyncrasy of the magic system.
User avatar
Sophie Miller
 
Posts: 3300
Joined: Sun Jun 18, 2006 12:35 am

Post » Sun Dec 11, 2011 10:24 am

I'm glad to hear it's fixable, thank you for your investigation :D
And eeeesh, I hadn't even realized it "double dipped" on penalties.
Actually fixing it is far outside my experience however. Any suggestions on who I might approach on something like this?
User avatar
Monika Krzyzak
 
Posts: 3471
Joined: Fri Oct 13, 2006 11:29 pm

Post » Sun Dec 11, 2011 6:18 pm

Actually fixing it is far outside my experience however. Any suggestions on who I might approach on something like this?

I put together a http://www.tesnexus.com/downloads/file.php?id=37717 to do it. Let me know how it works.
User avatar
cutiecute
 
Posts: 3432
Joined: Wed Sep 27, 2006 9:51 am

Post » Sun Dec 11, 2011 12:21 pm

Can we expect this to eventually be addressed in OBME, or is that plugin the official solution?
User avatar
Nick Tyler
 
Posts: 3437
Joined: Thu Aug 30, 2007 8:57 am

Post » Sun Dec 11, 2011 10:02 am

I've read about attribute variable type, and I have 2 questions:

1) While, until now, attribute could be altered by integer values only, now they can be altered also by float values. This won't cause problems?


2) Are OBSE plugins able to edit the type of variables? (example from short to long)?
Because I think it could be useful to change the type of variable of attribute from 8-bit to 16-bit.

I don't ask because I wan't a PG with 65535 in all attribute (!!!), but because mods like AVUncapper allow them to increase up to 255 with level-ups (which is the maximum for most RPG games), but any permanent increase by abilities or scripts cause the value to exceed the maximum and restart from 0. With 16-bit variables, this won't happen.
(Maybe somebody will feel an hero, and will set all to 65535, but anybody is free to play as he/she like)
User avatar
evelina c
 
Posts: 3377
Joined: Tue Dec 19, 2006 4:28 pm

Post » Sun Dec 11, 2011 7:03 pm

Can we expect this to eventually be addressed in OBME, or is that plugin the official solution?

Yes, although you could be forgiven for not holding your breath :P.

Are OBSE plugins able to edit the type of variables? (example from short to long)?
Because I think it could be useful to change the type of variable of attribute from 8-bit to 16-bit.

I don't ask because I wan't a PG with 65536 in all attribute (!!!), but because mods like AVUncapper allow them to increase up to 255 with level-ups (which is the maximum for most RPG games), but any permanent increase by abilities or scripts cause the value to exceed the maximum and restart from 0.

The base value of skills & attributes are not stored in script variables; generally speaking they have nothing to do with scripts. You can access them from scripts, but that is an entirely different matter.

It is possible for an obse plugin to remove the upper limit of 255 on base skills & attributes, but it is a much more complicated problem than you might think.
User avatar
Josh Dagreat
 
Posts: 3438
Joined: Fri Oct 19, 2007 3:07 am

Post » Sun Dec 11, 2011 11:25 pm

Perhaps it might be wise to clarify a bit on just what "base score" entails.

If I understand correctly, that is the score you would see if the player was standing there nekkid? Does that include racial bonuses? Birthsign?
User avatar
Sarah MacLeod
 
Posts: 3422
Joined: Tue Nov 07, 2006 1:39 am

Post » Sun Dec 11, 2011 9:36 pm

Perhaps it might be wise to clarify a bit on just what "base score" entails.

If I understand correctly, that is the score you would see if the player was standing there nekkid? Does that include racial bonuses? Birthsign?

The base value of your stats includes points from skill and level increases, birthsigns and other Abilities. It shows up as blue in the stats menu. It can be changed by scripts, but few vanilla scripts do so.

Non-base modifiers include non-Ability magic, and ordinary damage or consumption in the case of health/magicka/fatigue.
User avatar
Umpyre Records
 
Posts: 3436
Joined: Tue Nov 13, 2007 4:19 pm

Post » Mon Dec 12, 2011 12:16 am

I put together a http://www.tesnexus.com/downloads/file.php?id=37717 to do it. Let me know how it works.



Thank you! I'll check it out and let you know :D

*followup edit*
seems to be working perfectly, thank you! (although somehow my test target, Arquen, now has bugged stats, but it doesn't seem to be related to this fix/OBSE 020 beta. I reinstalled my 19b OBSE and removed the DLL and loaded an earlier save and Arquen is still showing up with wierd (IE zero) resists/vulnerables even though she "has" them. Like "weakness fire -25 0/0" (in other words the "sum" is 0... even tho Arquen has no other mods to fire resist, and was at -25 when I first started testing...)

Running with the latest obse and the magic fix now though, all the other mobs I've targetted arn't bugged so I'll ignore Arquen since I'm not supposed to fight her anyway :)
User avatar
claire ley
 
Posts: 3454
Joined: Fri Aug 04, 2006 7:48 pm

Post » Sun Dec 11, 2011 6:18 pm

I have a little idea:
could you use MenuQue to display the magnitude according to the spell effectiveness? (with decimals of course!)
User avatar
x a million...
 
Posts: 3464
Joined: Tue Jun 13, 2006 2:59 pm


Return to IV - Oblivion