
面向资源包和数据包创作者:
你只需在你的资源包/数据包的根目录下放置一个名为 "RPD.toml" 的文件,如下所示:

并在文件内写入类似以下内容:
[[Mods]]
id = "coolMod"
version = "1.2"
[[Mods]]
id = "anotherCoolMod"
version = "3.23"
注意事项:
模组条目之间的空行是必需的,因此像这样的配置是错误的:
[[Mods]]
id = "coolMod"
version = "1.2"
[[Mods]]
id = "anotherCoolMod"
version = "3.23"
以及
[[Mods]]
id = "coolMod"
version = "1.2"
id = "anotherCoolMod"
version = "3.23"
你也可以在版本字段中填写 "any",以允许使用任何模组版本
[[Mods]]
id = "coolMod"
version = "any"
[[Mods]]
id = "anotherCoolMod"
version = "3.23"
模组替代品
通过此功能,你可以为某个模组设置多个备选方案
[[Mods]]
id = "coolmod"
version = "any"
[[Mods.Alternatives]] # 强烈建议保留缩进
first = {id = "mod", version = "1.21"}
second = {id = "boringmod", version = "0.2"}
[[Mods]]
id = "leggenadarymod"
version = "any"
[[Mods.Alternatives]] # 但如所示,此处并非必须
potato = {id = "normalmod", version = "1.21"}
建议使用缩进,因为这对你以及后续阅读该文件的人来说更清晰易懂。
这是用于支持替代模组的旧版配置方法
强烈建议使用新方法,此处仅保留以兼容旧配置。
[[Mods]]
id = "coolMod||lessCoolMod"
version = "any"
[[Mods]]
id = "boringMod||epicMod||suckerMod"
version = "any"
这样 RPdepent 会检查是否至少存在其中一个模组。
请注意,建议在版本字段中仅填写 "any",因为目前无法为每个备选模组单独指定版本。
重要提示:
强烈建议在版本字段中使用 "any",因为不存在 ">"、"<"、">="、"<=" 等运算符,无法针对模组版本进行范围判断。
如何构建
你只需在 IDE 中克隆仓库,并运行 Gradle 任务 "build" 即可。
图标由 Cyber 制作,感谢 Cyber :p

for resource pack and data pack creators:
you just need to put in the root of your resource pack/data pack a file named "RPD.toml", like this:

and inside the file you need to do something like this:
[[Mods]]
id = "coolMod"
version = "1.2"
[[Mods]]
id = "anotherCoolMod"
version = "3.23"
to be noted:
the empty line between one mod and another is necessary, so configs like:
[[Mods]]
id = "coolMod"
version = "1.2"
[[Mods]]
id = "anotherCoolMod"
version = "3.23"
and
[[Mods]]
id = "coolMod"
version = "1.2"
id = "anotherCoolMod"
version = "3.23"
are WRONG!
you can also write "any" instead of the version to allow any mod version to be used
[[Mods]]
id = "coolMod"
version = "any"
[[Mods]]
id = "anotherCoolMod"
version = "3.23"
Mods alternatives
with this you can have multiple alternatives for a mod
[[Mods]]
id = "coolmod"
version = "any"
[[Mods.Alternatives]] #the indentation is highly suggested
first = {id = "mod", version = "1.21"}
second = {id = "boringmod", version = "0.2"}
[[Mods]]
id = "leggenadarymod"
version = "any"
[[Mods.Alternatives]] # but as shown here, not necessary
potato = {id = "normalmod", version = "1.21"}
i suggest to use the indentation because it's more understandable for you and whoever read the file after you
this is the legacy config to allow alternative mods
i highly suggest you to use the new method, this one is here only for retro-compatibility
[[Mods]]
id = "coolMod||lessCoolMod"
version = "any"
[[Mods]]
id = "boringMod||epicMod||suckerMod"
version = "any"
so RPdepent will check if there is at least 1 of the mods
be aware that it's suggested to just put "any" in the version field since you can't decide (yet) the version for each of them
TO BE NOTED:
it's highly suggested to just use "any" in the version field since there is no ">", "<" , ">=", "<=" operator, it's impossible to do with mods versions
how to build
You just need to clone the repository on your IDE and run the gradle task "build"
Icons made by Cyber, thank you Cyber :p
评论 0
登录后参与评分
还没有评论,来抢沙发吧