Skip to content

Instantly share code, notes, and snippets.

@TeoTwawki
Last active June 18, 2020 19:06
Show Gist options
  • Save TeoTwawki/648696ce36284539aa82af132637a780 to your computer and use it in GitHub Desktop.
Save TeoTwawki/648696ce36284539aa82af132637a780 to your computer and use it in GitHub Desktop.
Dm's about dw, h2h, and mob kicks

[12:26 AM] ibm2431: Are there any mnk mobs in the game that do kick attacks?
[12:26 AM] ibm2431: Mandies?
[12:27 AM] ibm2431: At the moment, the only difference between the dual wield mob mod and isH2H is that isH2H generates kick attacks
[12:27 AM] ibm2431: This is probably desirable for isH2H
[12:28 AM] ibm2431: I'm starting to wonder if we want a column at all
[12:28 AM] ibm2431: And instead either:
a) set isH2H properly (using a pool mod for dual wielders who aren't hand to hand because they don't kick)(edited)
[12:29 AM] ibm2431: b) drop isH2H column, and set mods for hand-to-hand (right, left, kick) to whole families (mandies) or pools (monk mobs who actually fight hand-to-hand)
[12:30 AM] TeoTwawki: in retail yes higher levels mobs can "kick" the animation for this varies. in private servers this is not implimented.
[12:31 AM] TeoTwawki: not all monk mobs will kick
[12:31 AM] TeoTwawki: its handled by a job trait (and thus regular modifier?) normally anyway(edited)
[12:34 AM] TeoTwawki: optimally, I would have liked to turn the existing "skillType" column into dmgType for slashing piercing etc, and handled h2h and dw elsewhere but thats not simple unless done ona per-group basis. And since a longterm goal was to kill the damn mod tables, I didn't wanna add to those, and we surely do not wish to give every effected mob a script for the sole purpose of adding one line to set the mod
[12:35 AM] ibm2431: Hrm... yeah... killing mod tables is a goal
[12:35 AM] TeoTwawki: the majority of these mobs have no need of any script at present, unless they happen to have a book page
[12:35 AM] TeoTwawki: I thought this was why we both grudgingly had to eat taking in a column
[12:36 AM] ibm2431: I guess I'm just running in circles
[12:36 AM] TeoTwawki: one step forward and 2 steps back
[12:36 AM] TeoTwawki: we started out trying to kill a column, wound up arriving at needing 2(edited)
[12:37 AM] TeoTwawki: a pox on whoever decided mimas has an actual great axe.
[12:37 AM] ibm2431: Wait, I think I might be overthinking the ish2h thing
[12:37 AM] ibm2431: So my concern was that the difference between ish2h and dw are concerned (in context of num attacks)...
[12:37 AM] TeoTwawki: yeah that doesn't need to be a worry
[12:37 AM] ibm2431: h2h generates a left swing and kick attacks
[12:37 AM] ibm2431: while dw only generates a left swing
[12:37 AM] TeoTwawki: kick isn't part of that situation
[12:38 AM] TeoTwawki: kick will be like a da proc
[12:38 AM] ibm2431: Yeah
[12:38 AM] ibm2431: Just have generateKickAttacks return 0 attacks without a trait
[12:38 AM] TeoTwawki: yup
[12:38 AM] ibm2431: Break it outside of the isH2H check
[12:38 AM] ibm2431:

    // Build dual wield off hand weapon attacks.
    if (IsH2H())
    {
        // Build left hand H2H attacks.
        CreateAttacks(dynamic_cast<CItemWeapon*>(attacker->m_Weapons[SLOT_MAIN]), LEFTATTACK);

        // Build kick attacks.
        CreateKickAttacks();
    }

[12:39 AM] ibm2431: I did not write the "build dual wield" comment
[12:39 AM] TeoTwawki: one bit that may get tricky, is we decided we coudl handle mobs that occ.attacks whaetevers teh way we do double, trupple, qudrupl;e attack (lord of onzozo, the NM in the up in arms BCNM) by using mods where we handle triopple etc already.
[12:39 AM] TeoTwawki: well
[12:40 AM] TeoTwawki: on monk mobs that shit can proc per-fist
[12:40 AM] TeoTwawki: maybe LoO's 8 hit is really quadra on both "hands" of his tentacular greatness?
[12:41 AM] ibm2431: That.. would make an absurd amount of sense
[12:41 AM] TeoTwawki: both mobs I know of that do this are sea monks
[12:41 AM] ibm2431: You can just see him having a quad hit rate through the roof
[12:41 AM] TeoTwawki: I'm not sure I've ever witnessed all 8 hits honestly
[12:41 AM] TeoTwawki: maybe thats just assumed because duh kraken club
[12:42 AM] TeoTwawki: I could easily see it being a ton of triple attack procing for 6
[12:42 AM] TeoTwawki: and maybe a fuck ton of haste or delay redux, plus his counters
[12:42 AM] TeoTwawki: mobs don't generate log message for counters - they just slap you in the face
[12:43 AM] TeoTwawki: same with guards
[12:43 AM] TeoTwawki: for mandy, a guard pops them in the ground so only their "onion head top" sticks out
[12:43 AM] TeoTwawki: then they pop up outa the ground after
[12:43 AM] TeoTwawki: their kick attacks are cute tho(edited)
[12:43 AM] TeoTwawki: they jump
[12:45 AM] ibm2431: So the only thing we're using mob's weapon skill type for is the H2H check?(edited)
[12:46 AM] TeoTwawki: correct (or dw, ironic given the mobmod IS being checked for)
[12:46 AM] TeoTwawki: 2 methods to do same thing..
[12:47 AM] ibm2431: Trying to think about how to break this up
[12:47 AM] ibm2431: I started today out with just having a m_DualWield
[12:48 AM] ibm2431: Then I got to mobs and said, "I might be able to set it for mobs while I'm here"
[12:48 AM] ibm2431: Which lead me to the mob mod
[12:48 AM] ibm2431: (Because we apparently always set the mob mod for all NIN NMs)
[12:48 AM] TeoTwawki: uh...we shouldn't be
[12:48 AM] ibm2431: (Which I'm refraining from just deleting because that sounds like it'd be wrong)
[12:48 AM] TeoTwawki: some of the yags and tonbery single wield(edited)
[12:48 AM] ibm2431: Yep, so this is going
[12:48 AM] ibm2431: I don't know which NMs are currently relying on it, but w/e
[12:50 AM] ibm2431: I'll leave this for a later time:

        if(mJob == JOB_WHM)
        {
            // whm nms have stronger regen effect
            PMob->addModifier(Mod::REGEN, mLvl/4);
        }

[12:50 AM] ibm2431: Only flagging it now because aether ran into issues with that
[12:50 AM] TeoTwawki: facepalm
[12:51 AM] TeoTwawki: there are places all the F over where somebody set mods for shit ALREADY HANDLED by the job traits
[12:51 AM] TeoTwawki: also shit plain made up
[12:51 AM] TeoTwawki: thf "dropping bomb like crazy"
[12:51 AM] TeoTwawki: and then they proceed to make thf goblins bomb toss have a 50% dmg boost
[12:52 AM] TeoTwawki: I -think- one of my final pr's to dsp axed that
[12:52 AM] ibm2431: It did, I remember
[12:52 AM] TeoTwawki: there are tons of mob scripts that add resistances that the mob already had
[12:52 AM] TeoTwawki: pld with resist sleep
[12:52 AM] TeoTwawki: some got a mob table entry AND THEN ALSO a script entry

[12:53 AM] ibm2431: In the context of dual wield mobs, will they have a dual wield trait?(edited)
[12:53 AM] ibm2431: Or is that going to be given to all mobs with a certain job
[12:54 AM] TeoTwawki: there's 2 models of ninja yagudo. one with 2 katanas and one with only one.
[12:54 AM] TeoTwawki: I am not sure where all you can find the 2 katana model. wotg?
[12:55 AM] TeoTwawki: same goes for the tonberries
[12:55 AM] ibm2431: So dual wield traits are given to all mobs with NIN job
[12:55 AM] TeoTwawki: the 1st tonberries you meet single wield.(edited)
[12:55 AM] ibm2431: But not all dual wield
[12:55 AM] TeoTwawki: correct
[12:55 AM] ibm2431: (I'm currently trying to figure out where to set m_dualWield for mobs)(edited)
[12:56 AM] ibm2431: At the moment I just have it in CalculateStats ._.
[12:56 AM] TeoTwawki: concerned that depending on how we name and structure, a future editor might try and fix what isn't broken
[12:56 AM] ibm2431: Right below this "reduce weapon delay of MNK" block ._.
[12:56 AM] TeoTwawki: Halver taught me to plan for this

[12:57 AM] ibm2431:

    ((CItemWeapon*)PMob->m_Weapons[SLOT_MAIN])->setDamage(GetWeaponDamage(PMob));

    //reduce weapon delay of MNK
    if(PMob->GetMJob()==JOB_MNK){
        ((CItemWeapon*)PMob->m_Weapons[SLOT_MAIN])->resetDelay();
    }

    if (PMob->getMobMod(MOBMOD_DUAL_WIELD))
    {
        PMob->m_dualWield = true;
    }

[12:57 AM] ibm2431: And I'm not entirely confident in this
[12:59 AM] ibm2431: Because it can't be used after a mob is spawned
[12:59 AM] ibm2431: (Unless setting a mob mod does a new call to calculateStats)
[12:59 AM] TeoTwawki: do we need it to though?
[1:00 AM] TeoTwawki: also that's another sign it shouldn't be a mobmod
[1:00 AM] TeoTwawki: jus sayin
[1:00 AM] ibm2431: Yeah
[1:00 AM] ibm2431: Since it can't be changed after the fact
[1:00 AM] ibm2431: Without gunking up setMod
[1:00 AM] TeoTwawki: I could make a binding to force change it, except some thing that need to change have not which are related
[1:01 AM] TeoTwawki: presently any call to calculate stats will heal the mob (or player) in full
[1:01 AM] TeoTwawki: for retail accuracy reason those need split into 2 separate calls
[1:02 AM] TeoTwawki: right now can't change anything about a mobs job or level without it healing(edited)
[1:02 AM] ibm2431: I guess the question becomes: is there ever a time that a mob ceases to have an offhand attack
[1:02 AM] ibm2431: Like, you brought up weapon breakers / throwers
[1:02 AM] ibm2431: And that sounds familiar, but I don't know if that's ever applied to an offhand weapon
[1:02 AM] TeoTwawki: I don't think so, but if my above thing is fixed, I could trivially change the value and recalc stats
[1:03 AM] ibm2431: Oh, and don't worry about setting a mobMod at all? Just reset m_dualWield?
[1:03 AM] TeoTwawki: I made a binding to level up mobs, without animation (use case was abyssea)
[1:03 AM] TeoTwawki: yes
[1:04 AM] ibm2431: And then we axe MOBMOD_DUAL_WIELD
[1:04 AM] TeoTwawki: in my binding, I set the new lv and call calulateStats - mobs updates, gets its new lv stats and hp
[1:04 AM] ibm2431: And when the mob is calculated, use a db column instead
[1:04 AM] TeoTwawki: for dw, I would set m_duelwield and call calc stats. the prob is it healing the mob at present
[1:05 AM] TeoTwawki: but so far, we don't have any mobs that dw that stop doing so that I know of
[1:05 AM] TeoTwawki: just saying it would be easy to handle
[1:05 AM] ibm2431: Okay, I'm feeling better about this
[1:05 AM] TeoTwawki: the fix for the hp refill is easy to, I just haven't had reason to do it
[1:06 AM] ibm2431: For now we still have isH2h, and we still have MOBMOD_DUAL_WIELD
[1:06 AM] TeoTwawki: probably when we start implementing fomors that lv up in witg, or when we do King Of Heart's level up(edited)
[1:06 AM] TeoTwawki: not sure if the fomors heal.
[1:06 AM] TeoTwawki: I wanna say they don't
[1:07 AM] ibm2431: So until that's sorted out into a proper new column, setting m_dualWield to true in calculate stats based on if they have MOBMOD_DUAL doesn't break anything
[1:07 AM] TeoTwawki: maybe just comment there to deprecate this later
[1:07 AM] ibm2431: When we do have the db column, we can change the check for MOBMOD_DUAL to whatever the db value is
[1:07 AM] TeoTwawki: so we don't forget the plan
[1:08 AM] ibm2431:

    // Deprecate MOBMOD_DUAL_WIELD later, replace if check with value from DB
    if (PMob->getMobMod(MOBMOD_DUAL_WIELD))
    {
        PMob->m_dualWield = true;
    }

[1:08 AM] ibm2431: I have axed the automatic setting of MOBMOD_DUAL_WIELD for NIN NMs...
[1:08 AM] ibm2431: Just deleted it entirely
[1:09 AM] ibm2431: I should probably see which NMs are affected...
[1:09 AM] TeoTwawki: you realize meanwhile, nothing double swings that doesn't have the mobmod
[1:09 AM] TeoTwawki: I mean out of things not set as h2h currently(edited)
[1:09 AM] ibm2431: I'm currently leaving isH2H alone
[1:10 AM] ibm2431: And I think the MOBMOD_DUAL was being set only for NMs
[1:10 AM] TeoTwawki: well. need to see which ninjas are effected anyway I guess
[1:10 AM] ibm2431: So if the mobs didn't have MOBMOD_DUAL set in db or lua, they weren't double-swinging anyway >>;
[1:11 AM] ibm2431: And then this attack round check becomes...
[1:11 AM] ibm2431: if m_dualWield, generate left hand hit
[1:11 AM] ibm2431: Instead of if main is such and such and sub is such and such or entity is mob and mob mod dual wield then
[1:13 AM] ibm2431: I guess later it'll be if h2h or dualwield then left hand
[1:14 AM] ibm2431: And generatekickattacks outside of the h2h check
[1:14 AM] TeoTwawki: I have a new thing I want someone to check now...
[1:14 AM] TeoTwawki: because of us tinkering with this
[1:15 AM] TeoTwawki: I wanna know if on retail, monk mobs are getting the same dmg calculate as player or teh same lv based "weapon damage" as others. the best test case woudl be a low lv player vs an orc grappler and orc fodder of same level
[1:16 AM] TeoTwawki: what I suspect is monk mobs are getting a lower dmg per hit to go along with their longer delay and 2 attacks per round, to get aproximately the same dps(edited)
[1:16 AM] ibm2431: That would not be surprising
[1:17 AM] TeoTwawki: and I think right now on dsp and topaz..monk mobs get the full dmg rating any other mob has, on both hits
[1:17 AM] TeoTwawki: same as dw

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment