Unleash your mod's full potential with Anita-UI!
For Players
Anita-UI is a centralized settings hub that allows you to fine-tune your favorite mods in real-time.
Say goodbye to the chore of installing multiple versions of the same mod just to change a single setting.
With Anita-UI, you can customize your experience exactly how you like it, directly in-game.
Installation:
Place the Anita-UI VPK into your game/citadel/addons folder.
Ensure it has a higher number if you use other UI mods (98 by default), and you're good to go!
IMPORTANT: This mod is currently under active development.
Persistent storage is not yet available. This means settings will revert to their defaults every time you restart the game. I am working on a solution for future updates!
For Developers
Empower your users by giving them choices. Use Anita-UI as a bridge to let players customize your mod's behavior. This saves you from creating multiple VPKs for different edge cases.
How to Integrate (3 Easy Steps)
Integrating your mod takes less than 5 minutes.
Here is how to do it using one of my mods "Minimap Reminder" as an example:
1. Expose your Data
Organize your settings into a CONFIG object at the top of your script.
var CONFIG = {
MIN_INTERVAL: 10.0,
IS_DEV: 0
};
2. Define your UI Schema
Create the menuConfig object.
The id of each element must match the name of the variable in your CONFIG object.
3. Paste the Integration Snippet
Paste this block at the very end of your script.
It handles the handshake, real-time synchronization, and automatic variable updates.
(function () {
var menuConfig = {
title: "Minimap Reminder", // Your Mod Title
description: "Audio reminders for minimap awareness.",
elements: [
{
type: "stepper",
label: "Minimum Interval",
id: "MIN_INTERVAL", // Matches CONFIG.MIN_INTERVAL
min: 1, max: 120,
defaultValue: CONFIG.MIN_INTERVAL
},
{
type: "toggle",
label: "Developer Mode",
id: "IS_DEV", // Matches CONFIG.IS_DEV
defaultValue: CONFIG.IS_DEV === 1
}
]
}; $.RegisterForUnhandledEvent("ClientUI_FireOutput", function(payload) {
try {
var data = JSON.parse(payload);
if (data.magic_word === "ANITA_ALIVE") { _anitaConnect.done = false; _anitaConnect(); }
if (data.magic_word === "ANITA_HANDSHAKE" && data.mod_title === menuConfig.title) { _anitaConnect.done = true; }
if (data.magic_word === "ANITA_UPDATE" && data.mod_title === menuConfig.title) {
if (typeof CONFIG !== "undefined" && CONFIG.hasOwnProperty(data.setting_id)) {
var val = data.value;
// Auto-convert Boolean to Number (1/0) if needed
if (typeof CONFIG[data.setting_id] === "number" && typeof val === "boolean") val = val ? 1 : 0;
CONFIG[data.setting_id] = val;
// Trigger the optional callback
if (typeof anitaCallback === "function") anitaCallback(data.setting_id, val);
}
}
} catch(e) {}
});
function _anitaConnect() {
if (_anitaConnect.done) return;
$.DispatchEvent("ClientUI_FireOutput", JSON.stringify({ magic_word: "ANITA_REGISTER", config: menuConfig }));
$.Schedule(1.0, _anitaConnect);
}
_anitaConnect();
})();
// OPTIONAL: Use this callback for instant reactions (like UI refreshes)
function anitaCallback(id, value) {
if (id === "IS_DEV") UpdateUI();
}
Complete documentation will be aviable in a few days
