Civ 2 ToT - Noob Questions - including grfx glitch

I'm the one who suggested using the 'pink' pixel but re-reading Knighttime's post it seems like you might only need to use a unique color:

"The single pixel at the extreme top left of a .bmp image is generally interpreted as defining another transparent color. Change this one pixel to a unique color (not used elsewhere in the image) and hopefully that will fix the issue."

As such, you may want to run a test with a different color from white or pink to see if it works as well.
 
yeah like maybe a really really light whitish yellow pixel wouldn't be obvious in the white sky
As such, you may want to run a test with a different color from white or pink to see if it works as well.
:yup: Yes, that is why I wrote my last post in this thread.

Another interesting solution, even to get rid of that in my eyes superfluos additional small icon in the civilopedia box can be found in this thread:
 
:yup: Yes, that is why I wrote my last post in this thread.

Another interesting solution, even to get rid of that in my eyes superfluos additional small icon in the civilopedia box can be found in this thread:
That's also very interesting, bigger pictures!

Quick question: does ToT still use the old (and very limited) title.gif inherited from MGE? or does it support bigger and better quality pictures? as a scenario title background graphic?

Thanks!
 
That's also very interesting, bigger pictures!

Quick question: does ToT still use the old (and very limited) title.gif inherited from MGE? or does it support bigger and better quality pictures? as a scenario title background graphic?

Thanks!
I think only a few months ago I tried to experiment with some better quality title.bmp's and it didn't work sadly. Was going to suggest allowing for high colour title BMPs in ToTPP but I figured I've pestered that man enough already about small graphical things most people people don't care about haha!
 
Last edited:
I think only a few months ago I tried to experiment with some better quality title.bmp's and it didn't work sadly. Was going to suggest allowing for high colour BMPs in ToTPP but I figured I've pestered that man enough already about small graphical things most people people don't care about haha!
Thanks for the quick reply!
 
And here I go again. I'm playing around the dialog.bmp and civwin_back.bmp files. There's an issue in the latter where for some really weird reason, I can't paint the entire thing with my new colours, there's a section in the bottom border of the file that for some reason it must remain the original horrible grey tones. I haven't been able to track it down to the offending pixel, but this is the closest I was able to get:

1) Screenshot from my drawing software:

1660563263192.png

In-game works fine:

1660563148049.png


If I paint the entire thing, the game throws an error as follows:

Screenshot of my drawing software:

1660563512651.png


In-game it crashes

1660563497115.png

I have searched the forum and couldn't find anything! Any ideas?
 
And here I go again. I'm playing around the dialog.bmp and civwin_back.bmp files. There's an issue in the latter where for some really weird reason, I can't paint the entire thing with my new colours, there's a section in the bottom border of the file that for some reason it must remain the original horrible grey tones.
May be there exist much better ways to fix this. I fixed it by modding those files in the Original folder. For a better switching between the different colourings in the Original folder I have multiple of those files that I only need to rename to have them in action, even in the scenario or mod that I want to play.

dialog-multi.jpg


Attached is a dialog file from skulb for an easy test.
 

Attachments

  • dialog.zip
    78.7 KB · Views: 25
May be there exist much better ways to fix this. I fixed it by modding those files in the Original folder. For a better switching between the different colourings in the Original folder I have multiple of those files that I only need to rename to have them in action, even in the scenario or mod that I want to play.

View attachment 636750

Attached is a dialog file from skulb for an easy test.
I see, I didn't want to replace the Original files but I'll give it a try, thanks!
 
I am preparing some custom improvement photos. However, a few of them in-game appear broken. All my images are 242x195 pixels, I am actually working on top of the original game XXimp.bmp images, so I'm not sure why some of them work and some don't, as all are pretty much the same size B&W photos.
...
Any ideas why this might happen?
I see that a previous post from me was quoted as the solution to your problem, and turned out to work for you. But I think what really worked was that you resaved the image, not that you changed the top left pixel.

For the large images that are shown in the Civilopedia, for wonders only (but not improvements), TOT used to treat the top left pixel of the image as defining a new transparent color. If that was your issue, the result would have looked like this:

transparency.png

As you can see, all the pure white pixels in the top left part of the image are transparent and the background is showing through. But the image you attached looks much more "garbled" and very different. Furthermore, it sounds to me like this was an improvement icon (not a wonder icon) and as far as I know, this transparency issue never occurred in the Civilopedia for improvements.

For wonders, TheNamelessOne actually provided a fix for this in TOTPP 0.17 and later. The patch named "Civilopedia wonder graphics" has the description "Fixes the rendering of wonder graphics in the Civilopedia" and it basically makes large wonder images display like large improvement images always did: the top left pixel is not treated as transparent anymore, if this patch is checked.

I suspect that your original problem was actually some type of corruption in the .bmp image (most likely in the header portion that stores image metadata). I actually had this same issue happen to me while building my own Medieval Millennium mod, but simply opening the image in Paint.net and resaving it (without making any changes) fixed it.

However, if you are adding images to custom dialog boxes in Lua, those images do still follow the rule that the top-left pixel defines a new transparent color. This can be useful, since it allows you to do something like display a unit icon with an irregular border that will "float" on the background of the dialog box. But if you want to use any improvement or wonder images in a dialog box (not just in the Civilopedia) then making the top left pixel unique is required to display it properly there.

Another interesting solution, even to get rid of that in my eyes superfluos additional small icon in the civilopedia box can be found in this thread:
Just to follow up on one item from that other thread, in case it's relevant to anyone here:
Would've made more sense to size-down from Improvements.bmp than to size-up from Icons.bmp. The graphics from Improvements.bmp are used sparingly in the game.
This exact idea was implemented by TheNamelessOne in a different TOTPP patch: "Civilopedia improvement icons" has the following description: "Uses the larger icons from Improvements.bmp for the improvements & wonders sections of the Civilopedia."

Quick question: does ToT still use the old (and very limited) title.gif inherited from MGE? or does it support bigger and better quality pictures? as a scenario title background graphic?
Unfortunately, although TheNamelessOne added this to his "to do" list at one point (see here) it hasn't been implemented yet. So you still have to use title.gif at this point.

And here I go again. I'm playing around the dialog.bmp and civwin_back.bmp files. There's an issue in the latter where for some really weird reason, I can't paint the entire thing with my new colours, there's a section in the bottom border of the file that for some reason it must remain the original horrible grey tones. I haven't been able to track it down to the offending pixel, but this is the closest I was able to get:
I'm unable to recreate this, sorry. I put a copy of civwin_back.bmp in my scenario folder (didn't touch the one in the Original folder) and overwrote the entire file with single shade of maroon, similar to what you did except without any attempt to have gradient shades at the bottom. It worked fine and appeared maroon in-game.

Are you willing to attach the actual civwin_back.bmp that you'd like to use, with no gray pixels at the bottom but all the red gradiant shades? I'd be interested to try it out myself.
 
Thanks @Knighttime for taking the time to reply in such detail.
I see that a previous post from me was quoted as the solution to your problem, and turned out to work for you. But I think what really worked was that you resaved the image, not that you changed the top left pixel.

I suspect that your original problem was actually some type of corruption in the .bmp image (most likely in the header portion that stores image metadata). I actually had this same issue happen to me while building my own Medieval Millennium mod, but simply opening the image in Paint.net and resaving it (without making any changes) fixed it.

Not sure why, I use Paint.NET and when I save, I leave selected "auto-detect" bit depth. Do you think I should manually select 24-bit or overrride any other default dettings?
1660637191836.png


1660637295808.png

However, if you are adding images to custom dialog boxes in Lua, those images do still follow the rule that the top-left pixel defines a new transparent color. This can be useful, since it allows you to do something like display a unit icon with an irregular border that will "float" on the background of the dialog box. But if you want to use any improvement or wonder images in a dialog box (not just in the Civilopedia) then making the top left pixel unique is required to display it properly there.
Thanks for the hint, I'll definitely use that feature too ion my scenario, haven't started with that yet.
Unfortunately, although TheNamelessOne added this to his "to do" list at one point (see here) it hasn't been implemented yet. So you still have to use title.gif at this point.
Thanks for that, I'll see if I can improve the 20 year-old title gifs I have as they look odd :)
I'm unable to recreate this, sorry. I put a copy of civwin_back.bmp in my scenario folder (didn't touch the one in the Original folder) and overwrote the entire file with single shade of maroon, similar to what you did except without any attempt to have gradient shades at the bottom. It worked fine and appeared maroon in-game.

Are you willing to attach the actual civwin_back.bmp that you'd like to use, with no gray pixels at the bottom but all the red gradiant shades? I'd be interested to try it out myself.
Absolutely. I am attaching the version that works in-game (_OK) and the completely painted version that crashes (_KO). I'm really curious to see if you can find anything at all as there's only a couple of pixels left painting. I use Paint.NET and basically I worked on top of the original file and saved keeping the same format.

Thanks,
Pablo
 

Attachments

  • Civwin_back_KO.bmp
    250.1 KB · Views: 23
  • Civwin_back_OK.bmp
    748.2 KB · Views: 24
Crap I just tried after writing my post. Instead of leaving the default settings I explicitly saved as 24-bit. That was it!!!!!

I'm really sorry for wasting your time. I'll reopen all graphics again and re-save just in case.

1660637962288.png
 
Crap I just tried after writing my post. Instead of leaving the default settings I explicitly saved as 24-bit. That was it!!!!!
Glad you found the issue! I checked and Paint.net on my PC defaults to saving as 24-bit, not Auto-detect. So yes, I think using that setting in every case will give the best (most consistent) results.
 
Glad you found the issue! I checked and Paint.net on my PC defaults to saving as 24-bit, not Auto-detect. So yes, I think using that setting in every case will give the best (most consistent) results.

Thanks again for your help.

Paint.NET is very useful and easy to use but I remember 20 years ago, when I worked on my MGE scenarios, that Paint Shop Pro (it was free back then) was way much better to handle the palettes. Now I'm currently working with the DLL gifs and it was impossible to get them working in-game with paint.NET, I had to download GIMP, at least the latter keeps the original palette!
 
Yeah, Paint.NET is great for .bmp files but not for Civ2 gifs. I actually still have my 1997 version of Paint Shop Pro running :D and it's still what I prefer for editing gifs. I've used GIMP on a few occasions too, but it just doesn't seem friendly or easy to use (probably because I use it so rarely that I never get comfortable with it).
 
Top Bottom