PerfectWorld3

It doesn't work properly this way; I already brought this up to Cephalo but he seems to have vanished with the project unfinished. The current method uses your CPU clock to generate a random seed for the map; problem is, everyone's computer pulls a different number and you all end up in different games when the engine realizes you're not on the same planet.

I came up with a fix that works well enough; you just need to go into the file and replace this (actually, I modified this a bit from the original - might not look the same as this... shouldn't be too hard to figure out, though):
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")


With this:
seed = ((Map.Rand(99999999, "")) * (Map.Rand(99999999, "")))

I'm really not sure why he felt the need to pull the clock time in the first place, actually. *shrug*

Yeah I have no clue why it didn't work for you, but I didn't need to anything other than change a simple value and it worked completely in a full game. The players didn't all end up in separate games.
 
[to_xp]Gekko;11759005 said:
anyone else noticed rivers often finishing 1 hex short of coast and creating visual artifacts? it's pretty annoying :/

I did some testing, and this issue actually happens only with the tweaked PW3 version included in VEM/GEM. not sure why...

edit: found the issue, it's caused by some ContinentsPlus code that adds islands, removing it solves it :D
 
It doesn't work properly this way; I already brought this up to Cephalo but he seems to have vanished with the project unfinished. The current method uses your CPU clock to generate a random seed for the map; problem is, everyone's computer pulls a different number and you all end up in different games when the engine realizes you're not on the same planet.

I came up with a fix that works well enough; you just need to go into the file and replace this (actually, I modified this a bit from the original - might not look the same as this... shouldn't be too hard to figure out, though):
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")


With this:
seed = ((Map.Rand(99999999, "")) * (Map.Rand(99999999, "")))

I'm really not sure why he felt the need to pull the clock time in the first place, actually. *shrug*

Perhaps you should have read my posts (218, 229) more in detail.

If nothing has changed. Map.Rand is not detailed enough for your version.
And, as you can see in the original code change I suggested, the seed = os.time() should be commented out. (-- starts a comment in lua). I left it in (commented out) that you can better see which lines I have changed.

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

I just downloaded the file from the first post (PerfectWorld3 does not seem to be in steam workshop anymore, is it?). And unfortunately Cephalo did not change the seed = os.time() in the last version.
So I really don't know where your code comes from.
 
Is there a way to change the map size in perfect world? Like say if i want slightly larger Huge sized maps what can i change
 
Is there a way to change the map size in perfect world? Like say if i want slightly larger Huge sized maps what can i change

there is teh "bigger worlds" mod that makes one about 50% larger than huge, but its incredibly taxing on the game engine and CTD's within 100-200 turns in my experience (on marathon) once all civs start getting real tech.



Can someone help? WHy cant i find a solution to put the resources "STONE" into perfect world? Im principally use NiGHTS for regular civ, and the lack of STONE is a serious detriment to my overall strategy
 
It was due to the inclusion of "bigger worlds," and older mod that i guess hasnt survived the importation to the workshop format of steam.



Would it be possible to have multiple icons on the same tile? I.e., multiple resources? The constraints of the mapspace really limit the versatility of an empire, and historically some of the most successful nations were smaller with highly diversified local economies, which could be represented in the use of stacking resources on the same tile. Simultaneously, tile improvements would have to stack.

Is this possible? I dont see a reason why it shouldn't be, aside from the cluttering of the actual art on the tile. Assigning more values to the tile shouldn't be a big hassle, aside from the fact that it could be hardcoded to only limit 1 tile.
 
Alright, so i'd like to ask how to change some small amount of code:

1. Increase the ratio of land to sea, so that the oceans aren't quite as big.
2. Increase the density of continents. Not sure how to articulate this other than the ratio of "coast:inland" to be a lot higher, to create rounder continents.
3. A pangea function?



Is it possible to modify the script?

Preferably to modify a new version so that old perfectworld3 (v.4) remains unchanged?
 
i absolutely love this map script, its the only one i use, but i would love if it was updated to include some user inputs, ideally an option to have 1 continent per team or at least pick number of continents, as in 2,4,6,8,10, or 12 or w/e
 
I don't know about exposing them as options in game setup, but you can reconfigure the mod pretty straightforwardly in PerfectWorld3.lua.

The first function includes a variety of map constants:
Code:
function MapConstants:New()
	local mconst = {}
	setmetatable(mconst, self)
	self.__index = self

	--Percent of land tiles on the map.
	mconst.landPercent = 0.28

	--Percent of dry land that is below the hill elevation deviance threshold.
	mconst.hillsPercent = 0.50

	--Percent of dry land that is below the mountain elevation deviance
	--threshold.
	mconst.mountainsPercent = 0.85

	--Percent of land that is below the desert rainfall threshold.
	mconst.desertPercent = 0.36
	--Coldest absolute temperature allowed to be desert, plains if colder.
	mconst.desertMinTemperature = 0.34

	--Percent of land that is below the plains rainfall threshold.
	mconst.plainsPercent = 0.56

	--Percent of land that is below the rainfall threshold where no trees
	--can appear.
	mconst.zeroTreesPercent = 0.30
	--Coldest absolute temperature where trees appear.
	mconst.treesMinTemperature = 0.27

	--Percent of land below the jungle rainfall threshold.
	mconst.junglePercent = 0.75
	--Coldest absolute temperature allowed to be jungle, forest if colder.
	mconst.jungleMinTemperature = 0.70

	--Percent of land below the marsh rainfall threshold.
	mconst.marshPercent = 0.92

	--Absolute temperature below which is snow.
	mconst.snowTemperature = 0.25

	--Absolute temperature below which is tundra.
	mconst.tundraTemperature = 0.30

	--North and south ice latitude limits.
	mconst.iceNorthLatitudeLimit = 60
	mconst.iceSouthLatitudeLimit = -60

	--North and south atoll latitude limits.
	mconst.atollNorthLatitudeLimit = 20
	mconst.atollSouthLatitudeLimit = -20
	mconst.atollMinDeepWaterNeighbors = 4

	--percent of river junctions that are large enough to become rivers.
	mconst.riverPercent = 0.19

	--This value is multiplied by each river step. Values greater than one favor
	--watershed size. Values less than one favor actual rain amount.
	mconst.riverRainCheatFactor = 1.6

	--These attenuation factors lower the altitude of the map edges. This is
	--currently used to prevent large continents in the uninhabitable polar
	--regions. East/west attenuation is set to zero, but modded maps may
	--have need for them.
	mconst.northAttenuationFactor = 0.75
	mconst.northAttenuationRange = 0.15 --percent of the map height.
	mconst.southAttenuationFactor = 0.75
	mconst.southAttenuationRange = 0.15

	--east west attenuation may be desired for flat maps.
	mconst.eastAttenuationFactor = 0.0
	mconst.eastAttenuationRange = 0.0 --percent of the map width.
	mconst.westAttenuationFactor = 0.0
	mconst.westAttenuationRange = 0.0

	--These set the water temperature compression that creates the land/sea
	--seasonal temperature differences that cause monsoon winds.
	mconst.minWaterTemp = 0.10
	mconst.maxWaterTemp = 0.60

	--Top and bottom map latitudes.
	mconst.topLatitude = 70
	mconst.bottomLatitude = -70

	--Important latitude markers used for generating climate.
	mconst.polarFrontLatitude = 60
	mconst.tropicLatitudes = 23
	mconst.horseLatitudes = 28 -- I shrunk these a bit to emphasize temperate lattitudes

	--Strength of geostrophic climate generation versus monsoon climate
	--generation.
	mconst.geostrophicFactor = 3.0

	mconst.geostrophicLateralWindStrength = 0.6

	--Fill in any lakes smaller than this. It looks bad to have large
	--river systems flowing into a tiny lake.
	mconst.minOceanSize = 50

	--Weight of the mountain elevation map versus the coastline elevation map.
	mconst.mountainWeight = 0.8

	--Crazy rain tweaking variables. I wouldn't touch these if I were you.
	mconst.minimumRainCost = 0.0001
	mconst.upLiftExponent = 4
	mconst.polarRainBoost = 0.00

	--default frequencies for map of width 128. Adjusting these frequences
	--will generate larger or smaller map features.
	mconst.twistMinFreq = 0.02
	mconst.twistMaxFreq = 0.12
	mconst.twistVar = 0.042
	mconst.mountainFreq = 0.078

	--mconst.useCivRands = true --not ready for this yet

	-----------------------------------------------------------------------
	--Below are map constants that should not be altered.

	--directions
	mconst.C = 0
	mconst.W = 1
	mconst.NW = 2
	mconst.NE = 3
	mconst.E = 4
	mconst.SE = 5
	mconst.SW = 6

	--flow directions
	mconst.NOFLOW = 0
	mconst.WESTFLOW = 1
	mconst.EASTFLOW = 2
	mconst.VERTFLOW = 3

	--wind zones
	mconst.NOZONE = -1
	mconst.NPOLAR = 0
	mconst.NTEMPERATE = 1
	mconst.NEQUATOR = 2
	mconst.SEQUATOR = 3
	mconst.STEMPERATE = 4
	mconst.SPOLAR = 5

	--Hex maps are shorter in the y direction than they are
	--wide per unit by this much. We need to know this to sample the perlin
	--maps properly so they don't look squished.
	mconst.YtoXRatio = 1.5/(math.sqrt(0.75) * 2)

	return mconst
end

It shouldn't be too hard to get a variety of different behaviors just by tweaking that function, though I haven't gone too far into it myself. If things work as I'd expect, you could get e.g. more land just by changing mconst.landPercent to something higher than 0.28.

There's some risk and some trial and error involved.
 
For sure. We use it in several GMR-hotseat rounds. ;)

Regul,

Where is the best place to ge the most up to date multiplayer script for PerfectWorld3? Looks at the history, it seems there have been several issue and bug fixes, so I'm not quite sure where to get the best version of this...

Thanks!
 
I've been scanning the 18 pages or so looking for what numbers to tweak in the .lua to make for smaller continents but nothing jumps out at me. Anyone able to offer some assistance?

I'll read in depth more to see...
 
If anyone has any variations of the PerfectWorld Map Script cephalo has given me permission to upload a pack of community-made PerfectWorld Maps - So far we have Flat Continents, Flat Pangaea, Flat Archipelago, Continents and Archipelago


Where are these?
 
I've been scanning the 18 pages or so looking for what numbers to tweak in the .lua to make for smaller continents but nothing jumps out at me. Anyone able to offer some assistance?

I'll read in depth more to see...

They aren't very obviously named, but I think the variables you want are twistMinFreq and twistMaxFreq. I haven't looked at this code in ages, so I might not be an authority on this anymore, :lol: but if you turn those numbers up you should get smaller landmasses etc.
 
Thanks! Also, while scanning I see your baby is almost 2 since it was 12/24 when you said he was born recently. I understand if you don't keep in it much anymore, I have 4 myself.

I turned down the total land size and had a lot of small places like I wanted. But land was crappy so I turned down the % for mountains. Got a nice spread of continent sizes like I wanted, didn't have to change a twist variable.
 
Back
Top Bottom