November 1, 2003, 13:15
|
#1
|
Emperor
Local Time: 12:40
Local Date: November 2, 2010
Join Date: Jun 2001
Posts: 7,665
|
Pbem?
Has anyone found any references to it yet? Particularly why the turn doesnt end.
|
|
|
|
November 1, 2003, 21:21
|
#2
|
Emperor
Local Time: 12:40
Local Date: November 2, 2010
Join Date: Jul 2001
Location: England
Posts: 3,826
|
PBEM was the next thing I was planning to attack. If you could provide precise details of the problem, it would help  .
|
|
|
|
November 1, 2003, 22:01
|
#3
|
Emperor
Local Time: 12:40
Local Date: November 2, 2010
Join Date: Jun 2001
Posts: 7,665
|
OK, IIRC its when you end turn it goes to the black screen and asks to close or exit (i think) and saves the turn to desktop, this is all normal, but when youve played all turns of all players and it goes back to player 1's turn, the turn still says "Turn 0" and all production/science/food whatever hasnt been collected and all player moves moved in the last turn are still exhausted, basically the turn hasnt ended but it goes around the player order.
|
|
|
|
November 1, 2003, 23:35
|
#4
|
King
Local Time: 11:40
Local Date: November 2, 2010
Join Date: May 1999
Posts: 1,528
|
And human to human diplomacy. If you could have that done by lunch time tommorow, that would be great. Thanks
|
|
|
|
November 2, 2003, 11:00
|
#5
|
Emperor
Local Time: 12:40
Local Date: November 2, 2010
Join Date: Jul 2001
Location: England
Posts: 3,826
|
Well, I think I've found the source of the problem, at least.
Essentially, in CTP1 the dialog asking you to forward the turn didn't pop up until after the next players turn had already begun, and all his start-of-turn stuff had been processed. This led to problems, because you could determine information about his empire by the kind of messages he was receiving and also what gold, PW and population he had.
It seems that they have moved the save game time forward now so that the game advances the player, and then the save occurs before any of the start-of-turn stuff happens.
Presumably, when you load the game it doesn't realise that it still has the start-of-turn stuff to do. I haven't investigated that yet. I am reminded, however, that when you play scenarios it does that start-of-turn stuff every time you load regardless, and so perhaps they shifted the code which should have been for the PBEM to the scenario stuff instead...
Something that does concern me a little is that just before it does the PBEM save it sets g_isScenario = false, and so I suspect PBEM forgets when you try to play it with a scenario. Of course, noone uses scenarios at the moment because they're broken, but I'm hoping that will change.
|
|
|
|
November 2, 2003, 18:02
|
#6
|
Emperor
Local Time: 12:40
Local Date: November 2, 2010
Join Date: Jul 2001
Location: England
Posts: 3,826
|
Am now crawling through the initialization code that occurs when you first start the game with a parameter to load a PBEM game. It's all pretty mundane so far. Initializing databases, etc. Exactly what you'd expect.
|
|
|
|
November 5, 2003, 19:01
|
#7
|
Emperor
Local Time: 12:40
Local Date: November 2, 2010
Join Date: Jul 2001
Location: England
Posts: 3,826
|
Well, I found a way to fix it, but for some reason it causes the turn to end as soon as it starts, so although you have the ability to do stuff you don't have the time.
Back to the drawing board...
|
|
|
|
November 5, 2003, 19:27
|
#8
|
Emperor
Local Time: 12:40
Local Date: November 2, 2010
Join Date: Jun 2001
Posts: 7,665
|
 okdat dont worry im still reading your prodress j although i cant help at all really epecially when im a little drunk
|
|
|
|
November 5, 2003, 19:33
|
#9
|
Emperor
Local Time: 12:40
Local Date: November 2, 2010
Join Date: Jul 2001
Location: England
Posts: 3,826
|
My prior attempt involved altering things when you load. I'm now trying for the CTP solution of altering them before you save. However, asynchronous event handling stops this from working... I can't seem to make the event manager flush its events before the save takes place. I thought that g_gevManager->Process() would do the job, but it doesn't seem to. Ho hum.
|
|
|
|
November 6, 2003, 16:26
|
#10
|
Emperor
Local Time: 12:40
Local Date: November 2, 2010
Join Date: Jul 2001
Location: England
Posts: 3,826
|
Well, I *think* I have a fix, at least to a certain extent.
I've altered things in such a way that it should:
- affect only email and hotseat games
- improve email games
- not break hotseat games too badly
Indeed, if I understand what's going on it shouldn't break hotseat games at all, but I certainly don't understand everything involved correctly because my other attempts at fixes weren't working as expected and I don't yet know why.
In any case, you can now at least build cities and units, move units and earn gold and PW in email games correctly. There are still some things which aren't working quite correctly, though, for instance the year and turn number never change.
|
|
|
|
November 8, 2003, 05:00
|
#11
|
Emperor
Local Time: 12:40
Local Date: November 2, 2010
Join Date: Jul 2001
Location: England
Posts: 3,826
|
Well, I've been unable to come up with anything better, so the fixes are at:
http://apolyton.net/csd.php?http://a...y/Pbem_bug.zip
These are to replace gs/utilities/newturncount.cpp and gs/gameobj/PlayerEvent.cpp. Essentially, I cut out the code that saves the game and pops up the messagebox from where it was, which was during the BeginTurn event handling before everything had happened, and I've put it in the FinishBeginTurn event, where almost everything has happened.
Last edited by J Bytheway; November 8, 2003 at 11:02.
|
|
|
|
November 8, 2003, 10:49
|
#12
|
Emperor
Local Time: 12:40
Local Date: November 2, 2010
Join Date: Jun 2001
Posts: 7,665
|
Does that also mean the Diplomacy carries over to the next players turn too, like it should? The problem was you would give a proposal to a human player and it would disappear on his turn.
|
|
|
|
November 8, 2003, 16:03
|
#13
|
Emperor
Local Time: 12:40
Local Date: November 2, 2010
Join Date: Jul 2001
Location: England
Posts: 3,826
|
Well, I've just tred sending a proposal to another human player, who responded just like an AI, as you might expect. However, this process seemed to make one of the players an AI. I'm not sure whether it was the sender or the recipient... Peculiar.
|
|
|
|
November 11, 2003, 18:12
|
#14
|
Emperor
Local Time: 12:40
Local Date: November 2, 2010
Join Date: Jun 2001
Posts: 7,665
|
Well im about to try this, as i got the source to compile thannks to ahenobarbs "ctp2 sourcecode compiling for dummies"
Just a thought, but would it be possible to fit in a password option for ctp2 pbem save files? Even when theyre tried to be opened in single player, basically impossible to open.
|
|
|
|
November 11, 2003, 18:18
|
#15
|
Emperor
Local Time: 12:40
Local Date: November 2, 2010
Join Date: Jul 2001
Location: England
Posts: 3,826
|
You could make a password option, but anyone with the source code could bypass it, so it would be fairly pointless. Indeed, anyone with the source code can do pretty much anything they want in the way of cheating in PBEM, so if you don't trust your opponents, don't bother.
|
|
|
|
November 11, 2003, 18:27
|
#16
|
Emperor
Local Time: 12:40
Local Date: November 2, 2010
Join Date: Jun 2001
Posts: 7,665
|
Could you not check for inconsistancies in each version of the game? Im plucking at straws really, the source code does have its disadvantages, especially in MP, but then again the rushbuy is easy for everyone to use, ive also seen external programs that can fiddle with memory addresses for certain amounts of gold/pw/whatever with a keystroke.
|
|
|
|
November 12, 2003, 04:36
|
#17
|
Emperor
Local Time: 12:40
Local Date: November 2, 2010
Join Date: Jul 2001
Location: England
Posts: 3,826
|
It is very difficult or impossible to authenticate versions, because whatever check is performed, your opponent can almost certainly divert it to an authentic version which he is not really using. In any case, as you say, there are other ways to cheat, such as editing saved games and memory directly.
|
|
|
|
November 30, 2003, 00:10
|
#18
|
Emperor
Local Time: 12:40
Local Date: November 2, 2010
Join Date: Jun 2001
Posts: 7,665
|
I found these posts from Pyaray aaaages ago...
Quote:
|
We do know exactly what is causing the bug. And we know for a fact that it won't creep into other game modes. It is specifically related to events occuring when it is the "wrong" persons turn, and causing problems. In both single player, and net play, the "right" person is always available and therefore eliminates the problem.
Pyaray
|
Quote:
|
Well, other things being rewritten affected it. As I mentioned in another post, it has to do with events occuring when it's not the appropriate players turn. There is logic to not give messages to the wrong players, yet the game expects answers to some messages prior to allowing it to continue. So you get in this stuck position where it won't procede without an answer, but it can't ask the question cause it's not their turn. This may sound like a very simple thing, but believe me, it's not. And for everyones knowledge, Hot Seat, and PBEM pretty much use the same logic.
|
Lots of people moaning because theyd be no PBEM...
http://apolyton.net/forums/Forum35/HTML/000287.html
|
|
|
|
December 11, 2003, 15:52
|
#19
|
Emperor
Local Time: 12:40
Local Date: November 2, 2010
Join Date: Jun 2001
Posts: 7,665
|
Okay ill post what ive seen having tested with the zip kaan made.
Scenario #1
Eight Players
1 - Maq
2 - Maq2
3 - AI
4 - AI
5 - AI
6 - AI
7 - AI
8 - AI
I put in the names and emails so i know whos it is, i press ok and it loads up the game then immediately saves the game without letting me even see where i am and gives the option to "quit" or "close", meaning it saved before I, as human player 1 (Maq) could play my turn.
It saves a turn on my desktop "CTP Email To maq@maq.com (Turn 0).c2g", i double-click and it loads and its "Maq" Player 1's civ's turn, all movement intact. I play the turn as normal and end it.
It saves the turn on my desktop, "CTP Email To maq2@maq2.com (Turn 0).c2g", okay player 2's turn "Maq2", i double-click it, it should be turn 0 for Maq2, but its turn 1... so Maq2 has missed his Turn 0 somehow....
It saves "CTP Email To maq@maq.com" on my desktop i double-click it loads and its "Maq's" (Player 1) Turn 1..... so now Maq2 has become "Player 1" and Maq is "Player 2", but they keep their original colours obviously (Maq2 is orange still but takes his turn before Player 1!)
(Ignore the file naming when it sends it to my desktop, its always "Turn 0")
I assume you got similar mixed results J Bytheway?
It does work normally after that though, production, science and food is processed as it should, which has been fixed then.
Last edited by Maquiladora; December 11, 2003 at 16:02.
|
|
|
|
December 11, 2003, 16:04
|
#20
|
Super Moderator
Local Time: 13:40
Local Date: November 2, 2010
Join Date: Mar 2001
Location: Tübingen, Germany
Posts: 6,206
|
Quote:
|
Originally posted by J Bytheway
It is very difficult or impossible to authenticate versions, because whatever check is performed, your opponent can almost certainly divert it to an authentic version which he is not really using. In any case, as you say, there are other ways to cheat, such as editing saved games and memory directly.
|
Maybe the game crashes at some point if the differences between the *.exe's are too huge, but maybe this comes into play rather in online MP, but of course could be interested to see the behaviours of slightly different *.exe's on MP games in general.
-Martin
__________________
Civ2 military advisor: "No complaints, Sir!"
|
|
|
|
December 11, 2003, 19:00
|
#21
|
Emperor
Local Time: 12:40
Local Date: November 2, 2010
Join Date: Jul 2001
Location: England
Posts: 3,826
|
Quote:
|
Originally posted by Maquiladora
Okay ill post what ive seen having tested with the zip kaan made.
Scenario #1
Eight Players
1 - Maq
2 - Maq2
3 - AI
4 - AI
5 - AI
6 - AI
7 - AI
8 - AI
I put in the names and emails so i know whos it is, i press ok and it loads up the game then immediately saves the game without letting me even see where i am and gives the option to "quit" or "close", meaning it saved before I, as human player 1 (Maq) could play my turn.
|
Yes, that's because I moved the code that pops up the dialog from the end of the turn to the beginning.
Quote:
|
It saves a turn on my desktop "CTP Email To maq@maq.com (Turn 0).c2g", i double-click and it loads and its "Maq" Player 1's civ's turn, all movement intact. I play the turn as normal and end it.
It saves the turn on my desktop, "CTP Email To maq2@maq2.com (Turn 0).c2g", okay player 2's turn "Maq2", i double-click it, it should be turn 0 for Maq2, but its turn 1... so Maq2 has missed his Turn 0 somehow....
It saves "CTP Email To maq@maq.com" on my desktop i double-click it loads and its "Maq's" (Player 1) Turn 1..... so now Maq2 has become "Player 1" and Maq is "Player 2", but they keep their original colours obviously (Maq2 is orange still but takes his turn before Player 1!)
(Ignore the file naming when it sends it to my desktop, its always "Turn 0")
I assume you got similar mixed results J Bytheway?
|
Yes - although I didn't test it much more than you have on the latest version. As I said, strange things started happening when I did Human-Human diplomacy.
Quote:
|
It does work normally after that though, production, science and food is processed as it should, which has been fixed then.
|
I see you were getting turn numbers advancing - mine was always stuck on turn 0. I guess that's because you had an AI player playing last, whereas mine were all human players.
|
|
|
|
December 17, 2003, 17:21
|
#22
|
Emperor
Local Time: 04:40
Local Date: November 2, 2010
Join Date: Oct 2000
Posts: 3,442
|
Once I get the CTP2 CD I'd be happy to help out testing the PBEM fixes. My CPP programming is not very good, so I probably would hinder more than help here, but at least I could test. I should be getting the game in a few days ... (Christmas present for myself!  )
|
|
|
|
December 17, 2003, 17:41
|
#23
|
ACS Staff Member / Hosted Site Admin
Local Time: 14:40
Local Date: November 2, 2010
Join Date: Jan 2000
Posts: 7,524
|
Good move Quinns
|
|
|
|
December 17, 2003, 17:56
|
#24
|
Emperor
Local Time: 12:40
Local Date: November 2, 2010
Join Date: Jun 2001
Posts: 7,665
|
Nice one quinns now we have 3 PBEM testers
|
|
|
|
December 17, 2003, 19:54
|
#25
|
Emperor
Local Time: 04:40
Local Date: November 2, 2010
Join Date: Oct 2000
Posts: 3,442
|
Kind of like real life ---- One person who knows what they're doing (JBytheway) and three who whine and complain and demand "when is it going to be done" and point at the calendar ... and who have no clue how to fix it themselves!  (Speaking for myself, that is.)
|
|
|
|
December 18, 2003, 05:56
|
#26
|
Emperor
Local Time: 12:40
Local Date: November 2, 2010
Join Date: Jun 2001
Posts: 7,665
|
Yeah its a good job some of us know what we're doing
BTW (no pun intended) theres 3 testers including JBytheway so we're abit understaffed. This is the right order to approach things though, get a working, balanced game with an AI, then add/fix MP options.
|
|
|
|
December 18, 2003, 11:25
|
#27
|
Prince
Local Time: 04:40
Local Date: November 2, 2010
Join Date: Apr 2002
Location: USA
Posts: 916
|
Maq, I still need to repay you for the merciless beating that I took the 1st time that I tried PBEM.
...so I'll do what I can to help playtest as well...
I just need more hours in my days... :argh:
|
|
|
|
December 18, 2003, 14:10
|
#28
|
Emperor
Local Time: 12:40
Local Date: November 2, 2010
Join Date: Jun 2001
Posts: 7,665
|
It was a short but enjoyable game, ill gladly hand you your ass on a plate again, anytime. 
J has made a fix of actually making it "complete" the turns, collecting resources, resetting move points, advancing science, production builds etc, im not sure how much of a permanent fix this is, although it does the job, it mixes up the first turn order (read above posts) this needs more tests though perhaps.
So if youre giving it a test, use all Human players, seeing as that is the most important to get working really.
|
|
|
|
May 27, 2004, 23:07
|
#29
|
Emperor
Local Time: 04:40
Local Date: November 2, 2010
Join Date: Jan 2004
Location: ??
Posts: 3,059
|
I was playtesting PBEM with the newest playtest today. Everything was working okay until it was time for the city to grow(19990 pop.). At this point instead of going to 20000 it reset back to 10000 plus some. Of course I couldnt build settlers with 1 pop so I had to stop.
PLayer Setup:
Human
Human2
computer
computer
computer
computer
computer
__________________
"Many religions now come before us with ingratiating smirks and outspread hands, like an unctuous merchant in a bazaar. They offer consolation and solidarity and uplift, competing as they do in a marketplace. But we have a right to remember how barbarically they behaved when they were strong and were making an offer that people could not refuse." -Christopher Hitchens
|
|
|
|
May 28, 2004, 04:33
|
#30
|
Emperor
Local Time: 12:40
Local Date: November 2, 2010
Join Date: Jul 2001
Location: England
Posts: 3,826
|
Quote:
|
Originally posted by EPW
I was playtesting PBEM with the newest playtest today. Everything was working okay until it was time for the city to grow(19990 pop.). At this point instead of going to 20000 it reset back to 10000 plus some. Of course I couldnt build settlers with 1 pop so I had to stop.
|
Is the same true of both human players?
Last edited by J Bytheway; May 29, 2004 at 05:11.
|
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is On
|
|
|
All times are GMT -4. The time now is 07:40.
|
|