Jump to content
madrussian

Global Mobilization faction flag textures issue

Recommended Posts

Adding Global Mobilization support to my dynamic mission (inching forwards towards release, at this pace hopefully within one week now!)

 

Upon startup, my mission scans the configs and lets you pick any faction for player, player support faction, enemy faction, etc.  (Kinda like Dynamic Recon Ops, where I got faction selection idea though my mission is totally different than DRO.)

 

I use configfile >> "CfgFactionClasses" >> _faction >> "flag" to get the flag textures.  Some faction classes have a flag entry, some don’t.  When flag texture is not present, I borrow flag textures from configfile >> "CfgMarkers" >> _type >> "texture", where appropriate.  (Many nation’s flags are in there.)

 

With GM factions selected, setFlagTexture is called on these GM textures and I was getting an error “Picture \gm\gm_core\data\flags\flag_ge_co not found”.  I checked the config and all the GM faction flag entries have a format like this:

 

Quote

configfile >> "CfgFactionClasses" >> "gm_fc_GE" >> "flag" = "\gm\gm_core\data\flags\flag_GE_co";

 

With vanilla factions (and all mods’ factions besides GM), the entry looks like this:

 

Quote

configfile >> "CfgFactionClasses" >> "BLU_F" >> "flag" = "\a3\Data_f\Flags\flag_nato_co.paa";

 

Seems GM’s faction flag entries are simply missing the “.paa” at the end so I tired adding it, but still getting the “Picture not found” error.  Anyone know if these GM faction flag entries are just bugged?

 

I would simply look inside the GM addons to see what’s going on, but I can’t because (again) they are EBOs (encrypted PBOs)!  So I thought better head to GM Discord and ask team, but I’d rather not bug em until I exhaust all options.

 

So I checked inside "CfgMarkers" to see if there are suitable flag textures in there.  I need West German, East German, and Danish flags.  Turns out, in here GM has good flag paths (with ".paa") for Austria, Bulgaria, Finland, East Germany, Romania, Sweden, Turkey, and the Soviet Union.  Which is awesome because it looks like GM devs are planning on expansion!

 

Now, good to go for East Germany ("\gm\gm_core\data\flags\gm_flag_GC_marker_ca") and Denmark (“\A3\ui_f\data\map\markers\flags\Denmark_ca.paa"), but still nothing for West Germany.  So now I am using "\A3\ui_f\data\map\markers\flags\Germany_ca.paa" (modern flag?) for West Germany as a placeholder, but it looks pretty silly for 1980s and would much rather have actual West German flag texture.

 

Here are the quick questions:

1. Anyone know how to make "\gm\gm_core\data\flags\flag_GE_co" work with setFlagTexture?

2. Otherwise, anyone know path to West German flag texture (with ".paa")?

 

I welcome any and all help, inc simple things I may have missed, thanks. :smile_o:

Share this post


Link to post
Share on other sites

Heya, the flag property for factions seems to not be used anywhere, as that path is incorrect. (Icon does get used.)

The flags can be found here:
 

Quote

\gm\gm_core\data\flags\gm_flag_gc_co.paa

Countries are named after the two-letter nato code from the 80s:
https://en.wikipedia.org/wiki/List_of_NATO_country_codes

GC = East Germany
GE = West Germany

Full list:

"\gm\gm_core\data\flags\gm_flag_us_co.paa"
"\gm\gm_core\data\flags\gm_flag_au_co.paa"
"\gm\gm_core\data\flags\gm_flag_be_co.paa"
"\gm\gm_core\data\flags\gm_flag_bu_co.paa"
"\gm\gm_core\data\flags\gm_flag_ca_co.paa"
"\gm\gm_core\data\flags\gm_flag_cs_co.paa"
"\gm\gm_core\data\flags\gm_flag_cz_co.paa"
"\gm\gm_core\data\flags\gm_flag_dk_co.paa"
"\gm\gm_core\data\flags\gm_flag_fi_co.paa"
"\gm\gm_core\data\flags\gm_flag_fr_co.paa"
"\gm\gm_core\data\flags\gm_flag_gc_co.paa"
"\gm\gm_core\data\flags\gm_flag_ge_co.paa"
"\gm\gm_core\data\flags\gm_flag_gr_co.paa"
"\gm\gm_core\data\flags\gm_flag_hu_co.paa"
"\gm\gm_core\data\flags\gm_flag_ic_co.paa"
"\gm\gm_core\data\flags\gm_flag_it_co.paa"
"\gm\gm_core\data\flags\gm_flag_lu_co.paa"
"\gm\gm_core\data\flags\gm_flag_nato_co.paa"
"\gm\gm_core\data\flags\gm_flag_nl_co.paa"
"\gm\gm_core\data\flags\gm_flag_no_co.paa"
"\gm\gm_core\data\flags\gm_flag_pl_co.paa"
"\gm\gm_core\data\flags\gm_flag_po_co.paa"
"\gm\gm_core\data\flags\gm_flag_ro_co.paa"
"\gm\gm_core\data\flags\gm_flag_se_co.paa"
"\gm\gm_core\data\flags\gm_flag_sp_co.paa"
"\gm\gm_core\data\flags\gm_flag_tu_co.paa"
"\gm\gm_core\data\flags\gm_flag_uk_co.paa"
"\gm\gm_core\data\flags\gm_flag_ur_co.paa"

 

  • Thanks 1

Share this post


Link to post
Share on other sites

Awesome, I hope you guys keep going and create units for all those flags!

 

On 5/25/2019 at 2:27 PM, madrussian said:

So now I am using "\A3\ui_f\data\map\markers\flags\Germany_ca.paa" (modern flag?) for West Germany as a placeholder, but it looks pretty silly for 1980s and would much rather have actual West German flag texture.

 

Now that I'm using proper flag textures from @mondkalb's post, I just got a little history lesson.  Appears West German flag from 1980s is the same as modern German flag.  So yeah, now it doesn't look silly at all. :smile_o:

  • Haha 1

Share this post


Link to post
Share on other sites

I needed a solution for this and its the first thing coming up with google on "arma 3 get faction flag texture" search.

dynamic solution:

// finds a suitable flag texture for players faction and returns it's path.
// looks for custom flag in textures folder first. file name syntax: factionclassname.paa
// then CfgFactionClasses is checked for flag or icon texture
// if failed then sides flag is returned
// Author: Sarogahtyp

private _faction = faction player;
private _flag = "textures\" + _faction + ".paa";

if ( fileExists _flag ) then { _flag } else
{
 _flag = getText ( configfile >> "CfgFactionClasses" >> _faction >> "flag" );
 
 if ( fileExists _flag ) then { _flag } else
 {
  _flag = getText ( configfile >> "CfgFactionClasses" >> _faction >> "icon" );
  
  if ( fileExists _flag ) then { _flag } else
  {
   switch ( side player ) do
   { 
 	 case ( west ) : { "\A3\Data_F\Flags\flag_blue_CO.paa" }; 
 	 case ( east ): { "\A3\Data_F\Flags\flag_red_CO.paa" };
	 default { "\A3\Data_F\Flags\flag_green_CO.paa" };
   };
  };
 };
};

 

 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×