Atlas Core
用于 Atlas Projects 的模组库
一个简洁的库,目前提供了命令库和一套健壮但尚不完整的配置系统。
不过,随着时间推移,它将扩展以满足更多需求,并且配置系统也会进行改进。
命令
截至目前,命令库的功能包括添加一种允许使用可互换参数的参数类型。也就是说,如果某些参数非必需,用户可以按照 <arg_name>=<arg_value> 的格式指定提供的参数,并会获得相应的建议提示。
未来计划创建一种 parameters 参数类型,允许插入类似 [--someArg value -someOtherArg] 的参数形式,以匹配常见的命令行参数风格,并提供输入建议。
此外,将来还会提供一种更简便的方式,以便在使用 vanilla(原版)参数类型以及 Atlas Core 添加的参数类型作为 opts 参数时,更容易实现所需的结果。
配置
默认情况下,配置文件存储在 ./config/<mod_id>/<config_path>.json,您可以在该位置访问和编辑它们。
如果配置包含图形用户界面(GUI),它将在暂停屏幕和主标题屏幕的“选项”菜单中的 Atlas Configs 菜单里显示。如果安装了 Mod Menu,Atlas Configs 菜单将作为 Atlas Core 的配置入口出现。如果某个模组附带了带有界面的默认配置文件,它将成为 Mod Menu 中该模组的配置界面。
也可以通过命令 /atlas_config 读取或操作配置文件,该命令允许您一次性重置、读取或重载所有配置文件,单独重置、读取或重载特定配置文件,或者编辑、重置或获取特定选项的值。
面向模组开发者
有兴趣在您的模组中使用此库吗?
建议您查看 README 以了解如何在您的模组中集成它。
Atlas Core
A mod library for Atlas Projects
A simple library that currently provides a command library and a robust config system, if admittedly incomplete.
However, it will be expanded to suit more needs as time progresses, and improvements to the config will be made.
Commands
As of right now, the command library consists of adding an argument type that allows you to use interchangeable arguments, as in, if certain arguments are not needed, then one can have the user specify the arguments provided with proper suggestions in the format <arg_name>=<arg_value>.
However, in the future the plan is to create a parameters argument which allows you to insert [--someArg value -someOtherArg], matching usual command line parameters, with suggestions for what to input.
In addition, eventually an easier way to achieve wanted results for vanilla argument types and ones which are added by Atlas Core when they are used as opts arguments.
Configs
By default, configs are stored in ./config/<mod_id>/<config_path>.json, which is where you will be able to access and edit them.
If the config has a GUI, it will appear in the Atlas Configs menu inside of Options on both pause screen and title screen. If Mod Menu is installed, the Atlas Configs menu appears as the config for Atlas Core. If a mod has an attached default config with a screen, it will become the config screen for that mod in Mod Menu.
Configs can also be read or manipulated using the command /atlas_config, which lets you reset, read, or reload configs all at once, reset, read, or reload a particular config, or edit, reset, or retrieve the value of a specific option.
For mod developers
Intrested in using this for your mod?
I recommend checking out the README to see how to implement it in your mod.
评论 0
登录后参与评分
还没有评论,来抢沙发吧