PerfectWorld3

cephalo

Deity
Joined
Jul 26, 2007
Messages
2,058
Location
Missouri, USA
Finally after months of excruciating experimentation I bring you PerfectWorld3 for Civ5!

This map script uses various manipulations of Perlin noise to create landforms, and generates climate based on a simplified model of geostrophic and monsoon wind patterns. Rivers are generated along accurate drainage paths governed by the elevation map used to create the landforms.

To use this map script, download from the mod browser in game and enable it as a mod, and then select 'mods' -> 'single player' -> 'setup game'. It's just like starting a normal game, but from inside the 'mods' menu. From there, you should see the PerfectWorld 3 map script in the list with your other maps.

Alternatively, if the mod browser is not working for you, you can download the civ5mod file from the civfanatics database here.

1) Download the file "perfectworld_3_v_1.civ5mod" from CFC's databas, save anywhere on your harddisk.
2) Open that file using WinRar/7-zip, then extract both files you see ("PerfectWorld3(v1).modinfo" and "Perfectworld.lua")
3) Copy both files to the folder "X:\Users\YourName\Documents\My Games\Sid Meier's Civilization 5\MODS" -- basically the place where all your other mods and mapscripts are located.
4) Activate the mod/mapscript ingame.


Sirian did a very good job making Firaxis' placement system for resources and starting positions, so for now I am using his default code. That comes with an option to increase the resource level like in the map scripts that come with the game.

I also have an option for all players to start on the largest continent like they do in Terra. It's not as robust as in previous versions of PW and the 'new world' is not guaranteed, but since that functionality also comes with Sirian's code, it was very tempting to just use it as is. The default setting starts players all over the world.

There are many other opportunities to tune the map with variables at the beginning of the actual lua script file in your users mods directory. Those familiar with prevoius versions of PW will know what I mean. You can change things like land mass percent, mountain percent, desert percent, etc. There are comments in the code explaining what each does.

Unfortunately, multiplayer is not supported at this time. I need to do some fancy things with the random number generation, and the Map.Rand() function doesn't quite do what I need to do. Once the proper SDK is released I can research what my options are for getting maximum resolution of the random sequence. Until then, my random number generation will break multiplayer.

Here are some screenshots...

This shot demonstrates how I mix the continent styles up a bit in certain situations. The Europe art set is the only one that is acceptable for jungle, but the Africa art set looks good on large Sahara like deserts, as does the America art set. This shot also gives a good example of the river drainage network.


This shot gives an example of how the climate model can create rain shadows. Here we have a strong equatorial wind coming from the east creating jungles and marsh on the east side of these islands, while the west side is desert in those places that are behind higher altitude areas. Altitude is a little bit harder to see in this version of PW than in previous versions, because I don't have pine trees to create that strong visual cue, so sometimes the rain shadows look a bit out of place. You have to use your imagination a bit and pretend there's a good reason why desert is next to jungle sometimes... :shifty:


I hope you all enjoy the map! Have fun!

Known Issues:

There is an occasional crash bug in my routine that fills in basins so that rivers flow to the coast. If the basins are not filled completely, I force the map to crash so you don't end up playing on a goofy map. If you lose the game on turn zero, that's because the map crashed. It will require a dedicated effort in the future to find where my lake siltifier is failing, because it only happens very rarely for me. It will happen all the time for you, because the law of randomness states that only things you don't want to happen will happen. Since I want to see the crash so I can fix it, it will elude me. For you, it will crash half the time. :mischief:

Version History ------------------
4- A working version of version 3

3- Added Atolls. Took Sirian's advice and shrank the 'huge' size.

2 - Shrank the map sizes except for huge. Added a better way to adjust river lengths. Used the continent art styles in a more diverse way. Cleaned up the mountain ranges a bit.

1 - initial release! 11/24/2010
 

Attachments

  • PW3-Desert.jpg
    PW3-Desert.jpg
    121.6 KB · Views: 127,059
  • PW3-Jungle.jpg
    PW3-Jungle.jpg
    104.5 KB · Views: 123,291
Those rivers look very, very nice. Good job!
 
I'll have to restart Civ 5 just to try this.
One unsettling thing on your screenshot, though: A river runs from plains to hills to sea.
You're still using heightmap differences to decide of putting hills/mountains I suppose and rolled your own river code? In which case I think this kind of thing would be unavoidable?
 
Wooohooo!:woohoo:

I played my last ten or so game sof BtS on your PW2 map, definitely gonny try this soon.

Though I find that the normal civ5 maps look really good now. Didn't they change the terrain to be of similar worth all over the world (desert hills/grassland hills) just to make the landscape look more natural?

Anyway, awesome work.


EDIT:

Which changes do you expect gameplaywise compared to terra? E.g. do you have more rivers, is it less balanced regarding starting positions, are ships more worthy due to higher number of islands and so forth?
 
I'll have to restart Civ 5 just to try this.
One unsettling thing on your screenshot, though: A river runs from plains to hills to sea.
You're still using heightmap differences to decide of putting hills/mountains I suppose and rolled your own river code? In which case I think this kind of thing would be unavoidable?

I'm using a combination of heightmap differences and total heightmap values this time, but the effect is similar in that hills and mountains are not a perfect indicator of the altitudes present.

With the rivers, there's actually a river at every hex vertex, but the only ones you can see are the ones that reach a certain amount of water. So where a river starts depends on the watershed area and how much rain it gets. A large watershed is as likely to cause a river as a small place with lots of rain. That's why in the jungle areas you see alot of little one tile rivers along the coast. In that case a large watershed is unnecessary becuase each tile is getting nearly enough rain to cause a river.
 
Which changes do you expect gameplaywise compared to terra? E.g. do you have more rivers, is it less balanced regarding starting positions, are ships more worthy due to higher number of islands and so forth?

I haven't played a complete game on this map, so their may be some gamebreaking issues yet to be ironed out.
 
I got a quick shot at the script.
I have an issue with rivers indeed. Many of them start in deserts or desert borders (including desert/desert/plain tiles, or in the middle of desert hills).

Here's an example (strat view and 3d view).




There are many rivers originating in a hill desert. It looks weird. Another spot on the same map had a large river running into a desert and being joined there by small affluents that were only 1 tile long but originated in a desert/desert/plain tile (with no forest, jungle or marsh).

I think it's a bit too many rivers in deserts. Marshes are also very rivery, and that would be fine except it results in lots of short/average parallel rivers and no complex river system like Amazon, Mississipi or the like.
 
I got a quick shot at the script.
I have an issue with rivers indeed. Many of them start in deserts or desert borders (including desert/desert/plain tiles, or in the middle of desert hills).

Here's an example (strat view and 3d view).

There are many rivers originating in a hill desert. It looks weird. Another spot on the same map had a large river running into a desert and being joined there by small affluents that were only 1 tile long but originated in a desert/desert/plain tile (with no forest, jungle or marsh).

I think it's a bit too many rivers in deserts. Marshes are also very rivery, and that would be fine except it results in lots of short/average parallel rivers and no complex river system like Amazon, Mississipi or the like.

There actually is a currently hard coded cheat rain amount to help rivers appear more uniformly across the terrain. I wanted to make sure there was at least a few 'Nile' type rivers. Maybe I over did it a bit. When I use only the rainfall amount, I guess I felt that deserts tended to have not enough rivers. Deserts also tend to be in areas on very large continents with a huge watershed, so cheating in this manner is kindof a knife edge balance.
 
Right on! This is one of my favorite maps from Civ4!

Time to shut down ModBuddy and startup Civ5 for a game!

Cheers!
 
Perhaps it's me, but I was unable to start a map with this (it was the 'you died before turn one' issue), after five consecutive tries with the following settings:
RANDOM leader
Perfect World 3 map script (can't wait!)
QUICK game
STANDARD or HUGE sizes

Note the only mods I have installed and running are the 'simple clock', 'Mongols,' and another map script I believe.

Didn't go throgh advanced, so I thing the default was to NOT start everone on the largest continent...

Any diagnostics I can send to help?
 
Perhaps it's me, but I was unable to start a map with this (it was the 'you died before turn one' issue), after five consecutive tries with the following settings:
RANDOM leader
Perfect World 3 map script (can't wait!)
QUICK game
STANDARD or HUGE sizes

Note the only mods I have installed and running are the 'simple clock', 'Mongols,' and another map script I believe.

Didn't go throgh advanced, so I thing the default was to NOT start everone on the largest continent...

Any diagnostics I can send to help?

If you have the lua logs turned on that might help. Five times in a row seems like more than just bad luck.
 
Brilliant, I never played on anything other than PerfectWorld in BTS so I am excited to give this a go. Thanks cephalo.
 
Amazing!! Finally! :D
As for the rain shadow thingy, how about having the desert simply be plains instead? That way it might not look TOO odd, and wouldnt there be some minor foliage behind those mountains anyway?
Well, if they are along the coast as in that screenshot i mean, not like in tibet or the gobi desert :)

I do also hope you find a way for the other continent types, i agree that the european looks by far the best in terms of temperate forests and such, and the autumn trees looks a bit odd, but i truly love all the variations in color the vanilla game has to offer, so i hope a future version of your script will retain that "new continent, new color" excitement.
Perhaps it already does, must admit i'm writing this before testing :)

Gr8 zomg job <3
 
I'll definitely be keeping my eye on this! I played PW exclusively in Civ4, and loved digging into your code and tweaking the many options you made available. This was actually the first mod I routinely searched for after Civ5's release, although I have to give the devs credit that the maps in 5 are dramatically better than 4's. The rivers in deserts definitely look like too much though, as rivers are so much more powerful even than in Civ4. I'd say the oasis tiles are already enough of a boost for desert terrain, and I personally don't mind a few swaths of map that aren't really habitable in a game.

My favorite aspect of PW 1&2 were always the mountain ranges, so while I can't tell from your screens, I hope this script carries on that fine tradition! I'll try this out as soon as I finish up my current game.
 
Okay so I decided to give this a go tonight, fired up a huge map, chose Japan just because "what the hell, im going to tokyo next month so why not soak in the soundtrack".
And what do i see as the loading screen fades away? Why the bay of tokyo of course, LOL, nice coincidence / map script indeed ;)



Either way, beautiful map this, will def keep playing on this one :)




I have no idea what that green stuff in the middle is, but i like it ;>


 
Looks like there might be a couple bugs to work out. I think in Baleur's screens I can see a mountain with a flood plain on it, and a hill with a swamp or something. Still a gorgeous map though.
 
Yeah, and the swamps sometimes have their reflection "broken", some mountains have sharp texture edges and such, i suspect its because the continents are mixed in the same landmasses, and the vanilla game didnt have any smooth transitions between continent tiles (apart from being seperated by water).

I saw an occurance where some guys in my warrior unit had red shadows, the others had black, its prolly due to the same thing (lighting changes in the continents, some have reddish shadows, some have bluish shadows).

We can always hope that the devs releases a patch in the future that contains smooth continent-tile transitions :/
 
Top Bottom