Is there really no way to do this (add resources on map)?

Greizer85

Emperor
Joined
Mar 7, 2009
Messages
1,210
Hello,

I was thinking about making a world map for Civ II as I'm not really happy with any of the existing ones (there may be ones out there on other sites that I'm not aware of; feel free to point them out to me to save me the trouble! ;)). But before I embark on such a mighty quest (my Civ V map took a *long* time to make!), I'd like to know the answer to one crucial question:

In the default Civ II map editor, there isn't any way to manually add or edit resources; all you can do is change the 'resource seed' number and hope for an adequate resource pattern to materialize in all needed locations... Which of course never happens. It needs to happen. Can I make it happen somehow? Is there a program available that can do this, or can I manually edit the map file somehow?

There's the question, ladies and gentlemen! :D I realize this forum gets little traffic nowadays; but I greatly prefer the look of Civ II graphics to any other version, and would gladly play Civ II for a while since I'm bored of Civ V. And you'd get a great map out of it (check out my Civ V map if you don't believe me). ;)

Sincerely,
Greizer


(Btw my Civ II version is MGE, if it matters.)
 
No, there is no way to do that!

The best you can do is play around with the ressource seed until you get close enough to what you would like:
 
I confirm that. There is a way to hide special resources but no way to add one in an arbitrary location.

Furthermore, there are quite a few world maps created by users (besides the three that shipped with the game). Search the forum for map downloads and you should be able to find several of them. If you still want to do your own version you may find it useful to start with one of those and modify it.
 
That's a bummer. I bet there were huge complaints about this when the game came out. Thanks for the info guys.

Now what's an even bigger bummer is that when I click the resource seed icon, the map editor crashes... But I guess MapEdit can help with that. Didn't try it yet.

As to my aims with the map, I'd like to have a map where there's decent continent shapes and accurate climates, etc, but which isn't like 20,000 squares or more in size. I'd like it so you have like 20 cities if you don't conquer others. I guess I'm spoiled by Civ V, but I really can't manage 100+ cities with their constant civil disorders and build orders. The wild days of my youth are already behind me! :D

We'll see if I can be bothered to make the map with this handicap. My Civ V map still needs updating, too, but atm I just don't have the steam for that (yes, that is a pun, too: Steam is a horrible program that needs to be tried, jailed and executed, then buried in the dark hole that it originally crawled from).
 
Not sure if this is common knowledge, but the algorithm the game uses to determine the resource type of a tile is as follows (in javascript, input is the map seed and the x and y coordinates of the tile, result is 0 for no resource, 1 and 2 for first and second resource respectively):

Code:
get_resource = function(seed, x, y) {
    var a = (x + y) >> 1;
    var b = x - a;
    var c = 13 * (b >> 2) + 11 * ((x + y) >> 3) + seed;
    if ((a & 3) + 4 * (b & 3) == (c & 15)) {
        var d = 1 << ((seed >> 4) & 3);
        if ((d & a) == (d & b))
            return 2;
        return 1;
    }
    return 0;
}

This means that there are only 16 patterns of coordinates that have resources, 64 if you distinguish between first and second resource.

It would not be impossible to patch this, and read tile resources from the save file for instance. It would break backwards compatibility of save files of course, but it would make resource placement much more strategic. I might just look into it for a future version of TOTPP.
 
Interesting. It's all Greek to me; however, it would seem that this is a monumental enough improvement that there must be some reason why it hasn't been done in all these years. Perhaps it has, but the knowledge of the event has been lost to the digital winds, so to speak?

So the way it would work is that there'd be a file with coordinates and resource types, right? It'd be time-consuming to place resources that way, but still infinitely better than the current 'system' (it's generous to call it that). All the better of course if there was a graphical way to place the resources, as with every other map editor in the history of the universe (seriously, who hit the adrenochrome when they decided not to include this? :crazyeye::smoke:).

What is TOTPP, btw? Test of Time... Something? I hope that if this can be done and you decide to take up the endeavor, you'd be kind enough to make a version of the 'fix' also for MGE, if at all possible.

EDIT: btw I started work on the map... It's a tiny bit smaller than I'd like now that I can look at it better, but I'm not gonna start over. I re-started my Civ V map at least 5 times... It's not good on your nerves, I tell ya. ;)

Spoiler :


What's a real doozy is that when I use MapEdit to add more squares to the north (I want a full British Isles and I miscalculated), it fudges up all the edges of the continents... Because it reads the file with pixels, maybe, instead of actual squares? Anyway it's real annoying. I guess I'm going to have to bite the bullet and re-draw all the coastlines. Luckily I keep a duplicate of all my maps at all times (learned that via way too many hard lessons).

EDIT: It seems that the 'scramble' effect only occurs with certain grid values, or if you repeat actions within the program. Most likely just a bug of some obscure sort. I found nice values for my map, and now the dimensions are perfect. The terrain outlines are almost done already (save for tweaking ofc). It will speed things up greatly to copy rivers, elevations and terrain types over from my Civ V map. And ofc the most time-consuming part, resource placement, is impossible so I won't have to do it. :lol: There's a silver lining to everything.

Feel free to comment, and tell me if you'd play on such a map. It may be too small for most folks who like Civ II, but perhaps there are others like me who prefer smaller maps, or would like a relaxing world-conquest romp every now and then. :)
 
So the way it would work is that there'd be a file with coordinates and resource types, right?

Without going into too much technical detail here, there would be a section somewhere at the end of the map / save file indicating the resource type for every tile.

What is TOTPP, btw?

It's a little project of mine to fix bugs and lift some of the limits in TOT, most notably it allows up to 32,000 cities instead of the default 255. See this thread for specifics.

I hope that if this can be done and you decide to take up the endeavor, you'd be kind enough to make a version of the 'fix' also for MGE, if at all possible.

Well, I know my way around the TOT binary because of my experiences with TOTPP, but I'm not sure whether this would carry over to MGE or not. The games are pretty similar though, to the extent that some binary patches work on both games. So, never say never, but don't get your hopes up. ;)
 
Whee..! Finished the map already -- in 2 days (it took me over a year to make my Civ V map)! :eek: When I have catched my breath, I will tweak it some more and upload it here at CivFanatics. For now here are some screenshots:

[Arrgghh! The useless Imgur refuses to show the pics on this site! Just click on this link instead.]

Neat, eh? It was a bit of a challenge to keep the land forms accurate with such a small map size (the final size of the map is 48x88 squares, so just a smidge bigger than a Standard sized map)... But I managed admirably I think. I'm open to criticisms; please don't point out the size of Europe or the shrunken oceans, though. Those are intentional design decisions, as on my Civ V map.

I hate moving ships around in Civ games; most world maps are 70% ocean, and it's such a drag to keep moving your fleets every turn -- not to mention that your boats will be obsolete before the invasion force can actually land! Not so here. On this map, world domination is perfectly doable in a single afternoon, like a leisurely stroll. :queen::hatsoff: The queen thanks you (my first game will be as the British, and it *won't* be a peaceful one! :D).

As for Europe, well, I want it to look like its namesake and have playable nations on it. Japan is also similarly enlarged, to give them a fighting chance.

@TheNamelessOne: If you can remember, please pm me if/when you're done making the modification. It would make my map 10x better than it is with random resources. :)

EDIT: If someone wants to try it, here is the map already. It should be in a fully playable state; what remains to be done is some minor tweaking: thinking of potential city sites and modifying terrain accordingly. I dare say it's better than 90% of available world maps already, considering its accuracy-to-size ratio. Yeah, I'm humble like that. :D Just try it out for yourself, see how you like it. ;)
 

Attachments

  • ZipWorld (for Civ II).zip
    2.9 KB · Views: 173
I found a work-around for the random resource problem: editing Rules.txt to make Tundra into a super-terrain, then placing it near the capital locations. However, there is a problem that I detail in this thread. In the second post there is a request for help; I'm simply posting in this thread, too, so that more people see it. It's awful quiet on these forums. The sooner the problem is sorted, the sooner you'll get to play on the finished map... And there's a special perk involved for the helper. ;)
 
So, since yesterday I'm able to import a single map with custom resources. What I did is change the map importing so that when the map seed is negative (not used by the unpatched game), an extra block of data is read (one byte per tile, value 0, 1 or 2), indicating the resource type for all tiles.

What remains to be done is saving to/loading from the saved game. Now, after saving and loading the custom resources are gone. ;)
Also, loading additional maps isn't done yet, apparently this is done in a separate function (I guess because this didn't exist in civ2 yet, the devs coded it separately for ToT).

But since the difficult parts (memory allocation and changing the map renderer) are already done, it means the modification is entirely feasible. It will be included in the next release of TOTPP.

Actual in-game screenshot:
Spoiler :
 

Attachments

  • custom_resources_small.jpg
    custom_resources_small.jpg
    331.4 KB · Views: 2,308
Please let us know when/if you're ever going to tackle MGE and allow us to place more cities and build more units. Once that happens, if you provide a bank account number, I may even consider to pay you a tribute of 50g for your peaceful nature ;)
 
Amazing work, much kudos. :goodjob: Can ToT read map files made in MGE? 'Cause if so, I might buy ToT just to be able to further modify my map. Would come in reeeeeeal handy for my new Finland scenario, too: e.g. there is a resource representing rapids (which were important for Finnish industrialization), but since there's no reliable way to place them it's proving to be a real headache and I may end up scrapping the whole idea.

Hate those ToT graphics btw. Kind of a cross between Civ II and III, looks untidy imo. Perhaps it looks better in-game though. But if not, before I buy ToT, is there a mod that changes the graphics back to the old style? It's the best look of any Civ game and I'm not willing to give it up, even for this massive improvement. :p
 
Greizer85 said:
Can ToT read map files made in MGE?
Yes, map files are compatible between both games.

Greizer85 said:
Hate those ToT graphics btw ... is there a mod that changes the graphics back to the old style?
I'm using custom graphics, since I don't like ToT's defaults. This is probably what you want though: Original Civ 2 graphics for ToT.

Blasph23 said:
Please let us know when/if you're ever going to tackle MGE ...
Greizer85 said:
I might buy ToT just to be able to further modify my map.
It's probably gonna be just ToT for a while, since I have more interest in adding new things then redoing the same stuff for MGE. So if you want to try these changes, your best course of action would be to try to obtain a copy of ToT. :)
 
@TheNamelessOne: Thank you for that link. Looks to be what the doctor ordered. :) Just ordered Test of Time from Amazon (18 euros, but delivery will take two weeks... What gives, this is 2014?!). I've read about some of its possibilities, and it seems to be the go-to version for easy scenario making. Maybe it will solve my graphical issues, too. I'm concerned though that not many people might have this fairly obscure version of Civ; given how few players there are left, I'd like to have the maximum audience for my scenario. Can you perhaps give a ballpark estimate about the numbers of ToT vs. MGE players?

I'm also wondering if you couldn't help me with my graphical issues? You seem to be quite knowledgeable of Civ II modding, since you're making ToTPP and all. Here is the link in case you happen to know about this issue and it's an easy fix (I'm really not into hex-editing or anything like that, as I'm just learning modding). It's a little tough going since the forums are so dead these days... I'm a decade too late here, heh.
 
I'm concerned though that not many people might have this fairly obscure version of Civ ... Can you perhaps give a ballpark estimate about the numbers of ToT vs. MGE players?

I honestly have no idea about the numbers of players of either version, but I wouldn't call ToT 'fairly obscure'. :)

I'm also wondering if you couldn't help me with my graphical issues?

I've thought a bit about it, and commented in the relevant thread. Let me know if it works or not.
 
Top Bottom