Killfeed
This is a killfeed I wrote back in 2018-19 for Academy KotH. Since Academy has closed in 2020, there is no reason to keep it exclusive anymore.
The source code is available on GitHub (view[github.com]).
This add-on comes with a killfeed, a "mid"-feed, a "death"-feed and kill-info functionality. It also works with AI units and UAVs/UGVs. Each component is described below and highly customizable, either by using the included Eden Editor Module or changing any of the configuration variables on the fly via script.
This add-on can be used as a server-side mod or as a client-side mod. If you want to enable it globally – that is, for every single-player mission and locally hosted multiplayer mission – you can use my add-on Killfeed Global Enabler.
This is a list containing all kills that occurred in the last 30 seconds. It is shown on the top right of the screen.
A feed displaying the player’s last few kills in the lower middle of the screen.
Exhaustive information about who killed and how he killed the player (including all assistants if enabled) as well as if and by which means the player hit its killer in return. It is shown on the top left of the screen until the player has respawned.
This is one-off information displayed in the upper middle of the screen about the longest kill yet – formatted as in the killfeed – as well as the longest kill streak. It can be displayed via script and reset on demand (see below).
This add-on’s hit-management-system can distinguish between the following types of hits:
- handheld weapon:
- bullet body hit
- bullet headshot
- under barrel grenade hit
- missile launcher missile explosion hit
- vehicle/stationary:
- weapon bullet body hit
- weapon bullet headshot
- grenade launcher hit
- missile launcher missile explosion hit
- vehicle body hit
- fall damage
- hand grenade explosion
- explosion of an explosive/mine
- explosion of a vehicle/stationary
- destruction of the vehicle currently mounted in
- unknown cause of death (killed via script)
In the case "destruction of the vehicle currently mounted in", the system also takes into account the cause which lead to the destruction of the vehicle. That can either denote who killed and how he killed it’s pilot (if the vehicle is a helicopter, and its pilot is dead or there is no pilot anymore) or who and how he damaged or destroyed the vehicle by other means. If a unit/player/uav/ugv gets killed by a script, the killfeed displays a tombstone.
All advanced settings can be adjusted inside the Eden Editor Module.
If you don’t want to use it and/or want to change any of the settings on-the-fly and/or per client, you can use the following documentation.
You can start the killfeed by calling the following:
You can reset all settings to default by calling:
- KF_var_Assists = true
toggles assist functionality (server-side) - KF_var_ShowFriendlyFire = true
shows a red "Friendly Fire" text in the midfeed and the deathfeed in case of friendly fire (server-side) - KF_var_DeathCausesInversed = true
flips the order of death causes (server-side) - KF_var_MultipleDeathCauses = false
toggles whether there can be multiple death causes displayed per line, in case the hitter hit the killed by multiple different means (server-side) - KF_var_PicturesHeadIcon = true
toggles whether a head icon is displayed in front of the weapon, in case of a headshot (server-side) - KF_var_PicturesBulletIcon = true
toggles whether a bullet icon is displayed between the head and the weapon, in case of a headshot (server-side)
- KF_var_KillfeedEnabled = true
toggles killfeed functionality (server-side) - KF_var_KillfeedCooldown = 30
determines for how long kills should be displayed (client-side, call publicVariable to globally change it on the fly) - KF_var_KillfeedMaximumLength = 10
maximum number of kills displayed at one time (client-side, call publicVariable to globally change it on the fly) - KF_var_KillfeedInversed = true
flips the positions of killer and killed (server-side)
- KF_var_MidFeedEnabled = true
toggles midfeed functionality (server-side) - KF_var_MidfeedCooldown = 10
determines how long kills should be displayed (client-side, call publicVariable to globally change it on the fly) - KF_var_MidfeedMaximumLength = 10
maximum number of kills displayed at one time (client-side, call publicVariable to globally change it on the fly) - KF_var_MidFeedYouColorYellow = true
toggles whether the text "You" in "You killed …" should also be displayed in yellow (server-side) - KF_var_MidFeedAssists = true : toggles whether there should be assists displayed (server-side)
- KF_var_DeathFeedEnabled = true
toggles death-feed functionality (server-side)
- KF_var_KillInfoDuration = 20
determines how long the kill-info should be displayed (server-side)
The kill-info can be displayed by calling the following:
You can reset the currently longest kill and killstreak by calling the following:
You can toggle the killfeed for a specific player by calling the following line:
Here, "_player" is the player object. If you want to enable the mid-feed for a specific player, you can use this command:
To disable the death-feed for a specific player, call:
You can display additional information in the killfeed, mid-feed and death-feed by adding custom functions to the variables KF_var_AddKillFeedInfo, KF_var_AddMidFeedInfo and KF_var_AddDeathFeedInfo on the server. There is an example for each in the comments.