MV WeaponType Variance

Hi

i got a request for an adaptative WeaponType Variance

I want each type of weapon in my game have a variance defined by a "fixed" range, and applied to all weapons assimilated to that type of weapon, in goal to apply this variance

Example :Here is a spreadsheet listing the types of weapons I want, with their information
WeaponTypes.png


For the exemple:
If my character use Twinblades
The Twinblades WeaponType must be defined with a WeaponVariance range of [90%-115%].
Means each time a character use a skill with a Twinblades equiped, i want a randomly number being choose inside the range [0.9-1.15] being passively added to the damage formula

BUT
if after this, i equip a Naginata to my character,
The Naginata WeaponType must be defined with a WeaponVariance range of [100%-130%].
Means each time a character use a skill with a Twinblades equiped (no matter wich Twinblade, it must work for all fist assimiled to this "Fist" WeaponType), i want a randomly number being choose inside the range [1-1.3] being passively added to the damage formula instead of the past randomly number being choose inside the range [0.9-1.15] (of the Twinblades Variance)


my Damage Formula
a.atk*a.atk/b.def*v[7]*WeaponVariance
You can either:

- Make a different version of the Attack skill for each weapon type, using the WeaponSkill plugin in your dlc\KadokawaPlugins folder or Yanfly's Weapon Unleash

or

- include conditional code/math for the weapon type inside the damage formula of Attack
in my mind (depending on the fact that I know absolutely nothing about coding and plugins/scripts),
i want something like:

For WeaponType 01 ( Nothing ), define WeaponVarianceRange to [ 1;1 ]
For WeaponType 02 ( Orb ), define WeaponVarianceRange to [ 1.05;1.55 ]
For WeaponType 03 ( Spellbook ), define WeaponVarianceRange to [ 1.05;1.55 ]
For WeaponType 04 ( Harp ), define WeaponVarianceRange to [ 1.35;1.75 ]
For WeaponType 05 ( Orb 2Hands ), define WeaponVarianceRange to [ 1.35;1.75 ]
For WeaponType 06 ( Staff ), define WeaponVarianceRange to [ 1.1;1.2 ]
For WeaponType 07 ( Scepter ), define WeaponVarianceRange to [ 1.25;1.75 ]
For WeaponType 08 ( ShortBow ), define WeaponVarianceRange to [ 1.15;1.65 ]
For WeaponType 09 ( Pistol ), define WeaponVarianceRange to [ 1.10;1.20 ]
For WeaponType 10 ( Dagger ), define WeaponVarianceRange to [ 1.10;1.20 ]
For WeaponType 11 ( Claws ), define WeaponVarianceRange to [ 1.10;1.10 ]
For WeaponType 12 ( Large Bow ), define WeaponVarianceRange to [ 1.35;1.85 ]
For WeaponType 13 ( Mace ), define WeaponVarianceRange to [ 1.10;1.20 ]
For WeaponType 14 ( Sword ), define WeaponVarianceRange to [ 1.05;1.25 ]
For WeaponType 15 ( Katana ), define WeaponVarianceRange to [ 1.05;1.25 ]
For WeaponType 16 ( Spear ), define WeaponVarianceRange to [ 1;1.3 ]
For WeaponType 17 ( Armed Arm ), define WeaponVarianceRange to [ 1.45;1.65 ]
For WeaponType 18 ( Scythe ), define WeaponVarianceRange to [ 1.25;1.75 ]
For WeaponType 19 ( Phasic Blade ), define WeaponVarianceRange to [ 0.95;1.35 ]
For WeaponType 20 ( Chakram ), define WeaponVarianceRange to [ 1.30;1.70 ]
For WeaponType 21 ( Odachi ), define WeaponVarianceRange to [ 1.25;1.75 ]
For WeaponType 22 ( Greatsword ), define WeaponVarianceRange to [ 1.25;1.75 ]
For WeaponType 23 ( Lance ), define WeaponVarianceRange to [ 1.25;1.75 ]
For WeaponType 24 ( Phasic Blade 2Hands ), define WeaponVarianceRange to [ 1.25;1.55 ]
For WeaponType 25 ( Arm's Cannon ), define WeaponVarianceRange to [ 1.35;1.75 ]
For WeaponType 26 ( Hammer ), define WeaponVarianceRange to [ 1.15;1.95 ]
For WeaponType 27 ( Phasic Cannon ), define WeaponVarianceRange to [ 1.25;1.85 ]
For WeaponType 28 ( Phasic Cannon 2Hands ), define WeaponVarianceRange to [ 1.55;1.95]
For WeaponType 29 ( Twinblades ), define WeaponVarianceRange to [ 0.9;1.15]
For WeaponType 30 ( Duel Sword ), define WeaponVarianceRange to [ 1;1.20 ]
For WeaponType 31 ( Fight Rod ), define WeaponVariance Range to [ 1;1.20 ]
For WeaponType 32 ( Fist ), define WeaponVariance Range to [ 1.20;1.20 ]
For WeaponType 33 ( Naginata ), define WeaponVariance Range to [ 1;1.30 ]


Define a Fonction RWV (for RandomWeaponVariance) who's returning a random number included on the WeaponVarianceRange of the equipped weapond

Like
function RWV() {
return Math.random() * "WeaponVarianceRange of the equiped weapon";
}


then i can use the following Damage formula:
a.atk*a.atk/b.def*RWV()
Woe to those that choose to quote all of that...

Seriously tho, this might be fun to implement.

OP: How would you envision this to work when dual wielding two different weapons?

Also, would there be a different variance range for magical skills used when the weapon is equipped?

Certain Hit skills?

Do enemies get to take advantage of the variances?
(I'm thinking I'd throw that in anyway to make it viable for different projects.)
Seriously tho, this might be fun to implement.
if it helps, this system was mentioned in another thread. i had also asked OP to point this thread to there when they made it so that anyone looking at the request could have a bit of added context
Thanks.

And wow! This is just the tail end to a wildly complex damage formula experiment.

I'll give it a try, but note that it WON'T be something that needs to be added to the damage formula (just like current variance).

I also think it really does need to reflect different damage types and so will try to implement it.
Woe to those that choose to quote all of that...

Seriously tho, this might be fun to implement.

OP: How would you envision this to work when dual wielding two different weapons?

Also, would there be a different variance range for magical skills used when the weapon is equipped?

Certain Hit skills?

Do enemies get to take advantage of the variances?
(I'm thinking I'd throw that in anyway to make it viable for different projects.)
1) for the DualWielding:
I have never thought about this.

And thinking about it, I think I have an idea, but it would require the creation of a new and independent plugin/script:

even ambidextrous people have one hand that is predominant over the other.

So let's suppose a plugin that allows you to define a "Dominant Hand", which could then be set via the note of each Character.

Example:
if the character is right-handed, the script, via the <Right Hand> command, will make his right hand the dominant hand

Conversely for the left.

As I have just thought about it, in the case of ambidexterity, the variance applied to the hits would be that of the weapon equipped in the hand defined as dominant via this preliminary plugin.

2) for the magic skills , i dont want a differente Range than physical skills.

for the simple reason that, in my view, magic comes from the person, not the weapon. The weapon is therefore an amplifier (or a reducer) but not the source of magic.
So the variance applied to magic depends on the weapon.

3) ennemies dont take advantages of the variance

if it helps, this system was mentioned in another thread. i had also asked OP to point this thread to there when they made it so that anyone looking at the request could have a bit of added context
Thanks, i forget to link the following topic, my bad 🙂
Woe to those that choose to quote all of that...

Seriously tho, this might be fun to implement.

OP: How would you envision this to work when dual wielding two different weapons?

Also, would there be a different variance range for magical skills used when the weapon is equipped?

Certain Hit skills?

Do enemies get to take advantage of the variances?
(I'm thinking I'd throw that in anyway to make it viable for different projects.)
Im just thinking about some things:

You talked about DualWielding, but can we also add something like "DoubleHanding", or a command who can allow to change/replace the actual WeaponVariance of a WeaponType by another one ?

Imagine i got a character who use a 1Hand-Sword in right dominant hand and a shield in left hand. Variance of Sword being [1.05;1.25].
But if the character unequip the shield, he can use his left hand for reinforce the strenght of the 1Hand-sword, changing the wielding from "One-Handing" to "DoubleHanding" ( not to be confused with "Dualwielding") then modifying variance into something like [1.15;1.30] ?

Btw, knowing that the amount of work for my requests is huge, I am ready to pay a fee for this (depending on my finances and the agreement that can be found)
I'm not going to ask for a commission for this because I'm not likely to make this specifically to your specifications.

I will be making it fairly generalized so most users can use it.

That said, I will very likely expand this from weapons to ALL equipment and add states that can adjust the rates.
The states could allow for two-handing or off-handing or whatever the dev would need.

What I need to figure out now is how best to calculate the ranges when multiple instances of variances are applied on one battler.

Open to suggestions here!
Any new ideas or advancements to resolve all of this?
I tried to document myself and learn how to do it myself, but I had to admit that I still don't understand anything about it, and that this is definitely not my strong point.
I thought he DM'd you. He hade the plugin shortly after your request.

I wanted to post it here, but no one responded after me and I didn't want to double post...

Sorry about that, but I hope the plugin does what you need.
Thanks 😉

well, i havent responded cause, due to my lake of knowledge, I thought you were asking suggestions to others ^^
Im going to look at it, i comeback later in the week to say if everything works and if it answers all my problems
Thanks 😉

well, i havent responded cause, due to my lake of knowledge, I thought you were asking suggestions to others ^^
Im going to look at it, i comeback later in the week to say if everything works and if it answers all my problems
Ok. I'll stand by for your follow-up
im back , @Maliki79 🙂

Well, It's looks like its not working .... 🙁

Like every time I want to test a new plugin, I create a new Project in order to do my tests in a "healthy" matrix.

I have my initial hero, Harold, with his loadout provided by the project, including a sword

The goal being that the plugin defines a variation of the damage of a skill as a function of the variance of a weapon and not of the variance of the skill itself, I change the predefined variance of the basic skill "Attack" from 20% to 0% on its page : the variance must be defined by the weapon, not by the skill.
(The variance calculated on its page only affects the skill and above all, being symmetrical: for 20%, the skill is [80;120], where the plugin must precisely allow the creation of an asymmetric variance linked to a type of weapon, for example [70;190] each time a sword is equipped, allowing a variation between 70% and 190% of initial damages)

I'm already starting by testing my damage on a group of training dummies.
My basic attacks all do 44 damage without exception (which is normal because the variance of the "Attack" skill is 0%)

Now i copy/paste the following tag on the Sword Note, before doing another test:
<malvariP: 70, 190>
<malvariM: 70, 190>
<malvariC: 70, 190>

To differentiate the screens, I now target the closest enemy.
My basic attacks all still always do 44 damage without exception
Two things:

Firstly, did you change the name of the plugin?
The name must be kept as MalVarianceVZ.

Secondly, did you start a new save after making the changes to the weapon(s) being equipped? The plugin does not update save files.

Please confirm these two points.
Two things:

Firstly, did you change the name of the plugin?
The name must be kept as MalVarianceVZ.

Secondly, did you start a new save after making the changes to the weapon(s) being equipped? The plugin does not update save files.

Please confirm these two points.
1) i have not change or modifie the name of the file, or the file itself

2) i loaded my Test Project already created by the past, i launched a Test-run NewGame with the plugin in the plugin file BUT not integrated/activated on the project, for collect datas about initial damages. And finaly , in the same Test Project ( without close it or reload it) , i launched a new Test-run NewGame , with plugin integrated and activated
in the same Test Project ( without close it or reload it) , i launched a new Test-run NewGame , with plugin integrated and activated
you did at least save the project between you enabling the plugin and you testing it right? plugin changes dont register until the project is saved
I found and fixed the issue.

Please redownload the plugin ver 1.0b and it should work.
I found and fixed the issue.

Please redownload the plugin ver 1.0b and it should work.
At work til 8:00pm, i look that this night, thanks for the fix, i came back to you for confirm if its working now 🙂

Original thread: https://forums.rpgmakerweb.com/threads/weapontype-variance.173719/