Consumable items to alter character traits?

I had this trouble with vxace long ago (now i'm asking about it for mv) and I think it required scripting back then..


I can't find anything that allows consumable items to alter a specific characters actor traits. For example, I would like a crystal dropped from an enemy that when used, will be consumed, and raise an elemental trait of the character that used it by 3%, permanently.  I do not want to use states for this, as too many of these can be obtained and stacked on the same character when used. I strictly want something that will change the trait of the character using it +/- ontop of what they already have.


Is this possible just through vanilla, or is there some plugin that will allow me to do this? I couldn't find one.


These traits: 
92e0c75e25.png
The items can do this by themselves, can't they?


You just have to use the effects box and select what parameters you want to increase there.
The items can do this by themselves, can't they?


You just have to use the effects box and select what parameters you want to increase there.



Oops sorry! I meant character traits... I will fix the original post.. 


Using items can add things like stats, states, and some other dingies, but they cannot add a permament addition to the actor traits, like these:


92e0c75e25.png



This is what i'm looking for. A consumable item to add something like +3% max mp, or max hp, or elemental resistence. Not just an absolute value to hp or mp, like items originally allow you to do.
If one can create a Common Event which will do the required modifications to Character Traits, an Item is capable of triggering that Common Event (See tab 4 of Item Effects...). Would that do the trick..?
If one can create a Common Event which will do the required modifications to Character Traits, an Item is capable of triggering that Common Event (See tab 4 of Item Effects...). Would that do the trick..?

There is no way for events to alter traits, and even if there were, using a common event would not tell the common event who to apply the trait to.


I'm pretty sure this could only be done through direct scripting or a plugin.
Well you technically could do this with eventing and some script calls, but it would be so much hassle it's not worth doing it without a plugin.


In case you want to know why: it's because traits are stored in $dataActors and not $gameActors. That means they are drawn from the database everytime the game is booted up and not saved for a particular save file.


You could modify temporarily traits with script calls but the modifications would be gone the next time the game is booted up. That would also mean that your current traits modifications would affect all save files and not just the current one...


You could maybe achieve what you want by storing traits modifications inside variables and reapplying them each time the save file is loaded , but it's probably not worth it.


Anyway, no practical way to do it without a plugin. I didn't search much but I couldn't find one that does this, and I don't have the time to begin writing one right now. Maybe try requesting it?
There is no way for events to alter traits, and even if there were, using a common event would not tell the common event who to apply the trait to.


I'm pretty sure this could only be done through direct scripting or a plugin.



Not wishing to contradict, and this may not be what you're looking for, but here's a couple of screen shots showing an Item (a Recipe...) which calls a Common Event; this then applies (with conditions...) an increase in Max HP (to the Entire Party, in my instance, but could be nominatively any of the Actors instead...). This increase stays for the duration of the game, and is saved with the rest of the game state.

Spoiler
This is the Recipe, which calls a Common Event in its 'Effects'...


nLjpHvY.png



... and this is the Common Event which calculates the % increase in Max HP to be added if the Hero has a 'Seasoning' item...


BSRnP6U.png



...but maybe this isn't what you were asking for..?
Not wishing to contradict, and this may not be what you're looking for, but here's a couple of screen shots showing an Item (a Recipe...) which calls a Common Event; this then applies (with conditions...) an increase in Max HP (to the Entire Party, in my instance, but could be nominatively any of the Actors instead...). This increase stays for the duration of the game, and is saved with the rest of the game state.

Spoiler
This is the Recipe, which calls a Common Event in its 'Effects'...


nLjpHvY.png



... and this is the Common Event which calculates the % increase in Max HP to be added if the Hero has a 'Seasoning' item...


BSRnP6U.png



...but maybe this isn't what you were asking for..?



No contradiction, because all you can do is modify absolute values of either the entire party, or a specific party member that you pre-define. There is no way to add SP and EX paremeters and apply them to the traits list of whatever actor used the item only, and the only way you could tell a common event to apply even absolute value stats to the character that actually uses the item, would be through applying a temporary state, and using a script to check for what actor has that state, and then apply the stat change to the character with the state. Because nothing that i know of can tie a common event to the specific character that used an item otherwise. There's no way for the common event to know.


Even with the use of states, it's still a mess.

Well you technically could do this with eventing and some script calls, but it would be so much hassle it's not worth doing it without a plugin.


In case you want to know why: it's because traits are stored in $dataActors and not $gameActors. That means they are drawn from the database everytime the game is booted up and not saved for a particular save file.


You could modify temporarily traits with script calls but the modifications would be gone the next time the game is booted up. That would also mean that your current traits modifications would affect all save files and not just the current one...


You could maybe achieve what you want by storing traits modifications inside variables and reapplying them each time the save file is loaded , but it's probably not worth it.


Anyway, no practical way to do it without a plugin. I didn't search much but I couldn't find one that does this, and I don't have the time to begin writing one right now. Maybe try requesting it?



Plugins will probably be the best way to go... I had thought of just having items apply specific states, but that wouldn't really allow them to stack very much, and it would get very messy...
Just get a "Permanent States" plugin (there are several out there) which allows certain states to not be removed on Death/"Recover All", a "Stacking States" plugin (again, several out there) which allows states to be applied multiple times to an actor and have the effect stack instead of overwrite, and create some permanent, stackable states which apply the parameters you want.  Then have the Item apply that state to the target.


I think it's worth noting that "Element Rate: Darkness 110%" will make the user take more damage from hostile Darkness-element actions.  It is a negative thing that you usually want to inflict on enemies (or have them inflict on you).  By default there's no way to add a parameter that increases the amount of damage a character does in a single element, although there are probably plugins out there for this as well.
i have an answer for your question

Original thread: https://forums.rpgmakerweb.com/threads/consumable-items-to-alter-character-traits.64700/