1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Graphical problem when editing Terrain1.gif

Discussion in 'Civ2 - Scenario Creation' started by Greizer85, Jan 12, 2014.

  1. Greizer85

    Greizer85 Emperor

    Joined:
    Mar 7, 2009
    Messages:
    1,210
    (MGE, if it matters.)

    Hi,

    I'm making a world map for Civ II and trying to make it as accurate as possible. In my crusade againt the randomly placed resources, I came across this thread, and followed the tip given there, which is to edit the Glacier terrain and make it a 'super terrain' for use at starting locations and prime city sites. Or rather, that was the plan until a little snag occurred...

    It's a good thing I backed up the Terrain1 file before trying; editing it went fine, but once I opened the Map editor, all the terrain was scrambled with wild colors. :crazyeye: I tested and this occurs even if I don't edit the file, but just save it over itself. I tried editing in Paint instead of the program I have for it (Paint.net), but then the editor complains something or other about 'bits', and refuses to even start up again. If you know the reason for these weird occurrences, or could help correct them, I'd greatly appreciate it.

    The map in question looks like this; it's a tad small for most Civ II players (I'd imagine), but should work well for short games or in multiplayer (due to the balanced starting locations). So the sooner the problem is solved, the sooner you'll get to play on it. ;)

    Cheers,
    Greizer

    EDIT: This seems to be related... Hexadecimal numbers give me a headache. I saved the palette of units.gif (that is said to work with all files), then tried enabling it in Terrain1. No luck, all scrambled eggs. I will continue to experiment, but if you have info, help would be greatly appreciated.

    EDIT2: Here is an image, if it helps.

    Spoiler :
     
  2. Greizer85

    Greizer85 Emperor

    Joined:
    Mar 7, 2009
    Messages:
    1,210
    This is taking too long and I want to play on my map already, so let's just circumvent the problem. Could someone here help me and do the needed edit for me? It's very simple.

    (Note: Before you do this, back up your own Terrain1.gif and make sure that the game doesn't scramble after you edit this file! It's enough that I'm screwed when it comes to this issue, I don't want there to be two of us. ;))

    I decided to use the Tundra terrain instead of Glacier for the super terrain, since the game automatically puts Glaciers near the poles when you start a game. So the change that I want to be made is as in the picture below:

    Spoiler :


    Just copy the square outlined in red (the 'alternative grassland' that is not used by the game - perfect for my purposes) directly over the Tundra square below it, making sure that the green outlines match exactly. That's it. You can understand my frustration when something so simple is proving so hard to do. :lol:

    If you do this for me, you will get your own tropical island on the map, in the shape of the initial letter of your first name, or any shape that you prefer and that's not too convoluted. If you do nothing else to end up in the history books, here's your chance, folks! :king::goodjob:
     
  3. Blasph23

    Blasph23 Terraformation Junkie

    Joined:
    May 30, 2008
    Messages:
    279
    Gender:
    Male
    Location:
    Poland
    Looks like your editor doesn't recognize/preserve the original color palette.
    Use gimp. It's free, powerful, kinda complicated but once you get the basics, it's amazing.
    I use that to edit all my civ2 gifs and avoid any problems whatsoever.
    As a side note, upload both the original terrain file and the one with your modifications.
    I'll take a look and tell you what the problem is so you won't repeat the mistake in the future.
     
  4. Greizer85

    Greizer85 Emperor

    Joined:
    Mar 7, 2009
    Messages:
    1,210
    Thank you for your answer! :) I was getting desperate. I did try various alternative programs, but I haven't tried Gimp yet. I'll give it a whirl, thanks for the tip. I also tried editing the palette with these programs and enabling the palette from Units.gif, but it didn't have any effect; either I did something wrong or the problem is somewhere else. For one thing, the yellow background that appears in my game is not present in any of the screenshots that I've seen of this problem; it's mostly grey or blue.

    Anyway here are the two files: the only 'alteration' done to the 'scrambled' file is opening and saving it in Paint.net. That's enough to totally scramble it...
     

    Attached Files:

  5. Blasph23

    Blasph23 Terraformation Junkie

    Joined:
    May 30, 2008
    Messages:
    279
    Gender:
    Male
    Location:
    Poland
    For some reason my GIMP program did not correctly save overwritten gray background of the terrain tile in question. I had to replace it with default pink that is commonly used in all Civ2 gif files. It works.
    Also, I believe that the issue with gray color used in civ2 gif files is related to its decimal number in the old enumeration of colors that most graphic programs don't use anymore.
    Instead they average it and give it the current day equivalent which in turn civ2 engine does not recognize properly. I might be wrong though, I only read something like this once, probably on this forum and I am no expert on graphics.
     

    Attached Files:

  6. Greizer85

    Greizer85 Emperor

    Joined:
    Mar 7, 2009
    Messages:
    1,210
    A thousand thanks to you my friend! :goodjob: I tested it and it indeed works. You can't really tell the new grassland apart from regular grass, though, so I'm afraid I'll have to try and edit it further myself... Downloading Gimp as I speak.

    I think I'll make two versions of my map: one with just the regular map file and one with an altered Rules.txt and terrain, maybe also some resources. I found some nice files here on CivFanatics that can be used to alter the graphics with very little work, which is fortunate as I'm a terrible graphical artist. I'll try to give credit where it's due ofc, but I kinda hoovered up the files and I'm not sure where everything came from.

    Btw I'm already making a map of Finland for a mod/scenario that I've thought up. It's called The Story of Finland, and contains the rise of Finland from an obscure agrarian 'colonial' realm into the modern hi-tech economy welfare state that it is today (even though it's being actively dismantled...). It's not strictly historical, but deals more with Finnish archetypes, along with a slight dose of humor where appropriate; e.g. Ice Hockey Rings will replace Colosseums, and JS Bach becomes Koskenkorvan Viina, a factory that makes a popular Finnish liquor. :D Could I count on your help when it comes to some technical aspects of the mod? Not full-time or anything but if a snag or two occurs along the way. I'm not sure how difficult it will be to do everything I want, but I'll experiment and see if I'll go ahead with it. So far Civ II modding looks to be a breeze compared to the later games, but then some things such as government forms are hard-coded and cannot be edited, so there's trade-offs ofc. Oh, and Terrain1 be cursed forever like the little devil it is! :p

    Btw where do you want your tropical island, and in what shape (on the world map that is)? ;)

    EDIT: Hallelujah! Praise the Gimp! It actually works without hiccups! :goodjob::cool: Now this will be exciting! Finally I'll be able to make the game look exactly how I want. I tried making a new Palace building before, but I'm terrible at editing graphics... I guess I'll try and pick what's best in the ready-made files, then if I need something else I might request some help. I'll also take suggestions to improve the tech tree and name some of the Civ (or rather 'trible') leaders, once I get the bulk of the work done. It's hard to think of leaders for the ancient Savonians or Kainulaiset (English?), etc... But I'm sure something can be thought up. Anyway, stay tuned for the actual mod thread. It will be a month or so probably. I should finish the update for my Civ V map, in order not to disappoint my fans, but I find Civ II looks much better than Civ V, paradoxical as that is. Its graphics have a 'timeless', painterly feel to them, while those of Civ V already seem dated to my eyes.
     
  7. Blasph23

    Blasph23 Terraformation Junkie

    Joined:
    May 30, 2008
    Messages:
    279
    Gender:
    Male
    Location:
    Poland
    B shape sounds good ;)
    I've been modifying scenarios to fit personal preferences and also made some of my own so I have a bit of experience with all those gifs and txt files that govern stuff.
    Quite a few things are hardcoded but certainly most are editable, including many of the government specific features, like max science/tax/lux rates or food consumption by settlers/engineers.

    Civ 2 is very well suited for modifications, it's what keeps me playing it. No two games are the same and when you suddenly feel they are, just alter a few things in rules.txt and the fun begins anew.

    Personally I much prefer sci-fi/post-apocalyptic scenarios for this game rather than historic/ancient ones, but if you ever finish yours, I will give it a shot.

    As for Koskenkorva, I have recently emptied a few bottles of vodka with a bunch of friends and one of them was a 1L bottle of the 60% Koskenkorva and it was amazing. At least the part that I remember.
     
  8. Greizer85

    Greizer85 Emperor

    Joined:
    Mar 7, 2009
    Messages:
    1,210
    You know what, I think I'll add swamps in Siberia in a B-shape. Then it won't affect the realism of the map too much, but you get a nice trophy for your efforts. :)

    My world map is nearly finished now, and the Finland map is coming along nicely. No more problems with Terrain1.gif. However, and I am ashamed to admit this, another problem in the same vein rears its hideous head: the minute I open and save Units.gif, in Gimp no less, all unit icons in the game become black boxes. :crazyeye: I'm a bit too tired to tackle with this issue again on such a short notice... I tried editing the palette of the file, but Gimp says that 'There are no colors present in this file'. :confused: I think I'll go ahead and edit the units' stats and try to figure out this headache later on; but if you (or anyone) know how to fix this, feel free to chime in again. I wish I was a more technical kind of person, but it's all Greek to me when it comes to the insides of files, computers and whatnot.

    EDIT: Aaaaaaand it's started again for Terrain1.gif as well. :eek: Whenever I save it, I get black backgrounds in resource squares. I give up for now. I will finish my Finland map, then see if I'll have the patience to figure this thing out. I'd hate to be able to edit things and then have the file go corrupt on me at the last minute (such things happen to me frequently in all walks of life).
     
  9. Blasph23

    Blasph23 Terraformation Junkie

    Joined:
    May 30, 2008
    Messages:
    279
    Gender:
    Male
    Location:
    Poland
    I'm not much of a specialist either but I have no problems with units.gif when editing with gimp. Perhaps you could make a backup copy, delete the original file entirely and save the copy after modifications with a new file extension - .bmp. I remember I did that before and it solves some other issues, probably similar to what you have.
     
  10. Greizer85

    Greizer85 Emperor

    Joined:
    Mar 7, 2009
    Messages:
    1,210
    Thanks for the tip. It actually worked the first time; however, I messed up the editing and then tried this trick again, exactly the same apart from the fix (fill the grey background with pink in order to get rid of the ugly grey blotches), and now all the graphics are black, just like my mind. :sad: I even tried making all the backgrounds pink, but no dice, blackness it is. *sigh* If I could just get this right, I could proceed with making my mod. Oh well, there's plenty of conceptual work to be done, so I'll just concentrate on that for now. Again thanks for all your help.
     
  11. TheNamelessOne

    TheNamelessOne Warlord

    Joined:
    Dec 18, 2013
    Messages:
    196
    Civ II does not support metadata in GIF files, which is sometimes added by the editor when saving. When using the GIMP, make sure to disable "GIF comment" when exporting. Not sure if this is your problem, but it may explain why it works one edit and then stops working the next.
     
  12. Greizer85

    Greizer85 Emperor

    Joined:
    Mar 7, 2009
    Messages:
    1,210
    Maybe I speak too soon (knocks on wood :mischief:), but

    PRAISE THE LORD, IT ACTUALLY WORKS!!!!!!!!!!!!!!!!!11 :eek::dance::beer::band::salute::bounce::thanx: :thanx::trophy::spear:

    The amount of smilies may appear excessive to the casual observer, but rest assured that it adequately represents the amount of my gratitude. :D My thanks go out to both you and Blasph ofc, since one of you gave me the cure and the other made it stay in my stomach, so to speak. :p Blasph already has a trophy on my world map, but maybe I'll make a b-shaped swamp in Finland, too, and have a city with no name somewhere. :goodjob:

    Now I'm a bit conflicted about whether I should do the scenario in ToT (which I just ordered), or stick to MGE. ToT has a less aggressive AI, correct? If so, that may be the stickling point, because frankly I'm immensely tired of the relentless blood-thirst of the MGE AI. 'Won't give me three techs and 500 gold? Fine, war until the end of time!' :mad: However the graphical style of ToT is really not my cup of pixels. Even with the mod you linked, there is something 'extra' about the edges of squares and icons that tickles my eyes (and I don't want them tickled). Maybe I'll try it with the mod and see if it's good enough. Only thing is, I will have to wait two weeks for the disc to arrive and I'm too impatient to keep myself from graphical modifications, since I've been deterred from making them all this time. Decisions, decisions. Again I thank you for this new, better set of problems! :D
     
  13. Blasph23

    Blasph23 Terraformation Junkie

    Joined:
    May 30, 2008
    Messages:
    279
    Gender:
    Male
    Location:
    Poland
    MGE AI is fixable. I'm playing civ2 mge with normal AI and it's really neat for the scenario purposes.
    There's a patch somewhere around this forum and also if it doesn't work for you, I can give you my civ2 executable.
     
  14. Greizer85

    Greizer85 Emperor

    Joined:
    Mar 7, 2009
    Messages:
    1,210
    Thanks for the info! :) I can't seem to locate the patch, so if you could attach the .exe, I'd appreciate it. Btw are there any side-effects to this change that you've noticed (like bugs etc)?

    ... Humm, if I put the .exe along with my scenario files, won't it mean that the player will have to overwrite their original Civ2.exe with it? So they will lose the default MGE AI (not to say it's a great loss, but some people might prefer it for other scenarios or regular games)? I guess I could warn them in the Readme about this... Or present two options, play with the default AI or the new one, for a more cut-throat or civilized experience in the making of modern Finland.
     
  15. Blasph23

    Blasph23 Terraformation Junkie

    Joined:
    May 30, 2008
    Messages:
    279
    Gender:
    Male
    Location:
    Poland
    Well yes, this would mean you have to replace the original civ.exe.
    You can always keep it around under different name and as far as I know, file name doesn't matter as long as you have it in the right folder - you can start the game from either file.
    As for the side effects - I haven't noticed any.
     

    Attached Files:

    • civ2.zip
      File size:
      735.6 KB
      Views:
      88
    Cassius Critzer likes this.
  16. Greizer85

    Greizer85 Emperor

    Joined:
    Mar 7, 2009
    Messages:
    1,210
    Thanks a bunch; I will try a test-game or two and see how the new AI works.

    This .exe seems to have the added benefit of starting the game right away -- I currently have a strange issue on my PC that requires me to click every application twice before they actually start up; then it 'registers' the first try about 5 minutes afterwards and says something like 'Only one copy of X may be running at once bla bla bla'. :crazyeye: I should re-install Windows one of these days, but in the meantime it's a nice added benefit, as I have to keep re-starting the game to see how the new graphics actually look in-game.
     
  17. Blasph23

    Blasph23 Terraformation Junkie

    Joined:
    May 30, 2008
    Messages:
    279
    Gender:
    Male
    Location:
    Poland
    Excuse the thread necromancy but I ran into an issue that's very much related to the discussion above.

    I started messing around with scenarios again and wanted to do some terrain edition.
    Updated my GIMP and started working, but of course - I have the grey triangles that I can't get rid of:

    Spoiler :
    upload_2018-7-13_20-42-58.png


    I tried everything in GIMP (I think I did). No interlace, no gif comments, nothing.
    Replacing the grey parts with the vanilla pink (or magenta or whatever it is) solves this but makes editing tiles like roads and railroads more of a hassle because the inner diamond borders disappear.

    In principle, I don't even have to edit anything, just save the file immediately after opening it, which proves to me it's the GIMP adding something to the file but I can't seem to find out what that is.

    Any scenario creators here that ran into these issues and successfully resolved them?

    PS. Using MS Paint is even worse - the game just crashes on reload. At least with GIMP I get some sort of usable graphics.
     
  18. Blasph23

    Blasph23 Terraformation Junkie

    Joined:
    May 30, 2008
    Messages:
    279
    Gender:
    Male
    Location:
    Poland
    I read somewhere that paint shop pro was a better choice for editing civ2's gif files and it indeed is.
    Zero problems after modifying the files and reloading the game.
    That still means GIMP has some hardcoded feature that complicates things.
    It would be nice if I could find out what it was, since I am much more used to GIMP's GUI and of course it's free.
     
  19. Cassius Critzer

    Cassius Critzer King

    Joined:
    Dec 27, 2017
    Messages:
    918
    Gender:
    Male
    I've been down this same road for 1.5 years. You can easily find free archived Paint Shop Pro with the caveat that it may or may not work with newer systems.

    So far there isn't a paint program in Google Play that will edit unit graphics, icons, or terrain on Android tablets. This means simple layer issues cannot be easily edited.

    If someone would blank out a terrain.gif for terrain 1 and 2, then these can be edited with the built in editor and saved as a .bmp. I've easily found excellent terrain files but cannot fix two issues.

    One
    I want a very simple icon to indicate as a layer over the terrain but NOT obscure the underlying terrain so that at a glance when trying to coordinate hundreds of units, movement rates can easily be calculated. All existing farms heavily obscure the underlying terrain.

    Two
    Even resources do this. I would rather have tiny icons or even just a color dot or a letter to indicate
    Coal
    Iron
    Gold
    Silver
    Etc are there as large icons may seem aesthetically pleasing but generally end up obscuring the terrain.

    If there was a blank terrain file for these issues, I would be supremely grateful.

    One of the things to consider is that in advanced mods with enormous combat, then tradng of resources can seldom work with merchants as they are defenseless and easy targets by the AI. Rather a mod desiner who sets up the cities can preset trades between cities to both help the AI attitude plus multiple revenue streams. Then turn off merchants so no one generates them. If you have 255 cities and innumerable say 500 merchants trying pointlessly to get across a map requiring walking and ships, they have a less than a 10% chance of getting there. And then by the time they do, there no longer is a need.

    So terrain resources are needed but mostly to indicate the source of trade but ideally NOT to create merchants, as trades are hopefully done prior to turn one. Then a cash strapped AI is not wasting shields with a terrible return on investment.
     
  20. Cassius Critzer

    Cassius Critzer King

    Joined:
    Dec 27, 2017
    Messages:
    918
    Gender:
    Male
    Here is the Terrain1.gif that I created. I converted a png file to a jpg, then converted that in another program to a gif. Note the difference in a typical terrain.gif file which is quite a bit smaller.

    Here's the file as a jpg too.

    I used the RGB values of 255 0 255 which should be the proper pink.

    Here is the original TERRAIN1.GIF file as well.
     

    Attached Files:

Share This Page