faky-Spectator_Mod icon

Spectator Mod

Server side mod that allows every player to spectate everyone.

Last updated 4 days ago
Total downloads 230
Total rating 2 
Categories Server-side
Dependency string faky-Spectator_Mod-0.2.16
Dependants 0 other mods depend on this mod

This mod requires the following mods to function

northstar-Northstar-1.6.0 icon
northstar-Northstar

A Titanfall 2 modding and custom server framework.

Preferred version: 1.6.0

README

Spectator Mod

Server side mod that allows every player to spectate everyone.
You can call the spec function with a string argument to spectate someone specific.
Please note that this is absolutely not stable (0.2.14 might be significantly more stable tho!), if you experience crashes do not hesitate to send me your log on Discord faky#2514.

Changes

  • Add function "Automatically spectate your killer after death cam has ended" and related ConVar(int) spectator_afterdeathcam.
  • Changed ConVars from Bool to Int (please update your config files) because somehow I am too stupid to make them work.
  • Fix bug: spectator_chatinfo_message not appearing.
  • Replaced spectator cycle function with something less shitty.
  • !Hotfix: crash when attacker was not a player.
  • Now displays name card of spectated player (to make it work you will switch to the enemy team when spectating, but you will be switched back on respawn). Does not work in FFA gamemodes.
  • fix some of the frequent crashes because player entity is not valid anymore.
  • fix cam sometimes switching again / name card appearing late.
  • HOTFIX crash when spectated player (target) dies during deathcam duration
  • if you cycle through players skip players not alive.
  • You can now enable/disable logging with the ConVar spectator_log
  • 0.2.11 Fix crash when people reconnect fast or somehow get disconnected twice in a row (no clue when that happens?).
  • 0.2.12 Only start spectating/switch team if kill cam is over. This will reduce many unnecessary team swaps that mess up spawns, etc.
  • 0.2.13 fix a crash inside SpectateCamera() because a player entity was not valid (around line 212).
  • 0.2.13 added spectator_namecards ConVar which allows enabling/disabling name cards, which need team switches to be displayed correctly.
  • 0.2.13 added spectator_admins ConVar so you can restrict spectator to certain players/UIDs.
  • 0.2.14 fixed crash in SpectateCamera() when player entity became invalid just after waiting 1 frame.
  • 0.2.14 end some threads when player disconnects.
  • 0.2.14 add some try/catch so server does not crash when there is an error.
  • 0.2.15 fix issue immediately going to spec if spawned as titan somtimes.
  • 0.2.16 add more logs / add timestamp to logs
  • 0.2.16 fix issue pilot getting killed and again spectating after respawn

Known issues

  • When you spectate an enemy (and get switched to the other team because namecards) but your auto titan is alive (probably also turrets and other things) and kills someone, the enemy team will get rewarded.
  • FFA gamemodes will not show names (since team switching would be needed).
  • If you go OOB, immediately spec, immediately spawn in as titan => you will get killed (by OOB timer?)
  • When a new player joins and you are spectating the enemy team: Teams will get unbalanced
  • When a player is having a timeout and rejoins before the server knows, that the client is having a timeout => crash
  • To spectate enemies (with namecards) we need to switch to the enemy team until I figure out how it works without switching :)

Usage

Type spec into console. Use A/D (LEFT/RIGHT) to switch between players.
Type spec pla to spec a player whose name has pla in his name (would for example spectate on "player" now).

ConVars for chat announcements

You can use following ConVars to edit the config on the run or add them to your autoexec_ns_server.cfg to set them on server start.

spectator_chatinfo
Accepted values: 0, 1
Default: 1
Description: Enables chat broadcast to all players.

spectator_chatinfo_interval
Accepted values: any integer
Default: 300 (5 minutes)
Description: Sets interval of chat broadcast.

spectator_chatinfo_message
Accepted values: any string
Default: "To spectate type spec in the console. Press A/D (LEFT/RIGHT) to change player."
Description: Sets text for chat broadcast.

spectator_afterdeathcam
Accepted values: 0, 1
Default: 0
Description: Automatically spectate your killer after death cam has ended.

spectator_log
Accepted values: 0, 1
Default: 0
Description: Enable or disable logging for this mod.

spectator_namecards
Accepted values: 0, 1
Default: 1
Description: Enable or disable namecards. Namecards need switching to the enemy team to be working correctly. Set this to 0 if you have issues with team switching/spawns. No effect if you use FFA gamemodes (always disabled in FFA).

spectator_admins
Accepted values: "UID,UID" or "" (empty string)
Example 1: "12331232"
Example 2: "2512342421,21315122,521452152"
Default: ""
Description: If you add UIDs in this string, spectator will only be available for these users. If the string is empty it will allow everybody to spectate.

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  
2022-5-15 0.2.16 13 Version 0.2.16 Install
2022-5-5 0.2.15 24 Version 0.2.15 Install
2022-4-30 0.2.14 10 Version 0.2.14 Install
2022-4-27 0.2.13 5 Version 0.2.13 Install
2022-4-23 0.2.12 8 Version 0.2.12 Install
2022-4-19 0.2.11 9 Version 0.2.11 Install
2022-4-15 0.2.10 14 Version 0.2.10 Install
2022-4-15 0.2.9 19 Version 0.2.9 Install
2022-4-15 0.2.8 6 Version 0.2.8 Install
2022-4-13 0.2.7 13 Version 0.2.7 Install
2022-4-12 0.2.6 8 Version 0.2.6 Install
2022-4-11 0.2.5 10 Version 0.2.5 Install
2022-4-11 0.2.4 6 Version 0.2.4 Install
2022-4-11 0.2.3 7 Version 0.2.3 Install
2022-4-10 0.2.1 9 Version 0.2.1 Install
2022-4-9 0.2.0 12 Version 0.2.0 Install
2022-4-6 0.1.0 16 Version 0.1.0 Install
2022-4-6 0.0.4 9 Version 0.0.4 Install
2022-4-6 0.0.3 9 Version 0.0.3 Install
2022-4-6 0.0.2 8 Version 0.0.2 Install
2022-4-5 0.0.1 15 Version 0.0.1 Install