aliens

Author Topic: OBSOLETE: [PirateZ] Commendations Mod 0.1  (Read 15098 times)

Offline ivandogovich

  • Commander
  • *****
  • Posts: 2381
  • X-Com Afficionado
    • View Profile
    • Ivan Dogovich Youtube
Re: [PirateZ] Commendations Mod 0.1
« Reply #15 on: July 27, 2016, 08:08:28 pm »
Does anyone know a way to hide Commendation pedia articles, so they're only visible by clicking an award in soldier's Diary? You know, more achievement-like this way.

No, I believe that would take extra code.  We never worked it out in Vanilla.

EDIT: my official stance on this is: I have my own commendations, but I will also supply this mod in the Piratez bundle - just make sure your mod deletes all my commendations criteria and pedia entries (they're all massed in homogenous blocks for ease). Also a question: I'm getting frequent crashes at mission's end.
Hmm... Ok. I'd rather just deprecate this mod then. Not distribute it with yours.  If people want to make new commendations in addition to what you are putting together for Piratez, I'd suggest we thread it as "Additional Commendations Mod" like I did with a few for vanilla (Melee Kill Medal, etc).

Are there any Commendations (besides "The original 8") which are hardcoded?
Yes there are.  BTW. Your Original 8 was identified as causing crashes in the nightlies so try disabling that one and see if your crashes stop. 

Hardcoded: (iirc)

Criteria using:

totalIronMan
totalImportantMissions
totalValientCrux
globeTrotter

Offline Dioxine

  • Commander
  • *****
  • Posts: 5412
  • punk not dead
    • View Profile
    • Nocturnal Productions
Re: [PirateZ] Commendations Mod 0.1
« Reply #16 on: July 27, 2016, 08:41:08 pm »
No, the Original 8 doesn't cause crashes (SO FAR!)... I managed to finish a single mission in this, and it was working fine. I will check the other ones - maybe it's as simple as missing proper Sprite :)

Also it would be a shame to deprecate that mod - I like it, only my own vision was different. I think people deserve the choice between the two.

Offline Dioxine

  • Commander
  • *****
  • Posts: 5412
  • punk not dead
    • View Profile
    • Nocturnal Productions
Re: [PirateZ] Commendations Mod 0.1
« Reply #17 on: July 27, 2016, 08:52:17 pm »
DAMN! It was "the original 8" that was causing the crash! No matter... Escaped Lunatics are denoted in the Maintenance anyway, so there's no point in keeping that as an actual medal (I will keep the Pedia entry, though). The STR_MEDAL_IMPORTANT_MISSIONS_NAME doesn't seem to affect it - do you think I can safely ignore it? Anyway, THANK YOU IVAN!

Offline ivandogovich

  • Commander
  • *****
  • Posts: 2381
  • X-Com Afficionado
    • View Profile
    • Ivan Dogovich Youtube
Re: [PirateZ] Commendations Mod 0.1
« Reply #18 on: July 27, 2016, 09:03:55 pm »
The STR_MEDAL_IMPORTANT_MISSIONS_NAME doesn't seem to affect it - do you think I can safely ignore it?

Hmm.. not finding this in your setup.   I dropped it from mine.  The way this used to work is it was hard coded to ignore small craft and only award for medium and larger in vanilla.  I think this was tied to actual craft STR_ s but I'd have to try to winkle it out of the code to be sure. 

( this would be a great place to ask for the ability to externalize the requirements for the criteria.  i.e. totalImportantMissions = missions that do not include the following list of craft: (insert list of craft here, etc).

Because this was crafted for vanilla to track stuff beyond the small/medium/large scout milkrun grinds, I don't think in its current incarnation that it is a useful criteria for Piratez commendations.

Offline Dioxine

  • Commander
  • *****
  • Posts: 5412
  • punk not dead
    • View Profile
    • Nocturnal Productions
Re: [PirateZ] Commendations Mod 0.1
« Reply #19 on: July 27, 2016, 09:37:23 pm »
Yeah, I got "Important Missions" for doing Ratmen Rodeo + Church Raid (req. was 2 missions). I'll ignore it.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8597
    • View Profile
Re: [PirateZ] Commendations Mod 0.1
« Reply #20 on: July 29, 2016, 10:52:01 am »
Does anyone know a way to hide Commendation pedia articles, so they're only visible by clicking an award in soldier's Diary? You know, more achievement-like this way.

I am basically playing it like that at the moment.... not looking at them.
I can implement a feature that only Commendations that have been awarded at least once are shown... BUT... doesn't "achievement-like" mean exact opposite? That you see all possible achievements (like in Steam games) and try to achieve them? Just asking... I think there should be a way to display all somehow... so that people can read how to achieve some more difficult ones too.

Anyone has a (detailed!) idea how to best do this?

PS: btw. for people testing Commendations, there is a nice feature in debug mode: Ctrl+C deletes all commendations.
« Last Edit: July 29, 2016, 10:54:37 am by Meridian »

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8597
    • View Profile
Re: [PirateZ] Commendations Mod 0.1
« Reply #21 on: July 29, 2016, 04:05:54 pm »
Or maybe just put them into the STR_NOT_AVAILABLE section?

Code: [Select]
https:// This section is meant for articles, that have to be activated,
https:// but have no own entry in a list. E.g. Ammunition items.
https:// Maybe others as well, that should just not be selectable.
static const std::string UFOPAEDIA_NOT_AVAILABLE = "STR_NOT_AVAILABLE";

In any case, I have implemented a feature that Commendation articles are visible only if:
1. debug mode is on
2. or article has been opened at least once
3. or the medal is awarded to at least one soldier (please note that if you sell a soldier, you can lose access to the pedia entry, if you haven't opened it yet)

I will publish the code in the evening.

But please think about how and if to enable the users to see all articles anyway... maybe this should be a user option (default hidden) or maybe someone has a better idea?

Offline Dioxine

  • Commander
  • *****
  • Posts: 5412
  • punk not dead
    • View Profile
    • Nocturnal Productions
Re: [PirateZ] Commendations Mod 0.1
« Reply #22 on: July 29, 2016, 06:54:18 pm »
Your feature sounds nice. The STR_NOT_AVAILABLE doesn't work, since it also blocks viewing the article by clicking on a commendation. As for achievement-like - true, locked achievements are displayed on Steam, but aren't displayed in many games (like Terraria).
The easiest way out of this would be to enable displaying article upon clicking on the commendation in the Diary, even if it's STR_NOT_AVAILABLE. That way, a modder can either make commendations hidden or displayed.

Offline Shoes

  • Commander
  • *****
  • Posts: 502
    • View Profile
Re: [PirateZ] Commendations Mod 0.1
« Reply #23 on: July 29, 2016, 11:52:40 pm »
Discussions:
Replacing the vanilla ribbons with more piratey bling, eg, tattoos, or jewelry pieces. 
- This would most likely require re-coding how the graphics are displayed, and would need Meridian or Shoes, or some other willing soul to lend a hand.

Here is the code for printing the sprites: https://github.com/SupSuper/OpenXcom/blob/689371638dc85dffc928884f1313fb255c3c7384/src/Basescape/SoldierDiaryPerformanceState.cpp#L75

I imagine there are more locations, but I forget them and I can't find them! I think making new sprites will be easy enough, especially if you keep the same dimensions. If you wanted bigger sprites, you will need to spread things out more by making bigger rows or something. If you wanted different kinds of decorations (stars, skulls, scars, etc), that would need new code, but I don't think it would be too complicated to do :D

Good luck!! It makes me too happy to see this development!

Offline Dioxine

  • Commander
  • *****
  • Posts: 5412
  • punk not dead
    • View Profile
    • Nocturnal Productions
Re: [PirateZ] Commendations Mod 0.1
« Reply #24 on: July 31, 2016, 08:05:00 am »
@Meridian: tried to use it but doesn't work. If I make a Commendation Pedia entry to be STR_NOT_AVAILABLE, it stays unavailable even if it has been awarded. Clicking on such a Commendation in the Diary doesn't work either. Am I doing something wrong?

Also, on a general note - commendations that do not seem to work:
- Grenade kills
- totalShotAt10Times
- totalHit5Times
- totalWoundsHealed
« Last Edit: July 31, 2016, 08:31:19 am by Dioxine »

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8597
    • View Profile
Re: [PirateZ] Commendations Mod 0.1
« Reply #25 on: July 31, 2016, 09:02:31 am »
@Meridian: tried to use it but doesn't work. If I make a Commendation Pedia entry to be STR_NOT_AVAILABLE, it stays unavailable even if it has been awarded. Clicking on such a Commendation in the Diary doesn't work either. Am I doing something wrong?

Yeah, STR_NOT_AVAILABLE will not work, I just saw it in the code and thought it might. I can't change it because it would break vanilla.

But the user option I introduced is working, right?

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8597
    • View Profile
Re: [PirateZ] Commendations Mod 0.1
« Reply #26 on: July 31, 2016, 03:51:51 pm »
PS: btw. for people testing Commendations, there is a nice feature in debug mode: Ctrl+C deletes all commendations.

I have added a new shortcut (Ctrl+A in geoscape debug mode) to reset the whole diary of all soldiers, not just commendations.
You may need that when upgrading to 0.99A if you have used PirateZ Commendations mod before.

Offline ivandogovich

  • Commander
  • *****
  • Posts: 2381
  • X-Com Afficionado
    • View Profile
    • Ivan Dogovich Youtube
Re: [PirateZ] Commendations Mod 0.1
« Reply #27 on: July 31, 2016, 05:25:29 pm »
Also, on a general note - commendations that do not seem to work:
- Grenade kills
- totalShotAt10Times
- totalHit5Times
- totalWoundsHealed

1.  I haven't tested this in my campaign.  It should only work with timed and proxy explosives.  Black powder bombs and others like them won't count for this.
2.  This seems to work well for me.  My solo platemail gals on the Jetbike are getting these consistently as they soak up small arms fire.
3. Same as above
4.  I haven't tested this.  This is a late feature that Shoes added after I had been working with him.  I haven't looked at the logic in the code.  Its possible too that the logic may now be outdated by developments in the nightly so that it didn't make the migration well.

Offline Dioxine

  • Commander
  • *****
  • Posts: 5412
  • punk not dead
    • View Profile
    • Nocturnal Productions
Re: [PirateZ] Commendations Mod 0.1
« Reply #28 on: July 31, 2016, 06:55:35 pm »
1.  I haven't tested this in my campaign.  It should only work with timed and proxy explosives.  Black powder bombs and others like them won't count for this.

Ivan, I'm not a retard :) I got suspicious after I killed 6 Academy troops with a Hi-ex Pack and got nothing commendations-wise. (Also it would work for BP bomb here, since I have added "BT_FIREARM" as one of criteria, but that's beside the point - I was specifically asking about grenades).

Thanks for clarifying the others, though; maybe I'm just not giving the enemies a chance (and light armor so far - half of the hits end with wounds anyway, so maybe that's the problem).

But the user option I introduced is working, right?

...I don't know how to use it, if there ever was an explanation, I missed it :)
« Last Edit: July 31, 2016, 06:57:11 pm by Dioxine »

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8597
    • View Profile
Re: [PirateZ] Commendations Mod 0.1
« Reply #29 on: July 31, 2016, 07:25:17 pm »
...I don't know how to use it, if there ever was an explanation, I missed it :)

Just try starting a new game... do you see any condemnations in bootypedia?... the list should be empty by default.