Page 1 of 6 123456 LastLast
Results 1 to 20 of 104

Thread: How to add new flags - COMPLETED

  1. #1

    Default How to add new flags - COMPLETED

    How to add new flags

    Note: Latest Gimp versions have the save system changed. Now you can use Save for saving the file in Gimp format. For any other format like png, jpg, dds, tga, etc. you have to use Export. So wherever in this tutorial is mentioned Save As.., you should use Export instead.

    Having made many flags for new factions I have improved and changed a lot my previous method so here is an update. I've also added a set of files that will assist you in making the flags.

    What we gonna need:

    1. Paint.Net

    2. Gimp

    3. A set of blank flags (Download and unzip: http://www.mediafire.com/download/bs...c/FlagsTut.zip)

    In the case of a completely new set of flags we have to make:

    1. ui\flags\<faction>

    flag_132.tga
    flag_animation X 12 (flag_animation 0000.tga - flag_animation0011.tga)
    hud_left.tga
    hud_right.tga
    large.tga
    mini_flag.tga
    portrait_flags.tga
    small.tga

    2. rigidmodels\campaignbuildings\campaignagenticons\textures

    agent_id_<faction>_diffuse.dds

    3. rigidmodels\flags\textures

    flags4.dds
    naval_id4.dds

    4. rigidmodels\naval\textures

    ensign_\<faction>_diffuse.dds

    Let's start working. First find a good image of your new flag. In my example I'll use Serbia's one.

    I. Rectangular shapes

    1. Open your new flag with Gimp. In Image\Scale change the size to 512 X 256 pix. Then select Edit\Copy.

    2. Open large.tga and Edit\Paste as New layer. Using Scale tool make upper layer slightly smaller so the peripheral golden edge of the bottom layer is visible.
    Spoiler Alert, click show to read: 



    3. In Toolbox click the layer mode and select Multiply (you can try also Grain merge). In this way upper layer will take the texture details of lower layer. Do not worry that it is so dark.
    Spoiler Alert, click show to read: 


    4. Mark lower level and select Colors\levels. Adjust color levels until you are satisfied by the result.

    Spoiler Alert, click show to read: 


    5. Mark upper level and select Layer\Merge down. Save the image as large.tga.

    6. Now it is easy to make some of the other flags by changing dimensions of large.tga. Select Image\Scale Size, resize:

    a. in 200 X 100 pix. and save it as animation.tga (we shall make later the real animation flags)

    b. in 132 X 66 pix. and save it as flag_132.tga.

    c. in 44 X 22 pix. and save it as mini_flag.tga.

    7. Open large.tga again and Save as... flags4.dds. In Save as dds window choose BC3/DTX5 compression and mark Generate mipmaps.

    8. Next flag is actually a small set of flags: ensign_<faction>_diffuse.dds (http://www.twcenter.net/forums/showt...6#post11179086). If you are not familiar with Gimp it is better to proceed to second part of tutorial and then come back to make it. We are gonna need an existing image so pick one from models.pack\rigidmodels\naval\textures, and extract it in your working folder (or use my ensign_diffuse.dds). Best choice should be one that the vertical stripes in the left of the image suit with the colors of our new flag. We also gonna need ensign.dds from my files. Open simultaneously large.tga and ensign.dds. Copy the first in a new layer over the second one. Use Scale tool to match completely, turn upper layer mode to Multiply and adjust the bottom layer's level of color so your image is as you like. Then Merge layers, copy new image and paste it as a new layer over the existing you have ensign_<faction>_diffuse.dds chosen. Move layer to cover the big one and Merge layers. Now edit the vertical stripes if you like. Select every one of them and use the Colors tools to adjust them. In my files there is a golden V to be used, so do not worry if you change the colours of the existing. Save your file as ensign_\<faction>_diffuse.dds using the same settings as in step 7 for Save as dds window.

    II. Hud flags

    I've prepared one more file to make our life easier with hud flags making and get the better result. Actually I've removed the golden stripe which we shall add later. Let's make Croatia's hud flags:

    1. Open left_flag.tga and copy mini_flag.tga (we've made already) on it as a new layer.

    2. Mark the upper layer, select Layer\Scale Layer and resize it to 50 X 25 pix.

    3. Using Rotate, Perspective and Scale tools to cover completely the lower layer.

    4. Adjust Opacity of the upper layer so you can see clearly the lower level but have an idea also where upper one is.

    Spoiler Alert, click show to read: 


    5. With Free Select tool (laso) mark the upper triangle that comes out the lower layer (see image below) and paste it as a new image because we are gonna need it later. Then proceed to cut all the other parts of the upper layer that extend out of lower so the 2 layers fit precisely. Restore Opacity so you can see only upper layer.

    Spoiler Alert, click show to read: 


    Spoiler Alert, click show to read: 


    6. Copy the triangle and paste it as new layer. Then using Rotate, Perspective and Scale tools (perhaps adjust Opacity also) place it to fit exactly in the upper part of the flag. We want its longer vertical side to fit exactly with the side of the flag where the pole should be. The sorter vertical will fit exactly with the edge of the flag. In this way the longest third side will give us the effect of the long folding that there is there. When you are satisfied Layer\Merge down the triangle layer so you have again only 2 layers.

    Spoiler Alert, click show to read: 


    7. Before proceed we have to save as.. this image because we'll need it latter for hud_right.tga. So save as e.g. base_hud.tga

    8. Let's proceed: Mark upper layer and repeat steps 3-5 of part I but save it as base_left.tga.

    9. Open left_hud.tga and copy over it base_left.tga we just madeas a new layer. Move it to fit perfectly and the golden stripe is clearly visible. If it is need it stretch it a little.

    10. Now you have a perfect hud_left.tga! Save the file.

    11. The rest hud flags can be done now much easier using the base_hud.tga we have saved in step II 7. To make the hud_right.tga you can follow 2 ways:

    a. The... instant way is to open left_hud.tga and using Flip tool make it with one click. Then save it as right_hud.tga!

    b. The... professional way is to make it as we did for left since the original has deferent folds. To do open base_hud.tga do the former trick with Flip tool. Then open right_hud.tga (the unmodded grey one) and repeat steps 8-10.

    12. Having the hud_right.tga made so far, you should have made also a base_right.tga as we did in step 8. Using base_left.tga and base_right.tga you can make the portrait_flags.tga following the already known procedure.

    13. Last image for this section is the small.tga. It is a very... small flag and I am sure now you know enough how to make it. Have in mind that it is so small that only some details are visible at the end so do not spend much time on that.

    III. Animation flags

    There are 12 animations flags that are used as 12 frames from the game to give the illusion of a waving flag. We shall work it with Paint. NET using Displace effect. To do that you have to add in Paint.NET the right plug in. To make our life easier I made a couple of displacement mask sets. Since it is a routine work with 12 repeated steps I suggest to prepare your work like this:

    Make a new folder and copy in there animation.tga we've made in step I 6a. Copy also in this folder one of the mask sets (total 12 .png files). Last thing, copy in there all the grey animation flags (total 12 .tga files).

    Before we proceed we have to prepare animation.tga, so open it with Gimp. Select Resize and resize it to 190 X 95 pix. Select Image again but this time Canvas Size and change size to its original 200 X 100. In this way there will be some space around image. Save the image and close Gimp.

    Spoiler Alert, click show to read: 


    Now open Paint.NET and your working folder side by side (or up and down) on your desktop and start the routine:

    1. Drag animation.tga on Paint.NET. Select Effects\Alpha-Displacement and in fill the settings as the image below. In Mask file Browse and link to 0.png file of the mask set you use. Then fill the places with red circles as I have them and press o.k.

    Spoiler Alert, click show to read: 


    Your image should already have waves as you can see in its edges.

    Spoiler Alert, click show to read: 


    2. Drag 0.png over your image as a new layer and then double click on upper layer (in layers window).

    Spoiler Alert, click show to read: 


    Adjust Opacity until wave shadows are just visible. Save file as flag_animation0000.tga overwriting the existing file.

    Spoiler Alert, click show to read: 


    The reason I prefer to have these tga's is first to have the name of the file ready and second to know all the time which file I am working in (trust me is not difficult to be confused).

    3. Drag animation.tga again and select Open. Repeat the procedure only now you should work with 1.png mask file to make flag_animation0001.tga. In this way you'll make all 12 animation flags.

    IV. Round flags

    Game uses 2 round flags, one over agents and the second over ships, both in .dds format. To make them open your new large.tga with Gimp. Using the round tool select a round piece of the flag which you like, copy and paste it as a new image. Resize it to 128 X 128 pix. and save it as agent_id_<faction>_diffuse.dds. Then resize it again in 64 X 64 pix. and save it as naval_id4.dds. Here we've done with all images.

    Now you have all images ready you have to place them in pack file. The easiest way is to extract in a folder all the flags of an existing faction from ui. In this way you'll have all folders ready. Then replace flags with your new set and add them it in your mod.pack. I think all these are know. I'll just mention we edit the 2 .tai files.

    As you've noticed in rigidmodels\flags\textures there are 2 .tai files which determine which flags the game will use on campaign map. The land flags are in flags1.dds, flags2.dds, and flags3.dds. Instead of messing with vanilla dds you can make a new flag (I 8 step) and name it as flags4.dds. Then open flags.tai (use notepad) and if:

    a. change an existing flag find the line with faction and change it in:

    flag_<faction>.tga flags4.dds, 4, 2D, 0.000000, 0.000000, 0.000000, 1.000000, 1.000000

    The same way you add a fifth flag, sixth and so on.

    b. If you want to add a new name add the same line with the new faction name. In this case you have to go in satrtpos.esf and change the name of the flag in FACTIONS record.

    The same procedure is for naval flags. Here if the new flag is naval_id4.dds the added line in naval_id.tai is:

    naval_ID__<faction>.tga naval_id4.dds, 0, 2D, 0.000000, 0.000000, 0.000000, 1.000000, 1.000000

    COMMENTS:

    1. About grey flags: the set I've provide is grey but actually the best color it should have depends on the colors of our new flag. If it has light colors then it should be light grey (I do not like white). If it has heavy dark color it should be darker. Most of the flags have several strips with deferent colors, so the ideal should be to have deferent grey color for every stripe.

    2. About displacement mask files: The method I've followed is based on this tutorial: http://forums.getpaint.net/index.php?/topic/15442-creating-an-animated-waving-flag/. But making them was not easy at all because there more than 20 frames are used and here only 12. If you want to make your own the tricky part is to make the 12 frames in this way so a potential 13th should look exactly like first one or else you'll get a nasty glitch. The same time the time between frames should be specific so it will not wave too fast or too slow. The easiest way to combine those things is to have symmetric shapes. However it will still cost you hours of tests to adjust them. I hope somebody finds a quicker and easier way so we have a bigger variety.
    Last edited by husserlTW; June 20, 2016 at 07:15 AM.




  2. #2

    Default Re: How to make new flags using Gimp

    Thank you very much!

  3. #3
    Zaitochisan's Avatar Civis
    Join Date
    Nov 2009
    Location
    London, UK
    Posts
    155

    Default Re: How to make new flags using Gimp

    I was wondering if you or anyone has looked into whether its feasable to incease the size slightly of the flags carried by units, not the indicator flags but the carried ones, they are just a bit wimpy and if so could someone then add another flag carrier but with regiment colours so units would have both "King's" and Regimental Colours?
    I imagine though its a model.

  4. #4

    Default Re: How to make new flags using Gimp

    Great job husserlTW !!!

  5. #5

    Default Re: How to make new flags using Gimp

    Quote Originally Posted by ♔ Tsar ♔ View Post
    Great job husserlTW !!!
    Thanks. Since I've seen people interesting on new factions, I've decided to give more details for some more difficult parts. How is it going with Croatia?




  6. #6

    Default Re: How to make new flags using Gimp

    Job with Croatia is almost finished, we must create that Zagreb have 5 slots and this flags (small, hud_left, hud_right, portrait_flags (.tga))

    Here is ui rar with flags !!!


    If you need something more, tell me !!! And thanx for helping us !!!

  7. #7

    Default Re: How to make new flags using Gimp

    Quote Originally Posted by ♔ Tsar ♔ View Post
    Job with Croatia is almost finished, we must create that Zagreb have 5 slots and this flags (small, hud_left, hud_right, portrait_flags (.tga))

    Here is ui rar with flags !!!


    If you need something more, tell me !!! And thanx for helping us !!!

    I've made the missing flags. I've also added the needed flags for naval, agents, etc. I've named hannover where it was necessary. I suppose you replace Hannover? If not change where ever you met the name Hannover to the faction name you've replaced for Croatia.




  8. #8

    Default Re: How to make new flags using Gimp

    Thank you very much husserlTW !!! +rep

  9. #9
    Scythan's Avatar Libertus
    Join Date
    Feb 2009
    Location
    Atlanta, Georgia, USA
    Posts
    62

    Default Re: How to make new flags using Gimp

    NOW you post it, after I did it the hard way...

    Blast!

  10. #10

    Default Re: How to make new flags using Gimp

    Quote Originally Posted by Scythan View Post
    NOW you post it, after I did it the hard way...

    Blast!

    Lol, reminds me of mario games.

    Alle Hollanders onder 1 vlag!

  11. #11

  12. #12
    Utereg's Avatar Laetus
    Join Date
    Mar 2010
    Location
    Utrecht
    Posts
    18

    Default Re: How to make new flags using Gimp

    Really I gave it up after 4 ,5 hours of spending my time to the hud_right. I think I miss a step or something. I do not have the patience anymore to find out what I do wrong. Every time I took a look to the tutorial and did every step what was said, by hud_right I fail every time do not know what I do wrong


    Edit:
    After my frustation I was trying it again and finally I have it!!!
    Last edited by Utereg; March 19, 2010 at 10:49 AM.

  13. #13

    Default Re: How to make new flags using Gimp

    Quote Originally Posted by Utereg View Post
    Really I gave it up after 4 ,5 hours of spending my time to the hud_right. I think I miss a step or something. I do not have the patience anymore to find out what I do wrong. Every time I took a look to the tutorial and did every step what was said, by hud_right I fail every time do not know what I do wrong


    Edit:
    After my frustation I was trying it again and finally I have it!!!
    The man who insists, he wins!




  14. #14

    Default Re: How to make new flags using Gimp

    I did all the steps correctly. But I failed with ( right_hud.tga )

    My English is bad So I hope in the future there will be video



    Thanks anyway great work

  15. #15

    Default Re: How to add new flags - COMPLETED

    UPDATE: Tutorial has been updated completely, animation effect has been also added.




  16. #16
    Okmin's Avatar In vino veritas
    Join Date
    May 2010
    Location
    USA
    Posts
    7,506

    Default Re: How to add new flags - COMPLETED

    Great job, +rep
    BTW, if you added flags to a faction, the agent ID doesn't show up unless you add entries to warscape_rigid in the DB.

    PS: Seems like ensign.xcf is corrupted, and your spoiler buttons link to the picture.
    Last edited by Okmin; October 19, 2010 at 03:46 PM.
    IN VINO VERITAS
    IN CERVESIO FELICITAS

    Under the patronage of The Lizard King
    Patron of Narf
    and Starlightman

  17. #17

    Default Re: How to add new flags - COMPLETED

    Thanks, I'll fix it.




  18. #18

    Default Re: How to add new flags - COMPLETED

    Hello mister,

    I do it like you said in your tutorial but the changes do not apear in game.
    I change flags in ui and those are ok but in rigidmodels\campaignbuildings\campaignagenticons\textures the changes do not apear in game, I replace the agent_id_georgia_diffuse.tga with agent_id_georgia_diffuse.tga (that i modified the imagine),and do not work, i changed agent_id_georgia_diffuse.tga with agent_id_georgia_diffuse.dds and do not work so any ideeas?

    Any sugestions are welcome.
    Tks a lot
    T

  19. #19
    Geronimo2006's Avatar TAR Local Moderator
    Join Date
    Oct 2007
    Location
    Ireland
    Posts
    7,405

    Default Re: How to add new flags - COMPLETED

    I'm going to have a lot of fun with this. Thanks HussarITW. +1 How do I make a square flag though?
    Last edited by Geronimo2006; October 25, 2010 at 03:05 AM.
    Colonialism 1600AD - 2016 Modding Awards for "Compilations and Overhauls".



    Core i7 2600 @ 3.4ghz - NVIDIA GTX950 2GB

    Colonialism 1600 AD blog

  20. #20

    Default Re: How to add new flags - COMPLETED

    Quote Originally Posted by Tantalaul View Post
    Hello mister,

    I do it like you said in your tutorial but the changes do not apear in game.
    I change flags in ui and those are ok but in rigidmodels\campaignbuildings\campaignagenticons\textures the changes do not apear in game, I replace the agent_id_georgia_diffuse.tga with agent_id_georgia_diffuse.tga (that i modified the imagine),and do not work, i changed agent_id_georgia_diffuse.tga with agent_id_georgia_diffuse.dds and do not work so any ideeas?

    Any sugestions are welcome.
    Tks a lot
    T
    Do what Okmin suggests in post 16: edit db\warscape_rigid table.

    Quote Originally Posted by Geronimo2006 View Post
    I'm going to have a lot of fun with this. Thanks HussarITW. +1 How do I make a square flag though?
    Search in web, you'll find plenty of them.




Page 1 of 6 123456 LastLast

Posting Permissions

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