This project models a web source displaying War Thunder in-game events to be integrated into OBS or similar streaming software. The goal is to provide a visual kill feed of squad members for viewers during matches. This could include an image of the vehicle helping people who are not familiar with all the vehicle names.
You can see demonstration here (low quality to be hosted on GitHub):
Overlay.webm
- Supports different vehicle types:
- Tanks
- Planes
- Helicopter
- Navy
- Nukes and drones too ;)
- Multi language support
- Works online and offline locally
- Events based on other
battle log
data:- Awards
- Other player disconnects from battle/game a.k.a. deserted from battle
- Other damage events: fire, crit, severe damage
- Sound effects if not possible with the game client itself
- Realistic sounds like from this awesome video Battlefield 1
- Detection for events like the following would be possible with the webinterface:
- lost crew members
- marked enemies on map
- and more.
- However, we are required to re-create or find another source for these type of sounds as those above are copyrighted
- Detection for events like the following would be possible with the webinterface:
Streamer
sounds- "Dumb ways to die" if you fly into a wall (
selfkill
) - "Wilhelm scream" if you lost a crew member
- "Dumb ways to die" if you fly into a wall (
- Drive gear switching sound
- Nuke sounds like this for nukes
- Similar to this great project: WTRTI, but for ground vehicles
- Realistic sounds like from this awesome video Battlefield 1
The goal of this project is solely to provide visual appealing overlay for viewers. For example by displaying the vehicle images for people not familiar with the vehicle names or displaying kills from squad members in a more prominent way.
This goal of this project is never to provide gameplay advantages over the vanilla behavior.
# Install dependencies
pnpm install
# Optional (Development): run the test suit
pnpm test
# Optional (Development): linting
pnpm lint
# Compile TypeScript to build the project
pnpm watchJS
- OBS 31+
- Project uses CSS nesting which the browser inside OBS in older version doesn't support
- Use the full game client (don't have game quality set to minimal)
- The web server accessible under
http://localhost:9111
from the game client is only provided by the full client version.
- The web server accessible under
Warning: the overlay needs to be refreshed after starting War Thunder at the moment.
This version makes web requests to retrieve the image data for vehicle and avatars.
- Avatars: https://avatars.warthunder.com/img/
- Vehicle images: https://static.encyclopedia.warthunder.com/images/
- Optional: Find your avatar name
- Visit your web profile at
https://warthunder.com/en/community/userinfo?nick=USERNAME
- Then right click your avatar and open it in a new window/tab or copy the address
- Then extract the file name from the address. So for example
https://avatars.warthunder.com/img/cardicon_esport_drops.png
->cardicon_esport_drops
- Visit your web profile at
- Add your browser source to OBS based on this, but using this address:
...?username=USERNAME
USERNAME
: Your own username- Full example:
...?username=TuxCode,cardicon_esport_drops&
This version uses only local files. All relevant data is extracted from the game client.
- Download the project
- Open
src/settings.json
in a text editor and edit
settings.json
- Add browser source pointing to local file
NotificationFeed
- Set browser size to:
1200x400
- Move it to the correct position
- I found horizontal centered and height
150px
a good fit below the mission objective and above a kill notification
- I found horizontal centered and height
- Cut out at the bottom
200px
using transformation to make it slide out
For example for special events like bomb kills.
Only a mockup:
Video_killfeed.webm
If you have any issues, you could check the logs for any errors.
Either:
- Open the overlay in a standard webbrowser
- Then open the developer tools - Press F12
- Click on
console
to check for any errors.
- Check the OBS logs
- by opening OBS in a terminal or find the
obs-studio/logs
folder
- by opening OBS in a terminal or find the
- Squad members cannot be extracted automatically and have to be added manually
- The data from the webinterface indicates that this feature is only available for game chat (
mode
field). For kill activity the field is empty.
- The data from the webinterface indicates that this feature is only available for game chat (
- Count kill assists
- There is a streak award, but it would only be printed for
> 2
kills in a row - We can detect critical damage from the battle log, but it could be unreliable to assume assists later.
- There is a streak award, but it would only be printed for
- Avatars cannot be downloaded on the fly i.e. for enemies
- There is only a limited set of avatars available
- However, we found no way to find out which of those is selected
- There is:
- The stats site, but it's bot protected Stats
- Maybe the mobile app or in-game could provide an API endpoint, but this would be highly
dependend on internal changes and not approved by
Gaijin
. Therefore it was not investigated further.
- Which kind of ammunition was used
- This data is exposed in the in-game battle log, but not available in the web interface
- Well, we could use optical character recognition, but this would be overkill and a performance hit
- We could make a database of standard ammunition per tank, but it would be very time consuming and not always match the reality
- Vehicle images could be mapped to multiple names and is therefore not precise
- The name
T-34
is mapped to multiple vehicles likeussr_t_34_1941
orussr_t_34_1942
, so only a single image is used - A few names are not unique across all vehicle types
English
has only two cases. NamelyMilan
->[mirage_milan
(air),fr_destroyer_aigle_class_milan
] andAriete
- However, the maximum of those cases across all languages are only
6
- It's possible to detect the destroyed vehicle type based on destroyed trigger word (e.g.
shot down
ordestroyed
), but this is dependend on damage source vehicle and won't help to verify the type of the destroyed vehicle
- The name
It extracts the data from the battle log. This log is pulled from the the web server http://localhost:9111
provided
by the War Thunder client itself. It parses the corresponding textual data about player and vehicle names. Then, the localized vehicle
names are translated back to vehicle identifiers using name mappings from the game client. This allows us to find the correct vehicle image,
because the game files uses those identifiers. Squad membership and player avatars are unfortunatly manually configurred, but are less likely to change.
The kill notification is then displayed using CSS animations on a transparant background. The smoke effect is shown with a video where the green background is keyed out to add an alpha channel in order to make it transparant as well.
- Smoke video from: kinwun@vecteezy
- Production video: allowed for up to 1,000 $ for free
- Fonts:
- Death icon in Team mockup FontAwesome
- By the War Thunder wiki:
- Text font
- Foreign vehicle prefix
- Vehicle symbols (i.e. fighter and tank) from the webinterface itself
- Vehicle images from the wiki or game client
- APFDS shell from shooting range video created by War Thunder