打开主菜单
首页
随机
登录
设置
关于Stardew Valley Wiki
免责声明
Stardew Valley Wiki
搜索
更改
←上一编辑
下一编辑→
模组:常用方法
(查看源代码)
2021年6月10日 (四) 05:10的版本
添加6字节
、
2021年6月10日 (四) 05:10
小
无编辑摘要
第124行:
第124行:
===自定义NPC===
===自定义NPC===
想要自定义NPC,你得修改或添加以下文件:
想要自定义NPC,你得修改或添加以下文件:
+
格式: '''''具体操作''''':'''''(往)目标文件夹或文件名'''''
格式: '''''具体操作''''':'''''(往)目标文件夹或文件名'''''
* 添加新文件:<tt>Characters\Dialogue\<文件名></tt>
* 添加新文件:<tt>Characters\Dialogue\<文件名></tt>
第136行:
第137行:
以上所有的操作都可以通过<code>IAssetLoaders</code>/<code>IAssetEditors</code>或者<code>Content Patcher</code>做到。
以上所有的操作都可以通过<code>IAssetLoaders</code>/<code>IAssetEditors</code>或者<code>Content Patcher</code>做到。
−
最后,你需要调用<
tt
>NPC</
tt
>的构造器来创建实例。
+
+
最后,你需要调用<
code
>NPC</
code
>的构造器来创建实例。
<syntaxhighlight lang='c#'>
<syntaxhighlight lang='c#'>
public NPC(AnimatedSprite sprite, Vector2 position, int facingDir, string name, LocalizedContentManager content = null);
public NPC(AnimatedSprite sprite, Vector2 position, int facingDir, string name, LocalizedContentManager content = null);
臭美香喷喷
50
个编辑