Conan Exiles

Conan Exiles

ModControlPanel
 This topic has been pinned, so it's probably important
hades  [developer] 2 Aug, 2019 @ 8:31pm
Developing Supporting Widgets
Developing Supporting Widgets:
Adding your widget to the "Mod Control Panel" UI is relatively easy, you create your widget as you normally would and add it to the UIModule datatable in the normal way.

Once your widget is complete and your datatable is setup we must add some "actor tags" to our mod controller, these are used to determine your widget, how many there are, their name and whether they require admin rights.

We will be using the actor tags as an info structure for our widget, it starts with the "MCP" tag, then we follow the "MCP" tag with our widget structure, there are 2 types of widget structure (see examples below).

UIModuleID (string) - Your widgets UIModule row name.
WidgetName (string) - The name for your widgets button in the control panel.
Rights (string) - whether your widget required admin rights, this should be either Admin or User.
Priority (integer) - Currently not used (default will be 10).

enum Rights { User, // widget will be available to all users Admin // widget will only be available to admins }; enum Priority { 0, // NULL 1, // widget will only be available when the game is running via a dedicated server 10 // used as default for standard widgets };

Notes:
There are a few things to consider when creating a supported widget.
  • Your widget must be self contained, any data that requires loaded should be done so in your widgets "Construct" event.

  • The "Vertical" screen space for your widget is, Viewport Height - 150.

  • Since we cannout actually determine whether the widget is loaded via your mod (ActivateUIModule) or the control panel, it's best to style your widget assuming it will be added to the control panel, then if you load your widget via ActivateUIModule you can call a function in your widget to adjust layout values etc.

Example Widget Tags V1 (old method)
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1823414570

Example Widget Tags V2 (new method)
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1831704928

Template widget used for officially supported mods.
Example Widget Source[drive.google.com]

https://youtu.be/gzswoCzTIDE
Last edited by hades; 3 Sep, 2019 @ 8:13am
< >
Showing 1-4 of 4 comments
hades  [developer] 16 Aug, 2019 @ 4:58am 
Updated example widget source codes to include a new multi user widget, this displays how to add user and admin options to 1 widget without needing to add multiple buttons =)
hades  [developer] 3 Sep, 2019 @ 8:15am 
Updated "Priority" enum, now it is possible for developers to set their widget to only show when the game is running via a dedicated server =)
Last edited by hades; 3 Sep, 2019 @ 10:50am
Agathorn (SH) 2 Dec, 2019 @ 4:56pm 
I can't figure out why the heck my mod's widget won't show up in MCP. In the MCP settings (where you can add categories) the widget does show up in the list of "Available Widgets" but the widget contents don't show anywhere.

EDIT: Hmm ok actually it DOES show up in MCP if I manually open my widget first from the console.
Last edited by Agathorn (SH); 2 Dec, 2019 @ 4:57pm
hades  [developer] 2 Dec, 2019 @ 7:10pm 
Agathorn (SH) has been helped over DM, for anyone else facing an issue resembling same problem please make sure you are using one of the ExampleWidgets posted in the OP =)
Last edited by hades; 2 Dec, 2019 @ 7:10pm
< >
Showing 1-4 of 4 comments
Per page: 1530 50