ok, this was way easier than i expected. i thought i was going to need to make a pretty complex decorator, but it turns out that i just needed to add a couple of property definitions to the current templates:
JavaScript:
import { CategoryData, CategoryType } from '/core/ui/options/options-helpers.js';
CategoryType["Mods"] = "mods";
CategoryData[CategoryType.Mods] = {
title: "LOC_UI_CONTENT_MGR_SUBTITLE",
description: "LOC_UI_CONTENT_MGR_SUBTITLE_DESCRIPTION",
};
and then change your mod category to
Category.Mods
. i'm testing to see if there are any more subtleties to it, but these panels are autogenerated from the CategoryData properties with only a few custom behaviors. you don't need to override the game scripts at all, they're already extensible through data definitions.
so far it works for me, the main drawback is that the tab bar is ugly. gonna see if i can style that in a conflict-free way. the other difference from the built-in tabs is that some of those have custom logic for cancel & reset, but i don't think those features were working for mods anyway. [
update: i took a closer look at this, and "Graphics" is the only tab that looks like it might be hooked up to specific behavior. the rest all hit
default
clauses with generic behavior, same as my new tab.]
View attachment 724945