Unit Editing

Fuhrervet1889

Chieftain
Joined
Jun 20, 2019
Messages
9
Hi, I'm looking for a little help. I'm new to civ 3 and poked around for about a week.

I'm working with Darkest Hour on Polish sprites, the SPAD S.61. at the moment and would like to add the polish emblem to the wings. I know how to convert sprites over to Hearts of Iron II(Darkest Hour)!

My question, Is it possible to add/change country emblems/symbols on units.

What programs/tools do I need. I have Bryse 5.5, Civ3FlcEdit, Animation Shop 3, and Gimp, but...what to do?

A good to the point tutorial would also be a great help, There is no information regarding this topic in the Darkest Hour forums.

Thanks for any help.
 
Yes, you can add/change things on unit flicks. I haven't done it myself but have seen many units posted where parts of a unit have been changed. I'd suggest searching with two keywords - "storyboard" & "civ color". From what I understand to make changes to the flic you need to export or convert it to a storyboard, edit it then convert it back to a flic. Civ color is in a special part of the unit palette. But I think if you read about how civ color is added or removed you'll get an idea of how to add any other element to the graphic.

Unit palettes are tricky. Look for threads / tutorials by Vuldacon. There are other good ones, but Vuldacon is both thorough & easy to understand.
 
Fuhrervet1889... If you make a storyboard of the Unit Flc, you can make changes. The difficulty changing the emblems is the different angles they are seen in the the different directions. That and they must be Exactly placed on each frame of every direction If the emblem is off by a pixel, it will jump around in the animation. I am not saying it can't be done but it would be a Very Tedious amount of work to do manually.

Get Flicster and Steph's Storyboard Editor. If you have a Good Graphics Editor Program, you could make the Emblems that you want to place. Each Emblem would need to be made so they appear correctly in each of the 8 directions (same Emblem at 8 angles but you may be able to make 4 angles then Mirror Image them for the other 4 directions).

You would probably be able to use the same palette that the Units use so you would not have to make a new palette.

Again, the placement of each Emblem must be absolutely accurate in each frame of each direction... this would be the time consuming part of the work as it would be accomplished manually one frame at a time on the Storyboard.
To place the Emblems accurately on each frame of each direction, you can develop a technique that will allow you to place them on each frame in the same place. An example of this would be to place an X on the first frame of each direction.

Make a copy of the First Frame with the Frame Lines.
Place your New Emblem where you want it on the copy, then remove everything except the Emblem, Frame lines and the X. In other words paint out the Unit using the Background color on the Storyboard.
Copy only the X and a corner of the Frame then paste the X on all frames of the Storyboard for the direction you are working on by lining up the corner of the Frame you copied to the existing corners on the Storyboard. This will place the X in all Frames of the Storyboard accurately for the direction you are working on.
You can then Copy the Emblem and the X and paste it to all frames of the direction you are working on... Line up the X on each Frame with the X you pasted on the Storyboard and the Emblem will stay accurate in the animation.
After completing the above steps, Remove the X on all frames of the Storyboard by painting them out with the same Background Color. You can then use the Storyboard to generate a New Flc with Flicster.

Naturally, IF the existing Emblems cause problems with your New Emblems, you would need to remove (paint out) the old Emblems before adding your New Ones but keep your New Emblems in the same place. It would be easiest to make your New Emblems larger than the old ones so when you copy and paste your new Emblems they cover the old ones.

For the copy and paste techniques, set the Background Transparent so only the Emblem and X or Frame Lines will paste on to the Storyboard. Use a Floating image when you are pasting the images so you can align the Frame Lines or Xs accurately on the Storyboard.

Perhaps this image will show what I am saying:
Emblem Work.png


An easier way to have the Emblems show correctly in the different directions is to make them with an Animation Program so you can rotate them to get the correct angles.
 
Last edited:
Well..and I thought this would be difficult...

This was my fear, I was hoping a unit could be imported into a 3d program and change the skins from there, and then remake the pcx storyboards.

At least now I have a path to my obsession, thanks Vuldacon for such a detailed answer.
 
Fuhrervet1889... Really, to more easily change Unit Animations, it is best to have the original animations and of course, the 3d Model.

If you can make or get 3d "models" of the Emblems you want, you could rotate them as needed for the angles required in your Bryce Program. You could use the Free Blender Program if Bryce does not function to make 3d models. Then you could manually add them as I stated or use another method. That part is not difficult once you get use to the technique. You can copy and paste many frames at a time so that part does not require a great deal of time and especially IF you Really want it :)

So it is not the technique I stated that is the difficulty really.... it is having the Emblems at the needed angles so they can be placed on the units. The difficulty is not having the 3d Models and the animations for the Units.
If you had the original animations and could load them into Bryce, that would be easy of course.
There is always a way to get what you want... IF you desire it enough and are willing to do what is necessary to obtain it.

Probably, the reason why you could not find anything regarding this question is because it is too difficult for people to try to explain due to not at least having the original 3d Model or animations.

What I stated in my last post does not explain every detail but I hope it conveys the essence of what you would have to accomplish. Yes it can be done... Perhaps there is yet another way... Think about it, Don't give up and Good Luck with your endeavor :)

Edit: if you want to discuss more about this, feel free to start a "conversation" with me here.
 
Last edited:
I greatly appreciate your help Vuldacon. I have a lot reading ahead and not sure of what questions one should ask at this point. WW2 has been a twenty year hobby, and if a SPAD S.61 had the Polish emblem on the wings..well a little more immersion is a wonderful thing!:) I'm quite sure questions will arise and would be grateful for your help!

As is for most, time is very limited for me and hope your offer stands for a few weeks.

Thanks,
Fuhrervet1889
 
A question/problem came up. I managed to place emblems on a plane, you were right, not that difficult. The problem came as the unit did not show up in game..just a spinning line above where the sprite should appear.

I believe this problem to be with the palette. I don't know how familiar you are with gimp, but hope you can assist.
My steps...
1. Opened the PCX strips one at a time and placed in RBG mode
2. Opened as layer, the emblem to be placed on wings, this file was a .gif file, which might be the problem.
3. Used scale image and perspective to place emblem, then copy paste and so on. This turned out well!
4. When finished I saved all strips as .pcx files.
5. Reopened files, one by one and use Image>Mod>Index to generate palette from image. The palette increased to 257 colors, even when I entered 255 colors (Which is needed for Darkest Hour sprites).
6. Opened color map and subtracted two colors (very light shades of pink, there were many of these shades and not close to 255_0_255). In Darkest Hour the transparent (255_0_255) needs to go in the very top left. The square next to that needs to be the shadow (149_0_149). I needed to subtract these two colors or the Custom Palette would not show up as a choice from the list of custom palettes unless the amount of colors were reduced.
7. Created palette for Darkest Hour, which is a scaled image (4x4 pixel image 8 bit depth .bmp) and placed in the proper game file.
8. Created the remaining strips using the custom palette and saved as necessary ("name".bmp).

I checked several times, file by file on what is needed to convert, place a sprite into Darkest Hour. Experienced at least in that regard.

First time working with palettes, did some reading, but feel something was missed.
Sorry for some of the useless details, hope you can help!

Also, I would've not been able to make the emblem with the existing palette..no red.

Thank you,
Fuhrervet1889
 
Fuhrervet1889... I have not used Gimp, however, there are many here that use it. It has some differences as most programs do but once understood, I understand Gimp is easy to work with...
Balthasar comes to mind as he almost totally works with Gimp and has done so for years. I will point him to this Post and he will probably help you with Gimp.

Yes, it is probably a palette problem that was created in Gimp from not knowing how to use that program to gain what you want. I am sure you know if the format for the units are .bmp for example rather than .pcx.

Probably most members here are not familiar with the palette used in Darkest Hour but they can help you with Gimp concerning procedures.

Concerning the Red color you wanted for the Emblem, I assume you can use different palettes for the Units in Darkest Hour. If so, you could make a new palette that contains the Red or other colors you want.

Unit palettes used in the Civ Game use a 256 color palette and probably have a much different indexing structure than is used in Darkest Hour. That said, if you can learn how to place the colors used by the palette in the correct index, you should be able to make what you want for use.

Perhaps you can upload an image of a Unit Palette used in Darkest Hour then explain details about the palette and Units used... this may enable better help from Members here.
 
Palette.png

The top left is transparent "Pink 255_0_255" The purple box just next to it is shadow 149_0_149.

A custom palette is created from the image, Attack NE, (.pcx file, made with FLCster). we use this strip first because it will have all the colors needed to make the palette. (The colors that come with the unit firing a weapon)

The pinks that are close to 255_0_255 need to be changed to this, or pink dots will show up on the sprite in game. Same applies to purples used for shadow 149_0_149.

After the palette is made, all .pcx files (N, NE, E, NW...) are changed.. Image>Mod>Index, convert with the custom made palette from the first strip (Max of 255 colors), and then saved as a .bmp file for DH.

What might have been a little confusing in my last post. DH needs the palette of the sprite, this is done by shrinking(scaling down) the first image "Attack NE" to a 4x4 pixel 8 bit .bmp file. This is done after Image>Mod>Index with the custom palette. "Attack NE" is then returned to normal size and re-saved for that action/direction.

There are also some .spr files, these align the sprite in game, determine speed, determine which .bmp strips to use for the Fire,Stand,or Walk direction, and which 4x4 pixel palette to use for said sprite.

This is the process for Darkest Hour. From what I've read, Civ3 uses two colors in the very bottom right for transparency, besides from this I don't know of any difference.

What I poorly described above, is my limited knowledge of palettes! I wish a portion of the talent and dedication regarding graphics that I've seen in this forum worked with DH!

Thanks for all the replies, never thought I'd receive this much help..Thank you very much!!!
 
Last edited:
Fuhrervet1889... Sounds like the palette you need is a basic 256 color palette with only 1 shadow and 1 transparent color. That allows more colors than the Civ Palette because the Civ Palette uses "Civ Specific Colors and Smoke and Shadow Shades on all Unit palettes... leaving only 160 colors to directly use for the Units.

Not exactly sure only using the NE direction for Unit Colors is accurate. I use all directions as lighting affects the colors in different directions.
To get a Good representation of all colors, we need to include any animation for the Unit that uses different colors such as the Attack where the Unit Fires a Weapon with a Gun Flash or something different is taking place that uses different colors than the basic Unit. Therefore, I put several storyboards together that represent all colors needed for the Unit and reduce the Colors after removing (changing to Pure Black) the Background and Any anti-alias shade, etc... Only want the Unit Colors needed for all animations.

If you can send me or upload the animation you want a palette for, I can make the 255 color Palette for you... consisting of just 253 Unit Colors and the Transparent Pure Magenta 255, 0, 255 and the Shadow 149, 0 149 in the top Left corner of the palette.
I assume the 256 color on the last palette slot is just Pure Black 0, 0, 0. I am sure you can accomplish the remaining procedures to finish the Unit as you want.
 
Not exactly sure only using the NE direction for Unit Colors is accurate. I use all directions as lighting affects the colors in different directions

( Attack NE direction ) This is correct, DH is not really known for its graphics much less lighting effects.

I've never built a palette, gimp does that from the image, I just change it slightly so DH can use it. In theory this method should have worked for my project..stop me if you heard that before:mischief:

Perhaps a different question, when making multi-units how are the palettes combined into one? I believe this would be similar to what I'm trying accomplish. Adding another image to the strip, which adds more colors to the pallet. If I figure out this riddle, many will benefit.

A very kind offer Vuldacon, however I would like to learn the process. Darkest Hour really does suffer from lack of good animation, I would like to change that. I have some fair ideas, but all of them require adding to the strip and changing the palette.

Would you also suggest some good tutorials that may help me, please.

Thanks,
Fuhrervet1889
 
Fuhrervet1889... I wrote a couple of tutorials about Palettes but they refer to the Palettes for the Civ Game. I suppose you could extrapolate from reading about making a Unit Palette.
I believe any Graphics Editor will make a Palette, however, Many Magenta and Purple Colors will be in the Palette from Anti-Aliasing blending the Unit Colors with the Background. For this reason the first step is to remove all of the Unwanted colors, leaving only the Unit Colors.
Generally a Unit will be 16 Million Colors when made in an Animation Program and this must be reduced to the smaller number of colors used in the Game Unit Palette. This seriously reduces the Colors and if many of the Unwanted colors are also in the palette, that reduces the Unit Colors much more.

You can browse the Tutorials here at Civ Fanatics that you may find some benefit from.

If you are wanting to make adjustments to existing Units, learning how to use Gimp or any Graphics Editing Program is the First Step. That and understanding how to make New Palettes. I am sure Balthasar can help you with Gimp. You will need to provide him with the files you are working on and what you want to accomplish.

Just for your information...These Images show the Palette Slots used for CIV Unit Palettes. Because there are differences for the CIV Palettes vs what you need for the DH Palettes, tutorials here are for making CIV Unit Palettes...so you would have to extrapolate from them the information and techniques you can use.
1 Unit Palette.png
2 Unit Palette.png

Note: There are actually 15 Shadow Slots on the Palette but usually the Lightest Shadow is not used other than Smoke or Fog.
 
Helpful, thank you! The 10 rows of colors, how do you determine what colors to place and where? Just experience threw trial and error or is there a system to placement.

Anti-Aliasing blending, had to look up the meaning, yeah, Darkest Hour can't use this as much. All we see are different shades of purple show up around the sprite-not good.

Just so I understand, your saying a palette is built manually instead of two or more palettes being blended together?

If you have anymore tips, tricks, does or don't, please let me know. I'll stop pestering you for a while, and do some more reading.

Thanks as always,
Fuhrervet1889
 
Fuhrervet1889... The 10 rows of colors or the 160 color slots for the Unit can be in any of those palette slots. A Graphics Editor will place the colors in a particular order as desired.

The different shades of purple we do not use either and the magenta shades are only used for Shadows, Smoke and Fog as seen on the Unit Palette.

A New Unit Palette is made from the storyboards that have 16 million colors as the Unit Animation was rendered. There are No Palettes yet. We Remove the Background, Civ Specific colors, purple and magenta shades then selectively reduce the colors to get the 160 Unit Colors used on the Palette. We then add those 160 unit colors to an existing Civ Palette that only has the Civ Specific colors, Smoke/Fog Shades and Shadow Shades on it. IF I understand what you need for the Darkest Hour Unit Palettes, you would remove the unwanted colors, then reduce to 253 colors for the Unit colors and add the Magenta and Shadow Shade for your 255 color palette, which as I gather, is actually a 256 color palette with the last Palette slot Blank (0,0,0).

IF you have Units that already have palettes and you want to combine two Palettes, you can do that too. There are several techniques to do this and that can vary according to the Graphics Editing Program and personal preference.

For the Palettes you want to make, it is easier than making a Civ Unit Palette as you only have to remove the unwanted colors then selectively reduce the colors to 253 Unit colors then add your Transparent and Shadow colors to the Palette.
______________________________________________________________________________________________________________________________________________________________________________________________________________

IF you have an existing Unit with a palette and you want to add an Emblem, you can first try adding your Emblem to a single frame by copying your Emblem and pasting it on to see how it looks. IF your new Emblem looks as you want with the existing colors for that Unit, Great, simply save the Storyboard or Strip. If the Emblem would be better with different Colors, you would make a New Palette by adjusting the Storyboard or "Strip" as you call it to 16 Million Colors, add your Emblem with the Colors you want then Reduce the Colors to 253. You would then add the Transparent Color, Magenta 255, 0, 255 and Shadow Color 149, 0, 149 to the Palette slots on the top left. If you cannot get the Transparent and Shadow Colors in the correct Palette Slots, Save the Storyboard or Strip after Reducing the Colors to 253 colors as a .bmp for later use.

For Use IF your Graphics Editor will not place the Colors where you want them on the Palette so you have the Transparent Magenta and Shadow Colors in the top Left Color Slots on your Palette:
First Open an existing Unit Palette in your Graphics Editor. Change all Unit Colors on the Palette to Black (0,0,0), leaving Only the Top Left Magenta (255, 0, 255) and Shadow Color (149, 0 149). Save it a Palette, named something like Start_Unit_Palette.pcx in your Graphics Editing Program. You can use this Palette to start any New Palette for DH by adding the New 253 Unit Colors to that Palette and saving the New Palette as the Name of the Unit .pcx. This will keep the Transparent and Shadow colors where they belong on the palette. You can then load the New Palette to your saved .bmp storyboards or Strip

How to save the New Unit Colors to make a New Palette:
When you have added your Emblems to the 16 Million Color Storyboard or Strip in your Graphics Editor and Reduced colors to 253, Simply Open the new unfinished Palette with the Unit Colors so you can see it On Screen. Take a Screen Shot (ALT + Print Screen) on the Keyboard, Close the Open Palette and Paste the New Screen Shot of the Palette (Ctrl + V). Name and Save that Palette Image where you want to access it and save as .bmp format as that format retains absolute color.
There is a method to add colors to palettes but if you need to or want to add the colors manually, You can get PEdit which is a Free Palette Editor. Open your saved Palette, Start_Unit_Palette.pcx in PEdit then open your saved .bmp Screen Shot of your New Palette Colors in PEdit. Click all Unit Colors onto the Start_Unit_Palette from your saved .bmp Screen Shot and save the Palette as probably a Named.pal in your Graphics Editing Program. You can open your saved .bmp Storyboard or "Strip" with your New Emblems on it and load your New Color Palette to it using "Nearest Color Matching". Then save the Storyboard or Strip as the Name of the Storyboard or Strip.pcx. The storyboard or Strip is ready to make the Flc.

Hope the above is understandable and compatible to help you with what you are doing... always a chore to convey technical procedures in writing :)

Again, if you would like to converse more about this in detail, you can start a conversation with me.

You are no bother at all, this is one of many things we do here at CivFanatics, help one another, share work, information and our Games :)
 
I have a different take on this, no one should be surprised.

Firstly, it's good that you seem to have a regular palette in #12, though it seems to be upside down - is that the unit palette as it's seen in GIMP?

Also, have you done the Flicster thing, that brings the unit back to it's storyboard? (Sorry, I'm not keeping up).

It seems that once you get the unit back to the storyboard, you could remove all of the magenta, by simply erasing it (add a layer, and place a copy on it with a transparent background - remove that magenta). You probably still have some magenta pixels - get rid of whatever's obvious, and after converting it to RGB, you can use your 'color' (Hue-saturation) tool to reduce the saturation of whatever's left. Finally, reduce the image, copy it, index it, paste it in, then add in the magenta at the end.

That's what I would do. There's a little tutorial that might help you see it here.
 
Last edited:
Work.png


These are the units palettes as seen in gimp.

No on the the storyboard, I've just been working with the (.pcx )directional strips NE,N,NW...one at a time. Been using FLICter to convert into PCX files and using gimp to create the bmp files (which DH needs)
Better, faster way?

Sorry if my ignorance is showing..The storyboard is when all directions are showing simultaneously on the same page?

@Vuldacon, It will take me a bit to digest all of that, but I will! There will be no retreat!!

I assume this is PEdit = PediaIcons Editor?

I just can't express my gratitude in words for the assistance from both of you!
 
Last edited:
PEdit means and is a Palette Editor. you can get it in many versions. I do not know what Operating System you use on your computer so I did not provide a link but you can simply Google PEdit palette editor to find what you need. Because you are using Gimp, I assume you do not want to buy an expensive Graphics Editor so I mentioned PEdit as a Free Palette Editor you can get for free for procedures. I have used this one for many years (0.9.1) https://www.softpedia.com/get/Multimedia/Graphic/Graphic-Others/PEdit.shtml

Yes, a Storyboard is all directions on the same file.I understand that you are modifying one direction at a time rather than using the entire Storyboard with all directions. That is understandable for what you are doing. Flicster will use the single directions then put them back to a Storyboard when you are finished with each of them.

The Unwanted colors in your Palette that you change on the palette, as you said in a previous post, could be removed before reducing the Colors. Then you would have more colors that are for the Unit on your palette.

What I am saying is it would be better to remove the Unwanted Colors before Reducing to the Number of colors you use on your Unit Palette. IF you simply Mask Out = change the Unwanted colors on the Palette so they are not seen or used, you lose other Unit colors that would be used on those slots for the Unit.

You can work with pcx files then change them to .bmp when finished.

I do not know what copy paste problems you are experiencing regarding your images... or is this a Problem you are having with Gimp?

EDIT: Gimp use to place the Transparent color on the Top Left. I am not sure if the Newest version still does that but it seems to me that would help you for the DH Palettes you are making. It would speed the process because the Transparent and Shadow colors would already be indexed and the Unit Colors.
 
Last edited:
Back
Top Bottom