Skip to content

Commit 0e669cb

Browse files
committed
更新 README.md
1 parent 3d5cd8b commit 0e669cb

File tree

2 files changed

+19
-10
lines changed

2 files changed

+19
-10
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/.idea/
2+
/.run/
23
/.vscode/
34
/cmake-build*/
45
build

README.md

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# LuaDB - Kingdom Come Deliverance II Lua Persistence Module
2+
23
[中文](#简介)
4+
35
## Introduction
46

57
This 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
8082
LuaDB.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
9499
after 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

Comments
 (0)