multiplayer / lan?

cptbarkey

Chieftain
Joined
Mar 1, 2008
Messages
1
is this mod compatible to play over a lan? we tried it and couldnt see the hosted game. just curious. awesome mod!!
 
As far as i know you are the first play tester to try it on Multiplayer.

Did you play other Mods over LAN ? (As in "Do You know how to set it up properly ?")

If so you might be able to help Davidlalen to make/test the necessary changes.
 
Refar is correct. I have not taken any steps to enable multiplayer or disable it. As far as I know it should work. I have never tried it or heard from anybody else who tried it. I have read some posts about "multiplayer compatibility" especially in python code, to avoid Out Of Sync errors, and I have followed all those steps.

If you can get other mods to work but not mine, please let me know which mods work and I will see if I can figure out what is different.
 
This mod works great in mp exept for one issue.. When a unique unite that adds to a city spawns from a depo (museum truck, refugees and so on) and you add it the game will instantly go out of sync.

The player who gets (and adds!!) the unit must save the game and reload that save (with everyone connecting again) to get around this problem.
After this is done the game will continue to work fine untill a new unique unit is spawned and added.. A bit anoying in the long run as they usually spawn quite often and the bonuses are great so one wants to use them.


(I play FFH2 with the mod^2 fall further and the mod^3 patrons of scion, usually without issues, always in mp.)
 
Do Tankers (the Refuel Action) cause a OOS ?
 
I have reviewed the code for creating fuel trucks. It is no different than the code for creating animals. There is no reason this particular code should be causing OOS. I am not a big expert on OOS; but probably the OOS is happening at some earlier point and not getting detected until this point.

The usual cause for this problem is that at some point, one player's machine generates a random number and another player's does not generate any random number. Thereafter, the random number generators are OOS. Some decisions may not lead to any OOS which is detectable by the game, but suddenly one does.

The usual process for tracking down this problem is to fill up the python code with debugging statements. Specifically, every random number which is generated needs to be logged with a unique message. Then, you would play a MP game, and each player would need to send me the logfile.

I can make a "debug" version of the mod which has all these print statements. Sadly, I have only a single CD of the game, so I cannot try MP myself. Hopefully if I post the debug version, then Deamon and his MP friends can send me their logs. From that, I may get a clue about where the problem is actually coming.
 
I think it's not creating fuel trucks, it's using fuel trucks. Unfortunately i can't be sure, let alone give you proof. But i asked about the trucks because i got a "gut feeling" there. I suspect that when/after a custom python action is taken (Refuel, Join City, Use Supply Caravan) the game might fail to properly report the local change to other players - perhaps somewhat similar to the previously encountered problem of AI fuel trucks failing to be removed.

Perhaps you can account for this possibility when designing the debug print-outs.
 
The report says the OOS occurs when the unit is produced, not when it is consumed. I suppose there might *also* be some unreported error when a unit is consumed. The print statements will actually cover all instances where a random number is generated, and no random number is needed when the unit is consumed. Let us see if we can sort it out.
 
Actually i am not 100% sure what the report states...
But i think it's about using the unit up...

....When a unique unite that adds to a city spawns from a depo (museum truck, refugees and so on) and you add it the game will instantly go out of sync.

The player who gets (and adds!!) the unit must save the game and reload that save (with everyone connecting again) to get around this problem.

In any case you are right about the actual cause of the OOS might not be exactly at the same time as you get the notifications, so it might or might not be about using up the unit.

The point however is, that used Random Numbers are not the only source of OOS. Basicly any change that is applied locally and not reported to other participants can be the cause.
Promotions from Python are known to cause OOS in many instances (Because the promotion does not get reported properly)
 
@ Deamon: Here is an experiment you could try right away. There is a secret key combination alt-h. It gives you one random "ruin find" unit in your capitol. Please start up a multiplayer game; have the first player use alt-h; you may have to use it a couple of times till you get a refugee or truck which you can "use up".

Does the OOS appear when creating the unit, or using it up? Performing this as the *first action* also reduces the chance that some other problem is causing the OOS and we only notice it later.

From the programming standpoint, all the unit creation calls pPlayer.initUnit() and all the unit destruction calls pUnit.kill(), both of which are MP-safe by themselves.
 
The oos issue apears when one uses the unit(any "ruin" unit(museum/food/... trucks, refugee) or spawned unit(gas truck) that adds to a city or a promotion), not when they are created.

Sorry for being deceptive in my original description of the problem.

We'd be willing to try a game with the debug code if you provide it for us.

//Deamon
 
Thanks! If you could try the experiment with alt-h and let me know whether it happens even in a brand new game, that will help a lot. Use alt-h a few times as the first move in the game, until you get a unit which can be "consumed" (refugee or truck, not hero) and then consume it. Since practically nothing else has happened in the game before the unit is consumed, that will help make sure it is really the kill operation which *causes* the OOS.
 
Answering my own question, I have mis-implemented all the action buttons, they are not multi-player-aware. My apologies, I will fix this as soon as I can.
 
I have been thinking...

You don't really need python for these Special Building action.
Just use the same mechanic as is used on the Great People to create special buildins. This way you will also solver the problem of multiple of these wonders being made in the same civ, if a player happens to pop more than one.
Might also make the AI use it better.

You still need to solve the Python actions for Fuel Trucks and Refugees tho.
 
Good suggestion. I will look into that, although I think the "safety truck" might then show up in the great people tab in the civilopedia. As you point out, refugees and fuel trucks still need to be fixed, and those probably happen earlier in the game.
 
I believe the OOS problem is fixed due to new code I have written for version 10. Please see the downloads page to get the new version, and let me know if it is working for you without OOS.
 
Great! Will give it a try asap and report back. :)

Edit:
The oos issues seem to be resolved (even using the gas truck). :D Great work!
Using the cheat "alt+h" still makes the game go oos, but that's the ONLY time.. and that is something I think is good. Cheating in mp isn't cool.
 
Top Bottom