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

Offline Neo23

  • Sergeant
  • **
  • Posts: 48
    • View Profile
Re: [STAT TRACKING] Soldier Diaries 1.0
« Reply #1080 on: January 07, 2016, 05:21:11 pm »
There are still many false awarded medals left. Recently I had a reproducible crash at mission end and it turned out it was the commendations ruleset. These happen in UFO and TFTD (converted commendations.rul by me) but in UFO more random.
More info about that here:
https://openxcom.org/forum/index.php?topic=4211.msg57180#msg57180

Here are some confirmed problematic entries:

False awarded:
-------------------
- STR_MEDAL_ALLRANKS_NAME
- STR_MEDAL_ALLBATTLETYPES_NAME
- STR_MEDAL_TRAP_NAME (this can be TFTD only, not sure though)

Can crash the game (TFTD only confirmed):
------------------------------------------------------
- STR_MEDAL_ORDER_OF_RESTRAINT_NAME
- STR_MEDAL_HELLRAISER_MEDAL_NAME
- STR_MEDAL_DISTINGUISHED_SERVICE_NAME
- STR_MEDAL_BOLTS_CROSS_NAME
- STR_MEDAL_SAPPER_NAME
- STR_MEDAL_SECTOPOD_KILL_MEDAL_NAME
- STR_MEDAL_HEADSHOT_NAME
- STR_MEDAL_REARSHOT_NAME
- STR_MEDAL_FLANKSHOT_NAME
- STR_MEDAL_ANTITERROR_NAME
- STR_MEDAL_MINDCONTROL_NAME
- STR_MEDAL_PSIPANIC_NAME
- STR_MEDAL_SLAVEKILLS_NAME

I hope this information helps somehow.

Offline Shoes

  • Commander
  • *****
  • Posts: 502
    • View Profile
Re: [STAT TRACKING] Soldier Diaries 1.0
« Reply #1081 on: January 07, 2016, 10:32:37 pm »
That's great that you were able to narrow it down to the commendations only. The mod itself is not official, even though I managed to get its source code merged into the base game :3

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 actually fixing the issues, I don't see a common denominator in the commendations. Some of the commendations you've cited are actually quite old and haven't really ever caused problems. It's possible that Supsuper made some changes to the source code that needs to be reflected in the commendations ruleset, but I can't think of anything that would cause crashes. If a commendation is malformed, it simply gets awarded all the time (the code checks to see if commendations should be NOT awarded, and if one is malformed, it doesn't get checked). I would like to look at the ruleset you've made before spending too much time hunting for these bugs. It's entirely possible that TFTD is the culprit as I haven't done much work on it since TFTD.

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

Offline Neo23

  • Sergeant
  • **
  • Posts: 48
    • View Profile
Re: [STAT TRACKING] Soldier Diaries 1.0
« Reply #1082 on: January 08, 2016, 03:24:44 pm »
Sure, I attached my TFTD version (for UFO I use the one from SupSuper only with my german translation added).
The above mentioned entries are commented out for the moment. So far my test game ist normally playable again, but more issues could maybe arise later.
As for UFO I have no actual test game ongoing at the moment, but short just for fun tests showed similar problems in the past. In UFO crashes are more random and
not often. Very hard to track down. I am too thinking not all these medals are totally broken, but many have problems with TFTD it seems, but there is clear a UFO problem too.
In TFTD all PSI-Medals are affected and many with the condition STATUS_UNCONSCIOUS too as far as I can see.


I really love this mod and I am very happy this got finally merged into the main branch. I hope these issues can be fixed some day in the future.

P.S. English text in this ruleset has not been optimized for TFTD yet. Only the german texts are supported for now. This file is not ready for serious playing in english OXC versions and supposed for debugging only.
P.P.S. @Shoes: If you need the converted graphics as well, I will upload them too.


Edit:
Good news. It seems the crashes are fixed with commit 3eb30c2 (https://github.com/SupSuper/OpenXcom/commit/3eb30c2087de6c33cfcaeb3426d9e3832a8604b9). I cannot reproduce these anymore with latest nightly and all medals enabled again. Funny thing it is I did not even get one of the affected medals after the mission in my affected test save. I think remaining issues are in the EXE source then.
« Last Edit: January 14, 2016, 03:34:34 pm by Neo23 »

Offline Countdown

  • Colonel
  • ****
  • Posts: 246
    • View Profile
Re: [STAT TRACKING] Soldier Diaries 1.0
« Reply #1083 on: January 18, 2016, 07:00:46 pm »
Soldier diaries are now in the nightlies! Keep an eye out for bugs. :)

Changes:
- TFTD compatible!
- Various string / UI changes
- Kill statistics now contain full unit name
- Mission statistics now contain marker name
- Various fixes

Old soldier stats should still work, but inconsistencies may arise.

Here's the new standalone Commendations mod (X-COM 1 only):

Sorry, I am new and not sure why this isn't working for me; this is my first time trying to add in a mod. I am using the milestone X-Com 1 download (not the latest Nightly).

On my Mod option screen I have the option for "Commendations" and I turn it to Yes and the game re-loads just fine. But nothing has changed. No stats, no medals after missions or a place to view available medals.

I pasted everything except the ruleset into the "Resources" folder. Am I missing something else?


Thanks for any help/advice. Loving what OXC is doing with this game. Played this once and while on my uncle's computer when I was kid, so just started playing again for the "nostalgia" factor, but then discovered it's one of those rare things that was actually way better than what you remembered/could appreciate when you were younger.

Offline R1dO

  • Colonel
  • ****
  • Posts: 442
    • View Profile
Re: [STAT TRACKING] Soldier Diaries 1.0
« Reply #1084 on: January 19, 2016, 01:27:46 am »
Good to have you aboard, my your rookies live long and prosper ;)

The commendation mod depends on the soldier diaries code. Hence the solution lies in the first line of SupSupers quote.

Please remember that the nightlies use a different layout for the data and mod folders.

Good luck

Offline Orz

  • Colonel
  • ****
  • Posts: 147
  • (aka Illamasqua)
    • View Profile
Re: [STAT TRACKING] Soldier Diaries 1.0
« Reply #1085 on: January 27, 2016, 02:02:25 am »
I couldn't fail to notice that Engineer/Technician (rank 2) was listed above Leader/Navigator (rank 1), while all other ranks are listed correctly in order from bottom to top (Terrorist, Soldier, etc. all the way to Commander)?

Will anyone correct this? I haven't found a way to edit this myself (using latest nightlies).



Scratch that, rank order seems to be totally randomized, correct?
« Last Edit: January 27, 2016, 02:56:02 pm by Orz »

Offline Shoes

  • Commander
  • *****
  • Posts: 502
    • View Profile
Re: [STAT TRACKING] Soldier Diaries 1.0
« Reply #1086 on: January 27, 2016, 05:51:22 pm »
I couldn't fail to notice that Engineer/Technician (rank 2) was listed above Leader/Navigator (rank 1), while all other ranks are listed correctly in order from bottom to top (Terrorist, Soldier, etc. all the way to Commander)?

Will anyone correct this? I haven't found a way to edit this myself (using latest nightlies).



Scratch that, rank order seems to be totally randomized, correct?

What do you mean by rank order; are you talking about the diary screens, listing who you've killed? The lists aren't really ordered as far as I remember, I think it's more of a first come first serve.

Offline Orz

  • Colonel
  • ****
  • Posts: 147
  • (aka Illamasqua)
    • View Profile
Re: [STAT TRACKING] Soldier Diaries 1.0
« Reply #1087 on: March 02, 2016, 01:29:12 am »
What do you mean by rank order; are you talking about the diary screens, listing who you've killed? The lists aren't really ordered as far as I remember, I think it's more of a first come first serve.

OMG, I totally missed this! Late reply, but yes, that's exactly what I meant.



But I come here now to report a totally unrelated issue, though. I think this is a Soldier Diaries' issue since me fixing the string on my end for Male Civilian still won't change what is displayed here:



Minor bug, but should display correctly as in UFO/EU. Not sure if the same issue would affect Female Civilian as I haven't "accidentally" killed any.

As an aside, I didn't intend to kill the above dude on purpose; but you see, it was kind of a bottleneck situation and the dude wouldn't budge and my guys needed to pass through or an alien would get away next turn. It was for the greater good, I promise :)

Offline Arthanor

  • Commander
  • *****
  • Posts: 2488
  • XCom Armoury Quartermaster
    • View Profile
Re: [STAT TRACKING] Soldier Diaries 1.0
« Reply #1088 on: March 02, 2016, 02:04:33 am »
I was going to ask how you managed to "accidentally" kill a civilian with a vibroblade. Those are pretty deliberate weapons. But fair enough. Careful with the justification though. Makes you sound like a xeno fish scum.

But the main point of my writing here was to check: Did you define a value for "MALE_CIVILIAN" or "STR_MALE_CIVILIAN" ? The first should work, the second will not.

Offline Orz

  • Colonel
  • ****
  • Posts: 147
  • (aka Illamasqua)
    • View Profile
Re: [STAT TRACKING] Soldier Diaries 1.0
« Reply #1089 on: March 02, 2016, 02:17:28 am »
I was going to ask how you managed to "accidentally" kill a civilian with a vibroblade. Those are pretty deliberate weapons. But fair enough. Careful with the justification though. Makes you sound like a xeno fish scum.

Thanks, that'll give me something interesting to read later. I always had an eye for Warhammer 40K, but never quite got into it. Curiously, though, from a brief overview I did on the races/factions, the Tau stood from the crowd for me :O

Quote
But the main point of my writing here was to check: Did you define a value for "MALE_CIVILIAN" or "STR_MALE_CIVILIAN" ? The first should work, the second will not.

Yes, indeed, that fixed it!

Offline Shoes

  • Commander
  • *****
  • Posts: 502
    • View Profile
Re: [STAT TRACKING] Soldier Diaries 1.0
« Reply #1090 on: March 02, 2016, 06:53:16 pm »
Thanks Arthanor!

I am pleased to see this is working so well with the Piratez game :)

Offline Kjotleik

  • Colonel
  • ****
  • Posts: 100
  • I am Kjotleik
    • View Profile
Re: [STAT TRACKING] Soldier Diaries 1.0
« Reply #1091 on: March 11, 2016, 01:24:46 am »
What does 'Improvisation" mean?

I'm using nightly 2016-02-27 04:45, Final Mod Pack 1.9.1.
I figured this was the most appropriate thread to ask the question, even though Soldier Diaries is included in the OXC itself.

I got this in two missions in a row, with the same soldier.

Mission One: Terror mission.
Weapon: Multi-Launcher.
Situation: Stepped out and fired, missed! Rocket just flew past the target and disappeared in the fog-of-war.
Next step: Getting psi-targeted on enemy turn, fleeing back to the Skyranger and getting out of there...(like a coward).
Result: One Kill - Civilian - weapon: Improvisation (?).

Mission Two: Ground Assault.
Weapon: Multi-Launcher.
Situation: Killed two Floaters (got the kills as Multi-Launcher kills). Then missed a third Floater by hitting the corner of the UFO.
Next step: Used other soldiers to fire (and miss) the target. One other soldier threw an incendiary grenade to light the target on fire.
...target then escaped into the UFO where he died from a fatal would, auto-ending the mission, two turns later.
Result: Three Kills - Floaters - weapons: Multi-Launcher (2) and Improvisation (1).

To me it seems both kills I got credited was indeed done by my Multi-Launcher. But why does it show up as "Improvisation?"

Please enlighten me with the answer to this. I'm a bit curious.


PS!
On a secondary note: I've also gotten a medal (Commendation mod, I presume) for killing with all weapon-types. The problem is I just got two kills from using a grenade (this was the soldier's first mission with kills recorded). Is this something to do with the Commendations mod, FMP or OXC? I have no clue as to where to ask questions about this. About how to fix it, I mean.

Sincerely
Kjotleik



Offline ivandogovich

  • Commander
  • *****
  • Posts: 2381
  • X-Com Afficionado
    • View Profile
    • Ivan Dogovich Youtube
Re: [STAT TRACKING] Soldier Diaries 1.0
« Reply #1092 on: March 11, 2016, 01:34:44 am »
Unfortunately, some of the medals are still a little bugged.  (i.e. the All Weapon Types) that you got.

Improvisation is basically anything that the game doesn't track as direct action.  > Shoot a barrel that explodes and kills a civilian? : Improvisation.   Take down a Cyberdisk that then explodes taking out 3 nearby sectoids? :improvisation.

That said, there could still be something buggy going on in your situations.

Offline Arthanor

  • Commander
  • *****
  • Posts: 2488
  • XCom Armoury Quartermaster
    • View Profile
Re: [STAT TRACKING] Soldier Diaries 1.0
« Reply #1093 on: March 11, 2016, 02:58:59 am »
Some of the awards from commendations are a bit buggy because the logic to attribute them is flawed. The all weapons and all ranks medals in particular, I think.

Regarding improvisation: Improvisation kills are given when something dies of.. something.. unusual. If the kill does not meet any of the checks (it wasn't a rifle kill, a grenade kill, a MC, etc.) it is labelled as improvisation.

If your case, the civilian must have died somehow in the aliens' turn, probably because something blew up (or maybe got wounded by the multi-launcher but not killed?). It probably died of mortal wounds and since that doesn't factor as a "known cause", it was labelled improvisation.

Same thing with the floaters. You killed two with the launcher, then set one on fire who died later. You got two ML kills, so that matches, and the improvisation is for the floater who burned to death, since fire death are not tracked (you would need to track who set him on fire, and who set every] tile on the map on fire, in case an alien steps on it and dies of the fire, which was deemed to be too much tracking).

Offline Kjotleik

  • Colonel
  • ****
  • Posts: 100
  • I am Kjotleik
    • View Profile
Re: [STAT TRACKING] Soldier Diaries 1.0
« Reply #1094 on: March 12, 2016, 09:48:27 pm »
Thank you both, Arthanor and ivandogovich.

That was good information to get. I'll try to keep an eye out for anomalies in the medals given. I can happily report that the Order of the Fallen seems to work as intended, at least. I've got a lot of cases that can confirm only dead soldiers get awarded this medal  :o

Maybe it's just me, but it would be more logical to re-name "Improvisation" to "Unknown Cause."

PS!
Just one question to Arthanor: If the On Fire/Mortally Wounded alien/civilian dies later, and the game doesn't track what injured him... how come one of my soldiers actually got credited with the kill? Is there a "last injured by" flag, or something?

PS2!
Oh, and about tracking tiles on fire: If any alien steps onto a tile on fire (and dies from it), then I'd argue it wasn't really the soldier lighting the tile on fire that made the kill. It was more a suicide than a kill, in my opinion.

Wouldn't it be a better solution to model it such a way that kills of unknown (untracked) sources never got credited to soldiers at all? You could always just give the info on the mission screen (when you click the mission in the diary to see the specifics). Kills by Soldier - Kills by Squad - Deaths of Unknown Causes.

Wops. Didn't mean to be too demanding here. Sorry if this post comes off as that. Not my intention. Just throwing out my ideas, the brainstorming way...


Sincerely
Kjotleik