Scoreboard Callbacks

v1.0.0·Updated 2023-01-22

A dependency for other mods, makes modifying the scoreboard easier and fixes mod collisions.

About this mod Author’s original text

Scoreboard Callbacks

Adds callbacks to make modifying the scoreboard easier and eliminates mod collisions. Used as a dependency.

Usage

Currenly, there's 2 functions:

First:

AddCallback_OnScoreboardPlayerUpdate( void functionref( entity, int, int, SuperiorFile ) callbackFunc ), which runs on every scoreboard update for every player on the scoreboard.

Example use:

AddCallback_OnScoreboardPlayerUpdate(testPlayerUpdate)

void function testPlayerUpdate(entity player, int index, int team, SuperiorFile file)

{

}

where player is the current player in the scoreboard, index is that player's index in the scoreboard, team is the player's team (passing that because getting the team from the player entity tends to crash the game), and file contains all data and RUIs of the scoreboard.

Second:

AddCallback_OnScoreboardUpdate( void functionref( SuperiorFile ) callbackFunc ), which runs every time the entire scoreboard gets updated.

Example use:

AddCallback_OnScoreboardUpdate(testSCUpdate)

void function testSCUpdate(SuperiorFile file)

{

}

where file contains all data and RUIs of the scoreboard.

The exact structure of SuperiorFile:

global struct SuperiorFile{

bool hasFocus = false

var selectedPlayer

var prevPlayer

var nextPlayer

var scoreboardBg

var scoreboard

var background

array scoreboardOverlays

array scoreboardElems

table header = {

background = null

gametypeAndMap = null

gametypeDesc = null

scoreHeader = null

}

var footer

var pingText

table teamElems

table highlightColumns

var nameEndColumn

table playerElems

var scoreboardRUI

void functionref(entity,var) scoreboardUpdateCallback

}

Install & use Install: Northstar client mod

  1. Install the Northstar client first (the open-source community client for Titanfall 2; its release page provides an installer). It loads the mods.
  2. Unzip the archive from playbuff and put its contents into the Northstar/mods/ folder inside your Titanfall2 directory.
  3. 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.

File & checksum

Filename
Scoreboard_Callbacks-1.0.0.zip
File size
38.9 KiB