Enhancing Sword Latent Effects and Enspell day/weather bonus
- maxtherabbit
- Developer
- Posts: 57
- Joined: Wed Jun 12, 2013 11:26 pm
Enhancing Sword Latent Effects and Enspell day/weather bonus
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.
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 318 times
-
- battleutils.cpp.patch
- (3.03 KiB) Downloaded 332 times
-
- ensword_latents.txt
- (1.36 KiB) Downloaded 332 times
Re: Enhancing Sword Latent Effects and Enspell day/weather b
tortoiseSVN wont let me apply the patches, can you make them one patch from the root directory? (right click onetimexi folder -> create patch)
- maxtherabbit
- Developer
- Posts: 57
- Joined: Wed Jun 12, 2013 11:26 pm
Re: Enhancing Sword Latent Effects and Enspell day/weather b
here's the unified patch
- Attachments
-
- enspell.patch
- (9 KiB) Downloaded 320 times
- maxtherabbit
- Developer
- Posts: 57
- Joined: Wed Jun 12, 2013 11:26 pm
Re: Enhancing Sword Latent Effects and Enspell day/weather b
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
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
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
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 347 times
Re: Enhancing Sword Latent Effects and Enspell day/weather b
maybe, i think i'll test it on retail while levelling drgmaxtherabbit 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
edit: and maybe i'll put a pkey on item_latents so we don't get duplicates
edit2: putting in a pkey made me find another item that had duplicates! hurray!
- maxtherabbit
- Developer
- Posts: 57
- Joined: Wed Jun 12, 2013 11:26 pm
Re: Enhancing Sword Latent Effects and Enspell day/weather b
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...
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
Re: Enhancing Sword Latent Effects and Enspell day/weather b
don't bother, there already is functions for all of that in the scripts, which is where additional effects are going to end up eventuallymaxtherabbit wrote:maybe create a function for the day/weather stuff...
just doing enspells as a temp thing for now
- maxtherabbit
- Developer
- Posts: 57
- Joined: Wed Jun 12, 2013 11:26 pm
Re: Enhancing Sword Latent Effects and Enspell day/weather b
don't additional effects that are calculated per swing have to be in the core?
Re: Enhancing Sword Latent Effects and Enspell day/weather b
nope, they just are right now because that's where the original author of them decided to put themmaxtherabbit wrote:don't additional effects that are calculated per swing have to be in the core?
- maxtherabbit
- Developer
- Posts: 57
- Joined: Wed Jun 12, 2013 11:26 pm
Re: Enhancing Sword Latent Effects and Enspell day/weather b
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?
not a total waste of time I guess, at least they are workin better than they were before
can you commit my latest plz?