Elin
77 ratings
Mod Config GUI
   
Award
Favorite
Favorited
Unfavorite
Gameplay: General
System: Mod Library
File Size
Posted
Updated
120.167 KB
Dec 7, 2024 @ 3:43am
Feb 20 @ 9:14pm
13 Change Notes ( view )

Subscribe to download
Mod Config GUI

Description
自动为拥有由BepInEx直接生成的配置文件的模组生成GUI。
通常而言,受支持的配置文件是Elin\BepInEx\config文件夹下的cfg文件。

以下内容详情见workshop\content\2135150\3379819704\README.md:
支持多语言本地化,从Mod文件夹\LangConfig\中读取xlsx文件的'Config'工作表,文件名:语言.xlsx,如EN.xlsx。
文件必须与Mod本体绑定(可以从Mod对应的BaseUnityPlugin获取),否则无法直接生成,需由Mod作者自己生成(注册对应Builder)。
GUI支持Mod作者进行一定程度的自定义,也支持非BepInEx的配置文件,但无法自动生成。

源代码 [github.com]

GPT translation:

EN:
This mod automatically generates a GUI for mods that has config files directly generated by BepInEx.
Generally, the supported config files are cfg files in the Elin\BepInEx\config folder.

The following content is in workshop\content\2135150\3379819704\README.md:
It supports multi-language localization, reading the 'Config' worksheet of the xlsx file in the Mod folder\LangConfig\, file name: language.xlsx, such as EN.xlsx.
The file must be bound with the mod itself (can be obtained from the corresponding BaseUnityPlugin), otherwise it cannot be generated directly, and the mod author must generate it (register the corresponding Builder).
GUI supports mod authors to make some customizations, also supports non-BepInEx config files, but cannot be automatically generated.

Source code [github.com]

JP:
このMODは、BepInExによって直接生成された設定ファイルを持つMODのGUIを自動生成します。
通常、サポートされる設定ファイルは、Elin\BepInEx\configフォルダ内のcfgファイルです。

ワークシートの内容は、workshop\content\2135150\3379819704\README.mdにあります。
多言語対応、Modフォルダ\LangConfig\にあるxlsxファイルの'Config'ワークシートを読み取ります。ファイル名:言語.xlsx、例:EN.xlsx。
ファイルは、MOD本体とバインドされている必要があります(BaseUnityPluginから取得可能)、直接生成できない場合、MOD作者が生成する必要があります(Builderを登録)。
GUIは、MOD作者が少しカスタマイズできるようになります。非BepInExの設定ファイルもサポートしていますが、自動生成できません。

ソースコード [github.com]
20 Comments
Proxyer Jan 10 @ 6:03am 
Thank you for fixed!
DW420 Jan 9 @ 11:43pm 
I deleted the error reports to keep the thread tidy. :)
xTracr_Owen  [author] Jan 9 @ 11:19pm 
@DW420
It should be fixed now.
Proxyer Jan 9 @ 5:31am 
After Version:EA 23.74 fix 5, mod dead again.
xTracr_Owen  [author] Jan 8 @ 5:24pm 
@DW420
这似乎是GUI入口点生成失败导致的。
出现问题时你的Mod Viewer中的最后一个mod是什么?
最好能把错误日志也发给我
This seems to be caused by a exception in GUI entry point generation.
What was the last mod in your Mod Viewer when the problem occurred?
Better yet, send me the error log as well.
DW420 Jan 8 @ 5:31am 
Latest update (7/1) bugs out the mods list. (or rather.. it does so on my setup)
Visually this results in all of the local mods disappearing from the list as well as some of the workshop mods.
From there on ..exiting the mod viewer is impossible via normal means and one has to ALT+F4 .
Disabling the Mod Config GUI mod results in everything showing up as normal & being able to exit the mod viewer as normal .
xTracr_Owen  [author] Dec 22, 2024 @ 8:36pm 
@NPOu
这个问题不难解决,但我的解决方案有点丑陋:
在LayerTitle.OnInit()的末尾添加补丁,在进入世界前初始化UIHelper,这样复制Layers(Float)的时候就不会把LayerInventory等窗口一并复制了
This isn't hard to fix, but my solution is a bit ugly:
Add a patch to the end of LayerTitle.OnInit() to initialize the UIHelper before entering the world so that when copying Layers(Float) it doesn't copy LayerInventory and other windows along with it
[HarmonyPostfix]
[HarmonyPatch(typeof(LayerTitle), "OnInit")]
public static void Oninit_Postfix()
{
UnityEngine.Object.Destroy(Layer.Create<LayerMod>().gameObject);
UIHelper.Init();
}
鉴于它暂时没什么影响,我就先不这么做了
Since it doesn't seem to be harmful, I'll leave it as it is for now
NPOu Dec 22, 2024 @ 5:20pm 
By the way maybe a nitpick but I keep seeing exceptions, even though they seem harmless.

ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.Collections.Generic.List`1[T].get_Item (System.Int32 index) [0x00009] in <7e05db41a20b45108859fa03b97088d4>:0
at UIInventory.get_owner () [0x0000a] in <2119054204a4433093b57a78b9b90a5a>:0
at LayerInventory.OnDestroy () [0x0001a] in <2119054204a4433093b57a78b9b90a5a>:0
UnityEngine.Object:DestroyImmediate(Object, Boolean)
UnityEngine.Object:DestroyImmediate(Object)
ClassExtension:DestroyChildren(Component, Boolean, Boolean)
ModConfigGUI.UI.UIHelper:ReplaceComponents(Layer)
ModConfigGUI.UI.UIHelper:AddLayer(ILayerBuilder)
ModConfigGUI.Patches.<>c__DisplayClass1_1:<CombineActions>b__2()
xTracr_Owen  [author] Dec 22, 2024 @ 4:49am 
@NPOu
It supposed to say “Changes have not been saved yet. Save?”, instead of "NotSaved".
This is actually a localization id, because the worksheet name for EN.xlsx is “General)”, with an unexpected bracket......:steamsad:
Fixed.
NPOu Dec 22, 2024 @ 3:01am 
@xTracr_Owen
Thank you!
Also small thing but when exiting the menu without saving it says "NotSaved", maybe change to "Do you wish to save?"
Thanks again!