aliens

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

Offline DracoGriffin

  • Colonel
  • ****
  • Posts: 302
    • View Profile
    • Steam: DracoGriffin
Re: [STAT TRACKING] Soldier Diaries 1.0
« Reply #840 on: July 21, 2015, 07:45:22 pm »
Nice; can't wait to see the improved UFOpedia.

Anything text-wise that you could use help with?

Offline Shoes

  • Commander
  • *****
  • Posts: 502
    • View Profile
Re: [STAT TRACKING] Soldier Diaries 1.0
« Reply #841 on: July 21, 2015, 08:32:09 pm »
Nice; can't wait to see the improved UFOpedia.

Anything text-wise that you could use help with?

ivandogovich did a great job adding flavor text to the commendations in the ufopaedia; any new commendations I've added are missing that text. If you wanted to dig through the ruleset and add some text, it would be greatly appreciated!

Offline Arthanor

  • Commander
  • *****
  • Posts: 2488
  • XCom Armoury Quartermaster
    • View Profile
Re: [STAT TRACKING] Soldier Diaries 1.0
« Reply #842 on: July 21, 2015, 08:42:07 pm »
Good news! I've added commendations button to the ufopaedia: https://imgur.com/f5XHegJ,wPiBdkh,LbwPi4f

Now that it works, I can make it pretty.

Awesome! That extra section will make things much easier :D

How do things work with modded alien races? Can you get "Gazer XenoCide" if you will a whole bunch of gazers? Or is it restricted to vanilla races? I guess one could mod-in the required commendations for extra races?

And how would it impact things like the Hercules medal (for killing one of each terror unit) if you add new terror units?

Offline Shoes

  • Commander
  • *****
  • Posts: 502
    • View Profile
Re: [STAT TRACKING] Soldier Diaries 1.0
« Reply #843 on: July 21, 2015, 10:14:49 pm »
Here is the commendation for killing one of each terror units:

Code: [Select]
  - type: STR_MEDAL_ANTITERROR_NAME
    description: STR_MEDAL_ANTITERROR_DESCRIPTION
    sprite: 46
    criteria:
      killsWithCriteriaCareer: [1, 2, 3, 3, 3, 3, 4, 4, 4, 4]
    killCriteria:
      -
        1: ["STR_CYBERDISC", "STR_LIVE_TERRORIST", "FACTION_HOSTILE", "STATUS_DEAD"]
        1: ["STR_REAPER", "STR_LIVE_TERRORIST", "FACTION_HOSTILE", "STATUS_DEAD"]
        1: ["STR_CHRYSSALID", "STR_LIVE_TERRORIST", "FACTION_HOSTILE", "STATUS_DEAD"]
        1: ["STR_SILACOID", "STR_LIVE_TERRORIST", "FACTION_HOSTILE", "STATUS_DEAD"]
        1: ["STR_CELATID", "STR_LIVE_TERRORIST", "FACTION_HOSTILE", "STATUS_DEAD"]
        1: ["STR_SECTOPOD", "STR_LIVE_TERRORIST", "FACTION_HOSTILE", "STATUS_DEAD"]
        1: ["STR_ZOMBIE", "STR_LIVE_TERRORIST", "FACTION_HOSTILE", "STATUS_DEAD"]

Here you would have to add the new terror units to be properly recognized.

The Xenocide medal is special though :) it was made with modding in mind, so adding new races will "add" new xenocide medals. Same goes for the weapons proficiency medal and the campaign medal: add new weapons or countries, and you get "new" medals.

I was thinking more about the "saving civilians" medal, and I think it's possible to overwrite a medal with another, thus "upgrading" a medal. I don't know how the rest of the code would react... maybe if you have the 100% rescue medal, you'll continue to receive the 90% rescue medal as well... it's something I will test.

And another note on the ufopaedia: I am able to have a "with commendations enabled" and "without commendations enabled" version, I just need to play with some numbers to make it pretty. This is essential in having the code included in the base game.

Offline Arthanor

  • Commander
  • *****
  • Posts: 2488
  • XCom Armoury Quartermaster
    • View Profile
Re: [STAT TRACKING] Soldier Diaries 1.0
« Reply #844 on: July 21, 2015, 11:08:50 pm »
Awesome forward thinking for the XenoCide, Weapons and Campaign medals!

For the Hercules, I would just have to add

Code: [Select]
        1: ["STR_CYBERMITE", "STR_LIVE_TERRORIST", "FACTION_HOSTILE", "STATUS_DEAD"]
in order for a cybermite to be included as a requirement?

Is this an additive list? Or do I have to rewrite the whole thing?

It would be good as an additive list, then each new race's ruleset could simply add entries to the commendation lists, without having to worry about conflicts.

And great news on the new UFOPedia! :D

Offline Shoes

  • Commander
  • *****
  • Posts: 502
    • View Profile
Re: [STAT TRACKING] Soldier Diaries 1.0
« Reply #845 on: July 22, 2015, 12:12:28 am »
I'm not sure what you mean by additive list, but I think it is yes. By adding that line of code, you are saying that "1" kill needs to have the following: be of race STR_CYBERMITE, be of rank STR_LIVE_TERRORIST, be of faction HOSTILE and be DEAD.

Here's a fun fact! The kills with criteria career (opposed to mission or turn) is a list of 10 (or fewer (or more if you add new sprites!)) integers that need to be reached; in this case, 1, 2, 3, 4. The repeating is to skip decorations, so you go from no pins, to 1 bronze, to 2 silver, to 3 gold. However, the numbers in the kill criteria itself are important too; in this case they are all ones. So if you've killed 1 of each terrorist, you've completed "1" kill with criteria career. If you changed it to "2: ["STR_CYBERMITE", ...]" but left the others one, you would only get the "1" kill with criteria career if you've killed one of each, but 2 terrorists.

Probably would have been simpler if I pointed you to the grenadiers medal:

Code: [Select]
  - type: STR_MEDAL_GRENADIERS_MEDAL_NAME
    description: STR_MEDAL_GRENADIERS_MEDAL_DESCRIPTION
    sprite: 14
    criteria:
      killsWithCriteriaTurn: [1, 2, 3, 3, 3, 3, 4, 4, 4, 4]
    killCriteria:
      -
        3: ["FACTION_HOSTILE", "STATUS_DEAD", "BT_GRENADE"]
      -
        3: ["FACTION_HOSTILE", "STATUS_DEAD", "BT_PROXIMITYGRENADE"]

Here, in a single turn, you need to kill "3" hostiles with a grenade OR a proximity mine. Fun stuff. There's a big comment chunk in the ruleset with more details on how to make your own :)

Offline Arthanor

  • Commander
  • *****
  • Posts: 2488
  • XCom Armoury Quartermaster
    • View Profile
Re: [STAT TRACKING] Soldier Diaries 1.0
« Reply #846 on: July 22, 2015, 12:29:11 am »
By additive I mean: If I had this in a new alien race mod:

Code: [Select]
- type: STR_MEDAL_ANTITERROR_NAME
    killCriteria:
      -
        1: ["STR_CYBERMITE", "STR_LIVE_TERRORIST", "FACTION_HOSTILE", "STATUS_DEAD"]

Will it add this killCriteria to the existing list (meaning you need to kill a cybermite on top of one of everything else), or will it overwrite the whole list (meaning you only need to kill a cybermite).

So parts of the rulesets are loaded in an additive way, others are loaded by replacing previous entries.

I'll look in the ruleset for more details too :D I didn't notice..

Offline Shoes

  • Commander
  • *****
  • Posts: 502
    • View Profile
Re: [STAT TRACKING] Soldier Diaries 1.0
« Reply #847 on: July 22, 2015, 03:22:04 am »
Interesting, I hadn't considered that behavior for the ruleset. I doubt that it will be additive though; I think it would replace. You can try it though :)

Offline DracoGriffin

  • Colonel
  • ****
  • Posts: 302
    • View Profile
    • Steam: DracoGriffin
Re: [STAT TRACKING] Soldier Diaries 1.0
« Reply #848 on: July 22, 2015, 06:39:39 am »
Looking through the ruleset; a standardized template would be good, especially for consideration inclusion to source code.

Some quotes had a leading space or trailing space (or neither), others did or didn't, some had one dash, most had two, a few had colons. Term for soldiers doesn't seem uniform. Term for enemy is loose; aliens, hostiles, threat, enemies, targets, etc are all used. Term for commendations is also sporadic: award, medal, commendation, order, citation, etc. Lastly, some of the quotes seem out of place, considering; Darth Vader, Disney movie, comedy movies, etc.

A defined template/standard would be great; although for source inclusion it may be best if text is geared towards "aliens"/"XCOM", in contrast to a more "neutral" tone and terms to allow "plug & play" accessibility for mods.

(e.g., XCOM -> Awarded to a soldier who killed ten Ethereals with a laser pistol. / "Neutral" -> Given to a unit after eliminating ten hostiles with a sidearm.)

Perhaps "awards" are the "upgradable" ones, "medals" are the generic one-off awards, "orders" the more exclusive/difficult to achieve; rather than just a "because it sounds cooler".

So far, this is what I've gleaned as a mock "standardized" template:

Flavor Quote - "... And so, thus medals were given to soldiers." -- A historical commander
Flavor Text - Soldiers that accomplish cool stuff against the big bad aliens get shiny bits attached to their uniforms.
Oracle (Actual) Text - This award is given to a soldier after killing X aliens.
Specific Level/Upgrades - Further levels are awarded after every Y alien kills, until reaching Z status.


Attached a compare (just change to .htm, much better readability), and suggested revisions. I apologize for being forthcoming; tried to use a more "neutral" tone and standardize the entries somewhat, but can't do much more without official clarification (see above).

Offline wsmithjr

  • Colonel
  • ****
  • Posts: 149
    • View Profile
Re: [STAT TRACKING] Soldier Diaries 1.0
« Reply #849 on: July 22, 2015, 07:30:40 am »
I just checked on my install (made using git and compiled/installed locally) and everything works fine. Seems like it's either something from the pre-compiled Windows version or a mistake while installing.

Well, I don't know what I'm doing wrong, then.  Tried a brand new install and still have the error.  The following is the exact install procedure I've used in Windows 7:

a) Redownload latest nightly: openxcom_git_master_2015_07_13_1222.zip
b) Redownload latest Commendations: 2015_05_25 Nightly.zip
1) Create d:\Games\OXC folder
2) Copy contents of openxcom_git_master_2015_07_13_1222.zip to d:\Games\OXC
3) Copy original UFO files to d:\Games\OXC\UFO folder
4) Copy contents of universal_patch.zip file to d:\Games\OXC\UFO folder, overwrite all files
5) \User\Documents\Openxcom folder is completely empty
6) Test game, everything works including MOD description text
7) The following is automatically added to \User\Documents\Openxcom foder: mods folder, options.cfg and openxcom.log
8) Copy Commendations contents from 2015-05-25 Nightly.zip to d:\Games\OXC folder, overwrite all files
9) Run game, get STR_MODS_TOOLTIP instead of mod descriptions
10) Enable Commendations mod in mod list
11) OXC reloads STR_MODS_TOOLTIP is still there instead of mod descriptions.

So, what am I doing wrong?  Everything seems to work except that one string, but it doesn't make sense to me why that one string is wrong.  And, if that is wrong, it makes me wonder what else might be wrong that I can't see right now.
« Last Edit: July 22, 2015, 07:40:40 am by wsmithjr »

Offline yrizoud

  • Commander
  • *****
  • Posts: 1014
    • View Profile
Re: [STAT TRACKING] Soldier Diaries 1.0
« Reply #850 on: July 22, 2015, 11:44:07 am »
If your  language is set to English-US, try English-England
If your  language is set to English-England, try English-US
If it fixes something, the issue was specific to that one language you moved from.

Offline wsmithjr

  • Colonel
  • ****
  • Posts: 149
    • View Profile
Re: [STAT TRACKING] Soldier Diaries 1.0
« Reply #851 on: July 22, 2015, 11:58:35 am »
If your  language is set to English-US, try English-England
If your  language is set to English-England, try English-US
If it fixes something, the issue was specific to that one language you moved from.

Thanks.  I meant to check that but forgot.  For some reason, language was set to "ar" ... whatever that is.  Changing it to English (US) didn't matter because nothing changed.  Changing it to English (UK) mucked everything up.  Changed it back to US but that string is still missing.

Just for kicks and went back and tried the oldest nightly I could download.  No change.

Offline Shoes

  • Commander
  • *****
  • Posts: 502
    • View Profile
Re: [STAT TRACKING] Soldier Diaries 1.0
« Reply #852 on: July 22, 2015, 03:15:26 pm »
So, what am I doing wrong?  Everything seems to work except that one string, but it doesn't make sense to me why that one string is wrong.  And, if that is wrong, it makes me wonder what else might be wrong that I can't see right now.

It would definitely seem like you're doing everything right, especially given that the mod tooltip text worked before my mod was installed. You have a few options: find the May 25th nightly and use that to play the mod, or compile from source your own version of the game to play the mod, or play the mod without the tooltip texts.

At some point once I have the ufopaedia stuff sorted out I will post another updated .exe, and it should work then. Statistics carry over, so you won't "lose" anything in that sense. I would also be interested in knowing if other strings are missing, or if it's only the tooltips.

@DracoGriffin, thanks for the input! Standardization is something I do want to do, even in the source code I use interchangeably "commendation" and "medal" and "award". I'm not able to properly look at the commend_compare.txt; it looks like a git diff file, but I don't know how to look at those independently. I use a CLI for git, so any advice there would be appreciated.

One of my goals for this mod is to be itself moddable and usable by other mods, so I would definitely want a more "neural" tone to the commendations. It's funny timing that you would mention creating a definition for what is a "medal" and what is a "cross" and all that, as Arthanor is hoping to put some order in the commendations listings.

I will add this to my growing list of things to keep in mind! (found here: https://gist.github.com/Shoes01/3af40f402d287ae9c229 )

edit: Here are the final ufopedia alterations, both with and without the mod enabled: https://imgur.com/a/nWF87/all ; I decided not to increase the length of the list however.

edit 2: new size of the soldier mission details window: https://imgur.com/enwrGzQ

edit 3: the kills screen (https://i.imgur.com/VHpxTLt.png) at the moment will mix psi panicks, psi controls, kills and stuns all in one big mess. I have added a "Panicks> ##" and a "Controls> ##" at the bottom of the screen, but the psi-attacks will still show up in the list of kills/stuns, unless I do some fiddlin', that is code duplication. Which I am not fond of. For the moment, I will leave it all jumbled in, but I would like to input again on what to do with it. Screenshot: https://imgur.com/03yyG9f ; notice the numbers are 0 despite the psi-amp being at 1, this is because the totals are calculated on the fly.
« Last Edit: July 22, 2015, 04:36:51 pm by Shoes »

Offline Arthanor

  • Commander
  • *****
  • Posts: 2488
  • XCom Armoury Quartermaster
    • View Profile
Re: [STAT TRACKING] Soldier Diaries 1.0
« Reply #853 on: July 22, 2015, 05:25:40 pm »
Nice looking UI work Shoes! The Commendations section fits right in  :D

Did you see the ruleset I uploaded a few posts ago? It has commendations ordered by type (alphabetically), then by name (alphabetically again). I like that the most for now since it makes it feel like a book (with a chapter on medals, one on crosses, etc.).

I'm not sure I agree with the idea of making the text neutral, I think it should be made XCom specific. The source code is for XCom so this addition should be too. If someone wants to make a Pirate mod, a Fantasy mod, a WW2 mod, a realistic modern day mod or whatever, they will likely want to rename everything and change all the text any ways, so we might as well do something that fits in with XCom.

What I do agree with, though, is putting some kind of sense into which medal is which. The mix of orders/crosses/medals/etc, with no real link with how prestigious they are, is odd (but all the names sound cool :D). I haven't changed it in the ruleset I made because that's not my work and I didn't want to go renaming stuff others did but if you and Ivan are up for that, I think it could be a good thing.

We currently have:
- Badge
- Citation
- Commendation
- Cross
- Heart
- Medal
- Order
- Ribbon
- Star
- Titles (ex.: Iron Man, Man of Steel, Night Stalker)

It is a bit hard to order (and I have no military knowledge), but I would say:
- Star (Most prestigious, hardest ones to get)
- Cross
- Order
- Medal
- Ribbon
- Commendation
- Citation
- Badge (Least prestigious, easiest one to get)

- Heart/Titles/Others (Special cases)

What do you think?
« Last Edit: July 22, 2015, 06:07:44 pm by Arthanor »

Offline Shoes

  • Commander
  • *****
  • Posts: 502
    • View Profile
Re: [STAT TRACKING] Soldier Diaries 1.0
« Reply #854 on: July 22, 2015, 05:44:16 pm »
I am looking at it now! It looks great; I am surprised by how much polish it adds.

 I agree with your ideas on the prestigiousness of the names. Have you played many games using the mod? If you've got a decent feel for the flow of commendations, I would gladly accept your changes. It's sort of what I'm doing at the moment, playing through and seeing what is being given too often (Order of Earth), or incorrectly (anything that needs a list of kills).

My thoughts on keeping things neutral is more along the lines of "Enemy has been killed" instead of "Space alien has been killed". By trying to keep things more traditional, it makes it more believable that a military organisation would hand out these commendations. I don't think there are any really offending commendations though.

Also! New nightly mod: https://dl.dropboxusercontent.com/u/234369005/OXC/2015-07-22%20Nightly.zip

As mentioned above, some commendations aren't working right anymore, I'm not sure why. No worries though, as stats continue to be tracked correctly, so when this gets fixed, you can enter debug mode (Ctrl+D) and then wipe the commendations (Ctrl+C); they'll all be regiven at the end of the month or the next mission.