Enhancing Sword Latent Effects and Enspell day/weather bonus

User avatar
maxtherabbit
Developer
Posts: 57
Joined: Wed Jun 12, 2013 11:26 pm

Enhancing Sword Latent Effects and Enspell day/weather bonus

Post by maxtherabbit » Sat Dec 07, 2013 1:08 pm

ok I've added the ensword latents, the sql records are in a separate file because my tortoisesvn was shitting the bed trying to make a patch of the item_latents.sql

I've also removed the +5 damage ensword bonus from the magic.lua and moved it into the CalculateEnspellDamage function inside battleutils

this way it will effect both tier 1 and 2 enspells like its meant to (+5 dmg bonus added after normal damage calc)

ALSO added day(10%) and weather (10%/25%) bonuses to the same function

bonus info sourced: http://wiki.ffxiclopedia.org/wiki/Red_M ... lculations

someone please test my battleutils ! I don't have a compiler installed lol

ETA a couple of changes - after some extensive testing I determined that the current calculations for enhancing skill were doubling up on enhancing gear bonuses (i.e. it was calling GetSkill() from the battleentity class which already takes into account the gear bonuses AND adding the enhancing modifier to it again. this resulted in every piece of gear that adds +15 enhancing skill actually adding +30 for purposes of damage calculation. both the calcs for the enspell2 in the battleutils and the enspell1 in the magic.lua were making this error)

also, in the battleutils the calcs for enspell2 are using integer division, which always results in the remainder being discarded, whereas in the magic.lua, the remainders were being rounded up or down accordingly. I'm not 100% sure what retail behavior is for rounding, but I'm assuming it always discards the remainder, as other calcs in DS seem to indicate this. so, in any case, I've changed the magic.lua to add math.floor() to the calcs to make them consistent with the battleutils.

If retail does in fact use rounding, I will change the lua back and adjust the cpp, but I think it's better that they are consistent.
Attachments
magic.lua.patch
(1.15 KiB) Downloaded 319 times
battleutils.cpp.patch
(3.03 KiB) Downloaded 333 times
ensword_latents.txt
(1.36 KiB) Downloaded 332 times

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

Re: Enhancing Sword Latent Effects and Enspell day/weather b

Post by kjLotus » Sat Dec 07, 2013 8:49 pm

tortoiseSVN wont let me apply the patches, can you make them one patch from the root directory? (right click onetimexi folder -> create patch)

User avatar
maxtherabbit
Developer
Posts: 57
Joined: Wed Jun 12, 2013 11:26 pm

Re: Enhancing Sword Latent Effects and Enspell day/weather b

Post by maxtherabbit » Sat Dec 07, 2013 9:30 pm

here's the unified patch
Attachments
enspell.patch
(9 KiB) Downloaded 321 times

User avatar
maxtherabbit
Developer
Posts: 57
Joined: Wed Jun 12, 2013 11:26 pm

Re: Enhancing Sword Latent Effects and Enspell day/weather b

Post by maxtherabbit » Sun Dec 08, 2013 4:37 pm

ok apparently someone had already added the ensword latents so now they're in there twice >.<

duuur - they had always been in there since I started playing, but they weren't working until r4110 because status effect latent wasn't implemented and I just hadn't tested my ensword since then or been paying enough attention to changelog OOPS :roll:

took the dupes back out

also fixed the non-working weekday bonus, everything else is working great

btw I think the JA melee delay needs to be increased to 2sec, the 1sec still doesn't feel like retail, b/c you're still swinging as soon as the ja animation is done
Attachments
enspellfix.patch
(4.24 KiB) Downloaded 348 times

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

Re: Enhancing Sword Latent Effects and Enspell day/weather b

Post by kjLotus » Sun Dec 08, 2013 8:27 pm

maxtherabbit wrote:btw I think the JA melee delay needs to be increased to 2sec, the 1sec still doesn't feel like retail, b/c you're still swinging as soon as the ja animation is done
maybe, i think i'll test it on retail while levelling drg

edit: and maybe i'll put a pkey on item_latents so we don't get duplicates :D

edit2: putting in a pkey made me find another item that had duplicates! hurray!

User avatar
maxtherabbit
Developer
Posts: 57
Joined: Wed Jun 12, 2013 11:26 pm

Re: Enhancing Sword Latent Effects and Enspell day/weather b

Post by maxtherabbit » Tue Dec 10, 2013 8:07 pm

today added opposing day/weather penalties and target resistance adjustment to enspell damage

also made it subject to dmgtaken, magicdmgtaken, and phalanx

still need to randomise the day/weather penalties/bonuses and add the elemental obi

also added the Sirocco Kukri additional effect (damage ranging from 0-10, subject to elemental resists, dmgtaken, magicdmgtaken, phalanx, and SS)

also need to add day/weather for that, maybe create a function for the day/weather stuff...
Attachments
battleutils.cpp.patch
(5.69 KiB) Downloaded 342 times

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

Re: Enhancing Sword Latent Effects and Enspell day/weather b

Post by kjLotus » Tue Dec 10, 2013 9:28 pm

maxtherabbit wrote:maybe create a function for the day/weather stuff...
don't bother, there already is functions for all of that in the scripts, which is where additional effects are going to end up eventually

just doing enspells as a temp thing for now

User avatar
maxtherabbit
Developer
Posts: 57
Joined: Wed Jun 12, 2013 11:26 pm

Re: Enhancing Sword Latent Effects and Enspell day/weather b

Post by maxtherabbit » Tue Dec 10, 2013 9:32 pm

don't additional effects that are calculated per swing have to be in the core?

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

Re: Enhancing Sword Latent Effects and Enspell day/weather b

Post by kjLotus » Tue Dec 10, 2013 10:05 pm

maxtherabbit wrote:don't additional effects that are calculated per swing have to be in the core?
nope, they just are right now because that's where the original author of them decided to put them

User avatar
maxtherabbit
Developer
Posts: 57
Joined: Wed Jun 12, 2013 11:26 pm

Re: Enhancing Sword Latent Effects and Enspell day/weather b

Post by maxtherabbit » Tue Dec 10, 2013 10:08 pm

damn oh well, so much for that lol

not a total waste of time I guess, at least they are workin better than they were before

can you commit my latest plz?

Post Reply