Init
This commit is contained in:
59
data/README.md
Normal file
59
data/README.md
Normal file
@ -0,0 +1,59 @@
|
||||
# 数据文件夹说明
|
||||
|
||||
## 📁 文件夹结构
|
||||
|
||||
### 📁 config/ - 配置文件
|
||||
包含游戏的核心配置文件:
|
||||
- `items.csv` - 物品数据配置
|
||||
- `resource_categories.json` - 资源分类配置
|
||||
- `inventory_categories.json` - 库存分类配置
|
||||
- `items.csv.import` - CSV文件的导入设置
|
||||
|
||||
### 📁 translations/ - 本地化文件
|
||||
存放 Godot 自动生成的本地化文件(.translation)。
|
||||
这个文件夹包含 `.gdignore` 文件,告诉 Godot 忽略其中的内容。
|
||||
|
||||
### 📁 imports/ - 导入配置备份
|
||||
存放导入配置文件的备份。
|
||||
这个文件夹包含 `.gdignore` 文件,告诉 Godot 忽略其中的内容。
|
||||
|
||||
## ⚠️ 重要说明
|
||||
|
||||
### 防止 Translation 文件自动生成
|
||||
|
||||
如果你发现 `config/` 文件夹中又出现了 `.translation` 文件,说明 CSV 文件的导入设置被重置了。
|
||||
|
||||
**解决方法:**
|
||||
|
||||
1. 检查 `data/config/items.csv.import` 文件
|
||||
2. 确保内容如下:
|
||||
```
|
||||
[remap]
|
||||
|
||||
importer="keep"
|
||||
type=""
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://data/config/items.csv"
|
||||
|
||||
[params]
|
||||
```
|
||||
|
||||
3. 如果不是这样,请修改为上述内容
|
||||
4. 删除任何新生成的 `.translation` 文件:
|
||||
```bash
|
||||
del data\config\*.translation
|
||||
```
|
||||
|
||||
### 为什么会生成 Translation 文件?
|
||||
|
||||
Godot 默认将 CSV 文件识别为本地化资源,会自动生成 `.translation` 文件。
|
||||
通过将导入器设置为 "keep",我们告诉 Godot 将 CSV 文件保持原样,不进行特殊处理。
|
||||
|
||||
## 🔧 维护建议
|
||||
|
||||
1. **不要手动编辑** `.import` 文件,除非必要
|
||||
2. **定期检查** config 文件夹,确保没有新的 translation 文件生成
|
||||
3. **备份重要配置** 在修改配置文件前先备份
|
||||
4. **使用版本控制** 跟踪配置文件的变化
|
||||
Reference in New Issue
Block a user