config data - magemonkeystudio/divinity GitHub Wiki

๐Ÿ’พ Config: data

This section controls how Divinity stores and manages persistent data such as item information, player progress, and module state.


๐Ÿ”‘ Options

Key Description
auto-save Interval (in minutes) to automatically save data to disk.
storage.type Type of database to use. Options: sqlite (default) or mysql.
storage.username MySQL username (only used when type: mysql).
storage.password MySQL password (only used when type: mysql).
storage.host Hostname or IP of the MySQL database server.
storage.database Name of the MySQL database.
purge.enabled Enables automatic removal of inactive player data.
purge.days How many days of inactivity before a playerโ€™s data is removed.
instant-save If true, saves immediately after every change (useful for testing, but lower performance).

๐Ÿงช Example

data:
  auto-save: 15
  storage:
    type: sqlite
    username: none
    password: none
    host: none
    database: none
  purge:
    enabled: false
    days: 60
  instant-save: false

๐Ÿ“Œ Notes

  • sqlite is file-based and ideal for small to medium servers. The database is stored as data.db in the plugin folder.
  • For larger servers or network setups, switch to mysql for external storage and syncing.
  • Purging is helpful for servers with high turnover or limited storage โ€” inactive player data will be removed automatically.