Results 1 to 18 of 18

Thread: Help with editing unit icons

  1. #1
    Member Member Revenant's Avatar
    Join Date
    Aug 2003
    Location
    Prague
    Posts
    198

    Default Help with editing unit icons

    I tried to modify some unit icons, but I am hopelessly bogged.

    I have to say I do not have any experience with graphical programs, know absolutely nothing about how palette works and so on... I just want to do some minor changes on unit icons included in MTW.

    I found guide from DukeJohn and tried to follow it, but:

    3.1.1 Unit Icon
    Function: this icon is used in battles in the bar at the bottom of the screen.
    Location: \Battle\UnitIcons\
    Format: UnitName.LBM, 256 colours
    Sample:

    Editing: This icon requires a carefull approach when editing. First #find a suitable existing MTW icon, increase the colour depth to 24-bit and change the image. If the icon is a bit sharply edged then enlarge the image by 200% use a smooth filter ,be carefull not to overdo the smoothing and reduce the image back to it's original size.
    Next find any suitable exising 256-colour MTW palette and use it. Make sure that the background colour is R:207, G:207, B:199. Next copy the entire picture in your painting program and then paste it over an exisiting MTW unit icon in Ultimate Paint. Then save it.


    I took icon, loaded it into graphical program (Ultimate Paint in this case). I do not know what the thing "increase colour depth" means - I just did some changes to picture, then saved it as LBM. Picture was ok, but color of the dress of soldier represented on icon did not change to his faction color on battle screen - it was green and purple no matter what faction I selected.

    I also do not know what the line " Next find any suitable exising 256-colour MTW palette and use it" means... Where can I get this palette?



    ...

    Can somebody please help me to learn how to change this icons? I know a lot about how MTW works, but I am total noob in this...
    Last edited by Revenant; 12-04-2007 at 23:13.

  2. #2
    Member Member Revenant's Avatar
    Join Date
    Aug 2003
    Location
    Prague
    Posts
    198

    Default Re: Help with editing unit icons

    Nobody can help me? :o

    Maybe If I give more information...

    I am using Ultimate Paint and I just want to change icon from Battle\UnitIcons.

    I loaded the old icon, made changes and then save it. Everything looks ok, except the fact that pieces of tunic that should have factional colors are always pink and green.

    I found several topics concerning this, but I am not sure if anybody came to solution? It is true that every mod I saw that changed this battleicons used only predefined colors, never icons with changing factionals colors, so managed somebody to achieve this?

  3. #3
    Second-hand chariot salesman Senior Member macsen rufus's Avatar
    Join Date
    Dec 2004
    Location
    Ratae Corieltauvorum
    Posts
    2,507

    Default Re: Help with editing unit icons

    Hi Revenant - probably the first thing you should do is download a copy of Mithel Image Converter from the "Downloads" section. This is a great little utility that allows you to convert LBMs to other formats.

    1) Use Mithel to open the uniticon you want to edit
    2) "Save the colourtable" as your first action
    3) Save the file to another format (I suggest PNG - JPEG is lossy)
    4) Open the PNG in a graphics app that can handle it
    5) Do your editing then save it to 256 colour Bitmap (.BMP) format (UP may be able to do 4 & 5, but it can't save LBMs correctly for MTW)
    6) Open the BMP with Mithel
    7) "Load the colourtable" (ie the one you just saved in 2)
    8) Save as an LBM again
    9) Copy across to your uniticon folder with the correct filename

    This is the simplest, least "technical" route I can think of, and the faction colours should still work

    If it doesn't work, come back and holler again
    ANCIENT: TW

    A mod for Medieval:TW (with VI)

    Discussion forum thread

    Download A Game of Thrones Mod v1.4

  4. #4
    Member Member Revenant's Avatar
    Join Date
    Aug 2003
    Location
    Prague
    Posts
    198

    Default Re: Help with editing unit icons

    It works.

    Thank you, man, you helped me greatly!

    But I have another problem, this time it is of course creating review_panel icons :/

    I tried to do it as DukeJohn wrote, but with bad results. I worked in Photoshop and Paint Shop pro 9.

    According to guide, I loaded battlemap icon, filled background with purple (I do not know if I did it right - At first I tried to change parameters of background color, then just created new color 255,0,255 a then fill background with it) , then saved it as TGA with described parameters, then used PurpGrab, but the result was always Biff with messed colors.

    Then I tried to save it as BMP and used biffreader to create new .Bif, importing data from BMP. This time the result was better, but background was not trasparent (the only fault, even faction colors worked).

    I tried to fill it by trasparent color by hand in Biffreader, but then infamous "black dots" appeared.

    I read several discussions about this issues, but again did not find solution.

  5. #5
    Second-hand chariot salesman Senior Member macsen rufus's Avatar
    Join Date
    Dec 2004
    Location
    Ratae Corieltauvorum
    Posts
    2,507

    Default Re: Help with editing unit icons

    If you've got Photoshop you can try another route, but I've had mixed results on anything with faction colours. I keep meaning to try out the PurpGrab method but haven't quite got around to it yet

    Generally for reviewpanel icons, if I'm modifying an existing one, I export to BMP with BIFreader, open in Photoshop and again save the palette (it's in IMAGE > MODE). Then I do the editing as required, reload the colour palette (or convert to indexed using the saved palette if I've had to change it to RGB to do the edits), save as a BMP (again 256 colour) and put it back into BIFreader - but there can be occasional black spots. I find it helps to set the second colour in the colour table to something outrageous that you won't use (I go for turquoise ). Do this by opening up the colour table of your image, double clicking on the second colour (ie colour 1, as it starts at 0), then setting the RGB values. As far as I can tell this seems to be some sort of secondary (or possibly part) transparency colour, hence why I chose a colour that won't appear in the actual image.

    If your background came out not transparent it seems like the colour value might be slightly off - check the colour table of your BMP (in Photoshop) and if necessary adjust colour 0 to "008000" in the HEX box (IIRC: 0,128,0 in RGB), resave, and re-BIF-ify it.

    It's definitely worth investing some time in studying Photoshop's colour mode menu, and building a library of colour palettes, saves a lot of heart-ache in the long run
    ANCIENT: TW

    A mod for Medieval:TW (with VI)

    Discussion forum thread

    Download A Game of Thrones Mod v1.4

  6. #6
    Member Member Revenant's Avatar
    Join Date
    Aug 2003
    Location
    Prague
    Posts
    198

    Default Re: Help with editing unit icons

    That was fast, thanks.

    And just one question:

    What to do if I want to create review panel icon from battle icon?

    Should I simply load it into photoshop, convert it to BMP and then continue as you wrote?

  7. #7
    Member Member Revenant's Avatar
    Join Date
    Aug 2003
    Location
    Prague
    Posts
    198

    Default Re: Help with editing unit icons

    Generally for reviewpanel icons, if I'm modifying an existing one, I export to BMP with BIFreader, open in Photoshop and again save the palette (it's in IMAGE > MODE). Then I do the editing as required, reload the colour palette (or convert to indexed using the saved palette if I've had to change it to RGB to do the edits), save as a BMP (again 256 colour) and put it back into BIFreader - but there can be occasional black spots. I find it helps to set the second colour in the colour table to something outrageous that you won't use (I go for turquoise ). Do this by opening up the colour table of your image, double clicking on the second colour (ie colour 1, as it starts at 0), then setting the RGB values. As far as I can tell this seems to be some sort of secondary (or possibly part) transparency colour, hence why I chose a colour that won't appear in the actual image

    I did it precisely as you wrote, but there are those ugly black blobs, always at the same places. I did a try, took one icon, did not change anything, only went throught all procedure. I did it several times and blobs are always there. I do not think the second color has anything to do with it.


    You are able to create transparent icons without black points?
    Last edited by Revenant; 12-05-2007 at 22:49.

  8. #8
    Second-hand chariot salesman Senior Member macsen rufus's Avatar
    Join Date
    Dec 2004
    Location
    Ratae Corieltauvorum
    Posts
    2,507

    Default Re: Help with editing unit icons

    Another idea to try: open your BMP copy of the unit icon in Photoshop, open up the colour table and make the background colour transparent (you do this with the little eye-dropper tool that is IN the colour palette box - you can select colour from the picture or the colour table to do this) then click OK. You should now have your little guy on a transparent background. Select all and COPY.

    Now make a new file (50x50px) with the 008000 green as background colour, and paste into it. You should now have your little guy on the green background. (You might end up with an RGB file at this stage so just convert to indexed using the correct palette in your new library of palettes ). Then save as BMP and convert back to BIF. Load up the game and see if it's any better
    ANCIENT: TW

    A mod for Medieval:TW (with VI)

    Discussion forum thread

    Download A Game of Thrones Mod v1.4

  9. #9
    Member Member Revenant's Avatar
    Join Date
    Aug 2003
    Location
    Prague
    Posts
    198

    Default Re: Help with editing unit icons

    Thank you, but this do not help.

    The black spots are somehow created by BiffReader during conversion, but they are not visible in it. I read about this problem in a lot of other topics concerning icon editing, but nobody came to solution, at least I did not find it.

    Somebody reccomended to create points of those background "parchment" colours of MTW to mask them, so I will try it.

  10. #10
    Member Member dimitrios the samian's Avatar
    Join Date
    Feb 2004
    Location
    Hellas Down Under
    Posts
    652

    Default Re: Help with editing unit icons

    Excellent topic !! Mac you 'r a modding whiz .

  11. #11
    Second-hand chariot salesman Senior Member macsen rufus's Avatar
    Join Date
    Dec 2004
    Location
    Ratae Corieltauvorum
    Posts
    2,507

    Default Re: Help with editing unit icons

    I know in the info_pics, little black spots occur where there is a single transparent pixel in the image, but big blocks work okay. I'm sure it has to do with the transparent / semitransparent pixels (semi doesn't work as you end up with a green outline...) It's a while since I made any new review panel graphics, but I manage to get them without black spots somehow... however i do tend to use a limited palette (ie vaguely monochrome) and load from successful palettes (I know using the word palette in two senses is confusing.... ) Erm, I use a limited colour range in the image and use proven colour tables. Hope that's clearer. And come to think of it I often go through a grey-scale/re-colourise process as well, which is fine if you don't want faction colours. If the worst comes to the worst then I fix things pixel by pixel in BIFreader, although the problem does seem to lie in the way BIFReader deals with single pixels.
    ANCIENT: TW

    A mod for Medieval:TW (with VI)

    Discussion forum thread

    Download A Game of Thrones Mod v1.4

  12. #12
    Member Member Revenant's Avatar
    Join Date
    Aug 2003
    Location
    Prague
    Posts
    198

    Default Re: Help with editing unit icons

    Hm, I solved it by applying parchment-color pixels over places where black dots appeared.

  13. #13
    Member Member dimitrios the samian's Avatar
    Join Date
    Feb 2004
    Location
    Hellas Down Under
    Posts
    652

    Default Re: Help with editing unit icons

    Hi Revenant ,, Just out of curiosity ,, What are you working on ? a complete mod ? cheers .

  14. #14
    Member Member Revenant's Avatar
    Join Date
    Aug 2003
    Location
    Prague
    Posts
    198

    Default Re: Help with editing unit icons

    Quote Originally Posted by dimitrios the samian
    Hi Revenant ,, Just out of curiosity ,, What are you working on ? a complete mod ? cheers .
    Nothing so big:)

    I play MedMod from Wes Whittaker and like his work and concepts. So I began with repairing graphics on some units (weapons missing etc.) and then I made High era campaign. There were also some problems with names and such things, if I remember correctly.

    And lastly, I am making rework of some units, because I think there are still some redundant units and others, that are underpowered. I am using default graphic, of course, because making graphic is really not my cup of tea:/

    The reason behind this particular thread was my need of icon of heavy mail clad infantry wielding axe and without shield (Galloglaich).

    The reason I like MedMod so much is because of excellent gameplay. I tried other, more popular mods, but while there is HUGE amount of work there the problem is that for me it is usually the vanilla game with more factions and more units. But in Medmod you can train your units only in limited area of map called "homelands" and every faction is "aimed" for specific battlefield tactics. This particular feature I like the most and I am trying to expand it even more.

    So long it is aimed only for personal use.
    Last edited by Revenant; 12-11-2007 at 15:13.

  15. #15

    Default Re: Help with editing unit icons

    Hi, I follow this method to make good unit icons (working transparent colours and no black dots).

    Tools: I use the following programs for editing the files:
    -Readbif.
    -Seqgrab, a tool of CA_BIF_BUF utilities.
    -A painting program like Gimp, Paint Shop Pro...

    First open an existing bif unit icon with readbif and extract frame as bmp. Then open this bmp with your painting program, edit the image at your taste, and save it.

    1. Battle\UnitIcons, LBM format, background colour R:207, G:207, B:199.
    Open your new icon and increase the colour depth to 24-bit. Replace the background colour of your icon (normally green colour R:0, G:128, B:0) with R:207, G:207, B:199. Save this 24-bit image as uncompressed TGA.
    Then Seqgrab appears on the scene. The TGA icon need to be renamed as 10001 (this is CA_BIF_BUF nomenclature). You also need the lbm original version of the icon which you edited; for instance if you edited the ByzantineInfantry.bif icon, then copy the ByzantineInfantry.lbm icon and rename it as 10001. You will have in the same folder two files named 10001, one in TGA format and other in LBM format. Then open Seqgrab and set the information as follows:
    - In "Path to images" write the location of your files, for instance C:\Program Files\New Unit Icons
    - In "Filename stub" type 1
    - In "LBM file to import colours from..." write the location of the 10001.lbm file, for instance C:\Program Files\New Unit Icons\10001.lbm
    - Check the square that says "Whole frame grab"
    - Check the square that says "Purple as transparent"
    Choose OK and a bif named 1 should appear; this bif don't serve you, so deleted it. However copy and save the 10001.lbm file which now shows your new icon and it is ready to rename and use in the game.

    2. Review panel icon, BIF format, background colour R:0, G:128, B:0.
    Open your new icon and increase the colour depth to 24-bit. Replace the background colour of your icon (normally green colour R:0, G:128, B:0) with purple R:255, G:0, B:255. Save this 24-bit image as uncompressed TGA and renamed it 10001. You also need the 10001.lbm file which provides the palette. The conversion process with Seqgrab is the same that I describe above. In the location of your files will now be placed a BIF without black dots BUT with their lesser brothers, the transparent pixels. This transparent pixels appears because Seqgrab interprets black R:0, G:0, B:0 (and during the conversion process other very similar blacks, normally R:0, G:4, B:0 and R:0, G:0, B:8) as the transparent colour (i.e. the colour 0 in a lbm MTW palette).
    In order to avoid this problem you need to make some changes before save the TGA icon. I assume that you changed the background colour to purple R:255, G:0, B:255. Then select the pixels coloured with the problematic blacks in your icon (normally R:0, G:4, B:0 and R:0, G:0, B:8) and recoloured it with other black like R:16, G:20, B:8. Save the 24-bit image as uncompressed TGA and named it 10001. Then you are ready to proceed with the Seqgrab and you will obtain a correct BIF named 1 without black dots and without transparent pixels in the body of your soldier.

    Regards

  16. #16
    Member Member dimitrios the samian's Avatar
    Join Date
    Feb 2004
    Location
    Hellas Down Under
    Posts
    652

    Default Re: Help with editing unit icons

    Revenant ,, Good to fill us in on what your doing , especially the fact that your actually completing the High Era on the MedMod .... but !!!
    Why keep it for personal use only ?
    Wouldn't you like to share it with others ?
    Im sure a lot of players would like to play your High Era .

  17. #17
    Member Member Revenant's Avatar
    Join Date
    Aug 2003
    Location
    Prague
    Posts
    198

    Default Re: Help with editing unit icons

    Why not, when it will be finished...

    I sent request to WesW if he has not any problems with it.

  18. #18
    Member Member dimitrios the samian's Avatar
    Join Date
    Feb 2004
    Location
    Hellas Down Under
    Posts
    652

    Default Re: Help with editing unit icons

    Fantastic !! news Revenant ,, The future looks very good indeed ,, Perhaps Tyberius will also allow you to use his updated more realistic units ,, Our humble version of Total War will continue to thrive ... yeehaaa !!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Single Sign On provided by vBSSO