Enhancing Sword Latent Effects and Enspell day/weather bonus
- maxtherabbit
- Developer
- Posts: 57
- Joined: Wed Jun 12, 2013 11:26 pm
Re: Enhancing Sword Latent Effects and Enspell day/weather b
if you wanna point me in the right direction for scripting the additional effects, I can start working on that instead of putting more effort into the temp stuff
Re: Enhancing Sword Latent Effects and Enspell day/weather b
there's still a lot that has to be done before we can start scripting them, we'll have to see what i can do this weekendmaxtherabbit wrote:if you wanna point me in the right direction for scripting the additional effects, I can start working on that instead of putting more effort into the temp stuff
- maxtherabbit
- Developer
- Posts: 57
- Joined: Wed Jun 12, 2013 11:26 pm
Re: Enhancing Sword Latent Effects and Enspell day/weather b
actually looking at the magic.lua, the current functions for magic bonuses (addBonuses and addBonusesAbility) do not have a provision for magical damage which is irrespective of MAB/MDB like enspells and elemental additional effects on weaponskjLotus wrote: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
also I'm seeing that the target's elemental resistances are being factored in twice to the current magic calculations:
first in the applyResistance function where it boosts their magic evasion
Code: Select all
local magiceva = target:getMod(MOD_MEVA) + target:getMod(resistMod[spell:getElement()]);
then again in the addBonuses function where it reduces dmg by an additional percentage based on the target's elemental resistance:
Code: Select all
local speciesReduction = target:getMod(defenseMod[ele]);
speciesReduction = 1.00 - (speciesReduction/1000);
dmg = math.floor(dmg * speciesReduction);
Code: Select all
resistMod = {MOD_FIRERES, MOD_EARTHRES, MOD_WATERRES, MOD_WINDRES, MOD_ICERES, MOD_THUNDERRES, MOD_LIGHTRES, MOD_DARKRES};
defenseMod = {MOD_FIREDEF, MOD_EARTHDEF, MOD_WATERDEF, MOD_WINDDEF, MOD_ICEDEF, MOD_THUNDERDEF, MOD_LIGHTDEF, MOD_DARKDEF};
Code: Select all
PMob->setModifier(MOD_FIREDEF, (int16)((Sql_GetFloatData(SqlHandle, 38) - 1) * -1000)); // These are stored as floating percentages
PMob->setModifier(MOD_ICEDEF, (int16)((Sql_GetFloatData(SqlHandle, 39) - 1) * -1000)); // and need to be adjusted into modifier units.
PMob->setModifier(MOD_WINDDEF, (int16)((Sql_GetFloatData(SqlHandle, 40) - 1) * -1000)); // Higher DEF = lower damage.
PMob->setModifier(MOD_EARTHDEF, (int16)((Sql_GetFloatData(SqlHandle, 41) - 1) * -1000)); // Negatives signify increased damage.
PMob->setModifier(MOD_THUNDERDEF, (int16)((Sql_GetFloatData(SqlHandle, 42) - 1) * -1000)); // Positives signify reduced damage.
PMob->setModifier(MOD_WATERDEF, (int16)((Sql_GetFloatData(SqlHandle, 43) - 1) * -1000)); // Ex: 125% damage would be 1.25, 50% damage would be 0.50
PMob->setModifier(MOD_LIGHTDEF, (int16)((Sql_GetFloatData(SqlHandle, 44) - 1) * -1000)); // (1.25 - 1) * -1000 = -250 DEF
PMob->setModifier(MOD_DARKDEF, (int16)((Sql_GetFloatData(SqlHandle, 45) - 1) * -1000)); // (0.50 - 1) * -1000 = 500 DEF
PMob->setModifier(MOD_FIRERES, (int16)((Sql_GetFloatData(SqlHandle, 38) - 1) * -100)); // These are stored as floating percentages
PMob->setModifier(MOD_ICERES, (int16)((Sql_GetFloatData(SqlHandle, 39) - 1) * -100)); // and need to be adjusted into modifier units.
PMob->setModifier(MOD_WINDRES, (int16)((Sql_GetFloatData(SqlHandle, 40) - 1) * -100)); // Higher RES = lower damage.
PMob->setModifier(MOD_EARTHRES, (int16)((Sql_GetFloatData(SqlHandle, 41) - 1) * -100)); // Negatives signify lower resist chance.
PMob->setModifier(MOD_THUNDERRES, (int16)((Sql_GetFloatData(SqlHandle, 42) - 1) * -100)); // Positives signify increased resist chance.
PMob->setModifier(MOD_WATERRES, (int16)((Sql_GetFloatData(SqlHandle, 43) - 1) * -100));
PMob->setModifier(MOD_LIGHTRES, (int16)((Sql_GetFloatData(SqlHandle, 44) - 1) * -100));
PMob->setModifier(MOD_DARKRES, (int16)((Sql_GetFloatData(SqlHandle, 45) - 1) * -100));
is this correct/intentional for the target to have two opportunities to reduce total damage received based on the same "stat"?
downloaded a syntax highlighting template for lua files in ultraedit in preparation, now I can finally read them all good
Re: Enhancing Sword Latent Effects and Enspell day/weather b
minor change, isn't too hardmaxtherabbit wrote:actually looking at the magic.lua, the current functions for magic bonuses (addBonuses and addBonusesAbility) do not have a provision for magical damage which is irrespective of MAB/MDB like enspells and elemental additional effects on weapons
yepmaxtherabbit wrote:is this correct/intentional for the target to have two opportunities to reduce total damage received based on the same "stat"?
- maxtherabbit
- Developer
- Posts: 57
- Joined: Wed Jun 12, 2013 11:26 pm
Re: Enhancing Sword Latent Effects and Enspell day/weather b
could I get a quick rundown of why there are two different identifiers/usages of the same DB value? and knowing how they are sourced for PCs would be awesome
I don't see anything on the retail ffxi wiki page for calculating magic damage that discusses a 2 stage resist calculation, they seem to indicate that resistance is a single calculation so I'm confused
my thinking regarding additional effects, is since they aren't subject to MAB/MDB or the magic shell effect that they would not be subject to a magic acc vs magic eva resistance test at all, but instead would only receive a fixed percentage damage reduction/penalty based on the target's resistance value. it's been a while but I don't remember my magic acc as retail rdm affecting enspell damage at all either.
agree or disagree?

I don't see anything on the retail ffxi wiki page for calculating magic damage that discusses a 2 stage resist calculation, they seem to indicate that resistance is a single calculation so I'm confused
my thinking regarding additional effects, is since they aren't subject to MAB/MDB or the magic shell effect that they would not be subject to a magic acc vs magic eva resistance test at all, but instead would only receive a fixed percentage damage reduction/penalty based on the target's resistance value. it's been a while but I don't remember my magic acc as retail rdm affecting enspell damage at all either.
agree or disagree?
Re: Enhancing Sword Latent Effects and Enspell day/weather b
one is analogous to +element mods on gear (affects resists only), the other is just an increase/decrease in final elemental damage taken. most of the time these are 0, just for families that are strong/weak to a specific element are they changedmaxtherabbit wrote:could I get a quick rundown of why there are two different identifiers/usages of the same DB value? and knowing how they are sourced for PCs would be awesome![]()
edit: for players, elemental evasion is +element on gear, and elemental defense is always 0
the enspell page says that enspells can be resisted, which means they have a macc vs meva check that can randomly half/quarter/eighth damagemaxtherabbit wrote:my thinking regarding additional effects, is since they aren't subject to MAB/MDB or the magic shell effect that they would not be subject to a magic acc vs magic eva resistance test at all, but instead would only receive a fixed percentage damage reduction/penalty based on the target's resistance value.
- maxtherabbit
- Developer
- Posts: 57
- Joined: Wed Jun 12, 2013 11:26 pm
Re: Enhancing Sword Latent Effects and Enspell day/weather b
I don't think that's correct, because IIRC in retail melee jobs could sub RDM and still do some damage against tough+ mobs with enspell (granted it was less b/c of the low enhanging magic skill). if it was based on magic acc, wouldn't pure melee jobs relying solely on sub job magic skill get resisted almost constantly on tougher mobs?kjLotus wrote:
the enspell page says that enspells can be resisted, which means they have a macc vs meva check that can randomly half/quarter/eighth damage
I would assume that additional effect: elemental dmg weapons follow the same rules for resistance (they too can be resisted, but it is certainly not based on magic acc because there is no applicable magic skill lvl upon which to base the magic acc calculation)
thus why I was speculating that it's a fixed percentage penalty/bonus
Re: Enhancing Sword Latent Effects and Enspell day/weather b
i have sirocco kukri (for example) scripted as having its base magic skill as dagger skill - it's also possible that it could just be assumed capped.maxtherabbit wrote:(they too can be resisted, but it is certainly not based on magic acc because there is no applicable magic skill lvl upon which to base the magic acc calculation)
in any case, i have RDM49 on retail so i guess i could just go look
- maxtherabbit
- Developer
- Posts: 57
- Joined: Wed Jun 12, 2013 11:26 pm
Re: Enhancing Sword Latent Effects and Enspell day/weather b
yeah you should do some testing, my memory is not that reliable on this subject
some google digging has led me to believe that you're right about the enspells being able to be resisted 1/2 1/4 etc. but that the resistance calculations are done differently than regular spells (for example INT/MND have no role in them whatsoever)
some comments I saw on somebody's livejournal (lol) were talking about using the enspells to determine various mobs' "pure" resistance rates to a given element. perhaps the mob's inherent weakness/strength to the element in question is the only thing that controls their chances to resist by fraction (with rates diminishing on the increasing resist tiers)
some google digging has led me to believe that you're right about the enspells being able to be resisted 1/2 1/4 etc. but that the resistance calculations are done differently than regular spells (for example INT/MND have no role in them whatsoever)
some comments I saw on somebody's livejournal (lol) were talking about using the enspells to determine various mobs' "pure" resistance rates to a given element. perhaps the mob's inherent weakness/strength to the element in question is the only thing that controls their chances to resist by fraction (with rates diminishing on the increasing resist tiers)
Last edited by maxtherabbit on Wed Dec 11, 2013 4:44 pm, edited 1 time in total.
Re: Enhancing Sword Latent Effects and Enspell day/weather b
not combat skill, was getting no resists with a club vs adoulin mobs
but i was getting some resists (6 damage instead of 12) with enblizzard against DC boars in kamihr, so its probably just assumed capped (i only have 160 enhancing skill as pup99/rdm49)
edit: and yeah, no int/mnd role probably, the script function for kukri already assumes 0 difference in int/mnd
but i was getting some resists (6 damage instead of 12) with enblizzard against DC boars in kamihr, so its probably just assumed capped (i only have 160 enhancing skill as pup99/rdm49)
edit: and yeah, no int/mnd role probably, the script function for kukri already assumes 0 difference in int/mnd