11# LuaDB - Kingdom Come Deliverance II Lua Persistence Module
2+
23[ 中文] ( #简介 )
4+
35## Introduction
46
57This module provides ** SQLite-based Lua data persistence** for Kingdom Come: Deliverance II mod developers, supporting
@@ -59,11 +61,11 @@ LuaDB.Dump()
5961- Key : must be a string
6062- Value : can be a boolean, number, or string
6163
62- | Type | Storage Format | Notes |
63- | ---------| ------------------------| -------------------------|
64- | Boolean | 0/1 | 0 represents false |
65- | Number | Single-precision float | |
66- | String | Latin1 encoding | Max 255 bytes currently |
64+ | Type | Storage Format | Notes |
65+ | ---------| ------------------------| --------------------------------------------- |
66+ | Boolean | 0/1 | 0 represents false |
67+ | Number | Single-precision float | |
68+ | String | Latin1 encoding | After testing, it can save a string of 10MB |
6769
6870## Usage Examples
6971
@@ -79,11 +81,14 @@ LuaDB.SetG("ending_unlocked", "bad_ending")
7981-- View data in console
8082LuaDB .Dump ()
8183```
84+
8285## Build
86+
8387- ` cmake -B build -G "Visual Studio 17 2022" -DSQLITECPP_RUN_CPPLINT=OFF `
8488- ` cmake --build build --config Release `
8589
8690## Debugging
91+
8792- Uses SQLite3 database named ` kcd2db.db ` in game root
8893- Operation logs stored in ` kcd2db.log ` in game root
8994- If launched with ` -console ` , debug output will also appear in a separate console window
@@ -94,6 +99,7 @@ This mod heavily utilizes reverse-engineered game internals and may be affected
9499after game updates, try removing the mod file (or rename ` .asi ` extension to disable).
95100
96101---
102+
97103# LuaDB - 天国拯救2 Lua 数据持久化模块
98104
99105## 简介
@@ -154,11 +160,11 @@ LuaDB.Dump()
154160- Key : 必须是字符串
155161- Value : 可以是布尔值、数字或字符串
156162
157- | 类型 | 存储格式 | 说明 |
158- | -----| -----------| -----------|
159- | 布尔值 | 0/1 | 0表示false |
160- | 数字 | 单精度浮点 | |
161- | 字符串 | Latin1 编码 | 目前最长255字节 |
163+ | 类型 | 存储格式 | 说明 |
164+ | -----| -----------| --------------------- |
165+ | 布尔值 | 0/1 | 0表示false |
166+ | 数字 | 单精度浮点 | |
167+ | 字符串 | Latin1 编码 | 经过测试,它可以保存一个10MB字符串 |
162168
163169## 使用示例
164170
@@ -176,10 +182,12 @@ LuaDB.Dump()
176182```
177183
178184## 构建
185+
179186- ` cmake -B build -G "Visual Studio 17 2022" -DSQLITECPP_RUN_CPPLINT=OFF `
180187- ` cmake --build build --config Release `
181188
182189## 调试
190+
183191- 使用位于游戏根目录下名为 ` kcd2db.db ` 的 SQLite3 数据库
184192- 操作日志存储在游戏根目录下的 ` kcd2db.log ` 文件中
185193- 如果使用 ` -console ` 参数启动,调试输出也会显示在单独的控制台窗口中
0 commit comments