FS25 Centralized Database Manager V2.0

  • Thread Author
01.jpg
02.jpg03.jpg04.jpg05.jpg


V2.0.0.0
Major Changes:
– Complete rebranding: DBAPI becomes SILODB (modDesc, scripts, console commands and API).
– Transition to ORM: Introduction of a structured data management system (CRUD: Create, Update, Delete, Find).
– Query Engine: Added QueryEngine (filtering, sorting, pagination) and SchemaValidator.
Breaking Changes:
– Removal of Key-Value: The old getValue, setValue, deleteValue and listKeys methods are removed.
– New Export: Scripts must now call SILODB instead of DBAPI.
Improvements:
– Updated ExampleDbUsage.lua with error handling.
Centralized Storage & VS Code Tooling for Modders
FS25_DBAPI is a streamlined persistence layer for Farming Simulator 25 mods. It replaces fragmented data handling with a centralized, JSON-backed FlatDB and provides a simple global API (g_globalMods[“FS25_DBAPI”].DBAPI) for namespaced key/value storage.
To supercharge your workflow, it comes with a dedicated VS Code extension featuring IntelliSense, snippets, and a live tree view to inspect your database files directly in the editor.
Why use FS25_DBAPI?
– Zero Overhead: A minimal, savegame-safe persistence layer that requires no external database engines.
– Intuitive API: Clean methods for getValue, setValue, listKeys, and deleteValue.
– Developer Velocity: Drastically speed up coding with autocomplete, snippets, and workspace visualization.
– Cross-Mod Compatibility: Simplify data sharing between mods and streamline migrations between savegames.
– Scalable: Lightweight enough for tiny utility mods, yet robust enough for complex modpacks.
Quick Start for Developers
Install the Mod
Drop the release ZIP into your mods/ folder and load your savegame to initialize the API.
Setup the VS Code Extension
Navigate to the vscode-extension directory and run:
Bash
npm run compile
npm run package
Install the resulting .vsix via VS Code (Extensions → Install from VSIX…).
Code Examples
Set a configuration value:
Lua
local DBAPI = g_globalMods[“FS25_DBAPI”]
DBAPI.setValue(“MyMod”, “config.playerSpeed”, 12.5)
Read with a fallback default:
Lua
local DBAPI = g_globalMods[“FS25_DBAPI”]
local speed = DBAPI.getValue(“MyMod”, “config.playerSpeed”, 10)
Get Involved
We’re looking for feedback! Whether you want to report a bug, request a feature, or propose an integration, join the conversation on GitHub.
 
Authors / Credits
LeGrizzly
Download modification
https://zippymods.com/fivh5d76qp1k/FS25_SILODB.zip.html
The release notes for the new version, V2.0.0.0, of the Centralized Database Manager (now SILODB) in Farming Simulator 25 mods bring significant changes and improvements to the data management system. Here's a breakdown:

### Major Changes:
- **Rebranding:** DBAPI is now known as SILODB, with modifications across modDesc, scripts, console commands, and API.
- **Transition to ORM:** Implementation of a structured data management system supporting CRUD operations (Create, Update, Delete, Find).
- **Query Engine:** Addition of QueryEngine for filtering, sorting, pagination, and SchemaValidator.

### Breaking Changes:
- **Removal of Key-Value Operations:** Deprecated methods like getValue, setValue, deleteValue, and listKeys have been removed.
- **New Export Approach:** Scripts should now invoke SILODB instead of DBAPI for data operations.

### Improvements:
- **Enhanced Example Usage:** Updated ExampleDbUsage.lua now includes error handling for better demonstration.

### Features:
- **Centralized Storage & VS Code Tooling:** FS25_DBAPI provides a centralized JSON-backed FlatDB for efficient data handling, with a global API for namespaced key/value storage.
- **Developer Tooling:** Includes a VS Code extension offering IntelliSense, snippets, and live tree view to interact with database files directly in the editor.

### Benefits of Using FS25_DBAPI:
- **Zero Overhead:** Lightweight, savegame-safe persistence layer without dependency on external databases.
- **Intuitive API:** Simple methods for common operations like getValue, setValue, listKeys, and deleteValue.
- **Developer Productivity:** Accelerate coding with autocomplete, snippets, and workspace visualization.
- **Cross-Mod Compatibility:** Facilitates data sharing between mods and simplifies savegame migrations.
- **Scalability:** Suitable for both small utility mods and complex modpacks.

### Quick Start Guide:
1. **Install the Mod:**
- Drop the release ZIP into the mods/ folder and load your savegame to initialize the API.
2. **Setup the VS Code Extension:**
- Navigate to the vscode-extension directory and run `npm run compile` and `npm run package`.
- Install the generated .vsix file via VS Code (Extensions → Install from VSIX…).

### Code Examples:
- **Set a configuration value:**
```lua
local DBAPI = g_globalMods["FS25_DBAPI"]
DBAPI.setValue("MyMod", "config.playerSpeed", 12.5)
```
- **Read with a fallback default:**
```lua
local DBAPI = g_globalMods["FS25_DBAPI"]
local speed = DBAPI.getValue("MyMod", "config.playerSpeed", 10)
```

### Get Involved:
- **Feedback and Contributions:** Users are encouraged to provide feedback, report bugs, request features, or propose integrations via GitHub.

This comprehensive update brings a more structured and feature-rich approach to managing data in FS25 mods, catering to both developers and modders for a seamless experience.
 
FS25 Sidebar Menu (PNG Icons)

FS25Mods.com - Download Farming Simulator 25 Mods for FREE

Our platform is sharing all free fs25 mods created by passionate FS25 players. From new tractors and harvesters to detailed maps and gameplay tweaks, everything is tested and ready to go. Finding and installing mods is super easy. Just browse by category, pick what you like, and download fast for free. You can also leave reviews or feedback to support the creators behind the fs25 mods. Whether you’re new to the game or you’ve been modding for years, FS25Mods.com is a great place to discover latest game mods for FS25 game.

Back
Top