| General | Hosted Sites | Civ5 | CivRev | Civ4Col | Civ4 | Civ3 | Civ2 | Civ1 | Misc | Marketplace |
![]() |
|
|
Welcome to Civilization Fanatics' Center. You are currently viewing our site as a guest which gives you limited access to our site features. By joining our free community, you will be able to participate in the discussions, search the forum, send private messages, vote in polls, upload your own screenshots to the gallery, and access many other special features. Registration is fast, simple and absolutely free, so sign up today! If you have any problems with the registration process or your account login, please contact support. |
|
|||||||
![]() |
|
|
Thread Tools |
|
|
#1 |
|
Chieftain
Join Date: Oct 2005
Posts: 23
|
BUG/BAT Multiplayer - Help!
Ok, so I along with a few friends have gotten back into Civ and have been playing nearly every night. I was poking around on here and found info on the BAT, BUG, and BUFFY mods so I checked them out. One friend and I decided to start up some games using the BUFFY mod, so we did. Everything worked great until we attack something, then we are instantly given the out of sync error. We searched on the forums and found others with the same issue but no solution, so we decided to try the BAT mod. We ran into the same problem with that. We were doing a direct IP game which I read has issues, so we tried alternative ways to play. We have tried playing over Gamespy, but with the BAT mod loaded no matter who hosts the other cannot see the game to join it. We opened all of the ports that were recommended in this post, but it has not helped. We tried playing a LAN game over Hamachi, but the game does not show up when trying over a LAN (even with no mod loaded LAN does not work for us at all).
We downloaded the zipped version of the BUG mod and installed it directly into the BTS folder as instructed in the readme file. If I launch a single player game the BUG mod is functional. If we try playing over Gamespy you can tell the mod is working because when attempting to connect to a game you are given a BUG loading screen hint, but the game does not connect. A direct IP game connects just fine, but for some reason the BUG mod is not loaded, the game plays just like vanilla BTS. We are at our wit's end. We have started a couple of games with BUFFY and BAT but have really been unable to finish them because of the out of sync issues. However, once you've played even a fraction of a game using any of these mods it is really hard to go back to playing regular BTS, so we're trying to find a way to get this to work so we can still enjoy the benefits of at least the BUG mod. Anybody have any helpful advice? |
|
|
|
|
|
#2 |
|
Deity
Join Date: Mar 2007
Location: Mountain View, California
Posts: 9,624
|
First, thank you for a great report and writeup of your actions. This is very helpful. I've got some further questions:
I can confirm that for some inexplicable reason BAT will not let you see games in the Gamespy lobby. Alerum and I tried many times to no avail. Both BUG and BULL worked, but we didn't actually play a game--just connected. So try BUG using the EXE's multiplayer install method, and it couldn't hurt to rename your CustomAssets folder just to be sure.
__________________
Monkeys killing monkeys killing monkeys over pieces of the ground. Silly monkeys, give them thumbs they make a club and beat their brother down. BUG Mod - BTS Unaltered Gameplay [ Forum | Download | FAQ | Known Issues | Troubleshooting | Modding Tutorial ] |
|
|
|
|
|
#3 |
|
Deity
Join Date: Mar 2003
Posts: 6,296
|
|
|
|
|
|
|
#4 |
|
Deity
Join Date: Mar 2007
Location: Mountain View, California
Posts: 9,624
|
Was that BULL 1.0 or a prerelease version (taken from a ZIP or SVN)? The answer to this question will help me track the problem down.
Does anyone know is the code to check for OOS is in the SDK? Is there a function that I can read to see what might be tripping it up?
__________________
Monkeys killing monkeys killing monkeys over pieces of the ground. Silly monkeys, give them thumbs they make a club and beat their brother down. BUG Mod - BTS Unaltered Gameplay [ Forum | Download | FAQ | Known Issues | Troubleshooting | Modding Tutorial ] |
|
|
|
|
|
#5 |
|
Deity
Join Date: Mar 2003
Posts: 6,296
|
Actually now that you mention it. RevDCM 2.5 and 2.51 had BULL in it, but it was the prerelease version glider got from the SVN quite a few months ago. It was RevDCM 2.6 that really broke MP (the OOS error on attacking), and when he integrated BULL in the 2.6 build it was the Official BULL 1.0 release he used. So it was something in a later version of BULL that caused this. I can't be sure, if you want I can try to track down a copy of RevDCM 2.5 and the current version, and you could run a diff. I don't know how usefull that would be though...
|
|
|
|
|
|
#6 |
|
Deity
Join Date: Mar 2007
Location: Mountain View, California
Posts: 9,624
|
The main difference between the pre-release version of BULL and the 1.0 release is the fix for the Stack Attack bug. That gives me a good idea of where to start looking. Unfortunately, the fix I applied seemed pretty straight-forward, and since SA is an interface-only feature I had assumed that each individual unit attack was sent as a command across the network.
__________________
Monkeys killing monkeys killing monkeys over pieces of the ground. Silly monkeys, give them thumbs they make a club and beat their brother down. BUG Mod - BTS Unaltered Gameplay [ Forum | Download | FAQ | Known Issues | Troubleshooting | Modding Tutorial ] |
|
|
|
|
|
#7 |
|
Deity
Join Date: Mar 2003
Posts: 6,296
|
I want to make sure I'm being accurate here, I'm pretty sure I'm correct on that, but can't be positive, and I can't find any reference to BULL in the Rev 2.5 or 2.51 changelog. I've linked this thread from a RevDCM MP thread, and hopefully glider will be along to put in a word or two. He's currently working on a RevDCM MP build, and getting BULL to work right is an important step in that.
|
|
|
|
|
|
#8 |
|
Deity
Join Date: May 2006
Location: Where animals hop not run
Posts: 2,050
|
@Phungus
Yeah your info is good Phungus. RevDCM 2.51 was BULL 1.0 pre-release and RevDCM 2.60 was BULL 1.0 post release. @EmperorFool Here's the scary bit. I'm a complete newbie on multiplayer. When I started work on it, I assumed that there was some sort of underlying mechanism that kept the game in sync at a high level....Then slowly more truth appeared to be revealing itself about multiplayer after confirming with Jdog. There is no underlying mechanism except for the user interface. Anything else that happens on the network but for the user interface, happens because of an assumption about determinism. That is if the sorenRandomNumber is initialised and synchronised across all machines at hook up time, from that moment on, the same sorenRandomNumbers get reproduced on all machines in a deterministic sequence, and each machine on the network runs as if it were in single player. The idea is that only the non-deterministic elements of code are transmitted across the network to keep the game synced. At first I thought that this includes random numbers, but it does not. The only non-deterministic code element that needs to be transmitted across the network are the human interface choices. This is my understanding of how MP works, and we believe that it was an engineering decision done to preserve very small bandwidths for very slow networks that were around when CIV4 was being built. Unless I am wrong, I shake my head to realise that the multiplayer implementation is absolutely minimalistic. No AI unit behaviour information is sent. No automated production information is sent. All that is ever sent is: 1) That local user interface events, trigger corresponding handlers on all network machines, and all machines execute the handlers in exactly the same way. 2) When local user interface code is running uniquely on a single machine, the game state must not be changed, and no calls to getSorenRandomNumber made either. At this point of execution, events are triggered and for modders, local mod information can be be stored so long as that information is not directly affecting the game state during this time. 3) When any other code is executing on either the local machine or the network, then the game state may be changed. This is because other than at local user interface event moments, all machines are running the same code, as a deterministic assumption. 4) A mathematical OOS algorithm simply checks the coherency of the game state in a very efficient algorithm, and if it detects a difference, multiplayer goes down with an OOS. This is my understanding, but I am only a beginner on multiplayer truly and respectfully and I could very well be a little bit, somewhat or completely deluded about what Firaxis did with multiplayer. Cheers
__________________
Joint modder of the RevolutionDCM mod for BTS Last edited by glider1; Dec 23, 2009 at 03:12 PM. |
|
|
|
|
|
#9 | ||||
|
Deity
Join Date: Mar 2007
Location: Mountain View, California
Posts: 9,624
|
Your understanding matches mine.
BTW, the random number generators are actually called "psuedo-RNGs" because they are actually just a complicated function that takes the previous value as input to produce the next value. One simple example would be "N + 1" which would produce die rolls of 1, 2, 3, 4, 5, 6, 1, 2, 3, 4 ... That would be pretty boring and not very random-looking, so much more complicated formulas are designed to spread the numbers, attempt to hit all values, and "look" random. Quote:
Quote:
[Note to self: go check!] Quote:
Quote:
Here's where the above applies to the OOS error in BULL. When you use a stack to attack a plot, does the game send a single "this stack attacks that plot" command to all machines, or does it send one "this unit attacks that plot" command for each unit in the stack until the combat is resolved? I can find this out easily enough when I get home this weekend; I was just wondering if anyone had looked at that code much. In that code is a check for the player's Stack Attack setting. In any case, I suspect my fix for the null pointer exception I had is what's causing the problem, but I can't think of what problem that could be. Even if the command sent is stack-based, all machines should pick the same units to attack and produce the same combat result. I'm pretty sure that player options are sent over the network, but I suspect that I'm checking the player options in that code, and if I check the "active" player's option, that will be a different player on each machine. Does anyone know if this problem occurs if both players have Stack Attack turned off? What about if they both have it turned on? In other words, does it only happen if player's have different Stack Attack settings?
__________________
Monkeys killing monkeys killing monkeys over pieces of the ground. Silly monkeys, give them thumbs they make a club and beat their brother down. BUG Mod - BTS Unaltered Gameplay [ Forum | Download | FAQ | Known Issues | Troubleshooting | Modding Tutorial ] |
||||
|
|
|
|
|
#10 |
|
Deity
Join Date: May 2006
Location: Where animals hop not run
Posts: 2,050
|
@Emporer
I wish I could help but I currently believe the best would be to remove all non-deterministic elements altogether and thus realise a perfect network multiplayer implementation on the network. An algorithm that can determine what a player will select before they select it. Wow that's tricky. It would mean that nothing would have to be transmitted across the network at all. I will now go and contemplate that one ![]() Cheers, thanks for the clarifications and have a peaceful Chrissy.
__________________
Joint modder of the RevolutionDCM mod for BTS |
|
|
|
|
|
#11 | ||
|
Chieftain
Join Date: Oct 2005
Posts: 23
|
Quote:
Quote:
EDIT: Success. We each used a clean install of the game to make sure there would be no issues with the other installations of BUG, BAT, or BUFFY that we had done before, installed BUG from the exe using the Multiplayer install method, and then we were successfully able to play a Direct IP game and attack without the out of sync error. We started a game up as Civs that start with a warrior instead of a Scout and went in search of animals to attack. We ended up finding each other instead so we declared war and attacked each other with no issues. To test out even further, my friend even had a warrior of his attack my capital and there were no problems. Thanks for the help, I'm grateful that we'll be able to play through a game using the BUG mod without having to worry about sync issues. Also, if you want help testing out things to try and fix sync issues (or any other issues with the mods) just let me know, I have no problems helping out. Last edited by HeroFromHyrule; Dec 24, 2009 at 12:54 AM. |
||
|
|
|
|
|
#12 |
|
Chieftain
Join Date: Apr 2009
Posts: 34
|
I tested this and verified that this OOS happens both when I had stack attack turned on as well as off. Both times, I was the only player connected at the time (Pitboss game); does OOS in this case mean my instance of the game is out of sync with the Pitboss game?
|
|
|
|
|
|
#13 | |
|
Deity
Join Date: Mar 2007
Location: Mountain View, California
Posts: 9,624
|
Quote:
Okay, so I guess PitBoss games run the game on the server as if it were an observing player, so yes, you must be getting OOS with that game. At least this tells me it is not that two players are interacting in some strange way.Does this happen if you attack with one unit? I had assumed not, but my guess now is that that is the only way you've been attacking. Can you try whichever way you weren't using before? I don't mean Stack Attack, I mean selecting multiple units and attacking. I'll be home tomorrow night so I can look at this on the weekend.
__________________
Monkeys killing monkeys killing monkeys over pieces of the ground. Silly monkeys, give them thumbs they make a club and beat their brother down. BUG Mod - BTS Unaltered Gameplay [ Forum | Download | FAQ | Known Issues | Troubleshooting | Modding Tutorial ] |
|
|
|
|
|
|
#14 | |
|
Live 4ever! Or die trying
|
Quote:
Edit: Changed it to the following in 2059 ... Code:
# BUG Poll statistical error if gc.getGame().isGameMultiPlayer(): iRandError = 4.0 else: iRandError = 3.5 + gc.getGame().getSorenRandNum(10, "Election Results Statistical Error") / 10.0
__________________
My Blog [Getting Old, Getting Cranky], Wife's Series! [The Prism Series - book 2 The Deeper Darkness now on sale!] BUG Mod - BtS Unaltered Gameplay [ Forum | Download | FAQ | Known Issues | Report Bugs | Troubleshooting | BUG Wiki | Modding Tutorial | BUFFY ] "I found this great mod! Have you heard of it? It gives me everything I need!" - Troy Goodfellow's wife talking about the BUG mod Spawn Busting: All the cool guys are doing it | Ruff's Oz Game is now up and seeking your input! Test your knowledge of probability quiz! My latest game report - new 3/26 Last edited by ruff_hi; Dec 24, 2009 at 05:00 PM. |
|
|
|
|
|
|
#15 |
|
Deity
Join Date: Mar 2007
Location: Mountain View, California
Posts: 9,624
|
Aww, let's give the multiplayer gamers some randomness, too! No need to use different methods or Soren's stinky RNG:
Code:
import random ... iRandError = random.uniform(2.5, 4.5)
__________________
Monkeys killing monkeys killing monkeys over pieces of the ground. Silly monkeys, give them thumbs they make a club and beat their brother down. BUG Mod - BTS Unaltered Gameplay [ Forum | Download | FAQ | Known Issues | Troubleshooting | Modding Tutorial ] |
|
|
|
|
|
#16 | |
|
Live 4ever! Or die trying
|
Quote:
Spoiler:
__________________
My Blog [Getting Old, Getting Cranky], Wife's Series! [The Prism Series - book 2 The Deeper Darkness now on sale!] BUG Mod - BtS Unaltered Gameplay [ Forum | Download | FAQ | Known Issues | Report Bugs | Troubleshooting | BUG Wiki | Modding Tutorial | BUFFY ] "I found this great mod! Have you heard of it? It gives me everything I need!" - Troy Goodfellow's wife talking about the BUG mod Spawn Busting: All the cool guys are doing it | Ruff's Oz Game is now up and seeking your input! Test your knowledge of probability quiz! My latest game report - new 3/26 |
|
|
|
|
|
|
#17 |
|
Deity
Join Date: Mar 2007
Location: Mountain View, California
Posts: 9,624
|
You're spoilers are teh awesome!
__________________
Monkeys killing monkeys killing monkeys over pieces of the ground. Silly monkeys, give them thumbs they make a club and beat their brother down. BUG Mod - BTS Unaltered Gameplay [ Forum | Download | FAQ | Known Issues | Troubleshooting | Modding Tutorial ] |
|
|
|
|
|
#18 |
|
The White Wizard
|
I just noticed this thread, and I have a question:
So, any time I call getSorenRand() in python, it will cause OOS's? Do gc.getGame().getMapRand() calls cause OOS too? Should I use the import random, random.uniform() call in place of them?
__________________
"A Witty Saying Proves Nothing" -Voltaire Civilization 4 Mods: Rise of Mankind - A New Dawn 1.75 Civilization 5 Mods: Active City Defense, Tech Diffusion Minecraft Mods: Spout & Spoutcraft Lead Developer |
|
|
|
|
|
#19 |
|
Deity
Join Date: Mar 2007
Location: Mountain View, California
Posts: 9,624
|
It depends on what you need the random number for. If your code will run on every human player's computer in a multiplayer game and determine what happens in the game, use Soren's RNG. This will ensure that each computer gets the same random number and thus will take the same action.
If your random number is only used to control some visual non-game-affecting thing for a single player, use that random module I just pointed to. I do not know if the Map RNG must be kept synchronized the same way Soren's must, but I would bet yes. BTW, take a look at the docs that I linked. There are other random distributions. If you just need a number between 0.0 and 1.0 (you can get 0.0 but cannot get 1.0), use random.random().
__________________
Monkeys killing monkeys killing monkeys over pieces of the ground. Silly monkeys, give them thumbs they make a club and beat their brother down. BUG Mod - BTS Unaltered Gameplay [ Forum | Download | FAQ | Known Issues | Troubleshooting | Modding Tutorial ] |
|
|
|
|
|
#20 | |
|
The White Wizard
|
Quote:
__________________
"A Witty Saying Proves Nothing" -Voltaire Civilization 4 Mods: Rise of Mankind - A New Dawn 1.75 Civilization 5 Mods: Active City Defense, Tech Diffusion Minecraft Mods: Spout & Spoutcraft Lead Developer |
|
|
|
|
![]() |
| Bookmarks |
|
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Download BUG and BAT Here! | alerum68 | Civ4 - BTS Unaltered Gameplay (BUG, BAT and BULL) | 94 | May 15, 2013 12:25 PM |
| BAT 2.0 and multiplayer | Drakesden | Civ4 - BTS Unaltered Gameplay (BUG, BAT and BULL) | 7 | Nov 28, 2009 02:19 AM |
| BAT Mod Multiplayer | ezolak | Civ4 - BTS Unaltered Gameplay (BUG, BAT and BULL) | 8 | Jun 02, 2009 04:07 PM |
| Does BAT 1.2 include BUG? | ezolak | Civ4 - BTS Unaltered Gameplay (BUG, BAT and BULL) | 2 | May 07, 2009 11:09 AM |
| Can't download BUG mod from website - BAT Shows on BUG Page | Genv [FP] | Civ4 - BTS Unaltered Gameplay (BUG, BAT and BULL) | 4 | Sep 28, 2008 01:11 PM |