@Nafraju - as others have mentioned, traits are stored on database records, not on saved data. More technically: only
$gameActors etc are saved,
$dataActors etc are not. The former constitute subsets of data that are expected to change during a playthrough: current HP, MP, TP, states, param bonuses, class ID, etc. Traits are not part of this.
Ways to add/remove traits mid-game without plugins include:
- Add/remove state - ideal except that by default death removes all states.
- Change class - mostly the same, just with different trait sets.
- Extra, locked equip slots - (un)equip these via event commands.
These may not be suitable, depending on your game's design. Failing any of these, I'd suggest a plugin for "persistent states", "passive states", or as already suggested, "dynamic traits".
:kaohi:
Database records should not be modified during play unless you reset them in a controlled manner, e.g. change value, perform operation, reset value. Changes not made in such a manner may persist for the rest of the
session: they won't reset on starting a new game or loading a save, which can easily cause bugs. In short: I don't recommend it.
:kaoswt2:
I agree with
@werzque: VisuStella seems to implement some kind of cache of trait objects on battlers that persists through save/load. My guess is that it resets when the battler is refreshed...if so, the problem will only become apparent after certain actions, e.g. changing equipment, taking damage, using a healing potion, etc. (This thread is not for plugin support, though.)