View Full Version : Civ4 Map Maker
sarysa Apr 13, 2008, 10:18 AM Version 0.0.3-0420 is out! - 2008-04-20 hotfix
Civ4 Map Maker is an open source project. The first release was this morning at 1am pacific. The UI is still a bit primitive and geeky, but it's pretty feature packed in its early incarnation.
Project URL: http://www.sourceforge.net/projects/civ4mm (should always work)
CivFanatics URL: http://forums.civfanatics.com/./downloads.php?do=file&id=9239 (works only after mod approval)
Current version: 0.0.3-0420
Requires: JRE (Java) 5 or higher. Available at http://java.sun.com
The purpose of the project was to make map editing way easier than it already is, and to correct the many shortcomings of WorldBuilder. The code is based on previous map editors I made for 2d games I'm working on.
VERSION 0.0.3-0420 HOTFIX NOTES:
- Bugfixes: Importing/exporting Warlords and BTS saves, Auto-resource placement on impassable/unimprovable tiles, import not importing world size (would always be DUEL)
- Another hotfix to make coastlines less confusing to look at. Definite "DUH" moment for me, what was I thinking?!
- Added special functions to strip rivers/resources/routes/coasts, since I'd already made this anyway.
- Auto-resource will give the option to place 3 tribal villages per civ on the map at 100%. Future versions will support manual placement of tribal villages.
VERSION 0.0.3 NOTES:
- Fixed a bug where sheep and wheat were getting switched on export.
- Map editor now allows rivers and roads to be on the same square. (internally, rivers are
handled bitwise now)
- Implemented importing of maps. This can be pretty slow with larger maps, keep in mind.
- Moved selection tool to where the other tools are. The selection tool being where it was
was legacy code from my other map makers that were much simpler in that respect.
- Cut/copy/paste interface looks much nicer. If a region is copied (not cut) the copied region
will be highlighted red. The place where a region will be pasted is highlighted yellow.
- Created an undo/redo feature. Undo goes back as far as 100 changes to the map, currently.
- Created a new map feature, since it's annoying to have to close and open the map editor
to make a new map.
- Greatly improved auto-rivers.
- Allows more auto-resources to go onto more diverse tiles.
- Fixed severely faulty math with the random resource generation.
- Implemented custom map sizes. The old map size (which is actually a variable in the
Civ4WorldBuilderSave file) now determines for how many civs resources are generated.
- Shows x/y coords on tooltip text. And yes, Y's are backwards because that's how Civ4 works.
Included in 0.0.2:
- Cut/copy/paste/delete: You can copy-paste regions of any size, using the normal Windows keyboard shortcuts.
- Fill tool: Works like the bucket tool in paint programs.
- Resize/scale maps: You can resize[crop or expand canvas] the map, or scale[stretch] maps larger or smaller. (though the more you up/downscale them, the less they resemble the original maps, but going from, say, Huge -> Large turns out well)
- Auto-river: Automatically connects rivers, though currently only supports rivers that don't have more than two adjacent rivers. (in directions N-S-E-W) This is something I'll be fixing in 0.0.3.
- Auto-coast: Option to automatically create a coastline surrounding all land.
- Auto-climate: Option to automatically tweak the map's climate based on latitude/longitude.
- Tooltips: Optional tooltips tell you what's on the tile and estimates Production/Gold/Food.
- Auto-resource: Option upon export to randomly apply resources to the map. Allows you to scale the resources, where a 10% resource map would be one where people fight heavily for resources, while a 300% resource map is one where resources are plentiful.
The way it works right now, when you launch the program, you get an empty canvas with only ocean. You can use the tools to create the basic map layout, place whatever you want, then let the program do the rest if you'd like. (coastlines, climates, resources...) The map files usually used by the program are binaries that are only useful to the program, which makes it run much faster. (no parsing) The binaries store the map's version number, so your .map files today will still work with whatever version of the program is around two years from now.
To make maps that Civ4 can use, you'll have to export the map. That's when autoclimate, autocoast, and autoresource works. This means you won't corrupt your map by using these features. They're 100% safe! There's even a "Seed" feature that'll help make it so (but not guarantee) your maps will export with the same random resources/climate each time. (climate at certain latitudes is 50/50 randomized)
Here's some screenshots:
http://www.pamelabowman.org/civ4mm003-hotfix-1.jpg
Version 0.0.3 hotfix screenshot. This is my current map, blown up to 130x120, auto-everything'd, exported, then re-imported back into Civ4 Map Maker. I'm just posting it to show that it can be done now, with all the auto-features your maps probably won't need to look so busy. :) Note how the coastlines also look nicer thanks to the hotfix.
http://www.pamelabowman.org/civ4mm003-2.jpg
Version 0.0.3 screenshot. A little difficult to see because the image's downscaled, but you can now see the copy rectangle and/or paste rectangle. The copied tiles are highlighted red. The yellow rectangle shows where the clipboard contents will go. I couldn't get the mouse pointer in the screenshot, but it's pointing at the top-left tile in the paste rectangle.
http://www.pamelabowman.org/civ4mm003-3.jpg
Version 0.0.3 "results" screenshot. Auto-rivers are nearly complete. All forms of rivers will connect now. This screenshot demonstrates how it tries to discern parallel rivers. There's a few kinks to work out, but your typical not-too-fancy rivers will always look correct.
http://www.pamelabowman.org/civ4mmss2.png
Version 0.0.2 screenshot. This is actually the map I'm working on.
http://www.pamelabowman.org/civ4mmss3.jpg
The previous screenshot, after being exported to a WorldBuilder save. Note that it's using all the auto-features.
Next version (0.1.0) will look at:
- Custom resources (as requested by Shqype)
- Bug fixes. There have to be a few by now...
- Mini-map that works similar to the WorldBuilder one
- More interesting transform tools. (rotate, manipulating the clipboard contents, etc.)
By the way, this is a 100% open source project, so if you're a skilled developer and want to contribute, you're welcome to do so. (provided your code is clean, readable, and stable)
GarretSidzaka Apr 13, 2008, 02:39 PM added your editor to podcast called ModCast!!!
listen through my signature's link :)
JEELEN Apr 13, 2008, 02:41 PM Nice tool! (And not bad for a first post either!):goodjob:
sarysa Apr 13, 2008, 04:09 PM Nice tool! (And not bad for a first post either!):goodjob:
Thanks. :) You can tell it's my first time here as I just realized there's two other projects similar to mine. :lol: The only difference being features and I think this one's the only open source project.
As is customary with a new project, I'll be churning out builds like crazy for awhile, I could even have 0.0.3 checked in some time this week. (I'm finishing up map importing right now)
Chiyochan Apr 13, 2008, 05:49 PM If possible a tracing/picture underlay feature would be great, but getting that Import map function is priority, especialy if it can clean the damn thing, I'm tired of broken/crashing maps every time I try to edit them
GarretSidzaka Apr 13, 2008, 11:28 PM Thanks. :) You can tell it's my first time here as I just realized there's two other projects similar to mine. :lol: The only difference being features and I think this one's the only open source project.
As is customary with a new project, I'll be churning out builds like crazy for awhile, I could even have 0.0.3 checked in some time this week. (I'm finishing up map importing right now)
We recorded a ModCast episode today that will be released soon, and featured your map editor :)
sarysa Apr 14, 2008, 07:28 PM If possible a tracing/picture underlay feature would be great, but getting that Import map function is priority, especialy if it can clean the damn thing, I'm tired of broken/crashing maps every time I try to edit them
In what way are your maps broken?
Right now, it'll let you get away with almost anything. It only cares what order BeginGame/BeginMap/BeginPlot appear in (and those three are required), and that the first line after BeginPlot is the x,y coordinate, but I could easily make it not care about that either.
By the way, though I probably won't put in an underlay until next version after 0.0.3 (as I'd like to get core features before waves of bug reports come in), you can quickly travel through your map by pressing CTRL-direction. i.e. pressing ctrl-right will take you about about 20-something squares to the right. I forgot to document all the controls.
Re: the modcast
I'm pretty much out of it when it comes to great advancements in message board technology in the last 3 years, but I'll check your link for it. :D
[edit: tax day 2008 :D ]
I more or less figured out how to complete the auto-river. I might add support for two parallel rivers tonight, but that's far as I can go.
Here's screenshot showing all river configurations will be supported in 0.0.3:
http://www.pamelabowman.org/civ4mmss4.jpg
Gr3yHound Apr 15, 2008, 09:12 PM Wow great,
i'm the MapView guy, and i really hope this project is going somewhere since i cannot really continue my project at this precice moment
It's a bit sad i cannot check the program out atm (but surely will asap) but due to the screenshots it looks a little bit like you tried to adopt some display styles from MapView, i can spot resources and improvements showed in a way which is pretty much as i used to do. ;D
If you have certain questions about how i did things or something just let me know, i'd be glad to help even if my reaction times might not be perfect and i might not have a lot of time.
One interessting thing might be a class i've been working on that allows map export map export to xml, to provide a more general interface for maps when it comes to interchange between several editing programs. Wbs and company aren't really parsable i thought it shoulded be wrapped into something everyone understands, so it's no longer a matter of parsing and turns into a matter of interpreting. Xml Example (http://www.hs-furtwangen.de/~bindig/MapView/xmlsaved.xml) (The example isn't really perfect since the xml'ed wbs doesn't have much a lot of the different possible scenarios shown, as i said, i was working on it)
Shqype Apr 16, 2008, 04:33 PM It's a great first release, but here's a few things I'd like to see in the next version:
1) Custom map size. Currently we can only choose from the 6 templates that you've provided. That's nice to have, but you should add a 7th option called "Custom" where we can set the size of the map.
2) Scalable Map View. Currently there is a predefined area where we can view our map. If I want to view the lower portion of my Large map I'd have so "scroll" down considerably. Could you make it so that the whole map is viewable by expanding the viewable section and by adding a zoom in/out scale? I'd like to be able to see "the big picture," or my whole map at any given moment.
Other things I'd like to see in the future:
A way for us to add custom resources to the map editor. Maybe providing instructions for how to edit a bonus defines file of some sort so we can add our own resources (and buttons for it) so we can use this map editor to populate our worlds with them. The same for features and routes, please. :)
Good job so far, though. It runs pretty fast; I haven't experienced any lag!
sarysa Apr 17, 2008, 11:58 AM Thanks for the replies.
re: Gr3yHound:
I don't expect the interface to change much, as Java doesn't have the "look cool" options that OpenGL does. The tooltips are there so people can tell what's on a square.
I'm hoping to keep my map editor slim and geeky. :D
As for making it XML, I'd prefer to keep it binary for speed reasons. (for example, importing maps takes 3 seconds on my 4 year old development laptop. Ouch.) But I could add an "export as XML" feature in the future if we all work out a standard, and people are free to rip off the load/save code in MapData.java.
re: Shqype:
#1 is coming in 0.0.3. (that's the last thing I need to do before 0.0.3, in fact)
#2 will be in the version after 0.0.3.
By custom resources, do you mean
[edit: got interrupted when posting this yesterday, was a bit of an earth-shaker in real life]
By custom resources, do you mean resources that don't exist normally? I could add that to my list for two or three versions from now. Something like that should be simple to do so long as you don't have more than 200 custom resources, the code already breaks up images by expecting them to be 24x24 squares. They could certainly be binaries too, assuming the whole less than 200ish (I think 219 to be exact) custom resources.
Shqype Apr 18, 2008, 09:23 PM Thanks for the replies.
re: Gr3yHound:
I don't expect the interface to change much, as Java doesn't have the "look cool" options that OpenGL does. The tooltips are there so people can tell what's on a square.
I'm hoping to keep my map editor slim and geeky. :D
As for making it XML, I'd prefer to keep it binary for speed reasons. (for example, importing maps takes 3 seconds on my 4 year old development laptop. Ouch.) But I could add an "export as XML" feature in the future if we all work out a standard, and people are free to rip off the load/save code in MapData.java.
re: Shqype:
#1 is coming in 0.0.3. (that's the last thing I need to do before 0.0.3, in fact)
#2 will be in the version after 0.0.3.
By custom resources, do you mean
[edit: got interrupted when posting this yesterday, was a bit of an earth-shaker in real life]
By custom resources, do you mean resources that don't exist normally? I could add that to my list for two or three versions from now. Something like that should be simple to do so long as you don't have more than 200 custom resources, the code already breaks up images by expecting them to be 24x24 squares. They could certainly be binaries too, assuming the whole less than 200ish (I think 219 to be exact) custom resources.
Cool, thanks for the reply.
And yes, that's what I mean by custom resources. I have new resources in my mod, and no more than 200, so it seems fine for me :)
sarysa Apr 19, 2008, 07:53 PM Version 0.0.3 is out, and most of the core features are in.
I'll definitely look at custom resources for 0.1.0. My todo list is pretty short right now. :) I think I've spent more time on this map maker than actually playing the game. Hah.
Though I spent an hour today playing on a 10x8 map. :lol: I'm amazed it didn't crash.
JEELEN Apr 20, 2008, 04:23 AM Have tried importing a BtS WBS file, but get a weird result (not really resembling the file I saved). Can't this tool be used with BtS files?
sarysa Apr 20, 2008, 08:59 AM Really? The basic features in Base/Warlords/BTS are all the same, and the program ignores lines it doesn't recognize.
Could you send me the WBS file and I'll see what's wrong? ( sarysa2@yahoo.com )
Now it will strip things like civilizations and units. You should be getting the correct terrains, features, resources, routes, and rivers, and most map constants. (dimensions, wrapping...) The focus of the program so far is just to make the basic map. Advanced features will be added in later versions when the basics are more or less stable.
JEELEN Apr 20, 2008, 09:26 AM I see. Maybe I'm just no good with the tool then... :crazyeye:(Sent you the file.)
cubeboy Apr 20, 2008, 09:28 AM my only complaint is that is does not work with BTS. I tried to load quick practice map i made with BTS, but apperantly the computer wants me to put in the Vanilla Civ 4 disk.
sarysa Apr 20, 2008, 10:14 AM I think I'll put in a hotfix today for BTS/Warlords after I look at JELLEN's issue. The only issue I can see after having made my own huge archapalageo (horrible spelling) map is that the file extensions are different.
If you have Windows set up to view file extensions, you can change it from Civ4WorldBuilderSave to CivBeyondSwordWBSave and BTS will automatically load it.
Also, I'm going to change the coast from just a copy of the WorldBuilder coast 2d art to a much lighter colored ocean. That has to be confusing.
sarysa Apr 20, 2008, 01:14 PM The hotfix has been posted. It's pending approval on CivFanatics, but it's available at the sourceforge link.
sarysa Apr 25, 2008, 01:20 PM This has been moving well the last few days. I worked on my own map (which, feel free to laugh, is the Final Fantasy V overworld 1 :D ) and found a number of UI bugs along the way, and not just obvious stuff like the tooltip's redraw. (which is fixed in 0.1.0 dev) Seems that when the undo stack maxes out, undo/redo stops working properly. This, and other more detailed bugs with undo/redo is guaranteed to be fixed in 0.1.0. I should have spent more time trying it out.
Here's a screenshot of the upcoming clipboard viewer:
http://www.pamelabowman.org/civ4mm010-dev1.jpg
Note that with the addition of the clipboard viewer, I'll be getting rid of the awkward (especially to code) red highlight for the copied region. It was a poorly thought out feature to begin with. :)
The only major thing left for 0.1.0 is to add support for custom terrains, feature, and resource mods, and I'm not quite sure yet how to do that. I'd like to make it as easy as possible. What would be a good mod that has custom versions of all of these that I could use as a point of reference? (not going with Final Frontier because that's more of a full-scale rewrite than a mod...way out of scope of the current map maker project)
CODE TALK: I tweaked the code a bit and moved map manipulation methods out of MapData.java and MapImagePanel.java, making them static methods in Constants.java for ease of use if anyone ever decides to make some kind of add-ons. Also made map drawing work with any byte[][][] of map data fed to the newly static method for map drawing. (still will be located in MapImagePanel.java) I hope to get JavaDoc and Subversion set up for this project after releasing 0.1.0. I can't imagine anyone wanting to jump in on this chaotic mess of code right now.
GarretSidzaka Apr 25, 2008, 09:41 PM in trying to get your app to run but im having trouble. i am no code guru :)
i installed the latest java, but i just dont see it really running in my tray and i dont think your program is seeing it
all that happens is this pops up in a dos-box
C:\Documents and Settings\Administrator\Desktop\New Folder>cd bin
'java' is not recognized as an internal or external command,
operable program or batch file.
Press any key to continue . . .
cubeboy Apr 26, 2008, 05:14 AM in trying to get your app to run but im having trouble. i am no code guru :)
i installed the latest java, but i just dont see it really running in my tray and i dont think your program is seeing it
all that happens is this pops up in a dos-box
C:\Documents and Settings\Administrator\Desktop\New Folder>cd bin
'java' is not recognized as an internal or external command,
operable program or batch file.
Press any key to continue . . .
do you have the java runtime environment running? you can download it here (http://java.com/en/download/index.jsp)
just to be sure
what i would do is not use the command prompt if you can help it, and go to where you installed the map maker and send a shortcut of "run.bat" to your desktop.
maybe you could take a screenshot of your desktop then it happens with the printscreen button, (paste into paint, host it, post it here)
sarysa Apr 26, 2008, 09:07 AM in trying to get your app to run but im having trouble. i am no code guru :)
i installed the latest java, but i just dont see it really running in my tray and i dont think your program is seeing it
all that happens is this pops up in a dos-box
C:\Documents and Settings\Administrator\Desktop\New Folder>cd bin
'java' is not recognized as an internal or external command,
operable program or batch file.
Press any key to continue . . .
Ok, it seems that you don't have your java environment variables registered for some weird reason. Shoot.
Anyway, to do this manually:
1. Go to c:\Program Files\Java\
2. Look for a folder that starts with jre1.6 or jre1.5. (or jdk1.6/jdk1.5 though unlikely)
3. Open your control panel
4. Look for "System" or "System Properties" and double-click that
5. Go to Advanced tab and click on "Environment Variables"
6. Look for one like "PATH". Add the following to end of it: [don't forget to start with the ; and end with \bin]
;c:\program files\java\[type entire folder name from step 2]\bin
7. Click "OK" each window until you're out of all that.
After that, run.bat should work.
Thanks for making me aware of this. (god I hate windows...) I'll figure out something to do this automatically in 0.1.0
sarysa Apr 26, 2008, 11:03 AM Actually, try this:
http://www.pamelabowman.org/run.zip
Unzip it to wherever you put the map maker and try run.bat again. It tries to find your installed JRE and should work if you put it in the default location.
If not, there's pretty much nothing I can do apart from searching entire directory structures. :/ And batch files are TERRIBLE...I treasure my sanity.
GarretSidzaka Apr 26, 2008, 02:19 PM this is what i had to type to do that
;c:\Program Files (x86)\Java\jre1.6.0_05\bin
GarretSidzaka Apr 26, 2008, 02:26 PM btw that worked!!!
Good work so far!! :goodjob: i like it
i cant wait to see the new features you will add :)
Palabfas May 25, 2008, 11:28 AM Can you make maps that are bigger tahn 25x25? Everytime i try i can't edit anything beyond the 25x25 mark. I think there's a way but i'm not really sure how to do it :(
Shqype Jun 19, 2008, 11:39 AM sarysa, can you give us an update on the status of this mod, please?
Chiyochan Aug 12, 2008, 03:29 PM In what way are your maps broken?
Right now, it'll let you get away with almost anything. It only cares what order BeginGame/BeginMap/BeginPlot appear in (and those three are required), and that the first line after BeginPlot is the x,y coordinate, but I could easily make it not care about that either.
By the way, though I probably won't put in an underlay until next version after 0.0.3 (as I'd like to get core features before waves of bug reports come in), you can quickly travel through your map by pressing CTRL-direction. i.e. pressing ctrl-right will take you about about 20-something squares to the right. I forgot to document all the controls.
Re: the modcast
I'm pretty much out of it when it comes to great advancements in message board technology in the last 3 years, but I'll check your link for it. :D
[edit: tax day 2008 :D ]
I more or less figured out how to complete the auto-river. I might add support for two parallel rivers tonight, but that's far as I can go.
Here's screenshot showing all river configurations will be supported in 0.0.3:
the maps are broken because they autodefeat when you try to play them, importing them into this would hopefully clean the maps entirely no matter what i screwed up, where most cleaning programs only remove certain arbitrary text from the file.
Civ3matt Oct 02, 2008, 10:22 PM To tell you, I tried it and it really sucks!:dunno::stupid:Plus with the map I made It looked like a pice of Sh** made me almost barf!:vomit:
Im sorry ot say this/:
Warned - Trolling.
Gooblah Oct 11, 2008, 03:32 PM Hey, tried it out and it works great! :goodjob:
Quick question: I had a map going which had a width of 28 tiles. However, I could only edit 24, since the other 4 were off the edge of the interface. I tried maximizing the window to no avail. Any ideas?
Gaius Octavius Oct 11, 2008, 06:39 PM Can you make maps that are bigger tahn 25x25? Everytime i try i can't edit anything beyond the 25x25 mark. I think there's a way but i'm not really sure how to do it :(
Hey, tried it out and it works great! :goodjob:
Quick question: I had a map going which had a width of 28 tiles. However, I could only edit 24, since the other 4 were off the edge of the interface. I tried maximizing the window to no avail. Any ideas?
You use the numpad to move the screen. :) (Make sure num lock is turned off.)
This is an excellent utility and makes map editing much easier than the WB. Good job. :goodjob:
Gooblah Oct 18, 2008, 10:45 AM Woah, that is awesome! Thganks a ton!
:D
GFO_Anubis Nov 04, 2008, 01:34 AM Ive got a bit of a problem.. when ive exported the map and want to load it in game it crahes.. im thinking it could have something to with missing starting locations.. else the program is nice and simple and that it I like.. if any got the version that dosent remove starting location I would like if you could post it...
Elucidus Dec 08, 2008, 08:13 PM I just create a game and save the file in world builder and then import those into the text of the map file. Then load it up and change it in worldbuilder, a pain for sure but it works.
P-Dubya Apr 12, 2010, 02:54 AM in trying to get your app to run but im having trouble. i am no code guru :)
i installed the latest java, but i just dont see it really running in my tray and i dont think your program is seeing it
all that happens is this pops up in a dos-box
C:\Documents and Settings\Administrator\Desktop\New Folder>cd bin
'java' is not recognized as an internal or external command,
operable program or batch file.
Press any key to continue . . .
by the way, the quickest way I found to avoid this problem was to create a desktop folder named "cd bin"and extract all Civ4MapMaker-src-and-bin-0_0_3-0420 contents into the folder. Then, open the batch file and it runs.
A question by the way; how do I create a landscape that isnt cylindrical, such as a north america map? Thanks.
Kid R Jul 02, 2011, 12:02 PM Good job developers - thanks very much for this :goodjob:
I just tried it for the first time after years of hacking the map area in WB saves by hand. Java is my language so if I think of any cool additions I'll send em in.
Radio Noer Jul 12, 2011, 09:20 AM Excelent tool, especially for making ridiculous maps without the hassle of worldbuilder, also very easy to use and figure out. 11/10
33CI00FA Oct 26, 2011, 02:12 PM Wow! If this tool works it is just what I need. Map editor for making great maps. I must try this out. I will give feedback after I try it.
|
|