GMSDB
GMSDB is a set of scripts for GMS and GM8.1 (for GM8.0 users, see this) I realized for my game Animus to manage the cards database. I decided to clean the scripts and generalize them so that they can be used as a generic database system written entirely in GML, without the need to use DLLs or other external resources.
The scripts are also available as a GEX extension.
Features
- Comprehensive database system with no external dll or extensions required
- Allows creation of an unlimited number of tables and table columns
- Data retrieval scripts that allow complex sorting and filtering of records
- Reads and saves database tables to the file system with its own format
- Can read an save records to CSV files, to be edited in Excel or text editors
- Tables and table columns are global and identified by name, no need to store and pass around table_id variables or similar.
- Works on GM8.1 and Studio
Download V1.2.0
The zip file contains examples and scripts for GM:Studio and GM8.1.
Documentation
An online version of the manual can be found HERE
Example snippet
Version history
v1.2.0 - 14 March 2013
- Better script descriptions Scripts include now an extensive and consistent description
- New documentation The zip file includes now a documentation file.
- New: db_record_find_values Performs a query in the database, but unlike the old db_record_find, this returns a ds_grid of values directly. It is also possible to specify which columns you want the script to return.
- New: db_record_select You can pass a ds_list of record ids to this function to get a ds_grid of column values
- New: db_record_insert_csv Populates a table with values from a CSV file
- Obsolete: db_record_row, db_row_value, db_table_add_column, db_table_grid, db_table_grid, db_table_index These functions are not present anymore due to streamlining of the system, and introduction of better alternatives.
- Changed: db_record_find The function is now called db_record_find_ids
- Changed: db_table_create The function now allows the creation of an unlimited amout of columns, by passing column names in a comma separated string instead of arguments. Also, since columns have a type now, also the GM8 version requires to specify a type for each column.
- Changed: db_record_insert The script now allows inserting values as a comma separated string. Passing values as arguments still works.
- Changed: db_record_update The script no longer updates a single column, you can now specify a list of columns to update, and N values to insert into them.
Older versions:
Edited by Catan, 18 April 2013 - 07:37 AM.











