News:

SMFNew Installed

+-+-

User+-

Welcome, Guest.
Please login or register.
 
 
 

Login with your social network

Forgot your password?

Site Stats+-

Members
Total Members: 728
Latest: Cho
New This Month: 0
New This Week: 0
New Today: 0
Stats
Total Posts: 10932
Total Topics: 795
Most Online Today: 389
Most Online Ever: 854
(September 18, 2024, 07:49:37 am)
Users Online
Members: 0
Guests: 266
Total: 266

Author Topic: Armor Fix Fixed  (Read 4456 times)

0 Members and 122 Guests are viewing this topic.

Armor Fix Fixed
« on: »
Recently Avocados pointed out that my Armor Fix mod did not actually do what it was supposed to do. (I only tested some low values at random that just happened to give the same results as if the mod had been working properly. If I had been more careful and tested some higher values, I would have discovered the problem.) It's fixed now.

ArmorFix does the following:
  • Gives %DR based on armor. The amount of %DR received is a logarithmic function of armor, such that every 2000 armor halves incoming damage. (I.e., 2000 armor yields 50% DR; 4000 armor yields 75% DR, etc.) This armor-> DR mapping occurs independently for physical, fire, ice, electric, and poison. (This really works as advertised now.)
  • Removed the baseline 25% DR from the Berserker and Engineer classes.
  • %DR updates once every 1/8sec. Accordingly, there is a short delay (average 1/16sec) between when your armor value changes and when your DR value changes.
  • The armor->DR mapping works all the way up to 99% DR (13288 armor), but you need a patched executable to go above 75%.
  • This mod is intended to be used in conjunction with removing all other sources of %DR (which my completed Eternity mod will eventually do.)

Since I had to use a looping skill for updates and precomputed skill logic to do the math, I am a little bit concerned about performance issues. I'm not seeing any slowdown on my PC, but I cold use a larger sample size. If you've got a few minutes, please download, test it out, and report back whether you experience any slowdown. (FYI: A Berserker with Shred Armor should incur the worst performance, so, if that works OK, everything else should too.)

Download link
« Last Edit: April 09, 2016, 02:12:38 pm by Chthon »

Share on Bluesky Share on Facebook


Re: Armor Fix Fixed
« Reply #1 on: »
you're insane! This looks like it was so much work!!

Re: Armor Fix Fixed
« Reply #2 on: »
you're insane! This looks like it was so much work!!

Not so bad. A lot of copy pasta and "replace all in all opened documents."

Re: Armor Fix Fixed
« Reply #3 on: »
A lot of copy pasta and "replace all in all opened documents."

Thank goodness for Notepad++! And thank YOU Chthon for the hard (and brilliant) work!

When you say "removing all other sources of DR" what would these be (and why is their removal for the better)?


Re: Armor Fix Fixed
« Reply #4 on: »
Go Chthon!

I'm tempted to reinstall GUTS just to see how you did this...

Re: Armor Fix Fixed
« Reply #5 on: »
When you say "removing all other sources of DR" what would these be (and why is their removal for the better)?

Skills and items are the other sources of %DR.

The reason for removing them is a handful of interlocking balance issues:
a. Now that armor is meaningful, we want to encourage players to build up their armor, rather than take the shortcut of using %DR gear.
b. Since you can now get a decent amount of %DR basically for free from the armor you already had anyway, the game gets too easy if you can get more.
c. I want to use the patched exe so that armor continues to be meaningful out beyond the reasonable limit on how much armor you can obtain. But that means that I have to remove every way that the player might exploit to get to 100% DR.

I'm tempted to reinstall GUTS just to see how you did this...

Summary:
1. Looping passive based off Share the Wealth. Adjusted the loop speed down to 0.125, shrank the damage shape down really tiny, and set the damage shape to only hit players.
2. Looping passive has five EVENT UNIT HIT blocks, one for each element. Each block contains an EXECUTE SKILL block that calls a calculator skill, and a statwatcher for that element's armor being not equal to a custom stat where I save the armor value from the last time the calculator skill ran. This helps performance by not calling the calculator skills during most iterations since armor values change infrequently. (Aside: This is also the first time I ever got a looping passive to call a subskill without crashing the game. Note this technique for future reference, since it may come in handy.)
3. Each calculator skill has 3 EVENT START blocks. The first one just sets a custom stat equal to the armor value, for the looping skill to check later. The second one contains 100 AFFIXES blocks. Each AFFIXES block contains an affix that sets a custom stat to what the final DR value is going to be, and two statwatchers (one >= and one <) using precomputed armor breakpoints. (The AFFIXES blocks for 0 and 99 only have one statwatcher.) (I'd rather use EFFECTS blocks instead of AFFIXES, but statwatchers are buggy in EFFECTS blocks.) The final EVENT START block gives a %DR bonus equal to the custom stat that got set in the second block. Exclusive is set to true, so it replaces the existing bonus with the new bonus. (I would have liked to set the DR bonus directly in the second EVENT START block rather than detouring through a custom stat, but it turns out there's insurmountable problems with any way you try to do that.)

Re: Armor Fix Fixed
« Reply #6 on: »
...But that means that I have to remove every way that the player might exploit to get to 100% DR.

So with this fix it's possible to get to 100% DR (via skill and item affixes) even without the patched .exe?  I thought the vanilla .exe capped DR at 75% in all instances?

Your solution design is really impressive, Chthon. But I wanted to ask about this...

...an EXECUTE SKILL block that calls a calculator skill, and a statwatcher for that element's armor being not equal to a custom stat where I save the armor value from the last time the calculator skill ran.

Is it possible to use a variation of your solution that would allow armor to wear down with use/getting hit? I'm asking in relation to a possible crafting rationale...


Re: Armor Fix Fixed
« Reply #7 on: »
The second one contains 100 AFFIXES blocks.

Yup.  Yup yup.

(I would have liked to set the DR bonus directly in the second EVENT START block rather than detouring through a custom stat, but it turns out there's insurmountable problems with any way you try to do that.)

I'm curious how you set a custom stat to be equal to a pre-existing stat.  I could never get SetStat or AddStat to be modified by the Stat variable.

Re: Armor Fix Fixed
« Reply #8 on: »
So with this fix it's possible to get to 100% DR (via skill and item affixes) even without the patched .exe?  I thought the vanilla .exe capped DR at 75% in all instances?

Sorry I was unclear. The patched exe is the only way to get to 100%. My balance concern is that, in the context of using the patched exe, I do not want players getting all the way to 100%, so I need to take steps to prevent that.

Quote
...an EXECUTE SKILL block that calls a calculator skill, and a statwatcher for that element's armor being not equal to a custom stat where I save the armor value from the last time the calculator skill ran.

Is it possible to use a variation of your solution that would allow armor to wear down with use/getting hit? I'm asking in relation to a possible crafting rationale...

I'm not completely clear on what you're looking for. Do you mean a system wherein each piece of armor loses 1 point off its armor value for each 5 times you get hit, or a durability system like D2, or something else? In any event, it sounds like this would be unsuitable because it pertains to the player and it sounds like you need something that pertains to the items themselves. The augment system is the only way I know of to manipulate the stats of items that already exist.

I'm curious how you set a custom stat to be equal to a pre-existing stat.  I could never get SetStat or AddStat to be modified by the Stat variable.

It's just like you'd think it is:
Code: [Select]
[EFFECT]
<STRING>NAME:PrevIceArmor
<STRING>ACTIVATION:DYNAMIC
<STRING>DURATION:INSTANT
<STRING>TYPE:SET STAT
<STRING>STATMODIFYNAME:RESISTANCE ICE
<STRING>STATMODIFYPERCENT:100
<BOOL>NOGRAPH:1
<FLOAT>MIN:1
<FLOAT>MAX:1
<FLOAT>CHANCE:100
[/EFFECT]

Two things of note: 1. You need to remember to actually create the predefined stat, since it doesn't already exist in most cases. 2. I think I recall reading somewhere about some sort of problem with floats and the stat system -- I don't remember what the issue was, but I think the bottom line was "don't use floats; use the int type even for predefined stats that are supposed to be floats."

Re: Armor Fix Fixed
« Reply #9 on: »
Yes youre right, i was thinking of a degrading of the armor value of the item itself.

Augment eh? Well thats for another thread then ;) Thanks!


Re: Armor Fix Fixed
« Reply #10 on: »
Ahh, maybe I tried using Floats.  I didn't know about that.

 

Recent Topics+-