Author Topic: [MERGED] Soldier Diaries 1.0  (Read 620458 times)

Offline Arthanor

  • Commander
  • *****
  • Posts: 2488
  • XCom Armoury Quartermaster
    • View Profile
Re: [STAT TRACKING] Soldier Diaries 1.0
« Reply #1170 on: August 04, 2016, 08:30:22 pm »
Hi Shoes! A bug report to make. Some of us Piratez players are running into a weird crash at the end of missions. Meridian looked into it and found that it is due to commendations. Here's the link to his report. You can find the saves from myself and another player just a bit higher up, although they are Piratez saves..

Thanks! :D

Offline Shoes

  • Commander
  • *****
  • Posts: 502
    • View Profile
Re: [STAT TRACKING] Soldier Diaries 1.0
« Reply #1171 on: February 28, 2017, 07:51:04 pm »
Quote
Warning: this topic has not been posted in for at least 120 days.

I have been away for longer than that!

I have made a PR to the OXC master branch with fixes to the longstanding killCriteria bug. This caused commendations like "Taking Names" to be awarded if a player killed a rank Terrorist alien, rather than having killed 1 alien of every rank. The PR outlines a bit what the issue was; quite simple really: maps don't work like I thought they did.

This fix changes the syntax of commendations that (attempted to) use the killCriteria criteria. Previously, the commendation would have looked like :
Code: [Select]
  - type: STR_MEDAL_BOLTS_CROSS_NAME
    description: STR_MEDAL_BOLTS_CROSS_DESCRIPTION
    sprite: 13
    criteria:
      killsWithCriteriaCareer: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
    killCriteria:
      -
        1: ["STR_LIVE_COMMANDER", "FACTION_HOSTILE", "STATUS_UNCONSCIOUS"]
      -
        1: ["STR_LIVE_LEADER", "FACTION_HOSTILE", "STATUS_UNCONSCIOUS"]

but now it would look like

Code: [Select]
  - type: STR_MEDAL_BOLTS_CROSS_NAME
    description: STR_MEDAL_BOLTS_CROSS_DESCRIPTION
    sprite: 13
    criteria:
      killsWithCriteriaCareer: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
    killCriteria:
      -
        - [1, ["STR_LIVE_COMMANDER", "FACTION_HOSTILE", "STATUS_UNCONSCIOUS"]]
      -
        - [1, ["STR_LIVE_LEADER", "FACTION_HOSTILE", "STATUS_UNCONSCIOUS"]]

Here's another example:

Code: [Select]
  - type: STR_MEDAL_ALLRANKS_NAME
    description: STR_MEDAL_ALLRANKS_DESCRIPTION
    sprite: 42
    criteria:
      killsWithCriteriaCareer: [1, 2, 3, 3, 3, 3, 4, 4, 4, 4]
    killCriteria:
      -
        - [1, ["STR_LIVE_SOLDIER", "FACTION_HOSTILE", "STATUS_DEAD"]]
        - [1, ["STR_LIVE_ENGINEER", "FACTION_HOSTILE", "STATUS_DEAD"]]
        - [1, ["STR_LIVE_MEDIC", "FACTION_HOSTILE", "STATUS_DEAD"]]
        - [1, ["STR_LIVE_NAVIGATOR", "FACTION_HOSTILE", "STATUS_DEAD"]]
        - [1, ["STR_LIVE_LEADER", "FACTION_HOSTILE", "STATUS_DEAD"]]
        - [1, ["STR_LIVE_COMMANDER", "FACTION_HOSTILE", "STATUS_DEAD"]]
        - [1, ["STR_LIVE_TERRORIST", "FACTION_HOSTILE", "STATUS_DEAD"]]

Here is the PR in question: https://github.com/SupSuper/OpenXcom/pull/1136

I am very happy to have squashed this bug, as it was holding back the most versatile kind of commendation.

I continue to keep track of ongoing issues (here: https://gist.github.com/Shoes01/3af40f402d287ae9c229), and I hope to ride this wave of success and knock out a few more issues!

edit: Here is an updated ruleset that I found somewhere; I honestly forget how I used to distribute this ;p https://pastebin.com/thCz8GW6

« Last Edit: February 28, 2017, 07:53:55 pm by Shoes »

Offline Countdown

  • Colonel
  • ****
  • Posts: 246
    • View Profile
Re: [STAT TRACKING] Soldier Diaries 1.0
« Reply #1172 on: April 14, 2017, 03:50:36 pm »
Hey Shoes, glad to see you back on here and still at it. I saw your pull request was included yesterday in the master and I'm looking forward to trying it out with the new fixes.

Offline Oladele.Itsifanus

  • Sergeant
  • **
  • Posts: 13
    • View Profile
Re: [STAT TRACKING] Soldier Diaries 1.0
« Reply #1173 on: May 02, 2017, 11:07:24 pm »
Hi guys, I installed the Commendations mod (the one linked in the first post) and I get the following error message:

Code: [Select]
[02-05-2017_22-01-39] [WARN] disabling mod with invalid ruleset: Commendations
[02-05-2017_22-01-39] [ERROR] failed to load 'Commendations'; mod disabled for next startup
C:\Program Files\OpenXcom\user\mods\Commendations/Commendations.rul: yaml-cpp: error at line 1003, column 9: bad conversion

I'm using the latest Nightly (openxcom_git_master_2017_04_23_1838), what could be the problem?

UPDATE: I tried Shoes' new ruleset from Pastebin, which he shared in his latest post above. Now the error message says: error at line 1274, column 9

I saw no one had this problem before, seems like it works for everyone. If anyone can help me out I would be glad! Dying to play with Commendations, I don't even want to start without it.
« Last Edit: May 05, 2017, 08:22:27 pm by Oladele.Itsifanus »

Offline Countdown

  • Colonel
  • ****
  • Posts: 246
    • View Profile
Re: [STAT TRACKING] Soldier Diaries 1.0
« Reply #1174 on: May 12, 2017, 05:05:39 am »
Hi guys, I installed the Commendations mod (the one linked in the first post) and I get the following error message:

Code: [Select]
[02-05-2017_22-01-39] [WARN] disabling mod with invalid ruleset: Commendations
[02-05-2017_22-01-39] [ERROR] failed to load 'Commendations'; mod disabled for next startup
C:\Program Files\OpenXcom\user\mods\Commendations/Commendations.rul: yaml-cpp: error at line 1003, column 9: bad conversion

I'm using the latest Nightly (openxcom_git_master_2017_04_23_1838), what could be the problem?

UPDATE: I tried Shoes' new ruleset from Pastebin, which he shared in his latest post above. Now the error message says: error at line 1274, column 9

I saw no one had this problem before, seems like it works for everyone. If anyone can help me out I would be glad! Dying to play with Commendations, I don't even want to start without it.
I actually haven't had time to play recently, so haven't downloaded the latest nightly since Shoes' latest update. I assume once I do, I'll have a problem because my ruleset will be out of date and I'll need to use the one he pasted above as you mentioned. Once I give it a try I'll let you know what happens and if I'm able to get it to work.

I took a quick look at the ruleset and don't see anything glaringly wrong at line 1274. You could try deleting that particular medal from the ruleset and see if that solves the problem. It could be a syntax error or typo, but again, nothing is jumping out at me as wrong there.

Offline Oladele.Itsifanus

  • Sergeant
  • **
  • Posts: 13
    • View Profile
Re: [STAT TRACKING] Soldier Diaries 1.0
« Reply #1175 on: May 12, 2017, 06:47:00 am »
I tried to delete the corresponding medals actually, but it's all the same. I'm eager to hear your results, thanks for trying!

Offline R1dO

  • Colonel
  • ****
  • Posts: 442
    • View Profile
Re: [STAT TRACKING] Soldier Diaries 1.0
« Reply #1176 on: May 14, 2017, 11:45:24 pm »
When using the ruleset from pastebin i cannot reproduce this error. Perhaps something went wrong during copying.
Perhaps you can attach your Commendations.rul file, so we can check for errors.

Offline Oladele.Itsifanus

  • Sergeant
  • **
  • Posts: 13
    • View Profile
Re: [STAT TRACKING] Soldier Diaries 1.0
« Reply #1177 on: May 15, 2017, 12:44:30 am »
Thank you, that's great. I attach the .rul file which is from the pastebin.

UPDATE: Okay everyone, I'm such a moron: I left the Commendations_TFTD.rul in the folder for future use, because I thought it is used only by TFTD, and hence the error message. Deleted it and Commendations loads fine. Thanks for the assistance, OpenXcom rulez!
« Last Edit: May 15, 2017, 09:44:38 am by Oladele.Itsifanus »

Offline R1dO

  • Colonel
  • ****
  • Posts: 442
    • View Profile
Re: [STAT TRACKING] Soldier Diaries 1.0
« Reply #1178 on: May 15, 2017, 10:59:42 pm »
Glad to hear you managed to solve this problem yourself. Enjoy your play.

One small trick i use myself to prevent these kind of problems is to first create a folder (under the ``mods`` directory) with the intended modname and put the .rul there.
This allows you to en/disable the mod from the ingame mod menu.

Offline endersblade

  • Captain
  • ***
  • Posts: 81
    • View Profile
Re: [STAT TRACKING] Soldier Diaries 1.0
« Reply #1179 on: October 07, 2017, 01:49:36 am »
Sorry to bump such an old thread, but I was curious, does this work with TFTD nightly now?  And if so, where do I download the version that does?  All the links on the first post are dead.

Offline ivandogovich

  • Commander
  • *****
  • Posts: 2381
  • X-Com Afficionado
    • View Profile
    • Ivan Dogovich Youtube
Re: [STAT TRACKING] Soldier Diaries 1.0
« Reply #1180 on: October 07, 2017, 04:38:17 am »
The Stat Tracking portion has been incorporated into the nightlies for about a year now.  This will work with OpenTftD.

Offline animal310

  • Captain
  • ***
  • Posts: 54
    • View Profile
Re: [STAT TRACKING] Soldier Diaries 1.0
« Reply #1181 on: October 20, 2017, 11:58:57 am »
I have noticed that on the statistics page the number of aliens captured seems to include saved civilians. For example I had my first terror mission from which I captured one live alien and saved two civilians. On the statistics page it showed the number of aliens captured as three. I had only had two previous missions and none had included a live capture.

Offline Shoes

  • Commander
  • *****
  • Posts: 502
    • View Profile
Re: [STAT TRACKING] Soldier Diaries 1.0
« Reply #1182 on: October 20, 2017, 06:47:11 pm »
I have noticed that on the statistics page the number of aliens captured seems to include saved civilians. For example I had my first terror mission from which I captured one live alien and saved two civilians. On the statistics page it showed the number of aliens captured as three. I had only had two previous missions and none had included a live capture.

Did you stun the civilians? You may have also inadvertently "captured" some aliens by shooting them, dealing non-lethal damage, but having them drop anyway. Are the number of saved civilians being reported for all of your soldiers, or just one of them?


Online Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 9086
    • View Profile
Re: [STAT TRACKING] Soldier Diaries 1.0
« Reply #1183 on: October 20, 2017, 07:28:19 pm »
Or just upload you save for analysis...

Offline animal310

  • Captain
  • ***
  • Posts: 54
    • View Profile
Re: [STAT TRACKING] Soldier Diaries 1.0
« Reply #1184 on: October 21, 2017, 02:28:27 pm »
Hi

Yeah apologies, should have attached the file.  It's attached below however i'm playing on Ironman so a few more missions have taken place since. The capture count has been correct since the terror mission. There were not any captures until the terror mission (which was the third overall). I didn't have Alien Containment prior to that but I didn't have any messages telling me that an Alien had died because of no Alien Containment during the first two missions.

It is possible that the civilians were sunned through smoke or collateral explosion damage, although not to my knowledge it is possible.

Cheers

Update

I’ve had another look and I’m now showing 9 alien captures however I have only had six, one of which I’ve researched. I did accidently stun one of my own men during a mission and this has maybe counted as one. So it is possible that it is counting stuns of civilians and xcom troops as alien captures. 
« Last Edit: October 21, 2017, 03:08:45 pm by animal310 »