Thread Tools
Old January 19, 2000, 23:51   #1
Harlan
Apolytoners Hall of Fame
 
Local Time: 16:04
Local Date: October 30, 2010
Join Date: Aug 2005
Location: Berkeley, CA, USA
Posts: 1,053
Vikings scenario redo
Hi,
Its been a long time since I've done any Civ2 stuff- I've been (and still am) burned out on editing Civ2. But I'm pleased to announce a new project. Alex (mor) asked if he could revamp the graphics for my Vikings scenario. I started thinking, more than just the graphics need redoing (That was my first scenario and always the one I had the most problems with). So I started to think about redoing it (a new map being badly needed IMO) but I didn't want to do the work. Happily, Jesus Balsinde has stepped in and will do most of the nitty gritty while I provide the new map and some general direction.

Sooo, this leads to some questions. First, it seems since I last freqented these pages, people have been getting more into hex editing. I am very intrigued by two hex editing possibilities. One, turning the barbarian civ into a normal civ. There was a thread about this a while back saying it could be done (FastEddie, you mentioned this). If so, I'd like to know how!

Secondly, I think it would be great to edit the hexes to put special resources exactly where one wants. Seems no reason why not, if only one knew where in the .sav file to look. I tried looking and it was mostly Greek to me. But I was thinking, maybe there is a way. Does anyone have a program where you can compare the text of two documents to see what's different between them? Cos what one could do is take a game, uncover a sea spot where there would be a fish, then save that under a new name. Then compare the two files- I imagine they would only be different by one hex. Then, experiment and figure out the pattern.

One last question, for those knowledgable of Muslim/Arabic matters. Could someone explain the deal with "Al-" prefixes in city names? I have widely conflicting sources over cities (like Basrah, Madinah or Mawsil) that sometimes use the Al- and sometimes don't. Some cities get it attached in front more than others. Plus, sometimes its capitalized, and sometimes its not! What's the best to use? What does it mean?

Harlan
Harlan is offline  
Old January 20, 2000, 06:50   #2
Fast_Eddie
Guest
 
Posts: n/a
Ackk..something I mentioned...

Well, about barbarian civs. All I know about that is that you can give the barbarians cities, instruct them on what to build, and rename the barbarians to the nuetrals or something.

I tried hex-editing, but the only one who's added a civ (From a game with less than 7) in there is Nemo.

I feel so important being mentioned by the great Harlan.
 
Old January 20, 2000, 23:16   #3
Michael Daumen
Scenario League / Civ2-Creation
Prince
 
Michael Daumen's Avatar
 
Local Time: 19:04
Local Date: October 30, 2010
Join Date: Dec 1969
Location: Research Triangle Park, NC USA
Posts: 693
Harlan, good to hear your voi -- I mean, see your typing.

I always understood Al- to be an article like "a" or "the."

BTW, have you checked out ToT?
Michael Daumen is offline  
Old January 21, 2000, 03:54   #4
Harlan
Apolytoners Hall of Fame
 
Local Time: 16:04
Local Date: October 30, 2010
Join Date: Aug 2005
Location: Berkeley, CA, USA
Posts: 1,053
I quote Fast Eddie, from a few months back:

"If anyone would know, it would be Andrew Livings. I've read over his HEX editing guide about 50 times, and I still don't understand most of it. From what I remember (don't quote me on this), Andrew tested the "8th" civ with the HEX editor, and the only problem he had (Once again DON'T QUOTE ME) was that the flags didn't show up."

Sorry for quoting, despite your protestations! But I want to get to the bottom of this. I emailed Andrew about this (he hasn't replied yet) and checked out his website. Seems some of the most interesting things he has to say about hex editing are now on dead links. I'd like to see this hex editing guide, if it still exists (outside of editing cities which is still on his website).
Harlan is offline  
Old January 21, 2000, 04:03   #5
Harlan
Apolytoners Hall of Fame
 
Local Time: 16:04
Local Date: October 30, 2010
Join Date: Aug 2005
Location: Berkeley, CA, USA
Posts: 1,053
Michael,
Good to run into you again, too. That was my guess on "Al-" as well, like saying "The Bronx". But I still don't know when to use it or not, and about capitalization. Maybe its one of those no right answer things, like spelling the name of the leader of Libya (I'm not even gonna try).

I've never checked out ToT, it seemed pretty disappointing. At least they added some events language I hear. Too bad they didn't do that kind of thing before. It would be tempting to upgrade scenarios, just for the extra events power since I felt the events space and abilities always constrained me, but seems like there isn't a critical mass of people who bought ToT (not even me, a big Civ2 fan).
Harlan is offline  
Old January 21, 2000, 06:40   #6
Fast_Eddie
Guest
 
Posts: n/a
Ahhh, yes...Andrew Livings reported quite a long time ago that he had done that. I can't quite remember where though...

How many times did I say don't quote me on this in that? Guess I'll know beteter next time .

Have you seen his guide to hex editing?
[This message has been edited by Fast_Eddie (edited January 21, 2000).]
 
Old January 21, 2000, 17:23   #7
Mercator
Scenario League / Civ2-Creation
Emperor
 
Mercator's Avatar
 
Local Time: 02:04
Local Date: October 31, 2010
Join Date: Dec 1969
Posts: 3,079
Harlan, about your second point:
Customizing the resources is not possible. I don't know what savegames look like, but in an .MP file, the resource is only saved as a seed number (the number you can enter when pressing "s" in the MapEditor). This seed number is read by the executable, which then generates the correct pattern (well, this is just a guess at how it might work). This is certainly the same with savegames.
How unfortunate!
Mercator is offline  
Old January 22, 2000, 06:22   #8
Stefan Härtel
Civilization II Democracy Game: ExodusScenario League / Civ2-Creation
King
 
Stefan Härtel's Avatar
 
Local Time: 01:04
Local Date: October 31, 2010
Join Date: Jul 1999
Location: Some cold place
Posts: 2,336
You can always try to make ressources 'regional', however you must be very careful when placing the terrains.
Use the seed option in the map editor to make ressources there where you want.
Another point is of course, what ressources you want to use. Being a European who is interested in his enviroment, I think I can help you with that...

------------------
Follow the masses!
30,000 lemmings can't be wrong.

We who grew up tall and proud
In the shadow of the mushroom cloud
Convinced our voices can't be heard
We just want to scream it louder and louder:
"What the hell are we fighting for?"
"Just surrender and it won't hurt at all"
-Brian May (Queen)
Stefan Härtel is offline  
Old January 24, 2000, 10:58   #9
techumseh
Civilization II PBEMScenario League / Civ2-Creation
Emperor
 
techumseh's Avatar
 
Local Time: 18:04
Local Date: October 30, 2010
Join Date: Apr 1999
Location: of the frozen North.
Posts: 4,197
Glad to hear about the project, Harlan. I hope you'll reconsider doing Vikings in Test of Time. Or at least consider a parallel version.

The events are the real advantage - there's really no comparison to FW. ToT has over three times the capacity. The new language provides a quantum leap in what can be simulated. Use of flags and masks (turning events on and off), multiple triggers, modifiers and several new actions means that the various possibilites have yet to be explored.

I'm a big fan of Angelo Scotto's CivConverter program, which converts FW scenarios into ToT. It doesn't work on all scenarios. ToT has bug relating to major objectives, so scenarios with those included may not convert.

Right now I'm finishing a ToT upgrade of my old Congo! scenario, and the new events capability has been wonderful to work with. For once, I put in all the events I wanted, and didn't have to decide which ones I didn't have space for.
techumseh is offline  
Old January 24, 2000, 15:26   #10
Mercator
Scenario League / Civ2-Creation
Emperor
 
Mercator's Avatar
 
Local Time: 02:04
Local Date: October 31, 2010
Join Date: Dec 1969
Posts: 3,079
I know where to find the map data in a .SAV file, but there is no resource info in that part whatsoever. So if there is any information about resources, other than a seed, it must be in a yet unexplored part of the .SAV file. And that won't be simply a "resource layer" as big as the map part itself, except only stating whether there is a resource on a square or not.
The only other possibilities are a resource seed or some other "semi-compressed" information about resources. Either way it won't be possible to change it to anything you like.
Mercator is offline  
Old January 24, 2000, 17:00   #11
Captain Nemo
Prince
 
Local Time: 00:04
Local Date: October 31, 2010
Join Date: Dec 1969
Location: Red Front
Posts: 556
I agree with Mercator, the special ressources are just layed out in a fixed pattern (like wallpaper) the only thing you can change is the spacing by changing the seed number. If you change the seed the entire pattern spacing changes... I would have eliminated some of the special ressources and used them as a couple of new terrain types...
My approach has been to eliminate some of the special ressources by creating a generic ressource that fits in everywhere (Marshes/ponds) When I come across a spot where I don't want a ressource I just change the terrain to Marshes and I have a pond with no special bonuses. It fits in well in forest, grassland, tundra, plains, jungle and even hills... This gives a little more flexibility in placing the ressources.
Captain Nemo is offline  
Old January 24, 2000, 22:34   #12
Harlan
Apolytoners Hall of Fame
 
Local Time: 16:04
Local Date: October 30, 2010
Join Date: Aug 2005
Location: Berkeley, CA, USA
Posts: 1,053
Mercator, I would be very interested in finding out where in the .sav file the terrain info is. Could you explain? I only know the city part thanks to Andrew, and a rough idea of the unit part just before it.

I still think something editable must be going on. At the very least, how is it that some ocean squares can have a special resources and others not, depending on distance from shore, and that one can uncover this by converting it to land halfway through a game? True, that shows the wallpaper-like pattern must be recorded somewhere in the file, but also whether the special resource is being used or is turned off must be recorded as well.

Is it possible to change the seed, via the .sav file? How?

Captain Nemo, I follow very similar methods. In this Viking case, I switched the place of grassland and swamp, allowing me to have special resources for grassland. The swamp can be strategically placed most anywhere to get rid of a special resource square I don't want. I also have an unused terrain type which I changed into "special", acting as a special resource equivalent whereever I want it. But it would be so nicer if I could just edit the .save file to have it exactly as I want!


Harlan is offline  
Old January 25, 2000, 01:48   #13
Harlan
Apolytoners Hall of Fame
 
Local Time: 16:04
Local Date: October 30, 2010
Join Date: Aug 2005
Location: Berkeley, CA, USA
Posts: 1,053
Fast Eddie,
If there is a Andrew Hex guide different from that one webpage about editing cities, I haven't seen it and would love to.

Mercator,
I don't know if the way special resources are seeded in the map program has anything to do with how special resource info is recorded in the actual .sav file. Why should it be the same? At that point, would it be faster in computing time to simply have a "no resource", "resource 1" or "resource 2" flag for each square?

Stephan,
I think I've done a good job as far as I can with what Civ2 allows. I just wish I had that extra power.

techumseh,
Yes, someone sent me the file explaining the events abilities. Very nice, but I don't even own ToT and don't want to spend actual money for it. If you or anyone else would like to make a ToT version, I would be very happy to see that happen.
Harlan is offline  
Old January 25, 2000, 10:03   #14
Mercator
Scenario League / Civ2-Creation
Emperor
 
Mercator's Avatar
 
Local Time: 02:04
Local Date: October 31, 2010
Join Date: Dec 1969
Posts: 3,079
Indeed the resources are a bit weird in Civ2, in contrast with what you get to see in the MapEditor. In the MapEditor there are fixed patterns of resources all over the map, while in the game this isn't always the case. I don't have an explanation for that, it's probably some fancy algorithm.

There is undoubtedly a place where the resource seed is stored in a savegame, I guess it's somewhere near the start of the file, but I don't know (yet).

About the map part in a savegame:
I don't have any savegame at hand, so I can't give the exact location. Maybe this is enough info to find it: every square is represented by 6 bytes, so the amount of space used by a map is 6 x surface. the last byte of a square always (?) is the HEX-code F0. As far as I can remember the map is stored closer to the end than the beginning of a file. Well, this vague info might help you.

In case you're wondering, the code used for the map-squares in a savegame, a scenario and a map are NOT the same, although vaguely similar. I do know the exact codes used in a map file, but there are some strange differences in the maps of savegames and scenarios.
Mercator is offline  
Old January 26, 2000, 04:10   #15
Mercator
Scenario League / Civ2-Creation
Emperor
 
Mercator's Avatar
 
Local Time: 02:04
Local Date: October 31, 2010
Join Date: Dec 1969
Posts: 3,079
For everyone interested in the details of the map in a savegame. I made a small guide about this. It's not complete yet, but it still offers some valuable information:
Terrain Coding In CivilizationII Savegames

And Harlan, if you still have the tutorial.sav from civ2: the map starts at the offset 0000A1E6. The last byte is at 0000FFA5.
[This message has been edited by Mercator (edited January 26, 2000).]
Mercator is offline  
Old January 26, 2000, 05:25   #16
Harlan
Apolytoners Hall of Fame
 
Local Time: 16:04
Local Date: October 30, 2010
Join Date: Aug 2005
Location: Berkeley, CA, USA
Posts: 1,053
Mercator,
Your work here, and the link you posted, are very great. Keep up the good work. Let us know if you make any more progress on the visibility hex- it would be great to simply change this hex if one makes mistakes in what squares are shown to who.

Here's what I think must be the case about special resources, if I haven't made myself clear so far. Lets say you have a big ocean. In the map editor it will be filled with resources, but when you start an actual game, all the resources not near a coast disappear. If you then build an island near a resource spot, it still won't appear, but if you change that exact spot to land, it will reappear and stay that way even if you turn it to water again. So, there must be in the file a place where the underlying pattern is saved, and also a function showing if that resource is activated or not.

Hopefully, if that location is found, this means one could turn on or off resources through hex editing, though maybe only for squares that fit the predetermined pattern. Perhaps, Mercator, this is the meaning of the 3rd or 6th byte you speak of, or its in some other still unknown location. Could you try editing a spot in an ocean where there would be a resource if it was near to land, so the resource is uncovered, and then see if there are any changes to the hex code for that square? That information must be recorded somewhere in the .sav file!

Another thought: would it be possible to increase the size of a map simply by adding extra lines of terrain code for extra lines of terrain? I doubt its that easy, there is probably a spot somewhere else in the file where the overall map size is indicated, if not other such spots that need changing. For instance, after checking out the info on hex editing cities, I tried to move a city simply by changing the hexes indicating the city's location. It unfortunately didn't work, creating some kind of middle ground where the name of the city was in one place and the actual city kind of still in the original spot. So city location info must be in more than one place.

But, if a map could be increased in size, might it even be possible to increase a map over the 100 by 100 limit? That would be mind-blowingly great. I've always rankled against that limit.

Also, does anybody know of the hex that needs changing to turn a destroyed wonder into a non-destroyed one? Someone who has now left Civ2 once did that for one of my scenarios, so I know it can be done.

Harlan is offline  
Old January 26, 2000, 08:03   #17
Mercator
Scenario League / Civ2-Creation
Emperor
 
Mercator's Avatar
 
Local Time: 02:04
Local Date: October 31, 2010
Join Date: Dec 1969
Posts: 3,079
I'll have another look at the resources, and I will try to find out the full meaning of the codes.

I will also try to see what changes can be made to change a map in a running game.

The map surface can be larger than 10000, it really isn't that difficult to accomplish. But don't get too excited, there is an absolute maximum, namely 10923. So you can get some gain, but not all that overwhelming.

Here's how to create a large map:
1. create a (blank) map of whatever size you want in the MapEditor.
2. open this map with a Hex-editor. The first to bytes of the map indicates the width, the 3rd and 4th the height of the map.
VERY IMPORTANT NOTE: these sizes are according to the coordinate system used in Civ2, NOT the MapEditor.
Change those to whatever you want, as long as the surface (according to the MapEditor) stays under 10923.
3. Open the map again. You will now get a pop-up saying that the MapEditor failed to load the map. Just click OK, and it's done.
FINAL NOTES:
a. Because of this error, this "oversized" map will not be created as a new one, but remain as the map you had open before it. So if you have been working on another map, DON'T use Save, use Save As instead to avoid overwriting previous work.
b. In the header of the map file there is actually a little bit more information stored about map size etc. Not changing that, and not adding enough bytes at the end of the file to match the map size, causes the "failure". Since it works like this anyway, you don't have to worry about those other things.

Mercator is offline  
Old January 26, 2000, 16:55   #18
Harlan
Apolytoners Hall of Fame
 
Local Time: 16:04
Local Date: October 30, 2010
Join Date: Aug 2005
Location: Berkeley, CA, USA
Posts: 1,053
Mercator,
What you say is very interesting- increasing the map size by about 10% is still very interesting for me. But I am a bit confused about the "failure" and all that. Will this work, or not? Have you made maps using this extra size that one can download? Is there a way to do it that won't cause that failure by better file editing? Does this extra size cause any problems when playing a game, such as the AI having errors in the extra space?

I've already made a new map for my Vikings update, and would be very happy to increase it to 10923.
Harlan is offline  
Old January 27, 2000, 05:06   #19
Harlan
Apolytoners Hall of Fame
 
Local Time: 16:04
Local Date: October 30, 2010
Join Date: Aug 2005
Location: Berkeley, CA, USA
Posts: 1,053
Mercator,
You rock! I tested out your 10923 limit, and indeed it works! Your instructions were a bit unclear, but I see what you mean now. And, I'm happy to say, my worries about such a file not working as a game were unfounded, from the brief check I did. You gotta post this great finding on a new thread so more people will see it. Call it: "This one goes to 11" .

I was able to take a preexisting map and add an extra 10% to the south. Apparently one can't add to preexisting maps in any other direction (except perhaps with extremely careful hex editing that would take hours)- trying to extend the map to the east creates an interesting smear. Luckily though, in this case south was exactly the direction I wanted to go (allowing some Sahara on a Europe map).

Now I wait for mapping hero Mercator to find out about changes in a running game, so I hopefully don't have to start the .sav from scratch to take advantage of this.
Harlan is offline  
Old January 27, 2000, 17:00   #20
Harlan
Apolytoners Hall of Fame
 
Local Time: 16:04
Local Date: October 30, 2010
Join Date: Aug 2005
Location: Berkeley, CA, USA
Posts: 1,053
I have an interesting map discovery of my own. I was thinking how unfortunate that the extra map size only helps to the south. I think I have found a crude, partial way around this. It occurred to me that C. Flinchbaugh's Map Utility program can convert Civ2 map files into a text CTP file and then back again without any loss of data. I tried this out, and saw that I could roughly understand the layout of the CTP text file. Basically, there are as many columns are there are width square in your map, and as many rows as height squares in the map. So, if you want to say, move the entire map down five squares, just cut the bottom five rows off, and then paste them in at the beginning of the file.

The one wierd problem with this is that the rivers appear in both the old and new locations. I'm gonna ask C. Flinchbaugh to see if he can figure out why this is, and how to stop that bug.

Harlan is offline  
Old January 29, 2000, 10:25   #21
Mercator
Scenario League / Civ2-Creation
Emperor
 
Mercator's Avatar
 
Local Time: 02:04
Local Date: October 31, 2010
Join Date: Dec 1969
Posts: 3,079
I updated the info about maps in savegames:
look here

I found out everything about the "visibility" byte and there is indeed a way to turn of resources.

Thanks for your maps and your compliments, Harlan. I'll try to make some nice guide or so to start a thread about the 10923 map size.
Mercator is offline  
Old January 29, 2000, 22:20   #22
Harlan
Apolytoners Hall of Fame
 
Local Time: 16:04
Local Date: October 30, 2010
Join Date: Aug 2005
Location: Berkeley, CA, USA
Posts: 1,053
Good discovery again, Mercator. Making maps is a whole new ballgame. Yesterday I was toying around with my Vikings map, and doing things I could never do before. I moved the whole thing to the right, then down, then expanded the bottom. Using the replace function and the map utility method I mentioned in my previous post, I was able to switch all desert and grassland tiles in under a minute (the problem was that I previously put grassland in the swamp slot, giving it no trade bonus when one built roads).

Using replace function with a hex file, I'll be able to fool the AI into thinking the grassland now occupying the desert slot is really grassland, when it comes to where they should build new cities.

One more thought on editing special resources: it would be very interesting if anyone could find the hex that governs what the special resource pattern is. The number of different pattern possibilities for any given map is rather limited (high resource seed numbers just repeat the same sequences). So I wonder what would happen if one put in a seed number outside the usual range- with Civ2 one never knows what kinds of strange things might result.
Harlan is offline  
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 20:04.


Design by Vjacheslav Trushkin, color scheme by ColorizeIt!.
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Apolyton Civilization Site | Copyright © The Apolyton Team