MakeAwesome.awk

tndp

Chieftain
Joined
Nov 1, 2005
Messages
16
I wrote this little script and decided I might as well post it. It takes a world builder save, fills it with special resources, strips off the ice-caps and adds many additional rivers. It also greatly raises the likelihood that tundra and desert hexes will be hilly (and thus not useless). It should be fairly easy to modify if you don't like the balance of special resources it produces (or want it to put special resources in strange places.) I also hope it might be a useful example for people interested in fiddling with world builder saves in an automated way (but I probably should've written it in python).

You run it as post-processing on a world builder save. That is to say - first, generate a random map that you would like to play on (you don't even have to look at it.) When you start the game, this random map will automatically appear as: WBAutoSave.Civ4WorldBuilderSave

For this script to work, you will need access to a real computer, or you will need to download cygwin or another real computer-emulator.

To use it, put it in the worldbuildersaves directory, for example:
C:\Documents and Settings\Samuel Handelman\My Documents\My Games\Sid Meier's Civilization 4\Saves\WorldBuilder

And then, open up the cygwin prompt, and type:
cd "/cygdrive/c/Documents and Settings/(your name)/My Documents/My Games/Sid Meier's Civilization 4/Saves/WorldBuilder/"
awk -f MakeAwesome.txt WBAutoSave.Civ4WorldBuilderSave > Cheat.Civ4WorldBuilderSave

In Civ IV, start a "custom scenario", a custom scenario named "Cheat" will have appeared, and you can play it. You can also "load" the secnario from within the in-game map editor.

Note that your opponents will have the same benefits you do, so it's not quite cheating. I actually find that these resource-rich maps are better balanced (or anyway more fun) for multiplayer. Things certainly get going somewhat faster.

I had to change the file extension to post it, you may find it helpful to change the file extension to ".awk" (although most systems shouldn't care.)
 

Attachments

  • MakeAwesome.txt
    9.8 KB · Views: 261
Hmm. I have created my own map with rivers, but I havn't added special resources yet, and I find that time consuming. Is it possible that I could edit this so that it does not change desert/tundra to hills, and not add rivers, and instead just add special resources? I don't know the structure of python that much, and I usually just use the BMP to WBS converter. Thanks.
 
The script to do that is attached - it adds a bonus in every fourth square and leaves the map otherwise untouched. This might be (way) more bonuses than you want, though.

Can you run awk scripts? The instructions to use it are just like those in the grandparent post.
 

Attachments

  • JustAddBonuses.txt
    4 KB · Views: 193
Great utility, However (and your gonna love this):D . Is there a way to leave bonuses alone and just modify the amount of forest and jungle? I know I can go into the WBS(worldbuilder.savefile) and change the percentage of desert and plains. I can even get rid of all of one feature(say forest) but I just want to change the percentages of forest and jungle. So I cant do a "find and replace all" for that. I have been looking for the file/location that determines the percentages of forest and such, however all I can find are desert and plains. Any help will be greatly appreciated.

[EDIT] Never mind I found it. Thanks anyways.
 
Top Bottom