Making map scripts work in MP?

Iceciro

Special Ability: Decimate
Joined
Jul 12, 2006
Messages
1,944
Location
in ur empire, takin ur cities
Me and a large (4-6 depending on the weekend) group of friends play CIV IV on the weekends and we are sick and tired of the way the default map generator always seems to put one of us in an utterly well, horrid position, and fills half the map with unusable desert tiles (with no hills or oasis.)

I really, really love Planet Generator - and so does the rest of the group - but only when we can get it to work. For some reason it always seem to desynch one of us due to Out of Synch issues - and we all have the map. Sometimes, rarely, it works, but usually it just nukes us and forces a restart with odd OOC values. Is there a proper way to fix this?

Should only the host have the map script and then transfer that? Is there any easy way to beat this?
 
Me and a large (4-6 depending on the weekend) group of friends play CIV IV on the weekends and we are sick and tired of the way the default map generator always seems to put one of us in an utterly well, horrid position, and fills half the map with unusable desert tiles (with no hills or oasis.)

I really, really love Planet Generator - and so does the rest of the group - but only when we can get it to work. For some reason it always seem to desynch one of us due to Out of Synch issues - and we all have the map. Sometimes, rarely, it works, but usually it just nukes us and forces a restart with odd OOC values. Is there a proper way to fix this?

Should only the host have the map script and then transfer that? Is there any easy way to beat this?

My map PerfectWorld used to have problems with MP, and that was because I was using the Python random number generator. I have fixed it so that it uses the Python rands only when the game is single player.

Strangely, maps are actually generated on all machines independantly, and rely on the random sequence to be exactly the same on each client.

Do some text searches in Planet Generator for stuff like rand, random, randint etc. He may have copied and pasted components that use Python rands.
 
I found some bits that are this...
def randomItem(self, dice):

Would that kill the script, and if so is there any way to make it the same on all computers? Because the rare times the map script works, it's incredible for us.
 
'dice' comes from getMapRand, which should be ok. I had a quick look through the file and I couldn't find anything suspicious, but that's alot of code to look through.

As far as I know, if the map goes out of sync it should happen right away. Once you start playing, the map code is over and should never be an issue. When it goes out of sync it's on turn one correct?
 
Before we even get started, yeah. It just immediately throws up the Desynch numbers. Often it's me (the host) and the next time I try to host a game with that particular script, it defaults all the options in the custom game room to the normals, with none of the script options available. This persists until I restart the game.
 
I've never actually played multiplayer. I assume that only the guy starting the game can choose map options right? I'm trying to think of what could cause a different state other than random numbers, because I didn't see anything in there that should cause a problem.
 
Yep, only the guy hosting. It's very odd to me, too.
 
I am interested in making it to work in multiplayer. I was aware of python rand issue, and i used firaxis dice thing, so random should not be a problem.

EDIT: Ok, I have first vague idea of what that might be. There should be a file in your Documents/MyGames/Civilization folder called planet_generator_0_60.cfg, which is used to store previously selected settings. Does deleting it before generating help? If it does, that may speed up fixing this problem.
 
So far I am unable to repeat this bug. That means I can't start fixing it. Few questions:

- Do you all have exactly the same version of map script? Even small change (i.e. from 0.67 to 0.68) matters.
- Game version (patch) should also be the same.
- Do you play over LAN? (that's the only way I can test multiplayer)
- After failed generation, go to My Documents/MyGames/Sid Meier's Civilization 4 folder on host computer, and attach "planet_generator_0_60.cfg" file to next post, or post it's contents (so I can see what your settings were).

Thread here is probably not the best place for bug progress, so I suggest moving to Planet Generator thread.
 
Back
Top Bottom