Obtaining the Random Map Seed Number

Joined
Dec 27, 2001
Messages
2,453
Location
Grand Rapids, MI
Hi Folks,

I've been away for a looooong time (well, in game years anyway :mischief:). So, sorry if this has already been asked and answered.

It seems like I remember way back from Civ III there was a way that, if you liked the random map you were dealt, you could type something in to find the map seed. Then you could type the number in for a new game and get the same exact map.

Is there a way to do that for Civ IV?

Thanks!!
 
AFAIK not by default, but i think you could edit the ini, to log the Random generator calls, then check the Log file for the map random seed used.

Then you can - again in the ini - enter the seed to make the game generate the same map again...

Code:
; Somewhere in the beginning of the file (7th or 8th entry...)

; Random seed for map generation, or '0' for default
MapRandSeed = 0

[......]

; The last few lines in the file for enabling Logs:

; Enable the logging system
LoggingEnabled = 1

; Enable synchronization logging
SynchLog = 0

; Overwrite old network and message logs
OverwriteLogs = 0

; Enable rand0 event logging
RandLog = 1

; Enable message logging
MessageLog = 0

; Break on memory allocation order #
BreakOnAlloc = -1
 
It's not what i was thinking of in the first place - i know, when working on my script, there was a Log where every RNG call went to. But i cant find it right now... :confused:
Or maybe i just had made my code write those somewhere ?!?

Anyway, i found it in another log file:

init.log:
Code:
...
...
...
[10821.140] DBG: Music Start
[10821.203] DBG: Font Init
[10821.265] DBG: Begin MenuManager
[10821.296] DBG: Total Frame MS: 31319.0  FPS: 000  Min:000 Max:000 Avg:000  SampleFilter:10.000000
 Time   :   Ave  :  Min% :  Max% : Num : Profile Name
-----------------------------------------------------
--------------------------------------------------
[10869.703] DBG: Engine: Camera Initialized
[10872.859] DBG: SyncRandSeed is 10821591, MapRandSeed is 10821591

I quit right after the mag generation, so it is possible the values will got burried under tons of other stuff later... Should be still possible to find it searching for MapRandSeed or something.

Here the Logging-Settings i used.
Code:
; Enable the logging system
LoggingEnabled = 1

; Enable synchronization logging
SynchLog = 0

; Overwrite old network and message logs
OverwriteLogs = 1

; Enable rand event logging
RandLog = 0

; Enable message logging
MessageLog = 0
 
Top Bottom