Efficiency
Efficiency
I went through scripts in abilities and effects, changing vars to local, and generally cleaning up.
I also noticed that Spirit Link didn't give a damn about Stoneskin, but I'll include that patch separate from the cleanups.
I also noticed that Spirit Link didn't give a damn about Stoneskin, but I'll include that patch separate from the cleanups.
- Attachments
-
- spirit_link.patch
- (1.77 KiB) Downloaded 335 times
-
- efficiency_in_abilities_and_effects.patch
- (22.62 KiB) Downloaded 284 times
Re: Efficiency
Oh, it's important to note that I tested Spirit Link, but I didn't go through every ability and effect that I cleaned up. The same is true for the mobskills I'm working on now.
Re: Efficiency
And here is mobskills, updated to use the modified applyPlayerResist and optimized as best I could. I may have missed some things and ask for some help double-checking my work, because this one was HUGE.
Also I had to modify applyPlayerResist, so that in the case a mob has and uses Elemental Seal before a TP move, the enfeeble of that move doesn't have increased accuracy.
Also I had to modify applyPlayerResist, so that in the case a mob has and uses Elemental Seal before a TP move, the enfeeble of that move doesn't have increased accuracy.
- Attachments
-
- mobskills_efficiency.7z
- (22.62 KiB) Downloaded 339 times
-
- Developer
- Posts: 176
- Joined: Tue Jul 31, 2012 7:21 am
Re: Efficiency
Spirit link :https://code.google.com/p/onetimexi/sou ... ail?r=1769
Efficiency for abilities/spells: https://code.google.com/p/onetimexi/sou ... ail?r=1770
Efficiency for abilities/spells: https://code.google.com/p/onetimexi/sou ... ail?r=1770
-
- Developer
- Posts: 176
- Joined: Tue Jul 31, 2012 7:21 am
Re: Efficiency
as for the mob tp moves as per our conversation revert to revision 1734 then make the changes as we need to include accRandom that was removed. Thanks! If you don't get a chance to finish let me know and I will get it done.
Re: Efficiency
Got some things I missed. Next I'll work on the problem of if a physical move misses, the enfeeb can still be applied. I'm not sure if the same applies to magical moves.
- Attachments
-
- mobskills_efficiency_2.7z
- (22.53 KiB) Downloaded 332 times
-
- Developer
- Posts: 176
- Joined: Tue Jul 31, 2012 7:21 am
Re: Efficiency
Don't implement this as the new resist function is not working and players resist 100% of the time. Needs to be revised by teschnei
-
- Developer
- Posts: 176
- Joined: Tue Jul 31, 2012 7:21 am
Re: Efficiency
So did test and it seems like it is passing either 0 or 1. It does not pass the value expected. It looks like lua is converting the float into an integer.
resist should be equal to one of the below:
as you can see there is no 0 yet it spits 0 out most of the time when it passes this before sending it to return. (I can see what it considers resist to be before it sends it to return by using printf just before the return resist;)
We need to figure out why it is not using resist as a float so the resistance works properly.
resist should be equal to one of the below:
Code: Select all
if(resvar <= sixteenth) then
resist = 0.0625;
--printf("Spell resisted to 1/16!!! Threshold = %u",sixteenth);
elseif(resvar <= eighth) then
resist = 0.125;
--printf("Spell resisted to 1/8! Threshold = %u",eighth);
elseif(resvar <= quart) then
resist = 0.25;
--printf("Spell resisted to 1/4. Threshold = %u",quart);
elseif(resvar <= half) then
resist = 0.5;
--printf("Spell resisted to 1/2. Threshold = %u",half);
else
resist = 1.0;
We need to figure out why it is not using resist as a float so the resistance works properly.
-
- Developer
- Posts: 707
- Joined: Sun Jul 22, 2012 12:11 am
Re: Efficiency
You need to use %f to print floats (or doubles) or you will get invalid values. %u is for unsigned integers, %i for integers, and %s for strings.
Re: Efficiency
or just use lua's print() function :p