BUG/BAT Multiplayer - Help!

Both of those actions need to take place on every person's computer in the same way, so you must use Soren's RNG. As long as each person's computer runs the code that does what you want, they will pick the same random city or choose whether or not the ship is captured.
 
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?
I think this is why there are multiple random number generators in Civ4. My understanding was that the soren version could be used again and again with no problems but you need to use the a-synchronous version to avoid OOSs. Which does the DLL use in battles?
 
That's exactly the "other" RNG I was looking for when we first saw the OOS errors caused by BUG's F8:MEMBERS tab!

Code:
CyRandom CyGlobalContext::getASyncRand()

Of course, the name is very misleading. That would translate to "get a synchronized random", but the comment says it's the "unsynchronized" RNG (asynchronous). I also like how the two RNGs are exposed through different means. Soren's has an accessor for both the CyRandom object and the next number in the series, but they are in CyGame, whereas the one above is in CyGlobalContext. Awesome!

I'm pretty sure this is what we want as it's used to pick the next soundtrack to play in CvGame::getNextSoundtrack()--something that is done on each player's computer individually. I've fixed RandomNameUtils and CvVictoryScreen.
 
Wow cool. Boy the random number thing is confusing all for the sake of making randomness appear random to humans when there is no randomness at all. getSorenRandomNumber() does not just get a soren number but get's a synced soren number and thus this "get" call affects the game state when it shouldn't. Now we have getAsyncRand() which is what we want, but does not read the way it should :crazyeye:

Now that it is Christmas and it is time to drink and be merry, it is simple to conclude that us coders are not actually writing code.... We are adjusting our minds and the code itself is nothing but an outpouring of that process.

Whatever.
Cheers
 
I've fixed RandomNameUtils and CvVictoryScreen.
You didn't actually test this, did you?

CvVictoryScreen ...
Code:
iRandError = 3.5 + gc.getGame().get(10, "Election Results Statistical Error") / 10.0
 
Dunno how I made that copy-n-paste mistake, but I've fixed it. I'll test it now (not the OOS aspect though--I'm going to let someone who plays multiplayer games try that out ;)).
 
wait a cotton picking minute here ... now the code says ...
Code:
iRandError = 3.5 + gc.getASyncRand().get(10, "Election Results Statistical Error") / 10.0
... that is what it was originally and it generated OOS errors. I thought we agreed that using the ASyncRand() function was a no no for python. BTW - what random number function does the combat engine use? We should NOT use that one.
 
The asynchronous random is used for sound tracks and AI choosing production for the popup. These are both interface-only effects that are executed on a single machine.

Soren's RNG is used for combat, spy missions, events, etc.

I think what happened is that we did it right (async) originally, but the person that reported the OOS may have been using the random name generator for Unit Naming. If we switch it to use Python's random module, we'll be guaranteed to be safe, but I'd really like to do a real test using this now that the naming is using async as well.
 
so me and 9 other people were about to start a pitboss game this month using the "latest" batmod (as of a month ago), when we ran into this OOS problem during test games.

is there an official fix yet for the batmod? i'm confused.

this may delay the start of our epic (marathon) game :(
 
The OOS issue is separate from the graphics BAT 2.1 problems. Right now the only solution is to use BAT 2.0. You can copy the BUG 4.2 files into BAT, and as long as all of the players do the same thing it will work fine without OOS or graphics problems, but this is optional to get the latest BUG features.
 
The OOS issue is separate from the graphics BAT 2.1 problems. Right now the only solution is to use BAT 2.0. You can copy the BUG 4.2 files into BAT, and as long as all of the players do the same thing it will work fine without OOS or graphics problems, but this is optional to get the latest BUG features.

Bat graphics are causing OOS?? It seems to me that graphics would be a local concern only and not cause OOS network issues?
 
No, the OOS issues are separate from the graphics problems. They are caused by the custom DLL from BULL.
 
No, the OOS issues are separate from the graphics problems. They are caused by the custom DLL from BULL.

Right, I have not run into any graphics problems. I just want to make sure my 10-player pitboss game can run without any issues. So far, the OOS is the problem. What steps do I need to take to fix the OOS in BAT 2.1?
 
You will run into graphics problems with BAT 2.1 eventually, causing crashes that will stop the game from continuing. I highly recommend using BAT 2.0 if graphics are most important or BUG 4.2 if features are more important. In either case, make sure no one uses the random names code for Unit Naming (off by default), and note that opening the MEMBERS tab can cause an OOS. The latest BUG in our SVN (not yet released, maybe a couple weeks, but you can get it there) has fixed these two issues.
 
You will run into graphics problems with BAT 2.1 eventually, causing crashes that will stop the game from continuing. I highly recommend using BAT 2.0 if graphics are most important or BUG 4.2 if features are more important. In either case, make sure no one uses the random names code for Unit Naming (off by default), and note that opening the MEMBERS tab can cause an OOS. The latest BUG in our SVN (not yet released, maybe a couple weeks, but you can get it there) has fixed these two issues.

Hmmm, thanks for the clarification. Who is responsible for maintaining the graphics portion of BATmod then and are they aware of this issue/fixing it?

Is it possible to use both BAT 2.0 AND the latest SVN BUG?
 
Yes on all counts. Lemon Merchant has produced a BAT 2.2 using the older version of Varietas Delectat 7.5 that doesn't have the crashes, and I am working to find the cause of the OOS problems in BULL. We will have a solution eventually, but things are chaotic right now in RL so it may be a couple/few weeks before we get something released.

You can merge BUG and BAT. Install BAT 2.0 normally, and grab the latest SVN of BUG. Then copy all the folders in BUG's CustomAssets folder into BAT's Assets folder, overwriting all files in common. You can ZIP this final "BAT Mod 2.0" folder and send it to your friends to use.
 
Yes on all counts. Lemon Merchant has produced a BAT 2.2 using the older version of Varietas Delectat 7.5 that doesn't have the crashes, and I am working to find the cause of the OOS problems in BULL. We will have a solution eventually, but things are chaotic right now in RL so it may be a couple/few weeks before we get something released.

You can merge BUG and BAT. Install BAT 2.0 normally, and grab the latest SVN of BUG. Then copy all the folders in BUG's CustomAssets folder into BAT's Assets folder, overwriting all files in common. You can ZIP this final "BAT Mod 2.0" folder and send it to your friends to use.

Thanks much for your detailed help.

Is 2.2 available yet or are you simply saying that 2.2 is ready for when you have fixed BULL, otherwise if I were to use 2.2, then I would still have OOS problems as BULL has not been fixed yet?

If I use BAT 2.0 combined with latest SVN BUG will I see the return of the Stack Attack bug if I do this? Then do I need to make sure I have the Stack Attack option off to avoid problems?

Finally, is it feasible that once a final fix for BAT 2.2 or 2.3 comes out that we will be able to update our installs without compromising the game (I guess I am asking about saved-game compatibility), or am I taking too much of a risk by using an SVN of BUG for a 10-player game that is likely to last a year?
 
BAT 2.0 doesn't include BULL which is the source of the OOS and Stack Attack bugs. BAT 2.2 is not released and not ready. I still need to find the cause of the OOS problem so I can fix it. If it seems too far off, I'll release BAT 2.2 without BULL, but I'd really like to fix the problem first.

Wow, a year eh? I don't play multiplayer games, so you would be best off asking others that do about switching the mod mid-game. I am under the impression that multiplayer games force the Locked Modified Assets setting so that you cannot change the mod files and use the saved game, but others can verify (or you could test it easily enough yourself).
 
where should i read to follow exactly when a fix is found and available in a repository for download?
 
I will post a reply to this thread when the OOS is fixed. If you subscribe to it, you'll see the update. I will also post to the Download thread as well, but I'll do that for any BUG/BULL/BAT release.
 
Back
Top Bottom