RMMV Is there a plugin that will give random stats on an x to y scale?

ZankokuNoYami

Regular
Regular
Joined
May 11, 2018
Messages
192
Reaction score
55
First Language
English
Primarily Uses
N/A
Basically, I am looking to be able to fo the following:

Using yanflys item core, every piece of armor is unique. As in, everytime you craft something, you get a variance in the stats. You can craft the perfect version or thr worst.

Say you craft a fur Helm

Base stats:
2 def
1 agi

But when you craft it, you can get a random bonus, like

Between 0 to 3 more defense
1 to 3 more agility
0 to 1 mdef

If there is already a plugin, could someone point me towards it? I have been searching and while I find some, they don't do what I want.
 

Andar

Regular
Regular
Joined
Mar 5, 2013
Messages
39,932
Reaction score
11,876
First Language
German
Primarily Uses
RMMV
you can do this with event commands.

the change parameter command allows not only constants, but also variables - and thoise can be set to random values.

Basically have an event at the start of the game go through all actors in the party to add the random numbers you want
 

ZankokuNoYami

Regular
Regular
Joined
May 11, 2018
Messages
192
Reaction score
55
First Language
English
Primarily Uses
N/A
you can do this with event commands.

the change parameter command allows not only constants, but also variables - and thoise can be set to random values.

Basically have an event at the start of the game go through all actors in the party to add the random numbers you want
I don't see that quite working. You are expected to constantly craft. The bonus outside cashing in extras is rolling for better stats. I just want a plugin that let's me set in the notes:

Def: +1 to +3
Agi: +1 to +3

Something like that. So while you will always get a Fur Helm with 2 Def and 1 agi, you might craft one with 5 Def and 4 agi. Random chance everytime you make one. Every piece of equipment will also have its own random allowances doe varying stats.
 

ATT_Turan

Forewarner of the Black Wind
Regular
Joined
Jul 2, 2014
Messages
12,706
Reaction score
11,298
First Language
English
Primarily Uses
RMMV
Isn't this covered by the very first notetag listed in the Item Core instructions?

If you are using independent items, items that aren't gained through the
shop can have a random variance applied to its stats.

Item, Weapon, Armor Notetag
<Random Variance: x>
If this item is acquired through non-shop means, it will have random
stats offset by x amount in either a positive or negative value.

So for 1-3 you would give it a value of 2 and a random variance of 1.
 

ZankokuNoYami

Regular
Regular
Joined
May 11, 2018
Messages
192
Reaction score
55
First Language
English
Primarily Uses
N/A
Isn't this covered by the very first notetag listed in the Item Core instructions?



So for 1-3 you would give it a value of 2 and a random variance of 1.

Random variance, at least from what I have messed with, doesn't seem to do quite what I am talking about. At least I haven't found a way to make it control specific stats by certain margins. It is random purely instead of me setting a chance of x to y per stat.
 

Andar

Regular
Regular
Joined
Mar 5, 2013
Messages
39,932
Reaction score
11,876
First Language
German
Primarily Uses
RMMV
It is random purely instead of me setting a chance of x to y per stat.
no, this means that you calculated the wrong numbers.

Variance does not mean a range from 4 to 8 (as an example), it means a middle point plus minus the variance.

So to get the example of 4 to 8, you'll set base = 6 and Variance = 2, resulting in 6-2 as one limit and 6+2 as the other.
 

ZankokuNoYami

Regular
Regular
Joined
May 11, 2018
Messages
192
Reaction score
55
First Language
English
Primarily Uses
N/A
no, this means that you calculated the wrong numbers.

Variance does not mean a range from 4 to 8 (as an example), it means a middle point plus minus the variance.

So to get the example of 4 to 8, you'll set base = 6 and Variance = 2, resulting in 6-2 as one limit and 6+2 as the other.
Is there a way to not have negatives?
 

Andar

Regular
Regular
Joined
Mar 5, 2013
Messages
39,932
Reaction score
11,876
First Language
German
Primarily Uses
RMMV
making the base always higher than the variance
If the base and the variance have the same number, then zero is the minimum.
 

ZankokuNoYami

Regular
Regular
Joined
May 11, 2018
Messages
192
Reaction score
55
First Language
English
Primarily Uses
N/A
making the base always higher than the variance
If the base and the variance have the same number, then zero is the minimum.
But the variance effects all base stats the same, rather smaller variances for some stats and higher for others.

Like I want to set a variance of up to 3 on Def and up to 2 on agi and it doesn't normally get magic Def but you have a chance of gaining up to 1.

This is why I was trying to find a plugin that would let me modify per stat in a more exact amounts.
 

Andar

Regular
Regular
Joined
Mar 5, 2013
Messages
39,932
Reaction score
11,876
First Language
German
Primarily Uses
RMMV
In that case you either need a patch for yanfly's plugin or you need to replace yanfly's plugin.
you cannot have two independent plugins affect the same area of the game.

I suggest you consider which way you prefer and then reword the request to follow that decision, because the way you assumed it would work does not.
 

ATT_Turan

Forewarner of the Black Wind
Regular
Joined
Jul 2, 2014
Messages
12,706
Reaction score
11,298
First Language
English
Primarily Uses
RMMV
This is why I was trying to find a plugin that would let me modify per stat in a more exact amounts.
Scrolling down further in the instructions for the Item Core you get the On Creation Eval notetag.

Just add the random bonuses to each parameter separately as you like.
 

ZankokuNoYami

Regular
Regular
Joined
May 11, 2018
Messages
192
Reaction score
55
First Language
English
Primarily Uses
N/A
Scrolling down further in the instructions for the Item Core you get the On Creation Eval notetag.

Just add the random bonuses to each parameter separately as you like.
I am confused on how to type that out. Could you give me an example?
 

ATT_Turan

Forewarner of the Black Wind
Regular
Joined
Jul 2, 2014
Messages
12,706
Reaction score
11,298
First Language
English
Primarily Uses
RMMV
Items have the same params array that actors do - it's in the order the parameters are listed on the class tab of the database, starting with 0.

The built-in function to get a random number is Math.randomInt(X), giving you a value from 0 to X-1.

So if you want your item to spawn with an Attack of 2-5, you'd give it a 2 in the database entry then
Code:
<On Creation Eval>
item.params[2]+=Math.randomInt(4);
</On Creation Eval>
 

ZankokuNoYami

Regular
Regular
Joined
May 11, 2018
Messages
192
Reaction score
55
First Language
English
Primarily Uses
N/A
Items have the same params array that actors do - it's in the order the parameters are listed on the class tab of the database, starting with 0.

The built-in function to get a random number is Math.randomInt(X), giving you a value from 0 to X-1.

So if you want your item to spawn with an Attack of 2-5, you'd give it a 2 in the database entry then
Code:
<On Creation Eval>
item.params[2]+=Math.randomInt(4);
</On Creation Eval>

Awesome! So... would that apply to all stats, or is that 2 in the formula specifically calling out the attack stat? At work, so I couldnt test it, but figured i should ask in advance haha.

Thank you kindly!
 

Latest Threads

Latest Posts

Latest Profile Posts

Yeah, it’s a status #3, but it’s just to let y’all know I think I’m gonna have to do a twofer on the Advent compilation tomorrow. I feel like butt. Have a fever. I want to descend into my crypt.
I hope Baldur's Gate 3 wins BIG at TGA tonight. Tales of Arise was the last game to inspire me and BG3 has MASSIVELY surpassed that!
One day someone will build independent items for MZ. ONE DAY!
"This will be the game I actually finish!" Every dang time.
Kes
I now officially hate moustaches.
I have a couple of NPCs who are important enough to need faces. I have learned that I can't really do moustaches, & now wish I'd never started this.

Forum statistics

Threads
136,818
Messages
1,270,378
Members
180,578
Latest member
JesterGameDev
Top