MV [SOLVED] I want to completely redo my player Stats

I suppose this is a multi-part question, but all of it is related to player stats. This entire thread is primarily talking about the Yanfly Engine, and also will mostly be in reference to YEP_StatusMenuCore, YEP_BaseParamControl, & YEP_SpecialParamFormula

  1. First, I would like to completely redo the way luck functions, but I have a tough time wrapping my head around formulas. In short: How do I make luck's functionality be based on only Target A? (I may have figured this out, but would appreciate any input you may have anyways) And, is there a way to make luck function or display itself with a smaller value? The luck stat can be broken down into 2 changes: First, make state/buff/debuff rate independent to the user (as it is now, I believe it is calculated based on the difference of target A from target 😎. Second, this more concerns a matter of aesthetic, but I would like luck to be displayed with smaller numbers. My game uses small numbers, 1's, and 2's - low, small numbers. So it looks whacky in the stat screen for "3 ATK, 1 DEF, 245 LUK". I'm not too particular about how this is achieved; either simply displaying a smaller number (but in the back end it still uses a large number), or to completely redo the way luck works so that it functions on smaller numbers. (by the way, in the picture below "Stack Rate" is just luck, but it's been renamed.)
    luckwhackiness.jpg
  2. Hopefully a slightly easier question; is there a way to use variables in a formula calculation? In particular, my game has "game rules" option that allow the player to tailor their experience to their taste. I would like to add a "EXP Rate" slider to my options menu (don't worry about that - I can do that, my question isn't about how to add that to the options menu). Effectively the menu option will just change the value of a variable. I want to feed this value into the SpecialParamFormula of EXP Rate, allowing players to increase or decrease EXP rate based on their preferences.
  3. M.Def and Agility are not really stats that are used in my game. Is there a way to hide these stats in my game? I had a plugin before hide these stats, but I don't believe that plugin is compatible with BaseParamControl. The other plugin also has a bunch of other functionality that I just don't need making it a very bloated solution to what I feel is a simple problem. So basically, I am looking for an easier way to hide these stats entirely in the game (not just the stats screen). Can this be done simply through Yanfly's plugins? If not, are there less bloated options available?
In summary:
How do I make luck's functionality be based on only Target A?
Is there a way to make luck function or display itself with a smaller value?
Is there a way to use variables in a formula calculation?
Is there a way to hide unused stats in my game?


I hope you guys can help!
Thanks so much!
How do I make luck's functionality be based on only Target A?
You are looking at altering the following function:
JavaScript:
//original in rpg_objects.js
Game_Action.prototype.lukEffectRate = function(target) {
    return Math.max(1.0 + (this.subject().luk - target.luk) * 0.001, 0.0);
};

//change it to maybe something like this?
Game_Action.prototype.lukEffectRate = function(target) {
    return Math.max(1.0 - target.luk * 0.001, 0.0);
};

Is there a way to make luck function or display itself with a smaller value?
I think the more elegant way would be to make luck actually function with smaller values. We are again looking at modifying the same function as above.
JavaScript:
//change it to maybe something like this?
//a luk value of 2.45 now has the same effect as a value of 245 previously
Game_Action.prototype.lukEffectRate = function(target) {
    return Math.max(1.0 - target.luk * 0.1, 0.0);
};

Is there a way to use variables in a formula calculation?
Yanfly's Param Control plugins allow you to use v[x] to access variable x in the formulas.

Is there a way to hide unused stats in my game?
Not without some kind of plugin I am afraid.
Sorry for my late reply, but thank you for your help.

The JS you posted is modifying the rpg_objects.js right? Can these formulas not be used inside Yanfly's BaseParamControl?

Not without some kind of plugin I am afraid.
Plugins are okay. My main complaint is that the only plugin I could find to do it was another plugin that did more than just remove stats, it allowed removing stats, recalculating stats, adding new stats, changing the way stats behave...it does a lot, in fact it does too much for what I need it for. I just was hoping for a simpler, more basic plugin that just hides unused stats from the game.

As for the variables in the functions, I was able to get is solved. Thank you so much!
The JS you posted is modifying the rpg_objects.js right?
Yes, I was talking about modifying a function in the rpg_objects.js. You could either do that by directly opening the file and changing it or by simply saving the modified function as a new plugin (that is the approach I would recommend).
Can these formulas not be used inside Yanfly's BaseParamControl?
Not really. Yanfly's plugin only allows you to change how a parameter is calculated. The effect the parameter luk has is hardcoded into the engine though. I guess you could kind of hack it into the formula by checking the Battlemanager's current action and returning 0 as the luk value while the one whose luk gets calculated is the current action's subject.
However I find just modifying the actual luk effect to be much cleaner.
For your second point of having luk work on smaller values that is also a "kind of but not really". Sure, you could include like a multiplier of 100 into the formula. Now you can use your small numbers in the database and still have the same effect as with your big values. But anything that actually displays the luk value (like the status screen) will also use this fixed multiplier and show you the large number. Unless you also make the multiplier conditional on whether the party is currently in or out of battle. But that runs into trouble as soon as you add something like Yanfly's in battle status menu.
So again, simply modifying the actual luk effect seems just much cleaner and simpler to me.

I just was hoping for a simpler, more basic plugin that just hides unused stats from the game.
Sorry, I can't help you further there. I don't know of any simple plugins that do that off the top of my head.
I just was hoping for a simpler, more basic plugin that just hides unused stats from the game.
Did you Google it? I can recall several threads about not displaying certain parameters that included the code to modify the status menu and such.

It's a very basic change to skip certain numbers as the engine loops through the parameters, so it doesn't require any specific plugin beyond the snippets you should be able to find.

Take a poke, and if you can't find it let us know.
Really sorry for the late reply, I've just been busy and hadn't had a chance to actually test this stuff yet.
I'll just have break off the hiding stats into another thread sometime in the future when I have time to work on that.

As for the luck, I took the formula @eomereolsson had posted and stuck it in a plugin. Here is the plugin in it's entirety:
Code:
/*:
 * @plugindesc Alters the way the LUCK stat is calculated.
 * @help New function looks like this: Math.max(1.0 - target.luk * 0.1, 0.0);
 * by eomereolsson
 */

Game_Action.prototype.lukEffectRate = function(target) {
    return Math.max(1.0 - target.luk * 0.1, 0.0);

It's sort of hard to tell if it's working. I hadn't altered my classes or anything to take advantage of the new smaller number formula, so shouldn't that theoretically mean with the new formula 245 luck would be insanely high? After doing some battle tests, it...vaguely felt like I was slightly more lucky, but also it could have just been placebo because I definitely wasn't getting like...100% success rate.
My state has a 33% chance to apply and it more felt like a 50%, but it's all just based on "a feeling" which is hardly objective.
Yeah, I'd say that is defenitely the placebo effect. In your OP you mentioned that you wanted to only take the target's luck into account - so that's what the formula I gave you does. If your actor becomes the target of anything that adds a state, then the state should not be added as their (for this formula) insanely high luck rate of 245 will make the returned overall luck effect rate 0. However if the actor uses a skill that adds a state to an enemy, now their luck is ignored and only the one of the enemy (target) gets factored in.
Did you want to have it the other way with the target's luck being ignored and only the skill users luck getting factored in?
Did you want to have it the other way with the target's luck being ignored and only the skill users luck getting factored in?
Oh dear, yes sorry, I think I had phrased my original post incorrectly. In my mind I was just thinking of the database's terminology of "target A" and "Target B".
I probably should have said that I want luck to only be based on the users luck.

edit:
I played around with the formula. Based on what you had shown me previously, I was just able to swap out the target.luk with (this.subject().luk and it seems to work.

Thank you so much for your help!

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/solved-i-want-to-completely-redo-my-player-stats.151034/