CrimsonSQL
Framework for Interfacing MySQL
模組介紹 作者原文
CrimsonSQL
Framework/Library plugin for accessing a MySQL Database
This is a framework dependency for other mods to utilize MySQL (and other flavors of MySQL) to sync information between servers or for external tools.
For example; CrimsonBanned uses this dependency to sync bans across different servers.
_Originally created for V Rising, but works with other IL2CPP BepInEx games._
Installation
- Install the version of BepInEx that is defined in the Dependencies.
- Extract _CrimsonSQL.dll_ into _(Game/Server Folder)/BepInEx/plugins_
I recommend setting your MySQL database to version _8.0.22_ if possible or other MySQL 8 versions. May work with other versions 7 & 9 and may work with other flavors of SQL such as MariaDB, but no gurantees.
Config
The name of your MySQL database.
Setting type: String
Default value:
DatabaseName = crimsonbans_db
You need to setup your MySQL server with an empty database. The tables will be automatically generated in this database by mods that use CrimsonSQL.
The host address of your MySQL database.
Setting type: String
Default value:
Host = 20.140.81.44
The IP Address of your SQL Server.
The port of your database server.
Setting type: Int32
Default value: 3306
Port = 3306
3306 is the default port of MySQL, but if yours uses another it will need to be supplied here.
The login username for your database.
Setting type: String
Default value:
Username = crimsonbans
The login password for your database.
Setting type: String
Default value:
Password = zebraApple32%
The login credentials for your SQL Server. It doesn't need to be root/admin, but it does need read and write permissions to the specified database.
Some variations of MySQL require additional parameters on the connection string; such as "CharSet=utf8mb4;Convert Zero Datetime=True;Allow Zero Datetime=True;" put those here if needed.
Setting type: String
Default value:
AdditionalParameters =
If you're having issues with connection to the database, it is possible the connection string is missing additional parameters. This is likely to occur when you use different flavors of MySQL such as MariaDB. Consult documentation or your server provider for what parameters you need to add. I will not help with setting up the connection to your version of SQL.
Verify Install
In your _(game / server folder)/BepInEx/LogOutput.log_ file you will see either a successful connection message
[Info: BepInEx] Loading [CrimsonSQL 0.1.10]
[Info:CrimsonSQL] Connected to MySQL database.
Or an error message that prints out information from SQL on what is wrong. Refer to the SQL Error Documentation for the output error code.
Integration with Other Mods
If you're a developer: CrimsonSQL is available as a NuGet package for easy integration into your projects
dotnet add package VRising.CrimsonSQL
Or add it directly to your project file:
This mod was created alongside CrimsonBanned. However, any mod can integrate with CrimsonSQL.
Check out the wiki section for documentation on how to integrate this mod as an optional dependency.
Have questions or feedback on this library? Join the Modding Discord!
Support
Want to support my modding development?
Buy / Play My Games!
Donations Accepted
This mod was a paid creation. If you are looking to hire someone to make a mod for any Unity game reach out to me on Discord! (skytech6)
安裝與使用 安裝:BepInEx 外掛
- 本站下載的壓縮包就是模組本體,通常是 BepInEx 外掛(解壓後得到 .dll 或外掛資料夾)。
- 建議流程:用社群模組管理器(如 r2modman)選中本遊戲後匯入該模組,管理器會自動裝好 BepInEx 前置並處理依賴。
- 手動流程:先在遊戲目錄裝好 BepInEx 載入器,再把解壓出的 .dll 或外掛資料夾放進 BepInEx/plugins/。
- 啟動遊戲,BepInEx 控制台會列印載入日誌;確認這個模組出現在日誌裡即為安裝成功。
帶「前置依賴」的模組需要一併安裝,否則不會載入。功能開關通常在遊戲內或外掛自帶的設定檔裡調整。
下面這些內容需要先安裝,否則該模組不會生效: