[SCRIPTING] [RMMV] REFERENCING HIME'S WEAPON DAMAGE IN VICTOR'S DUAL WIELD PLUGIN

Posts

Pages: 1
This is a bit tricky as it uses two different plugins by two different coders. Victor's Dual Wield and Hime's Weapon Damage respectively. (I'm adding the Scripting tag because this involves plugins and customizing them so hopefully its all good.)

Using Victor's Dual Wield plugin normally splits your damage among both attacks. However, what happens if you need to refer to another plugins info, in this case Hime's Weapon Damage, to properly split the actual damage/attacks of a character? I'm assuming that you can add in WeaponDamage somewhere into Victor's code where it refers to the split action. This way you don't have the combined weapon damage of the two weapons used in both attack calculations. (KeroKero's short sword should not be doing 2-12 damage base! It should be 1-6!)

-_- Kinda at a loss of where to start however. If anyone can help with this I can give you hugs, cookies, or uh...put you on a rooftop as a cameo character in a game. (not that I wouldn't put anyone in a game if they wanted, but ya know.) Hopefully I explained this well enough, a bit foggy from dental work done yesterday.
Trihan
"It's more like a big ball of wibbly wobbly...timey wimey...stuff."
3359
Can you link me to the plugins in question?
Victor's Duel Wield:
https://drive.google.com/file/d/0B0cSp2lASM9wbmdWendXTjFjMDA/view

Hime's Weapon Damage:
http://himeworks.com/files/rmmv/scripts/HIME_WeaponDamage.js

Thought I linked em in original post. >.> Oops.

Also yay, Trihan has appeared. (Totes reading your Slip in Javascript threads right now.)
Trihan
"It's more like a big ball of wibbly wobbly...timey wimey...stuff."
3359
Edit: I'm getting confused. Do you mean you want the weapon damage to be considered in the actual battle damage calculation, or when displaying attack values in the menu?
Ah, the weapon damage to be considered in the actual battle damage calculation for its respective attack/hand. Right now it doesn't seperate the two hands when calculating weapon damage in combat.

Example:
atk: 5
weapon 1: shortsword 1-6
weapon 2: dagger 1-4
attack skill: a.weapondamage(b) + atk

What it should look like:
Kloe hits for 11 damage! (1d6 +5)
Kloe hits for 9 damage! (1d4 +5)

How it is right now:
Kloe hits for 15 damage! (1d6 + 1d4 + 5)
Kloe hits for 15 damage! (1d6 + 1d4 + 5)

It kinda makes Kloe a bit more OP than she should be. >.>
Trihan
"It's more like a big ball of wibbly wobbly...timey wimey...stuff."
3359
What's your normal damage formula for attacking?
Ah the formula works as normal except for the a.weaponDamage(b) part. Victor's plugin properly sets all the other variables for the attacks. (If mainhand weapon has +10 atk and the offhand has +5 atk, then the two attacks you perfom will have the appropriate atk numbers or any of the base rm params.)

In a test version of Sunset Sheriff (playing around with dual wielding) the basic damage formula would be a.weaponDamage(b) * (a.atk * 0.2) + a.atk + (a.agi * 0.5) - (b.def * 2).
Trihan
"It's more like a big ball of wibbly wobbly...timey wimey...stuff."
3359
Can you give me the stats of one of the enemies you're testing so I can make sure my numbers match up?
Uh well I have Test Dummy Bat I do testing on... He has 100k hp, 0 mp, and 1 in all other stats.

Otherwise there is Rat, 40hp, 0mp, 8atk, 8def, 5mat, 5mdf, 11agi, 8luk.
Trihan
"It's more like a big ball of wibbly wobbly...timey wimey...stuff."
3359
Okay, what about actor stats?
Libby Test has 45hp, 15mp, 8atk, 8def, 8mat, 8mdf, 14agi, 16luk.
Trihan
"It's more like a big ball of wibbly wobbly...timey wimey...stuff."
3359
Did you keep the dual wielding damage multiplier in Victor's plugin at 75% or did you do it at 100% to compensate for the weapons having different weapon damage calculations anyway?
Kept it at 75%. I haven't gotten far enough adding in hime weapondamage ref to adjust it for balance, heh.
Trihan
"It's more like a big ball of wibbly wobbly...timey wimey...stuff."
3359
Okay, it looks like what I'm going to have to do is add a parameter to weaponDamage that passes the slot that's currently being considered, which I'll also have to add in to the makeDamageValue function of Victor's. This shouldn't be TOO difficult.
:O Oh man. Thanks so much Trihan. I'd mail you some cookies, but they'd get super stale in the mail. (they last maybe a week if each is individually ziplocked and the weather is fair)
Trihan
"It's more like a big ball of wibbly wobbly...timey wimey...stuff."
3359
Okay, I've got the attacks being separated now:

With just a.weaponDamage(b):

a1 3, a2 4
a1 3, a2 3
a1 3, a2 1
a1 2, a2 2

With test bat and a.weaponDamage(b) * (a.atk * 0.2) + a.atk + (a.agi * 0.5) - (b.def * 2):

a1 18, a2 13
a1 16, a2 19
a1 26, a2 16
a1 15, a2 15

Full formula with rat stats:

a1 miss, a2 2
a1 1, a2 2
a1 4, a2 1
a1 miss, a2 1

That's with 100% dual wield multiplier btw.

Is that a bit more like what you were after?
Trihan
"It's more like a big ball of wibbly wobbly...timey wimey...stuff."
3359
Okay, in HIME_WeaponDamage.js, find the if (weapons.length === 0) { conditional on line 168 and change its ELSE block to this:

if (!BattleManager.isSecondAttack()) {
		return this.evalWeaponDamage(weapons[0], target);
      } else {
		return this.evalWeaponDamage(weapons[1], target);
      }
Woot! It works perfectly! *votes Trihan best rmn coder*
Pages: 1