Hi, im using Yanfly Item Core in my game. I love it and who'd like to implement the Random Variance. But if the player should find a weapon in an enemy drop i believe that weapon should be degraded with lower stats than a brand new bought in the store.

The plugin allow it to happen, but the Random Variance can be lower (PERFECT) or higher. how can a force only the negative alteration of stats?

I am using ItemCore ver 1.28 which is the version used for MV 1.5.1 and it DOES NOT have code which forces negative-only variance.
I could write a plugin to force a negative, but you would STILL have to create a copy of the weapon in your database because you would need to add a notetag to that version of the weapon.

Or you can use this:
<On Creation Eval>
if($gameParty.inBattle()){
var leo = x + Math.randomInt(y);
item.params[z] -= leo;
}
<On Creation Eval>
Where z is the id of the parameter you want to change. (0-7 for base parameters, ie Max HP, Max MP etc. There might be code for things like hit rate or target rate but idk them)
While x is the minimum number you want.
And y is the maximum number - the minimum number + 1.
So lets say you want you're varaince to be between -5 & -15. Then x is equal to 5. While y is (15-5) + 1 which is 11.

As to how it's negative varaince, well where the code does item.param[x] -= leo;
It's subtracting the random number, and thus negative.

Or you can use this:
<On Creation Eval>
if($gameParty.inBattle()){
var leo = x + Math.randomInt(y);
item.params[z] -= leo;
}
<On Creation Eval>
Where z is the id of the parameter you want to change. (0-7 for base parameters, ie Max HP, Max MP etc. There might be code for things like hit rate or target rate but idk them)
While x is the minimum number you want.
And y is the maximum number - the minimum number + 1.
So lets say you want you're varaince to be between -5 & -15. Then x is equal to 5. While y is (15-5) + 1 which is 11.

As to how it's negative varaince, well where the code does item.param[x] -= leo;
It's subtracting the random number, and thus negative.