XCOM 2
540 ratings
[WOTC] LifetimeStats
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
240.324 KB
4 Sep, 2017 @ 9:27pm
26 Sep, 2017 @ 10:01pm
10 Change Notes ( view )
You need DLC to use this item.

Subscribe to download
[WOTC] LifetimeStats

Description
This mod is deprecated!
RustyDios has created an improved and more up to date version of this mod with my permission. I recommend those who are still interested in LifetimeStats switch over to his version here: [WOTC] LifeTime Stats Redux

You can even switch over mid campaign without losing any stats! Thanks RustyDios!

This is the WOTC version
For the base XCom version, go here
Please note that this version is brand new and may still be buggy! Let me know if you notice any issues

Tracks and displays the actions and successes of your soldiers throughout their campaign.
Now you can know for sure whether or not your favorite sniper has truely ever missed!

KNOWN BUGS
Grenades sometimes do not count for damage stats
May be unable to 'rescue' VIPs in large circles. Fix seems to be working, but still unsure

Multiple users have reported that LifetimeStats breaks certain story missions, particularly those which add new units to your control during the mission. While I have not done extensive testing, I have not had this problem (nor have many other users who I know use the mod regularly). I do believe that this issue is due to mod conflicts, however it seems that LifetimeStats is the mod which actually causes the game to hang. If you encounter this issue, temporarily disable the mod while you complete the mission then re-add it. You will lose any stats accrued during that mission, but should retain all previous stats.

FREQUENTLY ASKED QUESTIONS
Q: Why don't I see the stats panel during combat?
A: The stats panel only shows when you hover your mouse over the Hit% of a shot. You can make it always displayed by editing the INI file.

Q: Why is 'But Probably...' in my shot window? Does this modify my chance to hit?
A: That is a fun way to visualize how lucky this soldier is. It is just a visual change and does not impact actual dice rolls. You can disable it via the INI file.

Q: Why doesn't my Armory stats panel line up right like in your screenshot?
A: Known bug with non 16:9 resolutions. I am looking into it but in the meantime you can offset the window to the right or down by editing the INI file. Suggested panelXOffest=320 for 21:9 (Thanks Dem0nK!)

Q: Can I change what is shown in the tactical/armory stats panel?
A: Yes! You can change which stats get shown and the order for both panels in the INI

Q: Where is this magic INI file you speak of so I can edit all of these things?
A: steamapps\workshop\content\268500\1128399324\Config\LifetimeStats.ini

Q: Is Lifetime Stats retroactive? Or do I need to start a new campaign?
A: Unfortunately, I can only track stats after you subscribe with the exception of Kills. If you want true lifetime stats this needs to be enabled from the start of the campaign.

Q: What is Lucky% and how do you compute it?
A: It is how often this soldier beats the RNG. See below for the full algorithm with examples.

VERSION 2.0.4
September 27th
  • Made the stats panel only show the stats once (firaxis finally fixed their UIPanel issues) for real
    ------
  • Changed the way I was detecting if we are currently mid state submit (was preventing valid stats from saving)
    ------
  • Stopped LifetimeStats from creating stats while currently submitting states.
  • This should reduce crashes at the cost of not saving stats for units acquired mid mission. Working on better fix.
    ------
  • Made LifetimeStats root get initialized via a timer instead of OnInit (fixes Gatecrasher mission failed bug)
  • LifetimeStats now 'modifies' gamestates rather than creates new ones. This should improve memory usage (Under the Avenger)
    ------
  • Updated to WotC

CURRENT FEATURES
Tracked Data: (can configure order and if they are shown for each panel via INI)
  • Kills - Every kill made by a soldier (not part of mod, already tracked by base game)
  • Shots - Every shot taken by a soldier (includes sword attacks)
  • Hits/Misses - Whether the shot Hit or Missed
  • Hit/Miss Streaks - The current and best Hit and Miss streaks for this soldier
  • Crits - How many shots have Crit
  • Avg Hit % - The average hit chance over all shots taken
  • Avg Crit % - The average crit chance over all shots taken
  • Luck - Luck is computed by comparing Hits to Avg Hit%, see below for more details
  • Tiles Moved - The total number of tiles moved by a soldier
  • Executions - Number of repeater executions
  • Damage - Amount of damage dealt
  • Damage Taken - Amount of damage taken
  • Damage Negated - Amount of damage dealt blocked by armor
  • Damage Absorbed - Amount of damage taken blocked by armor

Tactical Lifetime Stats hover tooltip (or permanent panel via INI tweak)
A new panel has been added to Tactical Combat missions showing all tracked data visible by hovering over the current Hit% of a shot.

Luck Modified ToHit % (can disable in INI)
A new Hit% is now displayed next to the existing Hit% for all shots showing how likely this particular soldier is to hit given the actual hit chance and also their luck.

Armory Stats Screen
A new window located on the soldier screen in the Armory shows the stats of the currently selected soldier

COMPUTED VALUES
Due to popular demand, here are the algorithms I am using to calculate Luck and 'But Probably...'

Luck = Hits / (AverageHit% * Shots) - 1
If this value is less than zero, I show it as positive but 'Unlucky'
Example: AvgHit% = 80, Hits = 10, Shots = 10
Luck = 10 / (10 * 0.80) = 1.25 - 1 = 0.25 or 25% lucky

'But Probably...' = Hit% * (Luck+1)
Example: Hit% = 70%, Luck = 25%
'But Probably...' = 70 * 1.25 = 87.5

PLANNED FEATURES
http://steamproxy.net/workshop/filedetails/discussion/634754304/412448792349337145/
POSSIBLE FEATURES
http://steamproxy.net/workshop/filedetails/discussion/634754304/412448792349342862/
DEFAULT SETTING DISCUSSION
http://steamproxy.net/workshop/filedetails/discussion/634754304/412448792358503724/
BUG REPORTS
http://steamproxy.net/workshop/filedetails/discussion/634754304/412448792349339624/

KNOWN ISSUES
Resolutions other than 16:9 cause the armory window to display incorrectly. You can manually edit the position of the window in the INI file
as a temporary fix.

COMPATIBILITY
This mod uses UIScreenListeners and events and overrides no classes.
It listens to UITacticalHUD and UIArmory_MainMenu, if a mod overrides these classes there may be issues
I have yet to find an incompatible mod.

Special Thanks
CarolusIV #Outlaw
Popular Discussions View All (1)
1
20 Nov, 2022 @ 7:29pm
Chinese translation
zxc2008
147 Comments
BottomScorer 6 Jan, 2023 @ 6:52am 
One Steam tag should be sufficient!

War of the Chosen

NOT war of the chosen!
NOT WotC!
RustyDios 30 Oct, 2022 @ 10:03am 
I couldn't replicate this issue in the Redux version either (3 or 4 campaigns now played), when the same thing got reported there.

I had ~10 trusted players running tests and another ~5 really good modders look over the code too ... not one person could reproduce the issue .. and no-one from the "really good modders" could see anything glaringly obvious at fault in the code ...

So this issue is almost 100% a mod<>mod conflict ... and more than likely caused by something in another mod not doing what it is supposed to do, when it is meant to do it ...
Kosmo  [author] 30 Oct, 2022 @ 9:56am 
As stated in the description:

Multiple users have reported that LifetimeStats breaks certain story missions, particularly those which add new units to your control during the mission. While I have not done extensive testing, I have not had this problem (nor have many other users who I know use the mod regularly). I do believe that this issue is due to mod conflicts, however it seems that LifetimeStats is the mod which actually causes the game to hang. If you encounter this issue, temporarily disable the mod while you complete the mission then re-add it. You will lose any stats accrued during that mission, but should retain all previous stats.
BonesNo3 29 Oct, 2022 @ 3:24pm 
DO NOT INSTALL. Had to unsubscribe because it breaks the "Meeting Mox" mission and makes it impossible to continue the campaign. After unsubbing i redid the mission and i could reach the evac zone just fine.
RustyDios 18 Jul, 2022 @ 7:54pm 
@Kosmo
So I've sent you a Friend Request, as I would like to discuss an update/redux to this .. and I want to check I have the stat recording flow done right -- I need to understand it so I can slowly add more stuff over time

I'd prefer to talk on discord (XCOM2 Modders) but can't find you there ..

In my testing group things are pretty much working as expected, but one of the big things I'd to change/add is make things cross-campaign .. and I'm confused by how this actually tracks stats.

Regardless if I've not heard anything by end of the week, and going with your permission given below.. I'll put the Redux up on the workshop :)
Norse_Attack 14 Apr, 2022 @ 12:25pm 
oh thanks :)
Kosmo  [author] 14 Apr, 2022 @ 12:02pm 
Interesting, I'd check to make sure that you have the correct localization file for whatever language you are using -- I think they get loaded from them.
Norse_Attack 14 Apr, 2022 @ 4:56am 
I've no words on the left of stats. For example, I see no "shots" word, "hits". Only numbers
Kosmo  [author] 13 Apr, 2022 @ 7:05pm 
Scripture? Can you clarify what you mean?
Norse_Attack 13 Apr, 2022 @ 8:45am 
Any one experienced mess with lifetime stats? I have no scripture whatsoever, only numbers.