OpenXcom Forum

Modding => OpenXcom Extended => OXCE Suggestions DONE => Topic started by: g5-freemen on March 26, 2016, 12:27:52 pm

Title: [DONE] [Suggestion] Soldier's nationality
Post by: g5-freemen on March 26, 2016, 12:27:52 pm
How about national identification of soldiers? Maybe it possible to add in soldiers stats flag to show where from this soldier? Ivan - Russian for example and etc.
Title: Re: Soldier's nationality
Post by: Solarius Scorch on March 26, 2016, 08:42:14 pm
Yeah, I'd like that too, but it's a UI problem - where should it be displayed?
Title: Re: Soldier's nationality
Post by: g5-freemen on March 27, 2016, 09:11:08 am
Yeah, I'd like that too, but it's a UI problem - where should it be displayed?
Something like that i think
Title: Re: Soldier's nationality
Post by: Meridian on March 27, 2016, 10:51:47 am
Yeah, if you're called John Smith, that would work... if you're called Charalampos Tsourakakis, the name would either be cropped or obstruct the flag.
Title: Re: Soldier's nationality
Post by: g5-freemen on March 27, 2016, 03:14:29 pm
Yeah, if you're called John Smith, that would work... if you're called Charalampos Tsourakakis, the name would either be cropped or obstruct the flag.
If you call a soldier Hubert Blaine Wolfeschlegelsteinhausenbergerdorff or something like that it will also cropped, but it looks not normal to give soldiers so long names.
Title: Re: Soldier's nationality
Post by: Meridian on March 27, 2016, 03:17:48 pm
So, I added the flag support...

In the attachment, there is:
- a mod for xcom1 called "World Flags" with 33 flags corresponding to xcom1 name files (arabic=egypt flag, polynesian=new zealand flag)
- a mod for piratez called "Pirate Flags" with 1 flag... guess which one :)

And a few screenshots.

PS: you will need OXCE 2.9+ v2016-03-27 (or higher) for this to work.
Title: Re: Soldier's nationality
Post by: ivandogovich on March 27, 2016, 03:20:29 pm
So, I added the flag support...
<snip>
...you will need OXCE 2.9+ v2016-03-27 (or higher) for this to work.

Damn, impressive!  You never disappoint!
Title: Re: Soldier's nationality
Post by: Countdown on March 27, 2016, 03:40:52 pm
Damn, impressive!
+1
Title: Re: Soldier's nationality
Post by: g5-freemen on March 27, 2016, 04:26:16 pm
This mod is unsupported by OpenXCom as i understand ?
Title: Re: Soldier's nationality
Post by: ivandogovich on March 27, 2016, 04:34:53 pm
This mod is unsupported by OpenXCom as i understand ?

Standard OpenXcom (Milestone 1.0 or Nightly) will not work for this mod.  This required custom code to be written and a Custom Executable.  Meridian wrote this code and added it to his build of OpenXcom Extended which is Yankes' custom executable.   Basically, for features beyond what is available within Rulesets (such as adding flags, wound indicators, etc.) you need custom builds of the executable.  Sometimes these features make it back into the main branch of OpenXcom and show up in a Nightly and somtimes they don't.
Title: Re: Soldier's nationality
Post by: Meridian on March 27, 2016, 05:21:56 pm
This mod is unsupported by OpenXCom as i understand ?

Just like you, I cannot commit anything into OpenXcom master.
(which is a good thing)

I can however commit into my own fork, and that's what I did. I even build and publish executables regularly. If that's not enough, there's always option for you to build your own executable based on whichever fork you want, including OpenXcom master.

If you wish, you can cherry-pick this change (https://github.com/MeridianOXC/OpenXcom/commit/7838c1a5ab5e6480e7aa1eb01455fc4e5d1cf3e8) into your local copy of OpenXcom master and build your own version that contains everything what a nightly OpenXcom build contains and this particular change on top.

Enjoy.
Title: Re: Soldier's nationality
Post by: g5-freemen on March 27, 2016, 08:20:25 pm
If you wish, you can cherry-pick this change (https://github.com/MeridianOXC/OpenXcom/commit/7838c1a5ab5e6480e7aa1eb01455fc4e5d1cf3e8) into your local copy of OpenXcom master and build your own version that contains everything what a nightly OpenXcom build contains and this particular change on top.

Enjoy.
Sorry, but i'm not programmer and don't know how to compile something. Better i'll drink some beer and maybe try OpenXcom Extended :)
Title: Re: Soldier's nationality
Post by: Solarius Scorch on March 27, 2016, 10:46:17 pm
Meridian, all my soldiers have the US flag. I can see the ruleset only contains sprites definitions, so everything else must be hardcoded, so I don't know what I could've done wrong.

EDIT: Nevermind, apparently it only works for new soldiers.

BTW do I need the Flags-orig folder?

Also: how do I add more flags? Because some of my men don't have one. What is the order?
Title: Re: Soldier's nationality
Post by: Meridian on March 27, 2016, 11:18:45 pm
Meridian, all my soldiers have the US flag. I can see the ruleset only contains sprites definitions, so everything else must be hardcoded, so I don't know what I could've done wrong.

EDIT: Nevermind, apparently it only works for new soldiers.

Nationality is assigned when a new soldier is created.
Old soldiers will have nationality = 0.
You can change the nationality in the save file (attribute "nationality").

BTW do I need the Flags-orig folder?

No.
I just forgot it there when I was changing the palettes.

Also: how do I add more flags? Because some of my men don't have one. What is the order?

Flag codes are Flag0, Flag1, Flag2 and so on...

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.

EDIT: new flags should have basescape palette, height max 20 (preferably equal to 20) and width max 40. I downloaded my flags from: https://flagpedia.net/
Title: Re: Soldier's nationality
Post by: Solarius Scorch on March 29, 2016, 05:21:15 pm
Thanks for the response.

I haven't modded the .nam files, so I'm unsure of what happened, but I'll check it more thoroughly.
Title: Re: Soldier's nationality
Post by: g5-freemen on April 11, 2016, 11:25:33 am
Meridian
Maybe you can also add flag to the inventory screen before soldier's name?

and maybe better to add some border around flag, because sometimes it looks not good - flag color is the same as name string color
Title: Re: Soldier's nationality
Post by: yrizoud on April 11, 2016, 01:15:38 pm
The issue with this belgian flag is that the black strip is color zero, and zero counts as transparent.
Need to modify the image to use color 15 instead.
Title: Re: Soldier's nationality
Post by: Solarius Scorch on December 17, 2016, 04:29:32 pm
I have a question regarding new nationalities. I want to add some more countries, because several major players are missing - for example Brazil, Canada, Iran.

Let's say I want to add Canada. Making a Canadian.nam file is obvious, but then what should I do with the flag?
The number of the flag corresponds to *.nam file alphabetical order, and Canadian.nam would go between Bulgarian.nam and Chinese.nam. This would mean that all flags starting from China will be mismatched.

Solution 1: call the new file ZZZ_Canadian.nam, to make sure it's the last one. But it's so dirty that I really don't want to do that.

Solution 2: manually change all affected flag numbers by +1. A better solution, though it seems kinda stupid.

Is there another way?
Title: Re: Soldier's nationality
Post by: Meridian on December 17, 2016, 04:35:08 pm
I'm not aware of any other solution.
I would go for #2.
Title: Re: Soldier's nationality
Post by: Solarius Scorch on December 17, 2016, 05:16:44 pm
I'm not aware of any other solution.
I would go for #2.

Understood, thank you.


EDIT: I really don't understand how this works...

In my XComFiles folder I made a folder named SoldierName. It contains all the .nam files, including the new one, Canadian.nam; 34 files in total.

Under
Code: [Select]
  - type: STR_SOLDIER
Code: [Select]
there is:
    soldierNames:
      - SoldierName/

So far, so good.

In extraSprites I have all flags defined:

Code: [Select]
  - type: Flag0
    singleImage: true
    files:
      0: Resources/Flags/00-USA.png
  - type: Flag1
    singleImage: true
    files:
      0: Resources/Flags/01-Egypt.png
  - type: Flag2
    singleImage: true
    files:
      0: Resources/Flags/02-Belgium.png
  - type: Flag3
    singleImage: true
    files:
      0: Resources/Flags/03-UK.png
  - type: Flag4
    singleImage: true
    files:
      0: Resources/Flags/04-Bulgaria.png
  - type: Flag5
    singleImage: true
    files:
      0: Resources/Flags/05-Canada.png
  - type: Flag6
    singleImage: true
    files:
      0: Resources/Flags/06-China.png
  - type: Flag7
    singleImage: true
    files:
      0: Resources/Flags/07-Congo.png
  - type: Flag8
    singleImage: true
    files:
      0: Resources/Flags/08-Czechia.png
  - type: Flag9
    singleImage: true
    files:
      0: Resources/Flags/09-Denmark.png
  - type: Flag10
    singleImage: true
    files:
      0: Resources/Flags/10-Netherlands.png
  - type: Flag11
    singleImage: true
    files:
      0: Resources/Flags/11-Ethiopia.png
  - type: Flag12
    singleImage: true
    files:
      0: Resources/Flags/12-Finland.png
  - type: Flag13
    singleImage: true
    files:
      0: Resources/Flags/13-France.png
  - type: Flag14
    singleImage: true
    files:
      0: Resources/Flags/14-Germany.png
  - type: Flag15
    singleImage: true
    files:
      0: Resources/Flags/15-Greece.png
  - type: Flag16
    singleImage: true
    files:
      0: Resources/Flags/16-India.png
  - type: Flag17
    singleImage: true
    files:
      0: Resources/Flags/17-Hungary.png
  - type: Flag18
    singleImage: true
    files:
      0: Resources/Flags/18-Ireland.png
  - type: Flag19
    singleImage: true
    files:
      0: Resources/Flags/19-Italy.png
  - type: Flag20
    singleImage: true
    files:
      0: Resources/Flags/20-Japan.png
  - type: Flag21
    singleImage: true
    files:
      0: Resources/Flags/21-Kenya.png
  - type: Flag22
    singleImage: true
    files:
      0: Resources/Flags/22-SouthKorea.png
  - type: Flag23
    singleImage: true
    files:
      0: Resources/Flags/23-Nigeria.png
  - type: Flag24
    singleImage: true
    files:
      0: Resources/Flags/24-Norway.png
  - type: Flag25
    singleImage: true
    files:
      0: Resources/Flags/25-Poland.png
  - type: Flag26
    singleImage: true
    files:
      0: Resources/Flags/26-NewZealand.png
  - type: Flag27
    singleImage: true
    files:
      0: Resources/Flags/27-Portugal.png
  - type: Flag28
    singleImage: true
    files:
      0: Resources/Flags/28-Romania.png
  - type: Flag29
    singleImage: true
    files:
      0: Resources/Flags/29-Russia.png
  - type: Flag30
    singleImage: true
    files:
      0: Resources/Flags/30-Slovakia.png
  - type: Flag31
    singleImage: true
    files:
      0: Resources/Flags/31-Spain.png
  - type: Flag32
    singleImage: true
    files:
      0: Resources/Flags/32-Sweden.png
  - type: Flag33
    singleImage: true
    files:
      0: Resources/Flags/33-Turkey.png

I start a new game, order 50 agents to test.

So far, so good. But in many cases the soldiers have no flag whatsoever. I'm not even sure how it is determined...
Title: Re: Soldier's nationality
Post by: Meridian on December 17, 2016, 05:24:44 pm
What numbers do the soldiers without a flag have in the "nationality" attribute?
Title: Re: Soldier's nationality
Post by: Solarius Scorch on December 19, 2016, 12:49:34 am
What numbers do the soldiers without a flag have in the "nationality" attribute?

Never mind, I solved it:

Code: [Select]
    soldierNames:
      - delete
      - SoldierName/

Apparently it was adding soldierNames from the mod with the original soldierNames. After I removed the latter, it works fine.


EDIT:

I was wondering if I should make a new thread, but this is appropriate enough.

I realized it's an elephant in the room, but can we somehow have weighs for countries? Right now, a new recruit has the same chance of being an American or a Bulgarian. While I have no doubt that there are many brave Bulgarians who are eager to protect the Earth, I think there are still more Americans or Russians, because the difference in population is humongous. Not to mention that some countries may, for different reasons, be more willing to give troops to X-Com - for example Japan, because of Kiryu-Kai.

Yes, having definable weighs for soldier nationalities would be good.
Title: Re: Soldier's nationality
Post by: Slaughter on December 19, 2016, 02:28:07 am
Good idea. Through you should look at how militarized Bulgaria was in WWI - I think 33% of bulgars were in the military?

Btw, soldier flags are a bit weird in that they often differ in size, which is odd.

Enviado de meu SM-G3502T usando Tapatalk

Title: Re: Soldier's nationality
Post by: Solarius Scorch on December 19, 2016, 03:34:55 am
Good idea. Through you should look at how militarized Bulgaria was in WWI - I think 33% of bulgars were in the military?

Then how about Ireland? :)

Btw, soldier flags are a bit weird in that they often differ in size, which is odd.

Sure! Would you like to be in charge of making standardized versions? :)
Title: Re: Soldier's nationality
Post by: Meridian on December 19, 2016, 11:21:43 am
Yes, having definable weighs for soldier nationalities would be good.

Your obsession with the unimportant, irrelevant and beyond cosmetic stuff never ceases to amaze me  :P

Anyway, with 30+ nationalities, it is already pretty rare to see all of them, I don't want to make it even rarer (all nations participating in openxcom have a right to appear). Also, I believe most of the people are renaming their soldiers, so I guess they will be changing the default nationality (and maybe even avatar) anyway... and the rest won't care.
Title: Re: Soldier's nationality
Post by: Solarius Scorch on December 19, 2016, 11:41:50 am
Your obsession with the unimportant, irrelevant and beyond cosmetic stuff never ceases to amaze me  :P

Dude, seriously? I mean, seriously? Really? You're not kidding, right?

Sure, let's get obsessed about stuff like shadows and smoke animations instead. That's totally relevant.

If this kind of thing is irrelevant, then why the hell did you add flag support at all?

Anyway, with 30+ nationalities, it is already pretty rare to see all of them, I don't want to make it even rarer (all nations participating in openxcom have a right to appear).

Does it mean we should get as many people from Iceland as from the US? What kind of equality principle is this?

Also, I believe most of the people are renaming their soldiers, so I guess they will be changing the default nationality (and maybe even avatar) anyway... and the rest won't care.

Where do you get this surprising data? And if it was true, again, why did you make the flag support at all?

To be honest, I don't really care that much. But you went too far. Calling world setting elements "beyond cosmetic" and me an obsessed madman isn't just unfair, it's really stupid. Not all my ideas are great, but I can't sit and just take it.
Title: Re: Soldier's nationality
Post by: Meridian on December 19, 2016, 11:56:39 am
I'm sorry.
Touched the sweet spot I guess, and the smiley wasn't enough to counter it.

To answer the questions:

1/ shadows and smoke animation is constantly visible throughout majority of the gameplay (let's be conservative and estimate 50% of time spent with the game); Nationality is visible for a couple of seconds per soldier hiring process (let's be generous and estimate 0.005% of time spent with the game)... uhm, yes, smoke and shadows are relevant, flags are not.

2/ I added flag support, because people asked for it... I'm not gonna "remove" it again by designating everyone as only American or Chinese

3/ Yes, I would like to see at least one person from Iceland in my roughly 30 person strong team... I believe in XCF the teams are even smaller, but I might be wrong

4/ It's exactly an equality principle: every nation which joins xcom project has to provide also soldiers, at least one

5/ I didn't get any data from anywhere, that's why I said "I believe"... all people I have seen playing xcom though, have been renaming their soldiers

Lastly, I didn't call you madman, and I'm sorry if it sounded that way.
I will refrain from posting on threads, where I have an opposing opinion from now on.

EDIT: btw. if you so insist, you can already increase the probability of Americans ruling xcom by copying their .nam file several times (and assigning the same flag). Three American name files equals 3-times higher probability.
Title: Re: Soldier's nationality
Post by: Solarius Scorch on December 19, 2016, 12:17:19 pm
I'm sorry.
Touched the sweet spot I guess, and the smiley wasn't enough to counter it.

Well, what can I say... I probably took it too seriously indeed. But these were harsh words.

1/ shadows and smoke animation is constantly visible throughout majority of the gameplay (let's be conservative and estimate 50% of time spent with the game); Nationality is visible for a couple of seconds per soldier hiring process (let's be generous and estimate 0.005% of time spent with the game)... uhm, yes, smoke and shadows are relevant, flags are not.

I think both things are relevant - smoke anims indeed more so, but nationalities are also something that's present all the time. I can't say they're not important at all. Why? Because it's something I look at frequently. I do sometimes think about stuff like, what language is my team probably using or whether is there a problem with putting an Indian and a Pakistani in the same car. I don't do it much, but it sort of comes up, and that's a fact. From your post I gather you consider this unusual, but I consider it normal.

So what about it? Nothing concrete, but it's not like it doesn't matter at all. If it did, why make all these nations instead of just one?

2/ I added flag support, because people asked for it... I'm not gonna "remove" it again by designating everyone as only American or Chinese

3/ Yes, I would like to see at least one person from Iceland in my roughly 30 person strong team... I believe in XCF the teams are even smaller, but I might be wrong

4/ It's exactly an equality principle: every nation which joins xcom project has to provide also soldiers, at least one

These are fair arguments. I wouldn't want to see only big players either. But I still think I would prefer to have some weighs - like, triple the chance for a big player than a small country. I'm also all for diversity, but as it is now, it looks a little bit unbelievable.
It's not a big deal, or an important feature. But still...

5/ I didn't get any data from anywhere, that's why I said "I believe"... all people I have seen playing xcom though, have been renaming their soldiers

I think LPs are different because the players take soldier requests and such. I did it in the orifinal game, because the name pool was so small and also because I wanted people from other countries too (we're on the same page here).

Lastly, I didn't call you madman, and I'm sorry if it sounded that way.

Yeah, sorry about overreacting too.

I will refrain from posting on threads, where I have an opposing opinion from now on.

Oh please, you know that's not what I want. :) You may actually be right anyway.

Remember it wasn't really a request yet, I was -and still am - just considering options.

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.
Title: Re: Soldier's nationality
Post by: Meridian on December 19, 2016, 12:29:45 pm
But I still think I would prefer to have some weighs - like, triple the chance for a big player than a small country.

See end of previous post.

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.

I didn't know where to put it, there was no space left anywhere.
Also, we would need a second set of flags with battlescape palette.
Title: Re: Soldier's nationality
Post by: Solarius Scorch on December 19, 2016, 12:38:34 pm
See end of previous post.

Ah yes, I can see the edit now.

Yes, it would work. Not very comfortable, but yeah.

I didn't know where to put it, there was no space left anywhere.
Also, we would need a second set of flags with battlescape palette.

There's a lot of talking about expending the Diary section, so eventually there, probably. For now, like all the junk info:

(https://i.imgur.com/94rB0t3.png)

:)

If you ever feel like it, I think it would be worthwhile to do so. As a modder, I have no problem with maintaining a second set of flags.
Title: Re: Soldier's nationality
Post by: Meridian 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?
Title: Re: Soldier's nationality
Post by: Solarius Scorch 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:

(https://i.imgur.com/rdRspZk.png)

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.
Title: Re: Soldier's nationality
Post by: Forez 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
Title: Re: Soldier's nationality
Post by: niculinux 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  (http://openxcom.org/forum/index.php/topic,4442.msg61114.html#msg61114)

By now there is no nigtlhy  mod for this, please correct me if i am wrong. :)
Title: Re: Soldier's nationality
Post by: Countdown 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  (http://openxcom.org/forum/index.php/topic,4442.msg61114.html#msg61114)

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.
Title: Re: Soldier's nationality
Post by: FozzeY 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:
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:
(https://i.imgur.com/y9FaBKx.png)
(https://i.imgur.com/XV1ZlWU.png)
(https://i.imgur.com/muxBFyt.png)
Let me know what you think. I'm going to implement flags for the battlescape next.
Title: Re: Soldier's nationality
Post by: RockDoctor 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 (http://"https://en.wikipedia.org/wiki/ISO_3166-1_numeric") (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 (https://en.wikipedia.org/wiki/Flag_of_Earth). (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.
Title: Re: Soldier's nationality
Post by: Meridian 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...
Title: Re: Soldier's nationality
Post by: RockDoctor 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.
Title: Re: Soldier's nationality
Post by: SupSuper 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.
Title: Re: Soldier's nationality
Post by: Meridian 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
Title: Re: Soldier's nationality
Post by: SupSuper 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.