Main Menu
  • Welcome to The RPG Maker Resource Kit.

Database with script

Started by Diamond Star, July 26, 2011, 09:49:36 AM

0 Members and 1 Guest are viewing this topic.

Diamond Star

I want a tutorial or anything to know how caI control or change everything in database like skills ,actors ,party ...Manually with script

gerkrt

Quote from: cometstar on July 26, 2011, 09:49:36 AM
I want a tutorial or anything to know how caI control or change everything in database like skills ,actors ,party ...Manually with script

You can but only temporally because database is loaded each time at the start of the game at scene_title.

$data_items, skills,etc, check XP  manual and scene_title for this.

ForeverZero

You can always re-Marshal the data via script to have it save the data if needed, though the instances you would need this are rare. 

Zeriab

That can be a bother for encrypted games FZero.

You can find the structure of RPG::XXX in the help file which are what the $data_xxx arrays contains. You can change them if you want. Be wary of aliasing them because the hidden structures are not run again when you press F12. (Yeah, the not properly reseting bug)
You can change properties of the rpg objects using $data_XXX[index] which will usually only have an temporary effect since they will be overwritten when you create a new game or restart the game. I am not sure whether they can be present if you load a game. You can for example use this to change the hp of a monster. Mind you, the intent of the $data_xxx is to provide the values as they are entered in the editor.
Then there are the Game_XXX objects whose intent is on each particular game which typically get the values from the corresponding RPG::XXX object. Sometimes you have to change these instead or in tandem.

*hugs*