Overview
The ToolsData class contains all configurable settings for a match, including tournament information, sponsor displays, timeout configuration, watermarks, playercam settings, and name overrides.
export class ToolsData {
public seriesInfo : ISeriesInfo ;
public seedingInfo : ISeedingInfo ;
public tournamentInfo : ITournamentInfo ;
public timeoutDuration : number = 60 ;
public timeoutCounter : ITimeoutInfo ;
public timeoutCancellationGracePeriod : number = 10 ;
public sponsorInfo : ISponsorInfo ;
public watermarkInfo : IWatermarkInfo ;
public playercamsInfo : IPlayercamsInfo ;
public nameOverrides : INameOverrides ;
public constructor ( init ?: Partial < ToolsData >) {
Object . assign ( this , init );
if ( this . tournamentInfo . logoUrl != "" || this . tournamentInfo . name != "" ) {
this . tournamentInfo . enabled = true ;
}
this . timeoutCounter . left = this . timeoutCounter . max ;
this . timeoutCounter . right = this . timeoutCounter . max ;
}
}
ISeriesInfo
export type ISeriesInfo = {
needed : number ;
wonLeft : number ;
wonRight : number ;
mapInfo : MapPoolInfo [];
};
Number of maps needed to win the series (e.g., 3 for Bo5).
Maps won by the left team.
Maps won by the right team.
mapInfo
MapPoolInfo[]
default: "[]"
Array of map pool entries showing past results and upcoming maps. See MapPoolInfo Types below for detailed structure.
Tournament Configuration
ITournamentInfo
export type ITournamentInfo = {
name : string ;
logoUrl : string ;
backdropUrl : string ;
enabled : boolean ;
};
Tournament name to display.
URL to tournament logo image.
URL to tournament backdrop/background image.
Auto-set to true if name or logoUrl is provided.
ISeedingInfo
export type ISeedingInfo = {
left : string ;
right : string ;
};
Seeding information for left team (e.g., “#1 Seed”, “Upper Finals”).
Seeding information for right team.
Timeout Configuration
ITimeoutInfo
export type ITimeoutInfo = {
max : number ;
left : number ;
right : number ;
};
Maximum timeouts each team can have.
Timeouts remaining for left team. Initialized to max.
Timeouts remaining for right team. Initialized to max.
Timeout Settings
Duration of each timeout in seconds.
timeoutCancellationGracePeriod
Grace period in seconds during which a timeout can be cancelled without consuming it.
export type ISponsorInfo = {
enabled : boolean ;
duration : number ;
sponsors : string [];
};
Whether sponsor rotation is active.
Seconds each sponsor is displayed before rotating.
Array of sponsor image URLs. Automatically includes Spectra logo for non-supporters.
Note: If enabled is true and the organization is not a Spectra Plus supporter, the Spectra logo is automatically appended to the sponsors array.
Watermark Settings
IWatermarkInfo
export type IWatermarkInfo = {
spectraWatermark : boolean ;
customTextEnabled : boolean ;
customText : string ;
};
Whether to show the Spectra watermark. License Requirement: Always true for non-supporters. Disabling without Spectra Plus violates license terms.
Whether custom watermark text is enabled. Supporter Feature: Only available with Spectra Plus. Automatically disabled for non-supporters.
Custom watermark text to display (when enabled and user is a supporter).
Playercam Integration
IPlayercamsInfo
export type IPlayercamsInfo = {
enable : boolean ;
removeTricodes : boolean ;
identifier : string ;
secret : string ;
endTime : number ;
enabledPlayers : string [];
};
Whether playercam integration is enabled.
Whether to remove team tricodes from player names.
Unique identifier for playercam session.
Secret key for playercam authentication.
Unix timestamp when playercam access expires.
Array of player IDs with playercams enabled. Populated from backend.
Name Overrides
INameOverrides
export type INameOverrides = {
overrides : string ; // JSON representation of Map<string, string>
};
JSON-encoded map of player ID to display name overrides. Stored as JSON string for easier transfer: {
"player-uuid-1" : "CustomName1" ,
"player-uuid-2" : "CustomName2"
}
IOverridesPlayercamsData
export type IOverridesPlayercamsData = {
nameOverrides : string ; // JSON representation of Map<string, string>
enabledPlayers : string [];
};
Response structure from backend when fetching playercam and name override data.
MapPoolInfo Types
The map pool system supports four states for each map in a series:
Base Type
type BaseMapPoolInfo = {
type : "past" | "present" | "future" | "disabled" ;
};
Past Map
type PastMapPoolInfo = BaseMapPoolInfo & {
type : "past" ;
map : string ;
left : {
logo : string ;
score : number ;
};
right : {
logo : string ;
score : number ;
};
};
Represents a completed map with final scores.
Map name (e.g., “Ascent”, “Bind”).
Left team’s score on this map.
Right team’s score on this map.
Present Map
type PresentMapPoolInfo = BaseMapPoolInfo & {
type : "present" ;
logo : string ;
};
Represents the currently active map.
Future Map
type FutureMapPoolInfo = BaseMapPoolInfo & {
type : "future" ;
map : string ;
logo : string ;
};
Represents an upcoming map in the series.
Disabled Slot
type DisabledMapPoolInfo = BaseMapPoolInfo & {
type : "disabled" ;
};
Represents an unused map slot.
Union Type
export type MapPoolInfo =
| PastMapPoolInfo
| PresentMapPoolInfo
| FutureMapPoolInfo
| DisabledMapPoolInfo ;
Example Usage
// Basic configuration
const toolsData = new ToolsData ({
tournamentInfo: {
name: "VCT Champions 2024" ,
logoUrl: "https://example.com/vct-logo.png" ,
backdropUrl: "https://example.com/vct-bg.png" ,
enabled: true
},
seriesInfo: {
needed: 3 , // Best of 5
wonLeft: 1 ,
wonRight: 0 ,
mapInfo: [
{
type: "past" ,
map: "Ascent" ,
left: { logo: "https://example.com/team1.png" , score: 13 },
right: { logo: "https://example.com/team2.png" , score: 11 }
},
{
type: "present" ,
logo: "https://example.com/bind.png"
},
{
type: "future" ,
map: "Haven" ,
logo: "https://example.com/haven.png"
}
]
},
seedingInfo: {
left: "#1 Seed - Americas" ,
right: "#2 Seed - EMEA"
},
timeoutDuration: 90 , // 90-second timeouts
timeoutCounter: {
max: 2 ,
left: 2 ,
right: 2
},
sponsorInfo: {
enabled: true ,
duration: 8 ,
sponsors: [
"https://example.com/sponsor1.png" ,
"https://example.com/sponsor2.png"
]
},
watermarkInfo: {
spectraWatermark: true ,
customTextEnabled: true ,
customText: "VCT Champions - Grand Finals"
},
playercamsInfo: {
enable: true ,
removeTricodes: true ,
identifier: "session-123" ,
secret: "secret-456" ,
endTime: Date . now () + 3600000 , // 1 hour from now
enabledPlayers: [ "player-1" , "player-2" ]
},
nameOverrides: {
overrides: JSON . stringify ({
"player-uuid-1" : "TenZ" ,
"player-uuid-2" : "zekken"
})
}
});
// Access configuration
console . log ( toolsData . tournamentInfo . name ); // "VCT Champions 2024"
console . log ( toolsData . timeoutCounter . left ); // 2
console . log ( toolsData . seriesInfo . needed ); // 3
Automatic Adjustments
Show Tournament Auto-Enable
The tournamentInfo.enabled flag is automatically set to true if either name or logoUrl is provided in the constructor.
Show Timeout Counter Initialization
Both timeoutCounter.left and timeoutCounter.right are automatically set to timeoutCounter.max on initialization.
Show Sponsor Logo Injection
If sponsors are enabled and the organization is not a Spectra Plus supporter, the Spectra logo URL is automatically appended to the sponsors array by the Match class.
Show Watermark Enforcement
For non-supporters:
watermarkInfo.spectraWatermark is forced to true
watermarkInfo.customTextEnabled is forced to false
This enforcement happens in the Match constructor and cannot be overridden without Spectra Plus.