WorldBox - God Simulator

WorldBox - God Simulator

295 个评价
中文名
   
奖励
收藏
已收藏
取消收藏
标签: Mod
文件大小
发表于
更新日期
2.327 MB
2023 年 12 月 3 日 下午 8:30
2024 年 1 月 27 日 上午 6:35
4 项改动说明 ( 查看 )

订阅以下载
中文名

在 一米 的 1 个合集中
一米维护的mods
6 件物品
描述
中文名 由NeoModLoader上传

"简简单单"的中文名

为原版四族提供了中文名服务, 部分命名(如战争, 联盟等)尚未完成. 由于工作量问题, 其他生物不会在该模组内提供, 可自行按照文档编写附属/引用该模组自行提供.

下面是文档的纯文本格式, 预览格式见仓库(https://github.com/WorldBoxOpenMods/ChineseName):

## 1. 概览

这个版本的中文名提供了非常灵活的命名方式. 主要由四个部分组成: 命名器, 词库, 参数获取器, 模板选择器(未实现,
不远的未来会实现).

### 1.1 模组如何工作

1. 接收命名器, 添加/替换原版同id的命名器为一个固定的命名器 `A`(用于识别该命名器是否被替换)
2. 等待命名事件, 当目标名字为 `A`的结果时, 继续, 否则跳过
3. 以请求的 `name_template_id`来查找该模组中的命名器 `B`, 如果找到, 则使用该命名器 `B`, 否则跳过
4. 根据 `B`的参数获取器获取参数 `P`, 并使用 `B`的模板选择器选择模板 `T`(目前仅有按权重随机获取)
5. 使用 `T`和 `P`来生成名字, 如果生成失败(比如模板中某个部分生成空字符串), 则重新随机选择模板 `T`并重试, 直到成功或到达最大重试次数
6. 如果到达最大重试次数, 则使用 `B`的默认模板 $T_d $来生成名字

## 2. 词库

每一个词库都是一个纯文本文件, 一行表示一个词, 不提供注释等功能.

词库文件的无后缀名部分即为词库的id, 词库id不可重复(区分大小写, 要保证与其他模组也不重复, 如果重复,
则后提交的词库会覆盖之前提交的词库).

## 2.1 提交词库文件

### 2.1.1 一般提交方法

在初始化的地方添加

```csharp
WordLibraryManager.SubmitDirectoryToLoad("path/to/your/word/library/directory");
```

即可.

如果你的词库文件夹的路径相对于自己模组的根目录为"additional_resources/word_libraries",
并且你的模组主类实现了`IMod`接口或继承了`BasicMod<T>`, 则可以使用

```csharp
WordLibraryManager.SubmitDirectoryToLoad(Path.Combine(ModClass.Instance.GetDeclaration().FolderPath, "additional_resources/word_libraries"));
```

其中`ModClass`替换成你的模组主类的类名.

注意!!! 添加`using Chinese_Name;`.

注意!!! 如果你的模组直接依赖于中文名, 则可以直接使用上面代码; 否则, 需要使用块

```csharp
#if 一米_中文名
//代码...
#endif
```

来包裹`using Chinese_Name;`和上述代码.

长度限制, 后续略.
36 条留言
仙隐于世间 10 月 18 日 下午 12:17 
为什么会加载失败
Wazo 9 月 26 日 下午 5:01 
get a life bro
Wazo 9 月 26 日 下午 4:57 
you just dont like good games so find something you can enjoy and stop trying to ruin the reputations of perfectly good games when they arent any better or worse than most other games other than the fact that they arent made by million dollar corporations
ApexGlitch 9 月 2 日 上午 4:22 
hey everyone

universe sandbox has been in early access for 10 years

updates take months are actually useless additions nobody asked for they claim to fix bugs but the same issues remain broken

Their Roadmaps are lies they promised astoroid burn up features in march its now September and still nothing

im done waiting this just a lifestyle business at this point their living on our money with no intention of actually finishing the game

dont waste your money like i did we deserve better and they silenced me just for posting this

feel free to copy and paste this to warn others
time 7 月 12 日 上午 3:21 
大佬能不能更新啊
顶针 7 月 9 日 下午 11:37 
救救孩子吧
顶针 7 月 9 日 下午 11:37 
救救孩子吧
子午先森 6 月 20 日 下午 11:04 
能用了吗
云岚 6 月 19 日 下午 10:38 
救救孩子吧
Redrick Schuhart 6 月 18 日 上午 1:29 
Reported for being Chinese