Efficiency

Zedingo
Developer
Posts: 85
Joined: Tue Aug 14, 2012 12:24 pm

Efficiency

Post by Zedingo » Thu Sep 13, 2012 9:00 pm

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.
Attachments
spirit_link.patch
(1.77 KiB) Downloaded 166 times
efficiency_in_abilities_and_effects.patch
(22.62 KiB) Downloaded 172 times

Zedingo
Developer
Posts: 85
Joined: Tue Aug 14, 2012 12:24 pm

Re: Efficiency

Post by Zedingo » Thu Sep 13, 2012 9:51 pm

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.

Zedingo
Developer
Posts: 85
Joined: Tue Aug 14, 2012 12:24 pm

Re: Efficiency

Post by Zedingo » Sun Sep 16, 2012 8:55 pm

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.
Attachments
mobskills_efficiency.7z
(22.62 KiB) Downloaded 178 times

Metalfiiish
Developer
Posts: 176
Joined: Tue Jul 31, 2012 7:21 am

Re: Efficiency

Post by Metalfiiish » Tue Sep 18, 2012 12:49 am


Metalfiiish
Developer
Posts: 176
Joined: Tue Jul 31, 2012 7:21 am

Re: Efficiency

Post by Metalfiiish » Tue Sep 18, 2012 1:52 am

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.

Zedingo
Developer
Posts: 85
Joined: Tue Aug 14, 2012 12:24 pm

Re: Efficiency

Post by Zedingo » Tue Sep 18, 2012 2:28 am

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 172 times

Metalfiiish
Developer
Posts: 176
Joined: Tue Jul 31, 2012 7:21 am

Re: Efficiency

Post by Metalfiiish » Tue Sep 18, 2012 4:06 am

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

Metalfiiish
Developer
Posts: 176
Joined: Tue Jul 31, 2012 7:21 am

Re: Efficiency

Post by Metalfiiish » Mon Sep 24, 2012 4:14 am

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:

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;
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.

bluekirby0
Developer
Posts: 707
Joined: Sun Jul 22, 2012 12:11 am

Re: Efficiency

Post by bluekirby0 » Mon Sep 24, 2012 7:32 pm

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.

User avatar
kjLotus
Special Guest
Posts: 1813
Joined: Sun Jul 22, 2012 2:16 pm

Re: Efficiency

Post by kjLotus » Tue Sep 25, 2012 1:05 pm

or just use lua's print() function :p

Post Reply