how to fix the bug with the appearance of the earth in civ IV

AstrokauzazITS994

Chieftain
Joined
Jan 15, 2023
Messages
25
Hi, while playing civ iv i noticed that the earth is twice as big as it should be. I mean, for example, Europe can be seen from both sides if you look at the earth from space.
Another problem that annoys me is how to remove this ice cover at the poles of the map. because Greenland is at the equator, not at the pole. And by the way, I wish it was possible to cross the North Pole in civilizations to the Pacific.
If anyone knows the answer to these questions, I'd be very grateful
 
I think the only way that a mod can affect the Globe effect is through the GLOBE_... fader settings in Assets\XML\Misc\Civ4DetailManager.xml. This file is only sparsely documented with comments, so it's largely trial and error. I don't know if you can shrink the ice caps this way, or the "dark side" at the back of the Globe. For what it's worth, I imagine that it's better for usability to keep most of the map on display.

As for allowing movement across the poles, I guess you'd want units to somehow teleport when moving off a vertical edge. In principle, I believe this can be implemented in a mod, but it would be a big, difficult task e.g. to adjust the pathfinding code and distance measurements. I don't think travel by land or sea across the globe [edit:]poles is a big factor in reality anyway, and cheap diagonal movement already means that e.g. a ship traveling from Bordeaux to New York in a Civ 4 Earth scenario might as well go via Greenland.

A world map based on some funky map projection that places one of the poles in the center (example) might combine well with the Toroidal world-wrap setting. But Globe view is not going to translate that properly into a sphere.
 
Last edited:
A world map based on some funky map projection that places one of the poles in the center (example) might combine well with the Toroidal world-wrap setting.
That's a really nice approach :) I wonder why no one ever made such maps?
It's really a pity that Sid Meier and his team never used this projection. This should be a forth option besides Flat, Cylindrical and Torodial, with its special rules for longitude and latitude and movement modifiers near the four sides.
Is there any game that ever used this projection? :confused:

But Globe view is not going to translate that properly into a sphere.
IIRC there is no Globe view with torodial maps.
 
Honestly I can see why they didn't. It just looks alien.
 
That's a really nice approach :) I wonder why no one ever made such maps?
I agree, that quincuncial projection looks nicer than I would've imagined. All the bad distortion is in the Pacific. Maybe if there were some way, for the purposes of a Civ scenario, to tweak it so that the temperate zone gets enlarged ...
[...] with its special rules for longitude and latitude and movement modifiers near the four sides.
It does seem that, with toroidal wrap, Mexico would be strangely close to India. Out of the box, a flat (non-wrapping) map should work better, perhaps leaving out Antarctica entirely, which can't really be colonized anyway. That would greatly overstate the distance between South Africa, Patagonia and Australia, but it's not like those are actually close to each other on a sphere. :think: Something would need to be done about New Zealand and other Pacific islands.
Is there any game that ever used this projection? :confused:
Google only finds me this Civ 3 Earth map. Not sure if I understand how it works. No world-wrap, I'm guessing, but certain (all?) tiles along the edge of the map have 0 movement cost. And I found a Polygon.com article saying that this projection was briefly considered for No Man's Sky, but that it doesn't work well for arbitrary planets.
IIRC there is no Globe view with torodial maps.
Oh, right, only for cylindrical. OK, at least no weird looking globe then. (Might be possible, somehow, to get the EXE to show the 3D globe regardless of world-wrap, but, yeah, the poles aren't going to be where they should be.)
 
I agree, that quincuncial projection looks nicer than I would've imagined. All the bad distortion is in the Pacific. Maybe if there were some way, for the purposes of a Civ scenario, to tweak it so that the temperate zone gets enlarged ...
I remember reading in some C2C thread that the coordinate system can be modified. The discussion was about having two planets on one map: one taking place on the northern and one on the southern hemisphere. At least that's how I remember.
 
Something about multi-maps comes up now and then in the C2C subforum, and I always ignore it because I don't want to colonize the moon (not so long as terrestrial gameplay leaves much to be desired). Interesting idea that this could also be used for putting a portion of the Earth under a magnifying glass - if I understand you correctly. Sounds even more challenging than adding a novel type of map wrap, but maybe C2C already has the framework in place.

Anyway, seems to me that this projection would tolerate shrinking of the southern hemisphere pretty well (quick mockup):
Spoiler :

quinc-hemi-mockup-sm.jpg

Would be nice to do this sort of thing through the formulas that define the projection, but, in the end, one would probably want to make freeform adjustments to the coastline anyway.

Could get a bit annoying to play on a map that is partly upside-down.
 
Could get a bit annoying to play on a map that is partly upside-down.
Yeah, I always wondered why are we limited to a +-45° rotation?! In Colonization you can make full spins.
 
A world map based on some funky map projection that places one of the poles in the center (example) might combine well with the Toroidal world-wrap setting. But Globe view is not going to translate that properly into a sphere.
I like that quincuncial projection.
In order to make such a map work properly in the game, what would be required apart from: instant teleporting from tile to tile, using a pseudo recon to provide visibility on the “adjacent” tiles on another part of the map, assigning the appropriate plots to cities where some of the applicable tiles are on another part of the map, making sure the teleporting is taken account of in route planning?
 
Yeah, I always wondered why are we limited to a +-45° rotation?! In Colonization you can make full spins.
The key press gets handled by CvEngine::MoveBaseTurnLeft/Right in the EXE. I suppose that function has been changed in Col. But we do have access to CyCamera.SetBaseTurn, so I think this restriction could be lifted (by a non-DLL mod even). The whole BlueMod for Col should be portable to BtS. (Though, when I exprimented with that, I found that zoom via mouse wheel didn't work well after having manually altered the camera orientation. Perhaps not a problem when just rotating the camera in 45° steps.)

@LPlate2: Adjusting the geometrical functions in CvMap, CvGameCoreUtils (e.g. directionXY, plotDirection) should address a lot of problems in a clean way, in particular visibility, workable plots and plenty of AI code that checks the surroundings of a tile or measures air distances. Might also be enough to get pathfinding to work. (The K-Mod pathfinder uses plotDirection to obtain adjacent tiles.) I'd go through all code (DLL, Python, XML) that references "wrap". Don't know if the EXE will play along with such fundamental changes – i.e. making two tiles adjacent, for all intents and purposes, that aren't at opposite (wrapping) edges of the map. I guess the alternative is something more akin to the Airlift button. If it's only about travel across the poles on a cylindrical map, then some rarely used special action might actually be good enough (not affecting visibility or workable tiles).

Edit: I'm not actually sure how movement on a quincuncial map should properly work. Clearly, the four corners should be connected to each other – as they would be with toroidal world-wrap –, but, beyond that, I don't know.
 
Last edited:
Edit: I'm not actually sure how movement on a quincuncial map should properly work. Clearly, the four corners should be connected to each other – as they would be with toroidal world-wrap –, but, beyond that, I don't know.
Well, it would be strange with Torodial, as the way from Chile to Madagascar would be shorter than the way from Uruguay to Namibia. Oh well, the squaring of the circle will always remain a problem :lol:

Maybe a Tessellated version could work, where only 1/4 of the map is "real" with 3 clones. There would be 4 of everything (units, cities, etc) and whatever you do on any fourth of the map is also translated to the other 3 clones. But I guess it would require a completely new engine...

Something about multi-maps comes up now and then in the C2C subforum, and I always ignore it because I don't want to colonize the moon
The Moon me neither but Alpha Centauri...
Okay, just dreaming a bit.
 
Well, it would be strange with Torodial, as the way from Chile to Madagascar would be shorter than the way from Uruguay to Namibia. Oh well, the squaring of the circle will always remain a problem :lol:

Maybe a Tessellated version could work, where only 1/4 of the map is "real" with 3 clones. There would be 4 of everything (units, cities, etc) and whatever you do on any fourth of the map is also translated to the other 3 clones. But I guess it would require a completely new engine...


The Moon me neither but Alpha Centauri...
Okay, just dreaming a bit.
I tried cracking the Peirce wrap but was stymied by the path generation. Maybe someone else can work it out.
 
Cool that you've been able to implement the map script (link) so quickly. I guess it's similar enough to your Eyeball script.

If the high-distortion regions were made impassable – a flat triangle of sea ice along each edge of the map –, leaving the edges of the map reachable only in the four corners, then it seems to me that Toroidal wrap should work pretty well/ realistically. Due to cheap diagonal moves, the ice wouldn't affect non-wrapping movement much. Let me do a mockup (based on a Duel-size Donut, zoomed out very far):
Spoiler :

toroidal-peirce-mockup.jpg

:think: Strange to turn Antarctica into a transportation hub. A bit like gravity assist in space travel. Well, on a larger grid, the passable zone could be larger, so ships wouldn't have to sail straight past Antarctica. If there's a large continent at the South Pole or a subcontinent connected to the temperate zone, then Toroidal wrap at the corners is still better than splitting the southern continent into four parts, but, if Antarctica is just land ice, then disabling wrap (Flat) seems preferable.
 
While I can see how the equal opportunity/threat of the toroidal makes sense for gameplay, I never particularly liked it from a realism perspective. I’d hoped to get a more realistic global wrap working. Given that I’ve conceded defeat on creating a new wrap, using toroidal is the best compromise for the quincuncial map. I’ll issue a toroidal wrap version of the map. The impassable stretches on the edges don’t need to be as long as in your pictures (half the length of an edge would be enough). It should be as easy to move around the southern continent as the northern one.
 
Top Bottom