Mod Details

Time-in-raid Tracker

Time-in-raid Tracker 1.1.0

Created by  plebeian_rat

1.4K Downloads

SPT 3.7.6 Compatible

Finally! View the time you've spent in raid!

Latest Version 1.1.0
SPT 3.7.6

Updated Nov 21, 2023 at 5:50 PM

Version Notes
  • Support AKI 3.7.3
  • add UI time tracking
This download is externally hosted.
Always scan for viruses.

This mod enables you to track the amount of time you’ve spent in raid. There are two ways you can view the time you have spent in raid:

- check the file user/mods/plebeianrat-timeinraidtracker-1.1.0/{profile name}-time-tracker.txt

- check in the profile stats section of the EFT UI (note: this only visually updates after game client restart, so it will likely only be accurate when you first boot up the game, not after every raid)

Thanks to lopas123 for help getting the UI section working! As well as fixing a bug regarding multiple profiles

note: this mod will not track your time if you alt+f4 or crash, it only saves data when you end a raid by dying, extracting, or going MIA

This mod should be compatible with older versions of AKI.

Important: delete old versions of the mod when updating to a new one. You may keep your stats when upgrading from version 1.0.0 by copying the contents of user/mods/plebeianrat-TimeInRaidTracker-1.0.0/time-tracker.txt to user/mods/plebeianrat-TimeInRaidTracker-1.1.0/{profile name}-time-tracker.txt (note that profile name is case sensitive)

To install, just drop the contents of the zip into SPT/user/mods

Version 1.1.0
Download Mod Version
SPT 3.7.6
Latest Compatible SPT Version

409 Downloads

Created Nov 21, 2023 at 5:50 PM

Updated Nov 21, 2023 at 5:50 PM

Virus Total Results
  • Support AKI 3.7.3
  • add UI time tracking
Version 1.0.2
Download Mod Version
Unknown SPT Version
Latest Compatible SPT Version

228 Downloads

Created Oct 11, 2023 at 9:32 PM

Updated Oct 11, 2023 at 9:32 PM

Virus Total Results

No changes, just bumping AKI version

Version 1.0.1
Download Mod Version
Unknown SPT Version
Latest Compatible SPT Version

419 Downloads

Created Jun 30, 2023 at 9:04 PM

Updated Jun 30, 2023 at 9:04 PM

Virus Total Results

- add source to github

- confirm 3.5.8 compatibility

- add multiple profile support (thanks to lopas123!)

Version 1.0.0
Download Mod Version
Unknown SPT Version
Latest Compatible SPT Version

384 Downloads

Created May 30, 2023 at 3:56 PM

Updated May 30, 2023 at 3:56 PM

Virus Total Results
vampucio

this is good for the live game. so every (i have 20000 quintillion hours in raid) it become i have 200 hours in raid and every others in menu and loading screen XD

1 Like
lopas123

Believe with 3.6.1 the game now tracks the time in raid on the UI finally. But it seems to me quite broken (sometimes barely registers time, spent 30 min in PMC raid, but the profile thinks I only spent 2 minutes), this is where think your mod can in a way fix it. (unless somehow this mod breaks the functionality and the time tracking becomes incorrect, which I really doubt).

Found that by using this we can always replace the profile time with yours, which is more accurate. After it logs/ writes the changes to txt file (and we see in console that it was successful) would then add the following code:

var raidTimeSeconds = Math.floor(totalTimePlayedInMilliseconds / 1000); profile.Stats.TotalInGameTime = raidTimeSeconds;

1 Like

where do you put this code?

0 Likes

Thanks for the suggestion! I implemented it and added a new release. there is a bug where using this method, it only refreshes the UI after client restart, so it isn’t perfect but it does basically work.

also FYI lopas123 , in JS/TS, you generally want to use let or const for variables rather than var as vars get hoisted to the top of the file, meaning they break scope and become global variables basically.

Colkillervin the code is in this repo here: https://github.com/ezra-sg/SPT-TimeInRaidTracker specifically, the changes were added in src/mod.ts at line 106

0 Likes
deveagle

Can’t you ask the maker of the radar mod how he solved it so that it appears on the screen? Perhaps with this mod solution, this could also be solved so that the information can be placed on the screen.

0 Likes
lopas123

Great mod, even works on 3.5.8 with no changes, hopefully you will be able to get the UI part working in the future.

It appears the mod tracks the time for all accounts combined. So if you have more than one account all of their time will be added up. Checked through your code and can see that if we wanted to do it per account can just edit mod.js file (if you ran the mod before) and add the following to ….registerStaticRouter -> Action (anywhere between action and filePath).

const profile = container.resolve(“ProfileHelper”).getPmcProfile(sessionId);then change

const filePath = path.join(process.cwd(), “user”, “mods”, “plebeianrat-TimeInRaidTracker-1.0.0”, “time-tracker.txt”);with the following:

const filePath = path.join(process.cwd(), “user”, “mods”, “plebeianrat-TimeInRaidTracker-1.0.0”, ${sessionId}-${profileName}-time-tracker.txt);

0 Likes

ah excellent point, thank you. I will try this out

0 Likes

i appreciate the help, great catch. i have updated the code with your changes (minus the sessionID in the file name)

1 Like

Details