Author Topic: [STAT TRACKING] Soldier Diaries 1.0  (Read 565263 times)

Offline Arthanor

  • Commander
  • *****
  • Posts: 2488
  • XCom Armoury Quartermaster
    • View Profile
Re: [STAT TRACKING] Soldier Diaries 1.0
« Reply #1095 on: March 12, 2016, 09:55:46 pm »
Good questions! And it's always interesting to discuss the mechanics of things. Unfortunately, I don't know the proper answers to these.. My answer to your previous question comes from old discussions I've had with Shoes in this very topic.

We really need the medal master (Shoes) to answer these. :/

Offline Countdown

  • Colonel
  • ****
  • Posts: 246
    • View Profile
Re: [STAT TRACKING] Soldier Diaries 1.0
« Reply #1096 on: March 14, 2016, 01:26:23 am »
Just posting here in case Shoes or someone else gets to respond. I started a thread elsewhere, but did't get any responses so maybe it was in the wrong section or just too long to bother with.

Anyway, basically I've also noticed some inconsistencies with the stat tracking regarding mind control. Sometimes it miss-attributes kills to the wrong soldier or counts them differently in one place than another. A specific example and save file is linked to in the above thread.

Offline Xeno Wiper

  • Sergeant
  • **
  • Posts: 45
    • View Profile
Re: [STAT TRACKING] Soldier Diaries 1.0
« Reply #1097 on: March 14, 2016, 03:25:42 am »
Maybe it's just me, but it would be more logical to re-name "Improvisation" to "Unknown Cause."


Or it could be called "Miscellaneous".  ::)


Heh, "Unknown cause" reminds me of a morgue thing. And as Xcom is the one that does the autopsies, they are never unknown... :P


Just posting here in case Shoes or someone else gets to respond. I started a thread elsewhere, but did't get any responses so maybe it was in the wrong section or just too long to bother with.Anyway, basically I've also noticed some inconsistencies with the stat tracking regarding mind control. Sometimes it miss-attributes kills to the wrong soldier or counts them differently in one place than another. A specific example and save file is linked to in the above thread.


But before changing names, it's better to solve this first.
« Last Edit: March 14, 2016, 03:27:46 am by Xeno Wiper »

Offline Countdown

  • Colonel
  • ****
  • Posts: 246
    • View Profile
Re: [STAT TRACKING] Soldier Diaries 1.0
« Reply #1098 on: March 15, 2016, 05:10:13 am »
As for a band-aid fix, I would suggest removing the commendations that are being falsely awarded and that are crashing your game, then enter debug mode and do (if I recall...) ctrl+c. That should clear all the commendations from your soldiers, and at the end of the next mission/month, everything will be reawarded according to what's left in the ruleset. Stats will still be tracked, so if you re-add the commendations later, no progress will have been lost.

As for the falsely awarded commendations, I am aware of the bugs you've mentioned. Last time I dug into the code, I had concluded that the bug was arising from elsewhere in the code, and as I am not actually a programmer, I couldn't make sense of it :D
Just a note to anyone who uses this fix. When you do ctr+c that doesn't delete the commendations for your dead soldiers, only your live ones. So if you delete an award from the ruleset and then go into a dead soldier's awards section who has it, the game will crash. You have to manually go into the save file and delete that commendation from that dead soldier. Just open the save file in a text editor, use ctrl+f to search for that award name and delete all traces of it.


The strange thing to me about the falsely awarded commendations is they're not consistent. If it was just giving them out too easily, you'd think any soldier that meets the false criteria would get it, but it seems random. Also I noticed for example that the Order of the Hammer award was falsely awarded, but when I used the ctrl+c it wasn't re-awarded on the next mission even though I hadn't deleted it from the ruleset. Strange. The rulesets seem fine as far as I can tell, so I assume the problem is in the code and someone with C++ knowledge would have to correct it.


PS - Is there somewhere in the game to view cause of death? I see the info saved in the save file, but not anywhere to access it in game.

Offline Countdown

  • Colonel
  • ****
  • Posts: 246
    • View Profile
Re: [STAT TRACKING] Soldier Diaries 1.0
« Reply #1099 on: March 15, 2016, 05:41:30 am »
PPS- Just comparing notes with others. These are the commendations I've seen falsely awarded thus far:

-Mercy Cross (supposed to go to someone who stuns all aliens in a mission, but goes if they are the only person to stun one)
-Armis Potens (kill with all weapons award)
-Taking Names (kill all ranks award)
-Order of the Hammer (kill all alien races award)
-Hercules Medal (kill all terror weapon award)

-Order of the Earth (debatable ... supposed to be "special missions", but counts small and medium "landing" sites as special (landing instead of crashed). I just changed the wording in the award to reflect that.

Offline Shoes

  • Commander
  • *****
  • Posts: 502
    • View Profile
Re: [STAT TRACKING] Soldier Diaries 1.0
« Reply #1100 on: March 15, 2016, 11:31:09 pm »
The strange thing to me about the falsely awarded commendations is they're not consistent. If it was just giving them out too easily, you'd think any soldier that meets the false criteria would get it, but it seems random. Also I noticed for example that the Order of the Hammer award was falsely awarded, but when I used the ctrl+c it wasn't re-awarded on the next mission even though I hadn't deleted it from the ruleset. Strange. The rulesets seem fine as far as I can tell, so I assume the problem is in the code and someone with C++ knowledge would have to correct it.

That might be why I haven't fixed any of these ;p

As others have said (thanks guys!), "Improvisation" is the logic not knowing what happened. You can modify the string in your files to read something more appropriate; I was being a little cheeky when I decided on that term!

Regarding kills involving fire and stuff: fire hardly ever kills in vanilla XCOM. And tracking who lit what on fire meant breaking all the saves, because of the way tiles are saved or something. Thinking it is more pleasing to have your awesome fire kill awarded (and a few erroneous kills) rather than not having that awesome fire kill awarded, I went with a pretty relaxed system. Any unit who gets hit by something remembers who last hit them; then, if that unit dies, the last person who hit them gets a credit for the kill. It's not great, but as I can't track who started what fire, I can't track who kills who via fire properly.

Regarding cause of death: I think that's only used in the 'fallen soldiers' screen after missions. Come to think of it, it should probably show up in the memorial screen too.

I have an old running list of bugs and things I want to look at here : https://gist.github.com/Shoes01/3af40f402d287ae9c229. I have myself the note "MAJOR BUG: The last entry in a the kill "and" criteria is the only one being looked at." pinned as the bug responsible for commendations like Mercy Cross and Taking Names being awarded incorrectly. It's a public gist, so feel free to add comments below about other things I need to look at; it's much cleaner than skimming through discussions in this thread :)

As for your second thread, it would best fit here; stat tracking is officially part of OXC as Warboy and SupSuper maintain it, but the commendations is still my mod. I have some commendations source code in the base game, but that's because I am their favourite modder (I don't need my own subforum!). So yeah, Mind Control commendations were some of the last ones added, so they got the least amount of testing. The main profile screen uses vanilla XCOM code to track kills, I decided not to touch that in an effort to minimize code impact; vanilla XCOM did not give you kills for MC kills, it seems. I do though; they are tracked as slaveKills or something. Killing an MC with an MC is untested; I didn't think of that. When you say "mission screen", do you mean the little popup that reads time of day, alien race, etc; or do you mean the debriefing screen at the end of a mission? If it's the latter, that's vanilla code. If it's the former, then I am surprised that it's in one part but not another. I will add it to my list of things todo!

By design, it's only the profile screen that has vanilla code, and will be different from the rest of the diary. However, come to think of it, since the stat tracking is now 'official', I suppose the three place should indeed be consistent. I am going to add myself a note to fix that too. **

You're covering a lot of corner cases with MC kills, so I am not sure how my "last to hit an alien gets the kill credit" and "I am an MC slave and I killed myself" interact with eachother. Does the MCer get the kill, the last soldier that happened to hit the MCd? This also seems related to your bug. The two systems might be conflicting with eachother.

Regarding neutralizations, I forget if I ever built in an anti abuse system, where stunning an alien repeatedly gave you more stun awards or not... I think I have systems in place now that can prevent that, but I am not sure if I wrote code to make the two interact. I did not spend much time making sure the commendations could not be cheesed, so this may be a result of that.

But yeah, I appreciate the attention you're giving this! I always enjoy talking about this mod :3 some day I will come back to it and tinker some more.

** edit: I reread what you were saying, and the mission popup only lists the total kills for that mission; it won't list the total kills over the soldier's career. I will still look into it to see if it's somehow overlooking certain kill types.
« Last Edit: March 16, 2016, 07:28:18 pm by Shoes »

Offline Tiagofvarela

  • Squaddie
  • *
  • Posts: 2
    • View Profile
Re: [STAT TRACKING] Soldier Diaries 1.0
« Reply #1101 on: March 17, 2016, 11:59:34 pm »
I am confused about this. Supposedly, this is included with the Milestone download itself, but I certainly cannot seem to find it or enable it. What am I missing?
Thank you in advance for any help!

Offline ivandogovich

  • Commander
  • *****
  • Posts: 2381
  • X-Com Afficionado
    • View Profile
    • Ivan Dogovich Youtube
Re: [STAT TRACKING] Soldier Diaries 1.0
« Reply #1102 on: March 18, 2016, 12:08:00 am »
I am confused about this. Supposedly, this is included with the Milestone download itself, but I certainly cannot seem to find it or enable it. What am I missing?
Thank you in advance for any help!


Unfortunately it is not in the Milestone.  It is included in the Nightlies. 

Offline Tiagofvarela

  • Squaddie
  • *
  • Posts: 2
    • View Profile
Re: [STAT TRACKING] Soldier Diaries 1.0
« Reply #1103 on: March 18, 2016, 12:43:48 am »
Unfortunately it is not in the Milestone.  It is included in the Nightlies.
It seems I was mistaken, then. I wonder where I got the idea from...
Thank you!

Offline BetterBite

  • Squaddie
  • *
  • Posts: 9
    • View Profile
Re: [STAT TRACKING] Soldier Diaries 1.0
« Reply #1104 on: March 24, 2016, 10:53:48 pm »
I really can't get this to work. I followed the read me instructions and nope it crashes when I create a new game or load one. I need some help

(P.S. I had problems accesing forums so there is a comment on the mod page)

Offline Shoes

  • Commander
  • *****
  • Posts: 502
    • View Profile
Re: [STAT TRACKING] Soldier Diaries 1.0
« Reply #1105 on: March 24, 2016, 11:47:58 pm »
I really can't get this to work. I followed the read me instructions and nope it crashes when I create a new game or load one. I need some help

(P.S. I had problems accesing forums so there is a comment on the mod page)

Do you have any other mods installed? Do you have the commendations ruleset? Is it in the right place?

The only issue is that the game auto-crashes when you start a new game or load one? So, at the geoscape, and not at the battlescape?

I assume it's a simple issue :)

Offline BetterBite

  • Squaddie
  • *
  • Posts: 9
    • View Profile
Re: [STAT TRACKING] Soldier Diaries 1.0
« Reply #1106 on: March 26, 2016, 03:32:01 pm »
This was the first mod I wanted to install. The commendations ruleset is in the ruleset folder with the imagery and stuff. The game crashes as soon as the difficulty is choosen and start is clicked. It doesnt even go on the geoscape.

Offline Shoes

  • Commander
  • *****
  • Posts: 502
    • View Profile
Re: [STAT TRACKING] Soldier Diaries 1.0
« Reply #1107 on: March 26, 2016, 06:40:52 pm »
That is very odd. Have you tried playing without the mod active? Are you using the latest nightly? There is one commendation that is given to the original 8 soldiers, I think it's called "First to serve" or something. Maybe if you removed that from the ruleset, that would help?

In any case, if you're itching to play, you can play without the mod enabled until whatever is wrong fixes itself. Once you turn the mod on, after your first mission or end of month, all the commendations will be awarded as if you had the mod on the whole time. You won't have to worry about "missing out" on anything.

Offline BetterBite

  • Squaddie
  • *
  • Posts: 9
    • View Profile
Re: [STAT TRACKING] Soldier Diaries 1.0
« Reply #1108 on: March 26, 2016, 06:42:36 pm »
It might be because im not using the steam version.
I didnt pirate the game just using a diffirent LEGAL version

Offline Shoes

  • Commander
  • *****
  • Posts: 502
    • View Profile
Re: [STAT TRACKING] Soldier Diaries 1.0
« Reply #1109 on: March 26, 2016, 07:26:05 pm »
Are you able to run the game with the mod off? The assets should be the same from any source. Maybe you're missing a patch or something?