MegaMek / mekhq

MekHQ is a java helper program for the MegaMek game that allows users to load a list of entities from an XML file, perform repairs and customizations, and then save the new entities to another XML file that can be loaded into MegaMek.
http://megamek.org
131 stars 168 forks source link

Feature Request: Awards for personnel #547

Closed hell-fish closed 6 years ago

hell-fish commented 6 years ago

Hi

This may sound pretty minor, but I'm playing a non-mercenary campaign at the moment, and I wish I had the ability to grant the characters in my unit medals and awards. Doesn't have to be terribly complex, just go into the personnel tab menu and do something like right-click to grant an award to a character from a list. Sorta like how you change their rank.

On right click:

Award:

Award 1 Award 2 Award 3 ...

And maybe somewhere in the campaign options menu we can chose a pre-made list of awards (Davion, Kurita, etc.) or customize them with images (like portrait pics). Thus, when my unit deploys to Carver V for a 3-month mission, when it's all said and done, I can give them all a Carver V campaign medal, and then other medals for the characters who did important stuff, like held off a Blakist assault in a half-destroyed Locust or rescued the civilians in one of those special missions.

Like I said, minor, but it could go a way to helping me humanize my little puppet soldiers.

BLOODWOLF333 commented 6 years ago

@Dylan-M what ever happened with that?

pheonixstorm commented 6 years ago

He said there were issues that still needed to be worked out iirc.

BLOODWOLF333 commented 6 years ago

Awards.zip

My images for ranks, service stripes, and campaign ribbons. Along with just the rank portion of my scenario generator spreadsheet since this keeps getting brought up now and then.

bandildo commented 6 years ago

I got a working version going on, with some work still need to be done. Here's how it looks:

awards1 awards2

So, a couple of questions I'd like to debate:

    combatCommendation.description=Company Kills 72
    combatCommendation.medal=CombatCommendationM.png
    combatCommendation.ribbon=CombatCommendation.png
    combatCommendation.text=Combat Commendation
    combatCommendation.xp=2

I wonder if I ought to put instead in a xml, so it would be easier to add and edit new awards. The user could select which award set to use in the campaign options, just like @hell-fish suggested. However, this wouldn't allow us to enforce the award conditions (e.g. disabling the button to award something that requires X kills if the person has less than that), since that would need to be hard-coded.

Dylan-M commented 6 years ago

I started the work needed to do this as an overlay on the portrait because I also needed the same code for doing layered TO&E images. There should be 2 images for each award: Full award like you've got, and also the small ribbon that would normally be worn on the left breast of most uniforms. It is that smaller ribbon that would be used as part of the overlay on the portrait.

bandildo commented 6 years ago

You mean something like this? (quickly done in mspaint)

image

If so, seems like a neat discrete way of showing the ribbons. It's just a shame they are so small, because they are really beautiful.

hell-fish commented 6 years ago

Having them on the portraits doesn't seem optimal to me - you might have an elite 20 year veteran with a fruit salad as a portrait. I think bandildo (bandildo??) has the right idea with the full medals under the portrait and stat box. Using .xml too, I think, would be best as it would better allow the player to make/edit his own medals. Your merc company might use current American medals for their graphics, but mine might use imperial Austro-Hungarian medals and we might have different ideas in criteria for our medals. If I want to give a Victoria Cross or Medal of Honor equivalent to a guy piloting the light mech that killed an assault mech, I should have the freedom to do so. Someone else may just want to let him get to 5 total kills before a medal is automatically rewarded.

Great work on the first go!

On Thu, Jul 5, 2018 at 7:02 PM, bandildo notifications@github.com wrote:

You mean something like this? (quickly done in mspaint)

[image: image] https://user-images.githubusercontent.com/12190053/42339699-a8a16dda-8085-11e8-9349-ee1674024488.png

If so, seems like a neat discrete way of showing the ribbons. It's just a shame they are so small, because they are really beautiful.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/MegaMek/mekhq/issues/547#issuecomment-402805866, or mute the thread https://github.com/notifications/unsubscribe-auth/AgaQ5r6KdVoyi7M2RhL4ysfMHJzGTdaOks5uDlTGgaJpZM4Qqe0w .

NickAragua commented 6 years ago

I'm looking forward to seeing this as a pull request.

I agree that the medals should be defined in xml for greater flexibility. As far as having criteria for preventing/allowing medal awards, we can either a) leave it to the user, or b) allow the xml to specify some rudimentary criteria. Option b is obviously more work-intensive, and it may be a good idea to not do it for the initial implementation. Also, keep in mind that everyone has different thoughts on when medals should be available for award. Somebody may feel a need to award a medal for getting a five rear arc kills in a row while the target is in swamp terrain. I don't know that it's practical to anticipate all these possibilities.

A good compromise location for the medals would be below the portrait, to avoid the described fruit salad problem.

HammerGS commented 6 years ago

Also looking forwarding to seeing this. Personally I prefer the option in screen shot two. Also I think everything needs to be as player configurable as possible.

pheonixstorm commented 6 years ago

For the final image shown... No. They would need to be below the portrait as well. Either above or below the medals.

hell-fish commented 6 years ago

Will this feature allow non standard medals too? Some of the canon awards are things like big stars and sashes and stuff On Thu, Jul 5, 2018 at 10:04 PM pheonixstorm notifications@github.com wrote:

For the final image shown... No. They would need to be below the portrait as well. Either above or below the medals.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/MegaMek/mekhq/issues/547#issuecomment-402851982, or mute the thread https://github.com/notifications/unsubscribe-auth/AgaQ5scTZRA4n9Iqi8_YQwtuAhYVkzIeks5uDn9WgaJpZM4Qqe0w .

BLOODWOLF333 commented 6 years ago

Chappy also has a bunch of awards images and some faction specific ones and has posted them on the Megamek slack.

pheonixstorm commented 6 years ago

The initial idea I had that I shared with ralgith was to base the campaign ribbons on the contract followed by an upgrade for each scenario after the first.

ie First mission gives you a ribbon of x color or x x x colors. The next mission you get a single bronze star, next followup 2 bronze stars. Each series (bronze, silver, gold) would be no stars, 1 star, 2 stars, 3 stars, one large star, and maybe a border change to allow for 5 missions before bumping to the next color. Each contract ribbon could be designed in the contract the same as the toe images for the background. The scenarios decide the ribbons value (and number of scenarios fought for each individual.

bandildo commented 6 years ago

So something like this seems the best way to go? awards_mock

It looks nice, though the details of the ribbons are lost in resolution. But we have to choose either taking up space or not noticing the details. Can't have both.

I will then change it so we can add them via .xml

I was thinking about creating a sub-category in the menu, something like: Award > Award-Set-1 > Award 1.1 / Award 1.2 / etc Award > Award-Set-2 > Award 2.1 / Award 2.2 / etc This way we can leave the campaign options out of this. You are free to select awards from any set and mix them up, organize them as you wish. Award-Set-1 could be the current american medals, Award-Set-2 the Austro-Hungarian set, etc. However, this could be confusing for new users, as they will feel overwhelmed by the amount of medals. Did I just talk myself out of this idea? Would it be better to select an award set in the campaign options?

I will have to agree with @NickAragua about the prevention/allowance of medal awarding: it's not like it is difficult to "cheat" when playing AtB, anyways. We could have in the future some default awards, like the ones @pheonixstorm mentioned. That could use this framework, but then the awards would be hard-coded and automatically awarded. Seems something to do afterwards. I really enjoy the idea of auto-awarding some awards, it is always rewarding for a player to get something automatically. Also some "loyalty" awards would be interesting, for every X contracts completed for faction Y.

@hell-fish each award will have the possibility to have a ribbon image and a medal image. Both, only one or none at all. Medals will be displayed like shown in the first screenshots, ribbons will be under the portrait or somewhere else. You will be free to put whatever you wish as an image. Even a pin-up mech if you wish to have the kill-count in there :)

I will also add the "stackable" property for each award. This way you could award your pilot 3x the Purple Heart, or limit it to a single War of 3039. I was thinking of showing multiple instances of the medals, but only a single ribbon, even if it is stackable. Does this make sense?

BLOODWOLF333 commented 6 years ago

Can the ribbons be centered and are they following the order of precedence from the real-world military as well?

Like this: https://bg.battletech.com/forums/index.php?topic=55368.0

Patriot1776 commented 6 years ago

Why not have a separate tab for the awards?

NickAragua commented 6 years ago

That makes sense for the 20-year veteran whose got more medals than space on the chest. I'm somewhat concerned about the scope creep of it, as adding an extra "medal case" tab would mean extra coding. I'll leave it up to the coder. As long as the medal-rendering code is pretty modular it shouldn't be hard to move it around later if we feel a need to.

Patriot1776 commented 6 years ago

It was an idea. :)

BLOODWOLF333 commented 6 years ago

So they way I have been doing it is I use the colored ink portraits that can be downloaded off the megamek.org site. (I use Gimp as my image editor its similar to photoshop I hear)

  1. Resize the image to 150x150 after MekHQ randomly pics what image to use for the person.
  2. Add 10 pixels of transparency to the bottom of the portrait for the first row of ribbons (I use the medals as unit awards to be added to the force icons in the TO&E)
  3. Shrink my ribbons down to 10x30 pixels so five will fit in a row (centered).
  4. Add another 10 pixels to the bottom of the portrait if they gain more than 5 different ribbons and need another row, always keeping the highest ribbon on top then going according to the order of precedence to the right, with the lowest ribbon at the bottom right.
  5. And the ranks and service stripe images yeah those would be a different thing apart from this @bandildo (I imagine a new column in the rank section of the campaign options allowing the user to define the images for each rank and it writing the filepath of the image into the xml).
  6. All the medals in my zip have a corresponding ribbon (we only wore our medals when wearing dress blues in the USMC, the other dress uniforms it was just ribbons only along with our shooting medals) so, displaying the medals version somewhere else would save space restricting the portrait to ribbons only just as a suggestion.
bandildo commented 6 years ago

@BLOODWOLF333 that looks great, will aim to do it like so. Which is the real-world order? I could also add a "importance" property to each award. You also seem to have found a quite nice place to put the insignias. I would then use @Dylan-M code for layered images.

@Patriot1776 in my opinion it looks best to decorate the rather-bland panel, it gives more life and personality to the personnel.

BLOODWOLF333 commented 6 years ago

Order of precedence chart for sorting high to low. https://www.medalsofamerica.com/content--name-army-medals-and-ribbons-chart

this site is also where I got all of my medals and ribbons images after trimming them and removing the backgrounds in Gimp.

NickAragua commented 6 years ago

@bandildo There's some offline discussion happening, and the consensus seems that the medal ribbons should go below the portrait, to avoid the fruit salad problem. Bloodwolf's renders seem to solve the problem pretty well, so I endorse going with that kind of approach.

BLOODWOLF333 commented 6 years ago

Yeah I used to have the ribbons display over the portrait and a 20 yr SgtMaj mechwarrior's face would end up getting covered by the ribbon stack so had to start arraying them below the portrait. HQ would always scale the image just fine with no problems. And where ever you put the medals (idk how hard this would be to code) but, can have the upper row overlap the lower row of medals to compact it and save space as well just like on our uniforms.

github

pheonixstorm commented 6 years ago

Just put the ribbons in the same way as the medals from the second pic, right above the personnel log. Best spot for them and reusable whenever unit citations become a thing (planned).

hell-fish commented 6 years ago

I’m not a big fan of the overlap idea, if only because I think of the biography page as more like a DD-214 type of personnel record rather than an official portrait. I’d rather have a full record with full medals and awards that takes up the extra space than anything too small or compact to fully appreciate. I mean, our characters practically get a full, illustrated medical record already anyways, why not go all in on something so very meta and so very involving for a player commanding a unit? On Fri, Jul 6, 2018 at 3:16 AM pheonixstorm notifications@github.com wrote:

Just put the ribbons in the same way as the medals from the second pic, right above the personnel log. Best spot for them and reusable whenever unit citations become a thing (planned).

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/MegaMek/mekhq/issues/547#issuecomment-402905184, or mute the thread https://github.com/notifications/unsubscribe-auth/AgaQ5o1NMbCcNljHhbwQ1F32v2W-pqAIks5uDsh3gaJpZM4Qqe0w .

Patriot1776 commented 6 years ago

I'm for the separate tab to put the awards. Maybe include a field where a person can input what the character did to receive the award. Under the portrait will make it hard to see for some of us that are visually challenged and can lead to overlap problems if said character does a lot of missions. Why hide that beautiful artwork in such a way?

mchapman1970 commented 6 years ago

yes Bloodwolf is correct i have medals for all five factions and how they obtain them. I took what lorehad. and then added more. i also went and look at foreign armys to get ribbons color and also names for specialized medals.

Dylan-M commented 6 years ago

@hell-fish You wouldn't actually overlap them. You would row them along the bottom. The original discussion for doing this involved having the standard campaign ribbons along the bottom edge of the portrait, new rows going down, and then also having a separate place for the full awards and honors. I still believe it should be done this way. Also, the sample image @bandildo did had the ribbons far larger than was done in the original concepts also. In the original concepts, you could fit a row of 5 ribbons across the bottom of the portrait.

At any rate, good luck and have fun.

mchapman1970 commented 6 years ago

amir

something like this???

Patriot1776 commented 6 years ago

I do like that a lot better then the other way that was shown.

pheonixstorm commented 6 years ago

I think the dates and descriptions should go in the personnel log instead of adding an extra log like that though.

mchapman1970 commented 6 years ago

leftenant general valeria skidmore

I was tinkering with this a few months ago not sure if anyone would want this or if it is going to deep

pheonixstorm commented 6 years ago

Yeah that's a bit too much

NickAragua commented 6 years ago

It looks like people have all kinds of opinions on this matter. My suggestion is to go with https://user-images.githubusercontent.com/12190053/42338759-cab227c8-8082-11e8-8ea5-7ccda4887422.png and https://user-images.githubusercontent.com/12190053/42354677-58be2f84-80c0-11e8-957c-613658430ad0.png as originally planned.

My other main recommendation is to use good encapsulation on the medal/ribbon rendering code so that you can easily find and change it later, or invoke it from somewhere else without too much trouble.

pheonixstorm commented 6 years ago

The second linked image won't work though. It will waste a lot of space compared to having both the medals and campaign ribbons using the same design as the first linked image.

hell-fish commented 6 years ago

I think I like the LTG Connor Amir graphic the best. Not sure about the programming, but it looks the most flexible of all the options - ribbons, skill badges, etc. The one with the uniform just seems too tricky - how would the player chose what to put where?

On Sat, Jul 7, 2018 at 5:24 AM, pheonixstorm notifications@github.com wrote:

The second linked image won't work though. It will waste a lot of space compared to having both the medals and campaign ribbons using the same design as the first linked image.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/MegaMek/mekhq/issues/547#issuecomment-403187546, or mute the thread https://github.com/notifications/unsubscribe-auth/AgaQ5sC2fh4vhizWo6EzKf4AmJf5LzzKks5uEDflgaJpZM4Qqe0w .

mchapman1970 commented 6 years ago

yeah the second pic with the uniform i was trying something out. the badges on the right were just showing how many campaigns she was in and of course her commander badge. idk how u would code it. it was bitch doing it in gimp she is the only one i did that for. i am excited about this feature so like i said whatever the coder does i will be happy. and if we could maniulate the names and such in xml i would be in heaven. lol.

bandildo commented 6 years ago

So I guess this will be the "final" version on how it will look:

awards3

What do you guys think?

I will then implement everything using .xml. If anyone doesn't suggest otherwise, I think I'll leave the award sets out of the campaign options, and let the player choose on the fly via an intermediate menu.

Any more suggestions or feedback?

There is still a lot of cleanup to do and bug cracking until this becomes a pull request.

BLOODWOLF333 commented 6 years ago

Super sweet! Is it going to be too difficult to make the medals layer over each other with the top row offset from the one below it?

image

mchapman1970 commented 6 years ago

looks good. cannot wait to test it.

bandildo commented 6 years ago

@BLOODWOLF333 to be honest, I have absolutely no idea how the overlapping can be done. I'll investigate in the next opportunity, since it certainly looks neater.

Thanks for all the positive feedback :)

firefly2442 commented 6 years ago

Here's the awards page on Sarna. Not sure if we can use the images (copyright?) but maybe the text of the award names?

mchapman1970 commented 6 years ago

by using xml I will be able to create more medals or ribbons. and set the criteria? is that correct?

pheonixstorm commented 6 years ago

The campaign ribbons look like a mess that way... Too small and looks like a rainbow smashed together.

The medals look fine, though should be centered and inside the same type of ui element that the description/personal log uses to match the rest of the pane.

mchapman1970 commented 6 years ago

I like the ribbons and the medals the way he shows it...I am happy that we are getting these

pheonixstorm commented 6 years ago

We were getting it this dev cycle anyway lol

As for the ribbons though they really should be larger and done in the same way as the medals just to make it all neat. Not everyone uses a large resolution monitor so the smaller the resolution the worse it will look in the end. Not to mention how it will look for a pilot with 50+ ribbons. Would leave a lot of wasted space overall.

BLOODWOLF333 commented 6 years ago

image

No the ribbons should be done exactly the way he showed under the portrait that is just lik ehow the real world military does it. It looks good and correct I completely disagree with pheonixstorm's opinion.

bandildo commented 6 years ago

Okay, so I think I'm very close to wrapping this up.

Here's how it is looking:

awards

And the .xml is as follows:

awards2

As for the parameters:

As you can see in the first screen capture, we now can have multiple sets. To get everything working, to create a set named DEFAULT_SET, one should:

If anyone wishes to make the default set that will be included in every release, that would be extremely helpful. Just remember that the ribbons will be re-sized to 25x8 and the medals to 28x61 (let me know if you wish to change these values).

I will just take a look into overlapping the medals, which I believe it is the only thing missing before pull requesting this feature. Any tips on that?

EDIT: Also thought about adding the option to remove an Award. Should that be available in GM Mode only?

hell-fish commented 6 years ago

Great work, but I foresee a bit of a problem. Namely, very few canon medals, ribbons and awards would fit well into a 25x8 or 28x61 pixel format. Just a quick scan, it looks like much fewer than half the canon awards would fit well into this format, and many are not even medals or awards as we know them in the 21st century. http://www.sarna.net/wiki/Awards Some of them are badges or sashes or draped around the neck. The friggin' Steiners even have an award made out of an old propeller that could never look right with the current options.

I think we (er, you - sorry I can't do more than critique) should make some provision for these now as long as we're setting up the baseline for the capability. Maybe it could be as simple as adding a 150x150 pixel option/line or something? I think most of those weird awards could fit into something like that and still be recognizable, though in some cases we might just have some extra white space.

Thanks for the excellent work!

On Tue, Jul 10, 2018 at 6:02 PM bandildo notifications@github.com wrote:

Okay, so I think I'm very close to wrapping this up.

Here's how it is looking:

[image: awards] https://user-images.githubusercontent.com/12190053/42524932-d0bdf5ee-8469-11e8-8628-52553c219ebd.png

And the .xml is as follows:

[image: awards2] https://user-images.githubusercontent.com/12190053/42524940-dcc92cb4-8469-11e8-80a4-17a390a62006.png

As for the parameters:

  • Name and Description: self-explanatory;
  • Medal: medal file name;
  • Ribbon: ribbon file name;
  • XP: experience awarded to the person who gets the award. Also, the importance of the award is evaluated by the amount of XP given (e.g. to decide in which order they appear in the UI);
  • Stackable: by default/omission it is set as false. In case it is set as true, the award can be awarded multiple times to the same person.

As you can see in the first screen capture, we now can have multiple sets. To get everything working, to create a set named DEFAULT_SET, one should:

  • Name the .xml as DEFAULT_SET.xml
  • Create the folder /image/awards/DEFAULT_SET
  • Inside the previous folder there should be a /medals and a /ribbons folder, where the respective files should be placed.

If anyone wishes to make the default set that will be included in every release, that would be extremely helpful. Just remember that the ribbons will be re-sized to 25x8 and the medals to 28x61 (let me know if you wish to change these values).

I will just take a look into overlapping the medals, which I believe it is the only thing missing before pull requesting this feature. Any tips on that?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/MegaMek/mekhq/issues/547#issuecomment-403895582, or mute the thread https://github.com/notifications/unsubscribe-auth/AgaQ5n-JdxtaWrSPgvjGwo4KJOIj9GdTks5uFN47gaJpZM4Qqe0w .

bandildo commented 6 years ago

@hell-fish thank you for the feedback.

What if we created a third category next to the medals and ribbons, that would accommodate these awards? We could add them in a row above/below the current medal's one. We could also set a maximum size of 150x150, for example, therefore it could accommodate without stretching/resizing anything below those values. It won't be OCD-friendly by allowing to have things of different sizes, however.

This way, anyone who doesn't like the small ribbons, could add the real-size ribbons to this new category and they will appear above the medals in a bigger size.