Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expand XComCharacterCustomization, UICustomize to allow mod-added categories #266

Open
robojumper opened this issue Jun 2, 2017 · 1 comment

Comments

@robojumper
Copy link
Member

The UICustomize classes (UICustomize_Info, UICustomize_Menu, UICustomize_Props) need a hook in UpdateData to allow mods to add custom entries, similar to #164.

XComCharacterCustomization is a bridge between UI and content, and needs to be expanded to handle custom categories. In the base game, this is communicated via an enum, EUICustomizeCategory, but ut's always passed as an int (not that it matters much, enum = byte). Effectively, the only place where this enum matters is XComCharacterCustomization.
Thus, mods can just use custom indizes, provided XComCharacterCustomization uses callbacks if it doesn't know what to do with a given index (it wouldn't hurt to also call these if the index is a base game one, for moddability).
A centralized place to distribute indizes to mods would be needed to make it easier for mods to add new parts without conflicting.

@robojumper
Copy link
Member Author

robojumper commented Jun 2, 2017

The changes to XComCharacterCustomization can be kept minimal if overriding existing behavior is not a requirement, since mods can just provide their own callbacks for List Items and call the generic functions in XComCharacterCustomization that already operate on a content part type basis (string).

This would also eliminate the need for custom indizes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant