aliens

Author Topic: [DONE] [Suggestion] Soldier's nationality  (Read 25929 times)

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9101
    • View Profile
Re: Soldier's nationality
« Reply #30 on: December 19, 2016, 12:52:52 pm »
I like how you've elegantly squeezed it there :)
But it would look more like attached... with current 20px height.

Your example would be 16px height... I'm not sure if you can go that low without losing too much detail... maybe try 1-2 most complicated?

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11730
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Soldier's nationality
« Reply #31 on: December 19, 2016, 01:01:55 pm »
I actually enlarged that flag, not shrank it. :) But I was working with a screenshot, so I guess it scales differently in game.

As you know, the flags vary wildly in proportions, so I guess it'd require making standardized versions - for example 16x24 pixels. Here's the flag of Israel, which I think is the most problematic due to the star pattern:



I think it looks well enough.

Since we would need new files anyway (because of the battlescape palette), there's no problem with doing so.

Offline Forez

  • Sergeant
  • **
  • Posts: 10
    • View Profile
Re: Soldier's nationality
« Reply #32 on: July 28, 2017, 02:56:27 pm »
But that should have some effect- soldier from a given area should receive a temporary [small] boost in statistics in a ground mission

niculinux

  • Guest
Re: Soldier's nationality
« Reply #33 on: October 04, 2017, 08:18:09 pm »
EDIT: Is it possible to check the nationality in battlescape? Because that's when I usually feel like looking it up, and it seems I can't.

Well I really to wish that!  As far as I got searching forum/mod portal seems nationality flag dysplaying is an openxcom extended feature, very kindly provided by Meridian, from openxcom extended+ 2.9 and on

By now there is no nigtlhy  mod for this, please correct me if i am wrong. :)

Offline Countdown

  • Colonel
  • ****
  • Posts: 246
    • View Profile
Re: Soldier's nationality
« Reply #34 on: October 06, 2017, 04:23:42 am »
Well I really to wish that!  As far as I got searching forum/mod portal seems nationality flag dysplaying is an openxcom extended feature, very kindly provided by Meridian, from openxcom extended+ 2.9 and on

By now there is no nigtlhy  mod for this, please correct me if i am wrong. :)
Yes, this feature is only in OXCE+ (maybe also OXCE, but I'm not sure). This is not in the Nightlies.

Offline FozzeY

  • Squaddie
  • *
  • Posts: 1
    • View Profile
Re: Soldier's nationality
« Reply #35 on: March 13, 2018, 12:26:02 am »
Hi everyone.

I've had the idea of soldier flags in Xcom for quite a while, and since it's already implemented I decided to improve it a bit.

List of changes:
  • Fixed transparent black color.
  • Flags are now 23px high with a border to the left to match the rank insignia.
  • Preserved the aspect ratios of flags, max width 46px. Unless someone decides to add Qatar.
  • Nationality is stored as a string, so you don't have to shift the indices manually when adding a nation.
  • Added Switzerland as a proof of concept (credit to OliP for providing the name pool).
  • Replaced the "Arabic" flag with the Saudi Arabia one.
Known issues: when changing the soldier's flag on the info screen, the list cycles through from the beginning. The price to pay for getting rid of the indices, but storing two values for that seemed redundant.

Github fork: https://github.com/FozzeY/OpenXcom/tree/oxce3.5-plus-proto-flagfix

Here's what it looks like in-game:
Spoiler:



Let me know what you think. I'm going to implement flags for the battlescape next.
« Last Edit: March 13, 2018, 12:31:35 am by FozzeY »

Offline RockDoctor

  • Squaddie
  • *
  • Posts: 9
    • View Profile
Re: Soldier's nationality
« Reply #36 on: March 24, 2018, 10:12:25 am »
The number correspond to *.nam file alphabetical order, i.e.:
American = US flag = 0
Arabic = Egypt flag = 1
Belgium = 2
British = 3
Bulgarian = 4
...
...
Turkish = 32

If you have different *.nam files, your ordering will be different.
Isn't this rather setting up for unnecessary maintenance in he future? There's a long-established system for encoding country/ nationality names. It may be convenient to create something new for a first-run test, but unless you want to be dealing with 184 (or is it 196, I forget) entries in the code table, as well as needing maintenance when new countries/ nationalities are created / merged ... well, it's your code.
ISO-3166 - which uses well-known 2-letter codes (EN, AU, CA, US, for example ; if you think "they look like internet top-level domains", you're pressing the right button. Slightly less well known are the equivalent 3-digit codes (826, 036, 124, 840 for the same countries ; if you think they look like DOS code page numbers, you're right).

To quote two lines from the Wiki page,
Quote
An advantage of numeric codes over alphabetic codes is script (writing system) independence. (...)
Another advantage is that when countries merge or split, they will get a new numeric code

The needs of users who need to add their own distinctions (trivially, the Pirate nation ; less laughably you might wish to distinguish between USians and members of the Navajo Nation. For this, there are codes 900 to 999.

How to interpret a NULL or NaN code - e.g. your "unassigned" status issue ... might be covered in the detailed ISO (they tend to have thought these things through). Or you could assign a whole-Earth nationality and flag. (I'll note that the space view is from approximately above the "Cradle of Humanity" in East Africa", where humans originated.)

Anyway, your code. Sounds a fun idea.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9101
    • View Profile
Re: Soldier's nationality
« Reply #37 on: March 24, 2018, 10:19:24 am »
Sure, if I could do it from scratch, I would do it differently.

The nationalities were in the game from the beginning, and they were implemented this way... I kept this in order to preserve backwards-compatibility.

I've only added the flags...

Offline RockDoctor

  • Squaddie
  • *
  • Posts: 9
    • View Profile
Re: Soldier's nationality
« Reply #38 on: March 24, 2018, 11:06:53 am »
Ah.
I'm not sure I saw any indication of a nationality effect in the original game. Once the soldiers arrive, the only effect I could see is the name. And After each soldier survives their first mission, I erase the name in preference to Soldier statistics (Health, Strength, Kills, Missions) so I can decide who to put onto the mission, who to put in to Psi training, who gets armour plating, etc.

Offline SupSuper

  • Lazy Developer
  • Administrator
  • Commander
  • *****
  • Posts: 2162
    • View Profile
Re: Soldier's nationality
« Reply #39 on: March 25, 2018, 12:12:25 am »
There is no "nationality" in OpenXcom. That is to say, the game's just pulling names out of a hat and they are otherwise meaningless to the game. I intentionally avoided putting meaning to them because that is a whole subjective geopolitical nightmare I don't wanna get into.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9101
    • View Profile
Re: Soldier's nationality
« Reply #40 on: March 25, 2018, 12:24:08 am »
Understood and agreed.

I don't like to look like a liar however... so for future generations, here's what I meant: https://github.com/SupSuper/OpenXcom/blob/master/src/Savegame/Soldier.cpp#L66

The nationalities were in the game from the beginning, and they were implemented this way... I kept this in order to preserve backwards-compatibility.

"The nationalities were in the game from the beginning" corresponds to red circle
"and they were implemented this way" (i.e. as numbers indexing an array, or a vector if you wish) corresponds to blue rectangle

Offline SupSuper

  • Lazy Developer
  • Administrator
  • Commander
  • *****
  • Posts: 2162
    • View Profile
Re: Soldier's nationality
« Reply #41 on: March 25, 2018, 10:17:10 pm »
Fair enough, though you could put whatever other metadata you wanted in SoldierNamePool and get it back out without changing that.