Results 1 to 2 of 2

Thread: Guide to faction flags & icons

  1. #1
    wangrin's Avatar Unguibus et Rostro
    Patrician Artifex

    Join Date
    Feb 2005
    Location
    France
    Posts
    4,397

    Default Guide to faction flags & icons

    GUIDE TO FACTION'S FLAGS & ICONS


    Each faction is granted with several flags & icons :

    • state flag : this is the faction flag used in the campaign map above region capital and armies ;
    • regimental flag : this is the flag used by flagbearer in battle ;
    • naval ensign : this is the flag use for ships & vessels in battle ;
    • naval icon : this is the icon shawn above fleets in campaign map
    • agent icon : this is the icon shawn above agent in campaign map
    • mini-flag :
    • hud flag :



    A. STATE FLAGS

    State flags are .dds files.
    These files are stored in rigidmodels\flags\textures folder as flags<n°>.dds files where <n°> is the number allocate to the file (falgs0, flags1, etc.).
    Each flags<n°>.dds file regroup several flags.

    The game use atlas.tai file to locate flag.
    You can use Notepad++ (or Notepad) to open .tai as they are text files.
    Faction state flags tai file name is flags.tai
    Atlas file is some sort of table linking faction, atlas filename and flag location.
    Each flag size is 512x256 pixels.

    1. 2.

    1. original flags0.dds file
    2. example of modified state flags file

    As you can see, it is possible to play with transparency to change the shape of the flag.

    Code:
    # flags.tai
    # AtlasCreationTool.exe -width 2048 -height 2048 -o flags
    #
    # <filename>        <atlas filename>, <atlas idx>, <atlas type>, <woffset>, <hoffset>, <depth offset>, <width>, <height>
    #
    # Texture <filename> can be found in texture atlas <atlas filename>, i.e., 
    # flags<idx>.dds of <atlas type> type with texture coordinates boundary given by:
    #   A = ( <woffset>, <hoffset> )
    #   B = ( <woffset> + <width>, <hoffset> + <height> )
    #
    # where coordinates (0,0) and (1,1) of the original texture map correspond
    # to coordinates A and B, respectively, in the texture atlas.
    # If the atlas is a volume texture then <depth offset> is the w-coordinate
    # to use the access the appropriate slice in the volume atlas.
    
    flag_france.tga        flags0.dds, 0, 2D, 0.000000, 0.000000, 0.000000, 0.250000, 0.125000
    flag_enemy.tga        flags0.dds, 0, 2D, 0.250000, 0.000000, 0.000000, 0.250000, 0.125000
    flag_dutch_rebels.tga        flags0.dds, 0, 2D, 0.500000, 0.000000, 0.000000, 0.250000, 0.125000
    flag_denmark_republic.tga        flags0.dds, 0, 2D, 0.750000, 0.000000, 0.000000, 0.250000, 0.125000
    flag_denmark.tga        flags0.dds, 0, 2D, 0.000000, 0.125000, 0.000000, 0.250000, 0.125000
    flag_greek_rebels.tga        flags0.dds, 0, 2D, 0.250000, 0.125000, 0.000000, 0.250000, 0.125000
    flag_crimean_khanate.tga        flags0.dds, 0, 2D, 0.500000, 0.125000, 0.000000, 0.250000, 0.125000
    flag_courland.tga        flags0.dds, 0, 2D, 0.750000, 0.125000, 0.000000, 0.250000, 0.125000
    flag_cossack_rebels.tga        flags0.dds, 0, 2D, 0.000000, 0.250000, 0.000000, 0.250000, 0.125000
    flag_colombia.tga        flags0.dds, 0, 2D, 0.250000, 0.250000, 0.000000, 0.250000, 0.125000
    flag_cherokee.tga        flags0.dds, 0, 2D, 0.500000, 0.250000, 0.000000, 0.250000, 0.125000
    flag_chechenya_dagestan.tga        flags0.dds, 0, 2D, 0.750000, 0.250000, 0.000000, 0.250000, 0.125000
    flag_slavic_rebels.tga        flags0.dds, 0, 2D, 0.000000, 0.375000, 0.000000, 0.250000, 0.125000
    flag_france_republic.tga        flags0.dds, 0, 2D, 0.250000, 0.375000, 0.000000, 0.250000, 0.125000
    flag_britain.tga        flags0.dds, 0, 2D, 0.500000, 0.375000, 0.000000, 0.250000, 0.125000
    flag_bavaria.tga        flags0.dds, 0, 2D, 0.750000, 0.375000, 0.000000, 0.250000, 0.125000
    flag_barbary_states.tga        flags0.dds, 0, 2D, 0.000000, 0.500000, 0.000000, 0.250000, 0.125000
    flag_barbary_republic.tga        flags0.dds, 0, 2D, 0.250000, 0.500000, 0.000000, 0.250000, 0.125000
    flag_barbary_rebels.tga        flags0.dds, 0, 2D, 0.500000, 0.500000, 0.000000, 0.250000, 0.125000
    ...
    1. 2.
    1. base for flags<N>.dds
    2. base to create atlas tai files


    B. REGIMENTAL FLAGS

    Regimental flags are .tga files.
    Each faction large.dds file is stored in ui\flags\<faction name>\ folder.
    Each regimental flag is a 512x256 picture but :

    • it is possible to increase its size as long as you keep its proportions (example : 1024x512)
    • it is possible to use "transparency" to modify the size of the flag


    Examples :
    1. 2. 3.

    Flag is a particle model defined in standard_bearer_flag.logic file, located in rigidmodels\verletitems folder.
    Primergy's Large Flag mod enlarge CA original regimental flag : [Released] Larger Regimental Flags - Mod (NTW compatible)


    C. NAVAL ENSIGN

    Naval ensign flags are .dds files
    Each faction ensign_<faction name>_diffuse.dds file is stored in rigidmodels\naval\textures folder.
    Naval ensign file are composed of 4 flags : the main naval ensign and 3 pennants.
    Contrary to state and regimental flags, it is not possible to use transparency to modify the shape of the naval ensign.




    D. NAVAL ICONS

    Like faction state flags, naval icons are a combination of a .dds file and a .tai atlas.
    Naval icons data are stored in rigidmodels\flags\textures folder.
    The picture file name is naval_id0.dds and atlas file name is naval_id.tai

    1. 2.

    1. CA original naval_id0
    2. transcription of CA original atlas tai file


    E. AGENT ICONS

    Agent icons are .tga files.
    These files are stored in rigidmodels\campaignbuildings\campaignagenticons\textures folder.
    Filename is agent_id_<faction name>_diffuse.tga.
    Each icon size is 128x128 pixels.

    These textures are linked to a 3d model stored in \rigidmodels\campaignbuildings\campaignagenticons and named agent_id_<faction name>.rigid_model


    F. MINI and HUD FLAGSTUTORIAL : FACTION'S FLAGS & ICON

    to do

    G. DB TABLES

    The factions tables define flags to use depending of faction AND government type.
    The flags_path column define filepath to default state flag.
    The republican_flag_path define filepath to republic state flag when regime change is allowed to the faction.
    This means that, for Genoa (minor faction, republic, no regime change), its flag is defined in flags_path and not in republican_flag_path



    Filepath pointed to \ui\flags\<faction name>\ folder where regimental, hud and mini-flag are stored.
    Nothing seem to point to state flags nor naval ensign.
    So, I suppose that the game automatically search for state flag by pointing to flags.tai
    Same for naval ensign, I suppose the game point automatically to rigidmodels\naval\textures folder.

    The common point to all flags is the naming convention.
    For example, USA monarchy and USA republic :
    • USA REPUBLIC
      • Flag folder name : united_states
        • regimental flag : large.tga
        • hud flags : hud_left and hud_right.tga
        • portrait flag : portrait.tga
        • small flag : small.tga
        • faction flag (for User Interface) : flag132.tga
        • animated faction flag (for Starting Campaign UI) : flag_animation0000 to flag_animation0011.tga (but can be the same flag for each .tga if you don't want to create the anmitaion effect)
        • mini flag : mini_flag.tga

      • State flag name (flags.tai) : flag_united_states.tga
      • Naval ensign : ensign_united_states_diffuse.dds

    • UNITED STATE MONARCHY
      • Flag folder name : us_monarchy
        • regimental flag : large.tga
        • hud flags : hud_left and hud_right.tga
        • portrait flag : portrait.tga
        • small flag : small.tga
        • faction flag (for User Interface) : flag132.tga
        • animated faction flag (for Starting Campaign UI) : flag_animation0000 to flag_animation0011.tga (but can be the same flag for each .tga if you don't want to create the anmitaion effect)
        • mini flag : mini_flag.tga

      • State flag name (flags.tai) : flag_us_monarchy.tga
      • Naval ensign : ensign_us_monarchy_diffuse.dds



    Looking at more coherent examples, we can find france and france_republic, russia and russia_republic, etc.
    What is important is to name folder, files and flags according to names in flag_path and republican_flag_path columns from factions db tables


    H. STARTPOS.ESF

    Filepath to faction flag to use is also defined in startpos.esf

    Go to : CAMPAIGN STARTPOS > CAMPAIGN_ENV > CAMPAIGN_MODEL > WORLD > FACTION_ARRAY

    Then, search for the faction you need to modify : FACTION_ARRAY_x > FACTION_FLAG_AND_COLOURS
    The first FACTION_FLAG_AND_COLOURS seems to be linked to monarchy or default faction flags.
    The second FACTION_FLAG_AND_COLOURS seems to be linked to republic flags.



    The first row of each FACTION_FLAG_AND_COLOURS define the file path to flags.
    Last edited by wangrin; March 30, 2016 at 05:30 AM.


    « Le courage, c’est de ne pas subir la loi du mensonge triomphant qui passe, et de ne pas faire écho de notre âme, de notre bouche et de nos mains aux applaudissements imbéciles et aux huées fanatiques.. » Jean JAURES

  2. #2
    wangrin's Avatar Unguibus et Rostro
    Patrician Artifex

    Join Date
    Feb 2005
    Location
    France
    Posts
    4,397

    Default Re: Guide to faction flags & icons

    [RESERVED] BASE MATERIALS

    A. STATE FLAG

    1.

    2.

    3.

    1.State flag 1024x512 base matrix
    2.State flag fabric
    3.State flag creases

    State flag tai matrix : see FLAGS ATLAS.zip link.

    B. REGIMENTAL FLAG


    C. NAVAL ENSIGN

    1.

    2.

    3.

    1.Naval ensign 1024x512 base
    2.Naval ensign fabric
    3.Naval ensign creases

    Naval ensign flag tai matrix : see FLAGS ATLAS.zip link.
    Attached Files Attached Files
    Last edited by wangrin; March 29, 2016 at 10:31 AM.


    « Le courage, c’est de ne pas subir la loi du mensonge triomphant qui passe, et de ne pas faire écho de notre âme, de notre bouche et de nos mains aux applaudissements imbéciles et aux huées fanatiques.. » Jean JAURES

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •