🇨🇳
R2Northstar Wiki
Chinese
Chinese
  • 欢迎来到Northstar
  • 加入我们
  • 安装Northstar
    • 基础教程
    • 故障处理
  • Northstar用户手册
    • Mods(模组)
    • 服务器列表
    • 直连服务器
    • 游戏模式
    • 控制台指令
    • 启动参数
    • 在Linux上游玩
  • 常见问题解答
  • 使用 Northstar托管服务器
    • 前期准备
    • 托管私人比赛服务器
    • 托管独立的服务器端
      • 实践经验
      • 在Linux上托管服务器
    • 故障处理
    • 视频教程
  • 修改与开发教程
    • 开始修改
      • 基础修改
      • 教程
      • 参考列表
      • Squirrel(松鼠)脚本
        • 线程处理
        • 基础代码块
        • Respawn(重生)创建的函数
        • 表和数组
        • 回调函数
        • 游戏模式修改
          • 开始修改
        • 自定义设置
          • 关于mod.json文件
          • 关于本地化语言文件
          • 关于Mod(模组)文件
      • 设置语法高光
      • 本地化翻译
      • 收尾工作
    • 开发者
  • 其他
    • 特别感谢
由 GitBook 提供支持
在本页
  1. 修改与开发教程
  2. 开始修改
  3. Squirrel(松鼠)脚本
  4. 自定义设置

关于mod.json文件

The mod.json is responsible for governing when, and where your mod is loaded, and follows a layout that is fairly complicated at first glance, but ultimately simple

{
	"Name" : "SimpleRandomiser",
	"Description" : "SimpleRandomiser",
	"Version": "0.1.0",
	"LoadPriority": 1,

The script above defines the pubic and listed details of the mod

	"Scripts": [
		{
			"Path": "sh_SimpleRandomiser.gnut",
			"RunOn": "MP",
			"ClientCallback": {
				"After": "simplerandomiser_init"
			},

			"ServerCallback": {
				"After": "simplerandomiser_init"
			}
		}
	],

The scirpt above defines both what functions to run, when to run them and WHERE to run them, in this case it runs your simplerandomiser_init, when on multiplayer and for both the server and the client

	"Localisation": [
		"resource/simplerandomiser_localisation_%language%.txt"
	]
}

this defines the path to the language file

name this file mod.json, and it should go in the mods root folder

上一页自定义设置下一页关于本地化语言文件

最后更新于3年前