I replaced some portraits by renaming them to exact (file) names as they are in portraits folder. But I get a glitch - my 1st character portrait goes blank during some in-game actions and the game itself crashes a lot. I wonder if by replacing some portrait files, the file portraits.mes became corrupted? How to fix it?
Have you read the thread about custom portraits? A thing to be careful about with custom portraits is making sure each one is exactly the right dimensions and there are quite a few different sized portraits that make up each character's portrait. Here's a link to the thread Portraits Discussion If you download the portraits made easy that's linked in post #3 you will find a step by step instructions on custom portraits.
Since you overwrote the files themselves and presumably didn't change portraits.mes, I can't see what that file would be affected. If the portrait goes bad only some of the time, it's probably when the portrait tries to turn grey (which is when you are unconscious or dead). It could be one of two things - either the grey portrait file you made was made wrong, or the name of the file wasn't duplicated properly. Make sure you have the name of the grey file exactly as it was in the original, it can get funny as you know since the numbers change, the size letter changes, and the word "grey" is added if it's a grey images. For example, it's easy to do something like this when quickly naming files: HUM_0050_b_cabral.tga HUM_0051_m_cabral.tga HUM_0052_s_cabral.tga HUM_0051_s_cabral_grey.tga HUM_0052_m_cabral_grey.tga where the last 2 names should be 0053, and 0054