Updated civworld implementation Released under the GPL. This was updated 6 Feb, 2001. I would strongly suggest that you use CVS or a CVS-snapshot from 30 Jan or later (1.11.5) as there are map generation issues in the server code just prior to this (although it may at least compile with earlier code). the created maps will also only work on servers >= 4 Jan 2001 ---compiling/installing:--- 1. bunzip2 the patch. 2. in your freeciv source directory execute patch -p1 < <...>/civworld.diff where <...> is the path to the patch. 3. in the freeciv source directory execute autoconf && automake && ./configure && make you can give your normal options to ./configure (generally you won't need any), but you must compile the gtk client (which it does by default.) 4. the executable is appropriately named "civworld" and is found in /civworld/ where is your freeciv source directory. "map" is a script to start the map editor. We need to set the x-bit, so in your freeciv source directory execute: chmod +x map ---editing a map:--- Start the editor as "./map" in the source directory. You can: -Load a map from a savegame (in the Game menu) or using '-f filename' on the command line -Start editing -Generate a random map and then tweak For manipulating the map you use the toolbar. There are 6 tool buttons there: -draw one tile -draw onto all tiles in a rectangle -place a starting position (if you make it, you have to use it) -copy from the map -paste onto the map from the clip board (you must have copied something first) -undo last action You may also use the functions in the Editor menu to: -set options -generate random maps -operate on terrain en masse Once you are finished you can save the map in the main menu. ---using your created map:--- With a map names mymap.sav just start civserver: civserver -f mymap.sav From there it works just like if the map was created by the map generator. Starting positions are auto generated, if you didn't create any. If you did, you will get trouble if you don't have _that_ many players. I suggest setting aifill to that number or set minplayers and maxplayers to that number. Note that the created savegames only work on servers from the date mentioned at the top of the file. It is possible to modify savegames by hand, and it shouldn't be too hard to use the map part of a map file generated by civworld to create a map compatible with older versions. -------About the map editor------ The map editor is basically a gtk client with some code added from the old civworld map editor. There is much code in it that isn't used, but is left because it might be used later if the map editor becomes a scenario editor. (hopefully it will have died a merciful death before that happens, see below :)) Note that the editor is half server and half client, which is possible because the two actually share most data structures. But it has the potential to get ugly... It doesn't keep check of the memory allocation when you load a map, so lots of memory leaks. I think I forgot to delete some headers when I deleted the functions from the original gtk client. The only nice thing to say about the build process is that it works :). I include various files from the server and client, like ruleset and savegame loading. The files from the client that wasn't modified are just linked directly. If there is something you should be able to do, but you can't, it is probably because it isn't implemented :). The proper way to make a map editor is probably to integrate it into the client, but I had fun experimenting with this one. It is basically a hack to allow basic map creation for freeciv. Note that it does contain useful code like the copy/paste/undo and toolbox functionality from the old civworld. If you are planning to make a new map editor you should take a look. This implementation is also practical in that it updates most of the civworld code to 1.11.5 . Note that this version can not place start positions like the old civworld. On the other hand it can place specials and huts. I am probably not going to maintain the map editor, maybe except ensuring it continues to build and continues to have the functionality it has now. If someone wants to take charge of it they are very welcome. -Thue _____ Update: while it's still basically a hack, I added a couple of features to allow map creation to be a bit less tedious. I won't do very much more than 'maintain' the code outside of perhaps removing useless code or adding a feature that strikes my fancy, but I would be very much interested in hearing about "it dies horribly when I do this..." or "this thing would be perfect if it had X feature". Of course, it's always nicer when there's the additional, "...and here's the code to fix/implement it". --Mike