DocsMegalithMode files

Game types

A mode plays any multiplayer game type. Its objectives, scoring, role traits and round rules keep running alongside your script. Forge and the campaign can't be scripted.

mode in the headerGame typegame.get_game_type()More than eight teams
SlayerSlayer2Yes
CaptureTheFlagCapture the Flag1No: eight teams
OddballOddball3Yes
KingOfTheHillKing of the Hill4Yes
VipVIP6Yes
JuggernautJuggernaut7No: no teams
TerritoriesTerritories8Yes
AssaultAssault9No: eight teams
InfectionInfection10No: no teams
EscalationSlayerEscalation Slayer12No

Keep the game type's own limits in mind, so they don't end a round your script means to go on: leave them off, or set scripted_round_end = true. A mode shows on the Megalith card, and among the variants of the game type it plays. A game type's map must have its objectives: Conquest needs Territories objectives, and a mode on Capture the Flag needs flags.

team.get_native_score() reads a team's score in the game type itself, game.get_territory_count() and team.get_territory_count() read Territories, team.get_vip() names a team's VIP, game.get_juggernaut() the Juggernaut and game.get_current_hill() King of the Hill's active hill, and object.get_territory_owner() tells who holds one. is_of_type finds a flag, a bomb or an oddball. Scores your script keeps in its own numbers, such as tickets, are separate from the scoreboard's.