For anyone curious this problem has been fixed. Apparently something I may of done while updating the game made the plugin bug out when it came to loading saves.
Bobstah's Custom Stats 1.3.2
JS Plugin Releases (RMMV)When I just have the stat tag on the actor it doesn't seem to work.
Had <CustomStat: dmgrate=100> on my actor. A skill that does "a.dmgrate" damage was doing 0 damage.
I added <CustomStat: dmgrate=100> to the class also, and then it was doing 200 damage. Removed it from the actor and it was doing 100 damage.
EDIT: I also have a question. How can I call your custom stats with my own script? Like doing
But replacing the parameter with one of my custom ones from your plugin.
Had <CustomStat: dmgrate=100> on my actor. A skill that does "a.dmgrate" damage was doing 0 damage.
I added <CustomStat: dmgrate=100> to the class also, and then it was doing 200 damage. Removed it from the actor and it was doing 100 damage.
EDIT: I also have a question. How can I call your custom stats with my own script? Like doing
Code:
$gameVariables.setValue(2, $gameActors.actor(1).param(7));
Thanks for the edits. I'd like to second the above as I need to make changes to these stats mid-battle via script calls. Can you assist?
Version 1.3.1 is now available! Update immediately for critical bug fixes! Download
$gameActors.actor(1).sanity;
If sanity isn't defined, it will return 0. If it's a percentage stat, it will return 1 instead.
Alternatively, you can access more information about the custom stats by calling $gameActors.actor(1).customStats. This contains an object with properties named after their symbols, which also contain objects. If you want me to explain this in-depth, I will gladly do so. 🙂
Does this answer your questions?
Looks like I created a new bug with all of the crazy stuff I'm doing behind the scenes. Don't worry, I fixed this one. 🙂
You call it by the symbol directly, just like a normal stat. If your custom stat is named sanity, you would call:
$gameActors.actor(1).sanity;
If sanity isn't defined, it will return 0. If it's a percentage stat, it will return 1 instead.
Alternatively, you can access more information about the custom stats by calling $gameActors.actor(1).customStats. This contains an object with properties named after their symbols, which also contain objects. If you want me to explain this in-depth, I will gladly do so. 🙂
Does this answer your questions?
I think it does for me!
I'll test to make sure. Thank you very much for the assistance!
And just for the sake of asking, you can change the stat with this call, yes?
I'd need to do calls like $gameActors.actor(1).sanity += 100
Yeah, that should add 100 to the stat's modifier. It keeps track of its base value, a list of eval modifiers, and a flat number modifier that your statement should adjust.
Thanks for the help! The only thing I need to figure out is how to get the stats to show in Yanfly's equipment menu. Is there any easy way to do that or am I going to have to do a lot of tinkering?
Probably some tinkering, but I've thought about adding them to the list in the past. Give me a few days to get caught up on changes to my other plugins and I will revisit this.
Does this work for items as well?
I'm trying to use it with YF's item upgrade and it doesn't seem to be working...
Version 1.3.2 is now available, fixing a major save/load bug! Download
I'd be willing to bump this request up since I have a feeling someone will release an equipment status core plugin soon that will accommodate @KCaz64's request.
Items that are consumed by an Actor, yes. I would probably need to add a compatibility patch to make this work with Yanfly's item upgrades.
I'd be willing to bump this request up since I have a feeling someone will release an equipment status core plugin soon that will accommodate @KCaz64's request.
Thank you.
As an aside, for anyone interested, I found the script call to change a specific actor's custom params.
$gameActors.actor(1).customStats.statname.modifier += xstatname is the name of the stat and x is the amount.
I will see if this will work with YF's script, but the syntax is an awesome first step IMO.
Okay. Scratch the above. While it technically does work for Actors, it doesn't seem to work for anything else. Furthermore, the values don't save in a save file anyway.
With this, I have a request: Can multiple tags be used and calculated for a single item?
I tried adding two different <CustomStat: stattest+value>, but the game would only recognize the last entry.
Once this is done, can tags be added directly to weapon/armor notetags?
I'm currently using YF's Instance Items and can therefore add data to the items notes without messing up the data.
What I'm trying to learn is how to add these edits directly to the meta data.
If you could get these requests filled, I'm pretty sure I'll have all I need to get the stats working right.
And BTW, the stats don't seem to work on enemies, or the actor tabs (they seem to work fine for the classes.)
Thanks
With this, I have a request: Can multiple tags be used and calculated for a single item?
I tried adding two different <CustomStat: stattest+value>, but the game would only recognize the last entry.
Once this is done, can tags be added directly to weapon/armor notetags?
I'm currently using YF's Instance Items and can therefore add data to the items notes without messing up the data.
What I'm trying to learn is how to add these edits directly to the meta data.
If you could get these requests filled, I'm pretty sure I'll have all I need to get the stats working right.
And BTW, the stats don't seem to work on enemies, or the actor tabs (they seem to work fine for the classes.)
Thanks
Few quick questions:
I have it setup so that each class as: Str, vit, Int, spi, agi, and luk. Is it possible to set it up so that lets say 3 str = 1 attack? (same applied to others)
Also, can I set up a new stats, called Spd, which would be 3 agi = 1 speed, and have it define their speed in combat? (YEP Battle EngineCore (use speed instead of agi )
I have it setup so that each class as: Str, vit, Int, spi, agi, and luk. Is it possible to set it up so that lets say 3 str = 1 attack? (same applied to others)
Also, can I set up a new stats, called Spd, which would be 3 agi = 1 speed, and have it define their speed in combat? (YEP Battle EngineCore (use speed instead of agi )
Hey, nice script! 🙂
I'm having some problems with evals. I put these scripts in actor notetag:
<CustomStat: atm=$(a.mat * 2😉><CustomStat: att=$((a.level * 1.5) + 51 + a.wpa + a.atk / 2);>atm is magical attack and att is attack (like in ragnarok online where str and int affects directly your physical and magic attack).
When I start the game it gives the error "a key is not defined".
I'm having some problems with evals. I put these scripts in actor notetag:
<CustomStat: atm=$(a.mat * 2😉><CustomStat: att=$((a.level * 1.5) + 51 + a.wpa + a.atk / 2);>atm is magical attack and att is attack (like in ragnarok online where str and int affects directly your physical and magic attack).
When I start the game it gives the error "a key is not defined".
I've been looking for a good way to update this script, but when I wrote it I just kept piling on bad code. Please be patient with me, I need to rewrite a lot about the existing core and change the behavior of the script.
Right now, most of the issues are stemming from the way it tries to use the class' value instead of the actors. As this script was a request, that was the main feature I focused on.
Going forward, I will force the classes to use a modifier towards the stat instead of being able to assign the stat directly. If that sounds like it will work for everyone, I will begin fixing this script up during the week.
(I did a similar thing for my Battle Command List plugin, which made it much easier to maintain going forward)
Right now, most of the issues are stemming from the way it tries to use the class' value instead of the actors. As this script was a request, that was the main feature I focused on.
Going forward, I will force the classes to use a modifier towards the stat instead of being able to assign the stat directly. If that sounds like it will work for everyone, I will begin fixing this script up during the week.
(I did a similar thing for my Battle Command List plugin, which made it much easier to maintain going forward)
As long as the stat's values can be modified via script calls/ code, I'll be happy.
Thanks for the hard work you put into your scripts.
I know it's not easy.
How would I setup a state that lowers custom stats by a %?
I am having trouble pulling an enemy's custom stat into a variable. Using the script call, '$gameTroop.members(1).AC;' However it continues to return a value of zero. It works fine with the actor's stat being pulled into a variable... so I am at a bit of a loss. (It happens during a Common Event that is ran when a specific ability is used in combat.)
what is a.wpa? I don't think that is an auto-defined function.
How could we change the custom stats by script calls? I would like to do this on plugin evals... xD
EDIT: Sorry, it was solved 🤣
EDIT: Sorry, it was solved 🤣
Original thread: https://forums.rpgmakerweb.com/threads/bobstahs-custom-stats-1-3-2.48551/