How can I update objs' traits and notes and etc....in game

I want to customize growth skills randomly through changes in the game process:

First, I defined a blank traits state in the database, id is 13 for example,

then I create a event and write a js "$dataStates[13].traits[0]=[22, 7, 0.5];"(I mean give user 50%HP recover every turn)

Finally I create a skill x , which can add state 13 to user

I start game and clicked the event then start a battle with Skill x of course

but no effect ,no HP recover after turn
by default the database is static and cannot be changed during game.

all $data files are read-only as a result.

you'll need a plugin for rewriting how the database is handles, at minimum a dynamic traits plugin.

and changing notetags is even more problematic, because by default notetags have no function at all.
they are only used to transfer data to plugins, and there are a lot of plugins that only read notetags on new game and never again, making any change there useless.


most people work by exchanging data objects. making multiple skills and unlearn the old while learning the new one by event commands.
thanks, I think I must learn more to make a plugin ,I dont know how to rewriting the functions.lol
by the way , is there any plugins can help me with this problem?
ewriting how the database is handles,
you can use your call directly on turn 0 +x I believe and you could dynamically
change that over the battle.

as it doesn't save in the savefile, you are able to do that though if you need it,
so you dont require a modify plugin for it 🙂

if you want to save the $data, I made a tiny plugin to do just that to save it
in the savefile. (see spoiler) SDM.

if you need an overhaul how the $data are affected, than a plugin would
be required.
is there any plugins can help me with this problem?
If you Google "dynamic traits" plugins, as Andar said, you'll find several (I believe Galv and Shaz off the top of my head have written some).
If you Google "dynamic traits" plugins, as Andar said, you'll find several (I believe Galv and Shaz off the top of my head have written some).
thanks ,I will try to find one
Thanks , your plugin works , I can save the changed data now,but something wrong happened when I exit to the main menu , error, I think maybe there is a conflict between pulgins , and another problem is my savefile became twice bigger than before even I started a new game =.=! it cost more time when I saved my game, anyway, thanks very much
you can use your call directly on turn 0 +x I believe and you could dynamically
change that over the battle.

as it doesn't save in the savefile, you are able to do that though if you need it,
so you dont require a modify plugin for it 🙂

if you want to save the $data, I made a tiny plugin to do just that to save it
in the savefile. (see spoiler) SDM.

if you need an overhaul how the $data are affected, than a plugin would
be required.
I dont know what the error is you get or why, so I need more data if you
plan using it, as it just make the $data save in the savefile, so not sure
what can cause it to be bigger.

please sort that out and which plugin it conflicts too. you can either
DM me the crash report on the thread and I look into it when I got time.
I dont know what the error is you get or why, so I need more data if you
plan using it, as it just make the $data save in the savefile, so not sure
what can cause it to be bigger.

please sort that out and which plugin it conflicts too. you can either
DM me the crash report on the thread and I look into it when I got time.
savefiles.png

38kb file1 is the savefile with your plugin
14kb file2 is the savefile without your plugin
and follow is my plugin list:
plugin list.png

the conflict plugin is found , here it is (its free to upload as the author said)
I dont know what the error is you get or why, so I need more data if you
plan using it, as it just make the $data save in the savefile, so not sure
what can cause it to be bigger.

please sort that out and which plugin it conflicts too. you can either
DM me the crash report on the thread and I look into it when I got time.
here is the conflict error when I used both two plugins ,if I disabled one , the other works well
but I really need a Plugin to custom the obj.note
error.png

console_log.png
38kb file1 is the savefile with your plugin
14kb file2 is the savefile without your plugin
that is normal - the changes you make to the database have to be stored in your savefile, they cannot be stored in the database files directly because that would destroy future games by giving them the same changes.
and that means that of course te savefile gets larger - and will even increase size the more changes you add to your database (especially when adding new entries.
Thanks ,it will make my savefiles more and more bigger, sounds like not good for me
that is normal - the changes you make to the database have to be stored in your savefile, they cannot be stored in the database files directly because that would destroy future games by giving them the same changes.
and that means that of course te savefile gets larger - and will even increase size the more changes you add to your database (especially when adding new entries.
while it's in LiuYue_ExtraNotes, it's has nothing to do with my plugin directly.
but I dont know what the extra notes exactly does, so I think that one is
messing with the database as well somewhere.

but if my plugin is OFF and works, try one of the recommend plugins the
other mentioned to see if those works for you if you have a bunch.
I want to creat new skills in game ,I must save them first ,so I need your plugin,
as to the notetags ,,,,I will try some other ways to achieve that ,thanks of all your help these days
🙂
while it's in LiuYue_ExtraNotes, it's has nothing to do with my plugin directly.
but I dont know what the extra notes exactly does, so I think that one is
messing with the database as well somewhere.

but if my plugin is OFF and works, try one of the recommend plugins the
other mentioned to see if those works for you if you have a bunc😀🙂

Original thread: https://forums.rpgmakerweb.com/threads/how-can-i-update-objs-traits-and-notes-and-etc-in-game.152889/