Results 1 to 19 of 19

Thread: How to change an unit's icon?

  1. #1

    Icon1 How to change an unit's icon?

    So that is, how can I change an unit's icon in Napoleon Total War, what should I touch in Pack File Manager? Thanks in advance

  2. #2

    Default Re: How to change an unit's icon?

    Come on, back in Empire Total War was really easy, someone must know how to do it in NTW as well.

  3. #3
    Steph's Avatar Maréchal de France
    Patrician Artifex

    Join Date
    Apr 2010
    Location
    Pont de l'Arn, France
    Posts
    9,174

    Default Re: How to change an unit's icon?

    Can you give an example of what you want to do?
    This way I can give a more step by step answer.

  4. #4

    Default Re: How to change an unit's icon?

    Just replacing the icon that an unit shows. :') Like these:



    How can I replace them? Thank you very much.

  5. #5
    Steph's Avatar Maréchal de France
    Patrician Artifex

    Join Date
    Apr 2010
    Location
    Pont de l'Arn, France
    Posts
    9,174

    Default Re: How to change an unit's icon?

    To get good answer, you need to ask good question. I'm asking you to be specific and give an example. But not an example of unit icons, I know what they are, I've done hundreds of them for my mod. I'm asking for a specific example of what you want to change. Because there are several ways to do it.
    - Example 1: the first icon in your image has a red coat. If you want this to be pink, you can simply edit the image. No change in the db, but then every unit with this icon will be pink
    - Example 2: you want to unit on the left to have the same icon as the second one. i.e. for a specific unit, use a different existing icon. For this, two possibilities
    -- You want to change the uniform and the icone
    -- You want to change the icon but not the uniform
    - Example 3: You want to change the icon for the unit on the left, but only this unit. i.e. if another unit used the same icon, you want the unit to keep this icon.

    And this is even a little more complex because you have specific uniforms for specific units, but also generic uniforms with a simple colour change.

    See, many options. Now, what do you want to do exactly?

  6. #6

    Default Re: How to change an unit's icon?

    Sorry Steph for not being specific, I replied quickly because I didn't have enough time to give a proper answer. Yea, example 3 is the thing I'd like to do, replace the icon of an specific unit without altering the others. I'm trying to replace the icon of the Swedish line infantry, and the general of the Catalan faction. But now that I think about it, they're generic units, can I still change the icon specifically for them? Thanks for your help.

  7. #7
    Steph's Avatar Maréchal de France
    Patrician Artifex

    Join Date
    Apr 2010
    Location
    Pont de l'Arn, France
    Posts
    9,174

    Default Re: How to change an unit's icon?

    Ok, let's take the example of the Swedish line infantry.
    If you look at the uniform table, you can find this line


    "Sweden_Inf_Line_Line_Infantry" "sweden" "Sweden_Inf_Line_Line_Infantry" "Inf_Line_Line_Infantry"

    This means that the generic unit (last column), "Inf_Line_Line_Infantry", for the faction "Sweden" (2nd column), uses the uniform variant "Sweden_Inf_Line_Line_Infantry"

    Now, if you look at the data.pack, you will find in UI/Units/Icon "sweden_inf_line_line_infantry_icon.tga"

    same name as the variant, with _icon at the end.

    So
    - You can just add a new files with the same name as this tga, but different graphics, in your mod. This will replace the icon with nothing more to do
    - Or you may want to create a new file, with a different name. This can be done, but since the name of the icons and the variants have to be the same, then you'd need to create new variant.

    The rule is for the variant

    "atlas_Name_Of_Variant", where atlas_ (here sweden) must correspond to an atlas file (the big file with the texture).

    and then the icon name must be

    "atlas_Name_Of_Variant_icon.tga"

    Here, you can have specific icons, even if the unit is generic, because the uniform table tells what specific graphics to use for a specific faction and a generic unit.

  8. #8

    Default Re: How to change an unit's icon?

    OK, thank you very much, very useful. However, my Swedish line infantry is using the British uniform from the British Tutorial faction, i.e "Tut_Britain_Inf_Line_British_Foot". I like the uniform they use, so I changed some factions' units to the uniform the British tutorial faction uses. For me, this has been really comfortable as when I changed the original uniforms to that uniform, it adapted to the colors of the faction making sense. My Swedish Line Infantry uses the "Tut_Britain_Inf_Line_British_Foot" uniform but wears it in blue and yellow, and the Swedish militia uses the uniform "Tut_Britain_Inf_Militia_Militia" but wears it in grey and blue, making sense as well. So, I have another question, how can I make the Swedish generic uniforms have the same textures as the "Tut_Britain" uniforms with the correct colors, i.e. blue and yellow for Line Infantry and grey and blue for militia? And, by the way, how can I change the stats of the Swedish Line Infantry and Militia without making new units. Thank you very much for your help and replying fast as well.

  9. #9
    Steph's Avatar Maréchal de France
    Patrician Artifex

    Join Date
    Apr 2010
    Location
    Pont de l'Arn, France
    Posts
    9,174

    Default Re: How to change an unit's icon?

    For the colour, you have another table uniform_to_faction_colour.

    Remember this line from the uniform table.?

    "Sweden_Inf_Line_Line_Infantry" "sweden" "Sweden_Inf_Line_Line_Infantry" "Inf_Line_Line_Infantry"

    The first column, here "Sweden_Inf_Line_Line_Infantry" is a reference to the uniform_to_faction_colour.

    In this table, you will find for each reference and faction, a list of RGB colour.

    So if you want to use "Tut_Britain_Inf_Line_British_Foot" for Sweden, you need to add a line in uniform_to_faction_colour for Sweden, and modify the colours. If the line doesn't exist, then the game engine uses the default faction colour instead of a unit specific colour.

    It's not possible to change the stats without making a new unit.

    The concept of CA was to ahve a generic unit (same name/stat), but with variation of uniform and colour for each faction via two tables, uniform and uniform_to_faction colour.

    Everything else requires making copy of the unit.

    If you want proper Swedish uniforms:

    1805


    1810


    1813


    Finnish

  10. #10

    Default Re: How to change an unit's icon?

    Your mod looks awesome. Have you included new uniforms for the British faction from the tutorial (The Tut_Britain faction I was saying), the tutorial French faction and the French/British factions from the Egypt campaign? That would be awesome. Does your mod include a campaign which starts earlier in time, in 1792 or so?

    And by the way, with "Swedish generic uniforms" I was meaning the Sweden_Inf_Line_Line_Infantry uniform, and how I can make it wear the same clothes and hats as does Tut_Britain_Inf_Line_Infantry, i.e. have the same textures as does the Tut_Britain uniform.

    Thanks for your help :')

  11. #11
    Steph's Avatar Maréchal de France
    Patrician Artifex

    Join Date
    Apr 2010
    Location
    Pont de l'Arn, France
    Posts
    9,174

    Default Re: How to change an unit's icon?

    My mod starts 1805. I have different periods for uniforms, but no 1792. But at least France or Prussia start with bicorne!
    I didn't include uniforms from the "tutorial", because I remake ALL the uniforms.

    Simple:
    - look at the uniform table, find the line for "Tut_Britain_Inf_Line_Infantry", copy the 3rd column, paste it in the line of the Sweden_Inf_Line_Line_Infantry for Sweden , and then your Swedish unit will use the Tutorial uniform.
    - then edit the uniform_to_faction_colour to also change the colour.

  12. #12

    Default Re: How to change an unit's icon?

    Yes, I know that you make all the uniforms, I was meaning if you remade a new uniform for the British tutorial faction or the earlier French Republic faction.

    By the way, do you make new uniforms for Empire Total War as well?

    I already tried that "trick", and in fact is what I'm using now for Sweden_Inf_Line_Line_Infantry, I changed the 3rd column to the Tut Britain uniform long ago. I've already known this for ages. What I was meaning is changing the texture of the Sweden_Inf_Line_Line_Infantry uniform, and make it have the same texture as the Tut Britain uniform, how can I do it?
    Last edited by 8907654738; May 21, 2017 at 02:58 AM.

  13. #13
    Steph's Avatar Maréchal de France
    Patrician Artifex

    Join Date
    Apr 2010
    Location
    Pont de l'Arn, France
    Posts
    9,174

    Default Re: How to change an unit's icon?

    If you replace the 3rd column, you are actually using the same texture as the Tut Britain Uniform. The 3rd column is the variant, and the variant includes both textures and meshes.

    This is to change the unit as a whole. If you want to change only parts, I made a tutorial.

    I don't mod ETW, but I used some modified ETW graphics in my mod, mostly the for Ottomans.

  14. #14

    Default Re: How to change an unit's icon?

    Yea, if you change the 3rd column you change the unit as a whole, but what I'm saying is that if you use Tut Britain's meshes, textures and so on you're using its icon as well, and I don't want to touch Tut Britain's icon, I'd like the unit to use the meshes, textures and so on of Tut Britain but use Sweden_Inf_Infantry's icon which is what I want to replace.

  15. #15
    Steph's Avatar Maréchal de France
    Patrician Artifex

    Join Date
    Apr 2010
    Location
    Pont de l'Arn, France
    Posts
    9,174

    Default Re: How to change an unit's icon?

    If the unit is specific, you can define the icone in the unit table (same as for ETW).
    If it is generic, you need to make a copy.
    Otherwise, the 3rd column in the uniform table gives the variant AND the icons that should be used. So if you to replace the mesh but not the icons --> either you use the Sweden_Inf_Infantry icon, but rename it Tut Britain (but then the original Tut Britain will be replaced). Or you make copies.
    For the copies:
    - You could copy the variants and icons (copy tut_britain variant to tut_britain_2, and Sweden_Inf_Infantry icon to tut_britain_2), and use this as 3rd column in uniform table
    - Or if you want specific stats or AOR, make a copy of the unit and the variants and icons.

  16. #16

    Default Re: How to change an unit's icon?

    Sorry for replying so late, I've been busy in a school trip. I don't understand the copy thing, would you like to explain it more detailed? Thank you.

  17. #17
    Steph's Avatar Maréchal de France
    Patrician Artifex

    Join Date
    Apr 2010
    Location
    Pont de l'Arn, France
    Posts
    9,174

    Default Re: How to change an unit's icon?

    Extract the icons and variants.
    Rename them (add a _2 at the end for exemple), and then edit them to want you want
    Change the 3rd column in the uniform table to use this new icon/variants

  18. #18

    Default Re: How to change an unit's icon?

    Sorry for replying late again, I've trying to fix a strange issue with Empire Total War. I already tried what you said of adding a _2 at the end, and strangely the units showed placeholder textures.

  19. #19
    Steph's Avatar Maréchal de France
    Patrician Artifex

    Join Date
    Apr 2010
    Location
    Pont de l'Arn, France
    Posts
    9,174

    Default Re: How to change an unit's icon?

    because you probably don't have the variants with the _2 at the end

Posting Permissions

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