1. We have added the ability to collapse/expand forum categories and widgets on forum home.
    Dismiss Notice
  2. Photobucket has changed its policy concerning hotlinking images and now requires an account with a $399.00 annual fee to allow hotlink. More information is available at: this link.
    Dismiss Notice
  3. All Civ avatars are brought back and available for selection in the Avatar Gallery! There are 945 avatars total.
    Dismiss Notice
  4. To make the site more secure, we have installed SSL certificates and enabled HTTPS for both the main site and forums.
    Dismiss Notice
  5. Civ6 is released! Order now! (Amazon US | Amazon UK | Amazon CA | Amazon DE | Amazon FR)
    Dismiss Notice
  6. Dismiss Notice
  7. Forum account upgrades are available for ad-free browsing.
    Dismiss Notice

Obtaining the Random Map Seed Number

Discussion in 'Civ4 - Creation & Customization' started by Colonel Kraken, May 26, 2008.

  1. Colonel Kraken

    Colonel Kraken Chieftain

    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!!
     
  2. Refar

    Refar Chieftain

    Joined:
    Apr 10, 2005
    Messages:
    4,608
    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
     
  3. Colonel Kraken

    Colonel Kraken Chieftain

    Joined:
    Dec 27, 2001
    Messages:
    2,453
    Location:
    Grand Rapids, MI
    Thanks, Refar! I'll give it a try. :)
     
  4. Colonel Kraken

    Colonel Kraken Chieftain

    Joined:
    Dec 27, 2001
    Messages:
    2,453
    Location:
    Grand Rapids, MI
    I enabled logging, but I did not find anything in the logs folder that would help.
     
  5. Refar

    Refar Chieftain

    Joined:
    Apr 10, 2005
    Messages:
    4,608
    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
     
  6. Colonel Kraken

    Colonel Kraken Chieftain

    Joined:
    Dec 27, 2001
    Messages:
    2,453
    Location:
    Grand Rapids, MI
    Oh, good. I must have missed this the first time I looked through the file. Good find! Thanks. I'll give it a try. :)
     

Share This Page