• Our friends from AlphaCentauri2.info are in need of technical assistance. If you have experience with the LAMP stack and some hours to spare, please help them out and post here.

Trying (again) to learn to edit units

Aethelend

Warlord
Joined
Feb 18, 2008
Messages
154
I am making yet another attempt to learn how to muck around with units. My goal is to learn to recolor existing units; import units from other games; and finally- eventually, hopefully- learn to make my own.

I have made several attempts in the past to follow tutorials and learn how to edit units, but I've always given up. It feels like I have no talent for this and it's hard not to get discouraged.

I'm starting this thread because I am going to have a LOT of questions, and I foresee a lot of problems and hurdles coming up. I ask for patience as I try to overcome each obstacle one at a time.
 
Here is my first hurdle.

The tutorials I've read mention using GIMP as an alternative to Photoshop. But when I open a .flc file in GIMP, it... doesn't look right. For example, here is warriorAttackA from the standard Fireaxis warrior:


Why does it look like this, and how can I fix it?
 
I have never managed to open and edit a flc-file with Gimp. I don't think it is possible, since Firaxis uses non-standard headers in their version of the flc-format. What I do is to convert the flc-file to a pcx storyboard (using Flicster or Civ3FlcEdit) and then edit the storyboard with Gimp. After editing, the storyboard is converted back to a flc-file with one of those aforementioned programs.
 
That's what I was doing wrong the whole time?! Wow, I feel dumb. Okay, I am able to follow along with the color changing tutorial and I'm working on recoloring a unit. I'll make another post if/when I run into another roadblock. With any luck, the next post I make will be an image of a successfully recolored unit.

Thank you for your help!
 
Okay. Next problem.

I've been following the tutorial for recoloring units here: https://forums.civfanatics.com/threads/tutorial-changing-colors-in-existing-units.253651/page-2

I have been following tom2050's guide to recolor the earth elemental (I decided to make mine red), but I'm using GIMP instead of Photoshop. I can't figure out how to fill in the rest of the blank colormap with the plain red color that the tutorial recommends (FF0000). After the image was indexed, I only have 55 colors, and I can't figure out how to increase them.

Screenshot (2).png


Also, I can't figure out how to export the palette as a .pal file so that it can be read by TilesetPal. I can export the palette as text files, python files, and a few other things, none of which seem to be what I need to continue the tutorial.
 
I sort of figured it out? But when I copied and pasted the shadows back on, they were all red, just like the rest of the creature. I don't know what I'm doing wrong, or how to make the palette work.
Please tell me I'm not the only one who had a hard time figuring this out. Tom2050's tutorial made it sound like this would be easy.
 
I got it! Thank you so much! Except... now, the shadows look like they are in front of the creature instead of below it.

I'm sorry I'm asking so many questions. But hopefully, my blundering could serve as a tutorial for others in the future who have the same difficulties I did.

Screenshot (3).png
 
Wait! Nevermind, I got it. Apparently I needed to pick "Paste in place" instead of just "Paste."
 
Yes! I've done it. I've turned an earth elemental into a blood golem, and taken my first steps towards being an actual unit maker.

Blood Golem.rar

Next, I will try to learn how to recolor only specific parts of a unit, so that I can turn some elf units into drow elves for a Dungeons & Dragons mod I'm working on.

Thank you again, Jorsalfare and Snodmaulvenn, for your help.
 

Attachments

One of the first things my drow civilization will need is a worker. So I took Grandream's Mystara elven worker and changed the colors, so that it has dark grey skin and red clothes.

Screenshot (4).png


So far so good; I am satisfied with how he looks. Unfortunately, when I exported the palette and tried to apply it to the other animations, it didn't take. All that it did was make the colors of the original elf look worse. Here is the run animation:

Screenshot (5).png


What did I do wrong?
 
Update:

I couldn't properly apply the palette to the different animations, so I tried doing it the long way: individually recoloring each storyboard with the same hue, lightness, and saturation settings. It seemed to be working and the animations looked good in Flicster... until I realized that the worker had some ugly smears on his pants in some animations. I tried fixing it, but when I selected the problem colors, it also selected some colors on the worker's face. It's so annoying when the same colors that are on a unit's skin are also on its clothes!

I might try something else, with a different unit that has simpler colors.
 
If you want to use the same palette, one way around the problem you had with the elf & golem is this: before you index the palette, while the pcx still RGB make a larger graphic with both of the units side by side. Index that large graphic, then trim copies of the large graphic to have your units as pcx files. Because you created the palette while they were together in one large graphic they have the identical palette.
 
The grey box is the result of incorrect indexing. The index for transparent is #255, while your file uses #224 - which is for unit shadows. In your colormap the index #224 and #255 are identical (EE00ED), and when applying a colormap to a pcx-file, the first match will be used. Use color FF00FF for #255 and recolor the background in the storyboard with this color before indexing again.
The crashing file is 4.flc. This is a known bug with Flicster. If some part of the unit animation comes closer than 2 pixels from the right frame border, the compiled flc will be corrupted and cause crashing - although Flicster itself will be able to run the file.
Hope this helps.
Sigurd
 
Dunno if you've looked at my tutorial on PCX editing. I used static images - like the civilopedia stuff - for examples. The section on rearranging the colormap (palette) would apply to units as well. Unfortunately in GIMP you have to move the colors around one at a time. But for things like getting the smoke, transparent, etc in correct places it's simple even if not fast.
 
If some part of the unit animation comes closer than 2 pixels from the right frame border, the compiled flc will be corrupted and cause crashing

Interesting. I have an idea about that, having just coded my own Flic decoder. Is the source code of Flicster available?

More: The encoding is done in two-byte packets. For animations with odd pixel width there is a special construct to set the last pixel of the row before going through the pixel pair packets for the rest of the row.
 
Back
Top Bottom