Scoreboard Callbacks
A dependency for other mods, makes modifying the scoreboard easier and fixes mod collisions.
模組介紹 作者原文
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
}
安裝與使用 安裝:Northstar 用戶端模組
- 先安裝 Northstar 用戶端(Titanfall 2 的開源社群用戶端,官方發布頁提供安裝器),模組由它載入。
- 把本站下載的壓縮包解壓,內容放入 Titanfall2 目錄下的 Northstar/mods/ 資料夾。
- 透過 NorthstarLauncher.exe 啟動遊戲,控制台會列出已載入的模組。
Northstar 用於私人伺服器與自訂內容,請勿用它連線官方伺服器。