Roulette
A UI Lib. Roulette Like Apex.
Screenshots 1 screenshots
About this mod Author’s original text
///
/// This mod is still in development. You may encounter issues such as CTD/CTM. Use at your own risk.
///
/// If you have any problems (bugs, suggestions, screenshots, etc.), contact me via Discord @raintrap341. Or maybe a QQ group? Not sure…
///
/// If you like this mod, please give it a thumbs-up.
///
/// Special thanks to @justanormaluser and @uniboi
This mod is a UI library that provides modders with a roulette-style menu.
Please follow the guide below to use it.
How to use
- Prepare a UI script
You need to have a script running on the UI VM.
- (Optional) Set up title/desc/extra hud
The title appears above the roulette, and the description appears below.
void function SetupRoulette(string configName, string title = "", string description = "", var extraHud = null) {
file.title = title
file.description = description
file.extraHud = extraHud
}
- Register Shards
By default, the circle is divided into 8 shards. You can register only the shards you want.
Note: Shard index 0 is at 225°, which is the first segment to the lower left of the x-axis.
Function: RegisterShard
Purpose:
Registers and configures a single shard (sector) in the roulette UI, including its asset, name, display options, callback, color, position bias, and description.
Parameters:
- string configName
The name of your roulette config.
- int index
The index of the shard (0–7).
- asset shardAsset
The asset to display as the shard's image.
- string shardName
The display name for the shard.
- bool shouldShowImage (default: false)
Whether to show the image for this shard.
- bool shouldShowText (default: true)
Whether to show the text label for this shard.
- bool isAssetRui (default: false)
Whether the image is a RUI asset.
- void functionref(int index, entity localPlayer, var roulette) confirmCallback (default: null)
The callback function to execute when this shard is confirmed/selected.
- vector textColorOverride (default: ``)
The color override for the text label.
- vector shardNameBias (default: ``)
The positional bias for the text label.
- string shardDescription (default: "")
The description text for this shard.
Behavior:
- Stores all provided parameters in the file struct for later use.
- Finds the corresponding UI elements for the shard and its text label.
- Applies the text color and position bias to the text label.
- Registers the confirmation callback if provided and not already registered.
- Outputs a debug message indicating the shard has been registered.
void function RegisterShard(string configName, int index, asset shardAsset, string shardName, bool shouldShowImage = false, bool shouldShowText = true, bool isAssetRui = false, void functionref(int index, entity localPlayer, var roulette) confirmCallback = null, vector textColorOverride = DEFAULT_SHARD_TEXT_COLOR, vector shardNameBias =, string shardDescription = "")
// or below
void function RegisterShardOnlyCallback(string configName, int index, void functionref(int index, entity localPlayer, var roulette) confirmCallback)
- Open It
OpenRouletteMenu(yourConfigName)
yourConfigName is a string which you need to set in your mod.
- (Optional) With Concommand and key binding
Check the NS mod wiki and QuickTyping | - The Northstar Mod Database.
Example
From my mod QuickTyping | - The Northstar Mod Database:
const string ROULETTE_NAME = "QuickTyping"
// OpenRouletteMenu(string) is a UI func.
void function QuickTyping_OpenRoulette()
{
OpenRouletteMenu(ROULETTE_NAME)
}
// You should only register shards once if your shards are static. If the label/color/images changes dynamically, you should register everytime before the open.
void function QuickTyping_ModSettings_Init()
{
for (int i = 0; i )
}
SetupRoulette( ROULETTE_NAME, Localize("#QUICKTYPING_TITLE"))
}
Warning
This mod maintains only a single instance of the Roulette menu at any given time. ~~Make sure to avoid opening the Roulette menu simultaneously to prevent interference be
Install & use Install: Northstar client mod
- Install the Northstar client first (the open-source community client for Titanfall 2; its release page provides an installer). It loads the mods.
- Unzip the archive from playbuff and put its contents into the Northstar/mods/ folder inside your Titanfall2 directory.
- Start the game through NorthstarLauncher.exe — the console lists the mods it loaded.
Northstar is for private servers and custom content; do not use it to connect to official servers.