PerfectWorld3

The problem kinda fixed itself cephalo, it loaded after a few tries. I guess those crashes happen sometimes?

Anyway there is a new problem now, with the map itself - mah rivers have no rivers in them. :cry:
I encountered that graphical glitch before with one or two rivers. I guess it happens in the world wrap region? But now all the rivers I saw had that problem. :( Perhaps I was close to map wrap, but that was a big territory (whole continent) to have the glitch.

I noticed that when your viewport is near the meridian, rivers on the opposite side are empty. I don't know what to do about that other than to force water at the meridians, which I don't really like. However, if you prefer that, there are some variables to adjust that will make that happen. Just change the east - west attenuation factors to match the north - south attenuation factors. I never actually tested changing these, but it should work in theory.
 
I noticed that when your viewport is near the meridian, rivers on the opposite side are empty. I don't know what to do about that other than to force water at the meridians, which I don't really like. However, if you prefer that, there are some variables to adjust that will make that happen. Just change the east - west attenuation factors to match the north - south attenuation factors. I never actually tested changing these, but it should work in theory.

I'd like that. :) But I'm completely lost as to what and how this could be done. I'd appreciate if you'd do such a version of it and upload it. :please:
 
I'd like that. :) But I'm completely lost as to what and how this could be done. I'd appreciate if you'd do such a version of it and upload it. :please:

Open the PerfectWorld3.lua file in a text editor and have a look at it. There's all kinds of stuff you can change right there toward the beginning of the script. If you break it, you can always re-download.

I don't want to have to maintain multiple versions! Those variables are there so you can have some control.
 
I only have one question. Are round worlds possible? Or is it just square maps?
 
Open the PerfectWorld3.lua file in a text editor and have a look at it. There's all kinds of stuff you can change right there toward the beginning of the script. If you break it, you can always re-download.

I don't want to have to maintain multiple versions! Those variables are there so you can have some control.

Ok, I'll try that... What exactly should be changed?
 
I only have one question. Are round worlds possible? Or is it just square maps?

Civ5 maps are all cylindrical or flat. Toroidal maps are not supported.

Ok, I'll try that... What exactly should be changed?

See my previous reply.
 
Thanks for this map script, I loved it in Civ IV.
When I change the random function as suggested before and enable multiplayer support the game is lost immediately after generating a new map in multiplayer. It still works in singleplayer.

The lua log shows an exception:

Spoiler :
[11729.028] Initializing Lua 5.1.4

[11740.338] Credits: Header type not found.

[11740.370] MainMenu: 2011031719

[11740.370] MainMenu: 2011030317

[11740.370] MainMenu: 2011040317

[11740.370] MainMenu: 2011031719

[11776.687] Map Script: Generating Map

[11776.687] Map Script: Creating initial map data - PerfectWorld3

[11776.687] Map Script: map size: width=100, height=70

[11776.687] Map Script: random seed for this map is 1300389833

[11794.533] Runtime Error: [string "C:\Users\XXXXX\Documents\My Games\Sid Meier..."]:1667: attempt to index local 'nextJunction' (a nil value)

stack traceback:

[string "C:\Users\XXXXX\Documents\My Games\Sid Meier..."]:1667: in function 'SetRiverSizes'

[string "C:\Users\XXXXX\Documents\My Games\Sid Meier..."]:2474: in function 'GeneratePlotTypes'

[string "Assets\Gameplay\Lua\MapGenerator.lua"]:783: in function <[string "Assets\Gameplay\Lua\MapGenerator.lua"]:775>

[C]: ?

[11802.052] CivilopediaScreen: SetSelectedCategory(12)

[11802.052] CivilopediaScreen: CivilopediaCategory[CategoryTerrain].DisplayList

[11802.052] CivilopediaScreen: SetSelectedCategory(1)

[11802.052] CivilopediaScreen: CivilopediaCategory[CategoryHomePage].DisplayList

[11802.474] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\ConfirmImprovementRebuildPopup.lua

[11802.474] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\CityPlotManagementPopup.lua

[11802.474] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\ConfirmCommandPopup.lua

[11802.474] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\MinorCivEnterTerritoryPopup.lua

[11802.474] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\LiberateMinorPopup.lua

[11802.474] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\ReturnCivilianPopup.lua

[11802.474] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\AnnexCityPopup.lua

[11802.474] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\DeclareWarMovePopup.lua

[11802.474] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\BarbarianRansomPopup.lua

[11802.474] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\ConfirmGiftPopup.lua

[11802.474] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\ConfirmCityTaskPopup.lua

[11802.474] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\PuppetCityPopup.lua

[11802.474] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\DeclareWarRangeStrikePopup.lua

[11802.474] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\ConfirmPolicyBranchPopup.lua

[11802.474] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\MinorCivGoldPopup.lua

[11803.753] EndGameMenu: VICTORY POPUP INFO

[11803.753] EndGameMenu: 10

[11803.753] EndGameMenu: 1

[11805.079] EndGameMenu: Play audio: AS2D_VICTORY_SPEECH_LOSS


I didn't have time so far to dig into the code, maybe tomorrow.
 
Thanks for this map script, I loved it in Civ IV.
When I change the random function as suggested before and enable multiplayer support the game is lost immediately after generating a new map in multiplayer. It still works in singleplayer.

The lua log shows an exception:

I didn't have time so far to dig into the code, maybe tomorrow.

Some of the generation routines do require a high resolution random number. They sometimes don't handle the rare case where two adjacent values could be equal. It may require that adjacent map values are always less than or greater than, which is always the case when you have a full 32 bits of precision.
 
I rarely had that problem. But I changed my code to just seed the math.random. That seems to be much better than changing the rand functinos.

Code:
function PWRandSeed(fixedseed)
	local seed
	if fixedseed == nil then
	-- Jaii der Herr MP Fix =>
	--	seed = os.time()
		seed = (((Map.Rand(10000, "Generating PWRandSeed 1/3") * 10000) + Map.Rand(10000, "Generating PWRandSeed 2/3")) * 10000) + Map.Rand(10000, "Generating PWRandSeed 3/3")
	-- Jaii der Herr MP Fix <=
	else
		seed = fixedseed
	end
	math.randomseed(seed)
	print("random seed for this map is " .. seed)
end
 
Ah, I noticed I replaced only one random helper function... must have been blind.
I really like the idea of just replacing the seed though, thanks Jaii, works perfectly.
 
Ah, I noticed I replaced only one random helper function... must have been blind.
I really like the idea of just replacing the seed though, thanks Jaii, works perfectly.

Indeed. At first I didn't see how that would accomplish anything, but after thinking about it... Yeah, that solves the whole problem. I'm gonna have to borrow that. Thanks Jaii!

That's actually a much better solution than I had in the Civ4 versions.
 
This map script seems awesome, can't wait to try it.
I got a question however.
I like chosing "Random Map Type" when starting a new game, so I won't know right off the bat, that maptype I'm playing.
Is there a way to include PerfectWorld3 in the pool of maptypes it picks from?
Thanks. :D
 
You'll still know it's PW3 because it takes then times as long to generate as the other scripts. ;)

No offense intended, cephalo, I know it's because the script is simply much more complex and of course the output is worth it.
 
I'm not sure why, but every time I start a game with this map script I start off in or next to a ridiculously large amount of desert with hardly any resources. Even when I start somewhere fairly green I only have to explore a little to see that I am atually just on a small patch of green in the middle of a huge desert.

I'm thinking it's bugging out in some way and just generating way more desert that it is meant to. It's a shame because the screenshots look amazing and I really would like to play it.
 
The large deserts are intentional and considered a major feature of this script by most. Look at a map of the globe, and you'll see about 1/3 of the planet is desert, but most civ scripts generate more like 1/10 desert. If you don't like it though, open up the script in a text editor and read through all the settings at the top. There's a desert ratio that you can set to whatever you want.
 
The large deserts are intentional and considered a major feature of this script by most. Look at a map of the globe, and you'll see about 1/3 of the planet is desert, but most civ scripts generate more like 1/10 desert. If you don't like it though, open up the script in a text editor and read through all the settings at the top. There's a desert ratio that you can set to whatever you want.

Yeah I get that this script generates some large deserts...but what I'm saying is that most of the globe is carpeted with desert when I play. There's hardly any greenery at all.
 
Back
Top Bottom