如何开始
<h2>欢迎来到美丽世界MOD</h2>
<p>本文档将会快速帮助对mod制作的感兴趣的朋友快速上手</p>
<h2>准备工作</h2>
<h3>1.下载工具包</h3>
<p>[星际老板](<a href="https://ibeautifulworld.com/mod.sim.star.php">https://ibeautifulworld.com/mod.sim.star.php</a> "星际老板")
[武侠浮生记](<a href="https://ibeautifulworld.com/mod.fight.life.php">https://ibeautifulworld.com/mod.fight.life.php</a> "武侠浮生记")</p>
<h3>2.工具包介绍</h3>
<p>将工具包解压
<img src="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=ef87dbd9c4f4b9c8eff0b188665102a0&amp;file=file.png" alt="" /></p>
<h4>editor</h4>
<p>MOD编辑器,双击editor.bat启动
点击事件按钮打开事件编辑器
<img src="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=6044ea68897952df69a36cb41bac2c98&amp;file=file.png" alt="" /></p>
<h4>game</h4>
<p>测试版游戏,双击game.bat启动
config里存放游戏本体的配置</p>
<h4>src</h4>
<p>config: excel文件,存放游戏配置数据
script: typescript脚本项目,可编写代码逻辑
index.jpg/png: 上传MOD时的预览图</p>
<h4>dist</h4>
<p>texture: 存放图片文件
sound: 存放声音文件
index.json: MOD配置数据</p>
<h3>3.代码工具</h3>
<p>[1.下载安装Visual Studio Code](<a href="https://code.visualstudio.com/">https://code.visualstudio.com/</a> "下载安装Visual Studio Code")</p>
<p>[2.下载安装node.js](<a href="https://nodejs.org/en/download">https://nodejs.org/en/download</a> "下载安装node.js")</p>
<h4>3.安装typescript</h4>
<p>命令行执行下面命令(windows+R,cmd):
npm install -g typescript</p>
<h2>第1个MOD</h2>
<p>MOD的默认名称为api,我们第一个MOD名称为test</p>
<h3>1.修改代码</h3>
<p>用VSCode打开src/script目录
将脚本项目里的src/api目录修改为test
然后打开Mod.ts添加代码:
<img src="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=09bba30f9f1feab9be56f719fca13505&amp;file=file.png" alt="" />
然后打开package.json,点击Debug编译脚本(编译后的js脚本在dist目录,如果报错请重启电脑)
<img src="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=4e880d40c21fb5558912cc605710f412&amp;file=file.png" alt="" /></p>
<h3>2.添加事件</h3>
<p>打开editor,点击事件,然后新建
空白处右键,点击显示日志
<img src="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=94f3dafc1114eb059d0088ef617d197b&amp;file=file.png" alt="" />
然后输入文本,保存退出
<img src="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=160123e45ea2d3268791cc937e4752fa&amp;file=file.png" alt="" /></p>
<h3>3.打包MOD</h3>
<p>回到editor主界面,修改信息,然后打包mod
<img src="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=912fbd5df0fb6a4343423dc0919cfa21&amp;file=file.png" alt="" /></p>
<h3>4.测试上传</h3>
<p>生成MOD后,可打开game进行启用、测试
<img src="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=3192b915d04cdad77b42cdefb7966dd2&amp;file=file.png" alt="" />
测试完毕后可在editor中上传
<img src="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=6014dbab0ca5c46f23d6cf1b1c128199&amp;file=file.png" alt="" />
如果游戏上架了steam,可在游戏里上传创意工坊(选择output目录)
<img src="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=cfc81bf65f3976a371a6d9c8f8c4738d&amp;file=file.png" alt="" /></p>