Custom Database
Author: Tsukihime
Overview
This script provides a set of methods that allow you to add new objects to the database and update existing objects in database.
It abstracts all of the details for you and provides a set of simple-to-use methods for interacting with the database.
The script uses a custom database to record any changes to the database in your current game, and is stored with the savefile so that any changes in one game does not affect any other game.
The custom database only supports adding and updating at the moment.
Download
Get it at Hime Works
Usage
Creating objects
A set of "add" methods have been provided for you in the script.
Suppose you wanted to make a new weapon. It would look something like
# create your weaponw = RPG::Weapon.neww.wtype_id = 1 w.params = [999] * 8 # make it overpowered# now add it to the databaseid = CustomData.add_weapon(w)# you can do something with the IDThe general process is to create the RPG object, add it to the database, and then use that ID somewhere.
Updating objects
To update an object, you would call the appropriate `update` method provided by the script.
For example, if you wanted to update a skill's MP cost, you might do something like
Author: Tsukihime
Overview
This script provides a set of methods that allow you to add new objects to the database and update existing objects in database.
It abstracts all of the details for you and provides a set of simple-to-use methods for interacting with the database.
The script uses a custom database to record any changes to the database in your current game, and is stored with the savefile so that any changes in one game does not affect any other game.
The custom database only supports adding and updating at the moment.
Download
Get it at Hime Works
Usage
Creating objects
A set of "add" methods have been provided for you in the script.
Suppose you wanted to make a new weapon. It would look something like
# create your weaponw = RPG::Weapon.neww.wtype_id = 1 w.params = [999] * 8 # make it overpowered# now add it to the databaseid = CustomData.add_weapon(w)# you can do something with the IDThe general process is to create the RPG object, add it to the database, and then use that ID somewhere.
Updating objects
To update an object, you would call the appropriate `update` method provided by the script.
For example, if you wanted to update a skill's MP cost, you might do something like
Code:
# Updating skill 51s = $data_skills[51]# change its mp costs.mp_cost = 20# now update the databaseCustomData.update_skill(s)
Last edited by a moderator:
