Khalmee-Scoreboard_Callbacks icon

Scoreboard Callbacks

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

By Khalmee
Last updated a week ago
Total downloads 707
Total rating 1 
Categories Client-side Mods
Dependency string Khalmee-Scoreboard_Callbacks-1.0.0
Dependants 3 other mods depend on this mod


Scoreboard Callbacks

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


Currenly, there's 2 functions:


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

Example use:


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.


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

Example use:


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<var> scoreboardOverlays
	array<var> 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

Available versions

Please note that the install buttons only work if you have compatible client software installed, such as the Thunderstore Mod Manager. Otherwise use the zip download links instead.

Upload date Version number Downloads Download link  
2023-1-22 1.0.0 707 Version 1.0.0 Install