ToT Map3 Bug

Boco

Warlord
Joined
Jun 23, 2001
Messages
264
Location
NJ, USA
Has anyone ever seen this?

Starting from the SciFi game, I created a 4 map scenario. All maps look normal except for the last one (map3), which has a distorted display of ocean squares. :confused: Most of the ocean is labeled and displayed as terrain other than ocean. :crazyeye: Units moving through these squares, however, treat them as ocean (so the problem is purely cosmetic). Looking at map data block 2 with a hex editor indicates that nothing is amiss. I don't know enough to find blocks 1 and 3.

Attached (hopefully) is a screen dump of the thumbnail map. The top panel shows what you should see. The middle panel shows the actual map as displayed in ToT. The bottom panel views a square that should be an ocean square.

I've seen this using three different maps as map3. I suspect that there is something buggy in ToT's method of saving data for the fourth map. Would that be in map data block 3? The map coordinates extend from 0,0 to 109,115. What string should I search for to find mdb3?
 

Attachments

  • map4bug.gif
    map4bug.gif
    29 KB · Views: 187
In the Sci-Fi game, map 3 is meant to represent a gas giant. Ocean is automatically replaced by 4 gas terrain types – it's hard-coded. All 4 (terrain slots 7, 8, 9 and 11) are treated as ocean. The coastline graphics in Terrain8.bmp are used for all of them, too.

Any reason why you're using the Sci-Fi game? Be aware that both the Sci-Fi and Fantasy games have hard-coded features (don't ask me what they all are). Note: you can toggle between game types by hex-editing the .sav file. Game type is stored in byte 982:

0x00 Original
0x01 Sci-Fi
0x02 Fantasy

Finally, if you're looking for map block 3, you can find it easily by using that spreadsheet I uploaded in the Map/AI thread.
 
:hmm: I know what this is... It's because you started from the SciFi game. The 4th map is the Gas Giant there. If you start a SciFi game you'll notice the different "strata" on that map. That's also actually only Ocean, but using graphics from different terrain types. That's what's happening to your map now too.

I *think* you can fix that by changing the map characteristics in the rules.txt in @SECONDARY_MAPS. But it's possible that those values are actually saved into the savegame somewhere.

If they are set in the savegame I don't know where. But you should be able to find out like this:
- Start a new SciFi game as a white civ using a pre-existing map (could be the same one for all 4 maps) with set starting points (just to make sure as much as possible remains constant) and save right after it started.
- Now edit the SciFi rules, changing the map type of the 4th map to something other than gas giant and start and save a SciFi game again, using the exact same start-up settings as before.
- Check to make sure that the 4th map doesn't have the gas strata now.
- Compare the two savegames and see where the differences are.
 
Bah! Wobbegong beat me to it.

Wobbegong said:
In the Sci-Fi game, map 3 is meant to represent a gas giant. Ocean is automatically replaced by 4 gas terrain types – it's hard-coded. All 4 (terrain slots 7, 8, 9 and 11) are treated as ocean. The coastline graphics in Terrain8.bmp are used for all of them, too.

That's not true. Slots 7, 8 and 9 are normal land terrain as always. They will remain land if you use them in your map. The ocean strata are just a graphical effect. All Ocean still remains Ocean, but in-game the graphics and names are used of the other terrain types apart from Ocean to create the effect. The terrain properties like shields etc. are still those of Ocean.
 
Mercator said:
Bah! Wobbegong beat me to it.
Haha! ;)
Mercator said:
I *think* you can fix that by changing the map characteristics in the rules.txt in @SECONDARY_MAPS. But it's possible that those values are actually saved into the savegame somewhere.
I *believe* it's hard-coded for Sci-Fi games. The effect will disappear if you change byte 982.
Mercator said:
That's not true. Slots 7, 8 and 9 are normal land terrain as always. They will remain land if you use them in your map. The ocean strata are just a graphical effect. All Ocean still remains Ocean, but in-game the graphics and names are used of the other terrain types apart from Ocean to create the effect. The terrain properties like shields etc. are still those of Ocean.
:blush: I guess I didn't notice - as they're used exclusively as 'ocean' in the Sci-Fi game. Since the graphical effect appears to be hard-coded, I imagine it would be difficult to incorporate these 3 terrain types (as land) into a map that contained significant quantities of 'ocean'.
 
Wobbegong said:

:cry: ;)

Wobbegong said:
I *believe* it's hard-coded for Sci-Fi games. The effect will disappear if you change byte 982.

That is very possible. I never looked into this myself. I assumed that the @SECONDARY_MAPS bit would control that. But now I think of it, that might just affect the way Civ generates the random maps for them, not how it displays them.

Wobbegong said:
:blush: I guess I didn't notice - as they're used exclusively as 'ocean' in the Sci-Fi game. Since the graphical effect appears to be hard-coded, I imagine it would be difficult to incorporate these 3 terrain types (as land) into a map that contained significant quantities of 'ocean'.

What makes you think it would be difficult? Or do you just mean that it would be hard to take advantage of this graphical effect and that it would make the 3 land types practically unusable to avoid graphical confusion?

If you load a "normal" map for the gas giant you'll see how it turns out. That's how I found out about the effect.
 
Mercator said:
That is very possible. I never looked into this myself. I assumed that the @SECONDARY_MAPS bit would control that. But now I think of it, that might just affect the way Civ generates the random maps for them, not how it displays them.
Yeah, that's how I see it. If you take a 4-map Original game or a Fantasy game and change it to a Sci-Fi one (via byte 982), the ocean 'banding' will appear. That's without gas giant parameters in the @SECONDARY_MAPS section at any stage. I notice it also occurs in Sci-Fi games with pre-made maps.
Mercator said:
What makes you think it would be difficult? Or do you just mean that it would be hard to take advantage of this graphical effect and that it would make the 3 land types practically unusable to avoid graphical confusion?
I meant I was having a brain fade. :crazyeye:;) If the coastline tiles in terrain8.bmp are completely opaque (as they are just about everywhere except the Sci-Fi game) then you will only see the effect in the mini-map. Some of the terrain labels in the status bar would also be incorrect.
 
Thanks for the ideas, esteemed wizards of archaic hexes.
Wobbegong said:
Any reason why you're using the Sci-Fi game? Be aware that both the Sci-Fi and Fantasy games have hard-coded features
My efforts to create a 4 map scenario from the standard or extended game failed. Rather than figure things out, I simply opted for a 4-map game. Can you list the hard-coded gotchas? :mischief:
Wobbegong said:
Game type is stored in byte 982: 0x00 Original 0x01 Sci-Fi 0x02 Fantasy
0x00 -> fails to update maps 2 & 3 correctly when the zoom or cursor changes.
0x02 -> seems to work fine, although the game now looks to the ..\Fantasy folder for TXT, BMP, etc. files. Do you know of any hard-coded gotchas with the Fantasy game? :mischief:
Mercator said:
Bah! Wobbegong beat me to it.
Candy mouth is slowing your reflexes. ;)
Wobbegong said:
Ocean is automatically replaced by 4 gas terrain types – it's hard-coded. All 4 (terrain slots 7, 8, 9 and 11) are treated as ocean. The coastline graphics in Terrain8.bmp are used for all of them, too.
Mercator said:
That's not true. Slots 7, 8 and 9 are normal land terrain as always. They will remain land if you use them in your map. The ocean strata are just a graphical effect. All Ocean still remains Ocean, but in-game the graphics and names are used of the other terrain types apart from Ocean to create the effect. The terrain properties like shields etc. are still those of Ocean.
Wobbegong said:
:blush: I guess I didn't notice
That's an unusual smiley for you to post!

My experience is consistent with Merc's description. Coastline gfx are used for all ocean squares regardless of stratification, causing the squares to look like oceans with overflow debris at most zoom levels (See http://apolyton.net/forums/showthread.php?s=&threadid=134556&pagenumber=3)
Mercator said:
That is very possible. I never looked into this myself. I assumed that the @SECONDARY_MAPS bit would control that.
Here's my Rules.txt settings at the time that the 4 map Sav file was made:
Code:
@SECONDARY_MAPS  
6, 0,0, 0,0, 0,0,0,0,    0,0,0,  0,0,0,   0,0,0,  
6, 0,0, 0,0, 0,0,0,0,    0,0,0,  0,0,0,   0,0,0,  
6, 0,0, 0,0, 0,0,0,0,    0,0,0,  0,0,0,   0,0,0,
Because this didn't prevent stratification, I didn't try your test.
Mercator said:
But now I think of it, that might just affect the way Civ generates the random maps for them, not how it displays them.
I was hoping that map blocks 1 or 3 might hold the key.
Wobbegong said:
Finally, if you're looking for map block 3, you can find it easily by using that spreadsheet I uploaded in the Map/AI thread.
:confused: Well, yeah, about that... I'm stuck. :cry: What's wrong with this picture? :blush:
 

Attachments

  • kordufan.gif
    kordufan.gif
    193.4 KB · Views: 133
  • mb2calc.gif
    mb2calc.gif
    16.5 KB · Views: 107
Boco said:
0x00 -> fails to update maps 2 & 3 correctly when the zoom or cursor changes.
Strange. I've no such problems with WotR and that's a straight 4-map Original-type game. This might sound like a silly question, but you do have terrain files 5-8 in your testing directory, don't you? They are absent from the Original folder.
Boco said:
Can you list the hard-coded gotchas? :mischief:
Only a few come to mind. I know there are some different tech effects (see William Keenan's ToT Advances article), the Space Ship graphics are different for the Fantasy game and as you're already aware the Fantasy/Sci-Fi folder becomes the default directory for game resources (anything in your scenario folder will override it – menu.txt excluded). I suspect the diplomacy screens are hard-coded, too. I'd like to bet there are more lurking around somewhere, which is why I'd be cautious about using either the Fantasy or Sci-Fi games as a base for a scenario.
Boco said:
That's an unusual smiley for you to post!
That's because normally I shamelessly misinform people. :D
Wobbegong said:
If the coastline tiles in terrain8.bmp are completely opaque (as they are just about everywhere except the Sci-Fi game) then you will only see the effect in the mini-map.
Boco said:
My experience is consistent with Merc's description. Coastline gfx are used for all ocean squares regardless of stratification, causing the squares to look like oceans with overflow debris at most zoom levels
I suspect a cross-post. Yes, if they exceed the size of the diamond, you'll get 'debris'.
Boco said:
I was hoping that map blocks 1 or 3 might hold the key.
See my previous post.
Boco said:
:confused: Well, yeah, about that... I'm stuck. :cry: What's wrong with this picture? :blush:
Assuming that El Aurens 2 uses the same map as El Aurens 1, then your map dimensions are incorrect for starters. The real map width is half the value displayed in the game (the Civ2 map editor gets it right). If the map dimensions are giving you a headache, open the map in MapEdit – that'll tell you. By my reckoning you should have a width of 55 and a height of 116. For tile co-ordinates, enter the values from the game.

I take it you don't have 218 pairs of transporters in your game, either? The list in the .sav file includes deleted and pillaged ones, so that could explain higher numbers (if that's the case).

After you've fixed the map dimensions, enter co-ordinates (0,0) and you should get the offset for the first byte of map block 4 (map 3).
 
Wobbegong said:
This might sound like a silly question, but you do have terrain files 5-8 in your testing directory, don't you? They are absent from the Original folder.

Such a silly question. :lol: :gripe: :rotfl: Oops, I was careless! That was the problem. :blush:

All is good now. :hatsoff:

[Edit] [Edit2] Rats! It appears that some settings in @UNITS_ADVANCED are royally fubar now. (overlooked an error in the section) [/Edit2] [/Edit]
 
Back
Top Bottom