Apolyton Archive  |  Preserved copy of the Apolyton Civilization Site and its forums as they stood in September 2005. Read-only; nothing here can be posted to or replied to.  |  Forum index |  About this archive |  The 1998–2001 UBB forums
Today on Apolyton WARDELL INTERVIEW PROMO A.C.S. HISTORY CHAPTER 4 GET CIV4 /w FREE PLUS! A.C.S. PHOTO GALLERY GET A.O.M. V1.1
Apolyton Civilization Forums
main| civ2| civ3| civ4| smac| ctp2| ron| moo3| galciv| galciv2| alt| about|
ApolytonPLUS | register | search | faq | new posts | pm (-/-) | upload | members
hall of fame new! | civgroups | civgroups news | interviews | the column | radio | chat | directory | news | store | PLUS
Apolyton Civilization Forums : Powered by vBulletin version 2.0.3 Apolyton Civilization Forums > Call To Power II > CtP2-Source Code Project > DEBUG: Pbem?
Show a Printable Version | Email This Page to Someone! | Receive updates to this thread | Report this to Apolyton news!
CivGroups
CTP2 Source Code Project (59): Not a Member - Join

bottom of page
  
Author
Thread   
Pages (2): [ 1   2   ]
< Last Thread     Next Thread > Post New Thread     Post A Reply
Maquiladora is offline Maquiladora
Emperor

Jun 2001
time: 05:31
  Old Post 01-11-2003 22:15 Visit Maquiladora's homepage!
Edit/Delete Message Reply w/Quote
#1 Report this post to a moderator
Pbem? Get a bigger avatar today!

Has anyone found any references to it yet? Particularly why the turn doesnt end.

J Bytheway is offline J Bytheway
Emperor
England
Jul 2001
time: 05:31
  Old Post 02-11-2003 06:21 Visit J Bytheway's homepage!
Edit/Delete Message Reply w/Quote
#2 Report this post to a moderator
Suffering from ads?

PBEM was the next thing I was planning to attack. If you could provide precise details of the problem, it would help .

Maquiladora is offline Maquiladora
Emperor

Jun 2001
time: 05:31
  Old Post 02-11-2003 07:01 Visit Maquiladora's homepage!
Edit/Delete Message Reply w/Quote
#3 Report this post to a moderator
Increase the size of your Attachments

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.

MrBaggins is offline MrBaggins
King

May 1999
time: 05:31
  Old Post 02-11-2003 08:35
Edit/Delete Message Reply w/Quote
#4 Report this post to a moderator
Support Apolyton, buy Alpha Centauri

And human to human diplomacy. If you could have that done by lunch time tommorow, that would be great. Thanks

J Bytheway is offline J Bytheway
Emperor
England
Jul 2001
time: 05:31
  Old Post 02-11-2003 20:00 Visit J Bytheway's homepage!
Edit/Delete Message Reply w/Quote
#5 Report this post to a moderator
Support Apolyton, buy Alpha Centauri

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.

J Bytheway is offline J Bytheway
Emperor
England
Jul 2001
time: 05:31
  Old Post 03-11-2003 03:02 Visit J Bytheway's homepage!
Edit/Delete Message Reply w/Quote
#6 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations: Deluxe Edition

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.

J Bytheway is offline J Bytheway
Emperor
England
Jul 2001
time: 05:31
  Old Post 06-11-2003 04:01 Visit J Bytheway's homepage!
Edit/Delete Message Reply w/Quote
#7 Report this post to a moderator
Support Apolyton, buy Civilization: The Boardgame

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...

Maquiladora is offline Maquiladora
Emperor

Jun 2001
time: 05:31
  Old Post 06-11-2003 04:27 Visit Maquiladora's homepage!
Edit/Delete Message Reply w/Quote
#8 Report this post to a moderator
Support Apolyton buy from Amazon

okdat dont worry im still reading your prodress j although i cant help at all really epecially when im a little drunk

J Bytheway is offline J Bytheway
Emperor
England
Jul 2001
time: 05:31
  Old Post 06-11-2003 04:33 Visit J Bytheway's homepage!
Edit/Delete Message Reply w/Quote
#9 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations: Deluxe Edition

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.

J Bytheway is offline J Bytheway
Emperor
England
Jul 2001
time: 05:31
  Old Post 07-11-2003 01:26 Visit J Bytheway's homepage!
Edit/Delete Message Reply w/Quote
#10 Report this post to a moderator
Support Apolyton buy from Amazon

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.

J Bytheway is offline J Bytheway
Emperor
England
Jul 2001
time: 05:31
  Old Post 08-11-2003 14:00 Visit J Bytheway's homepage!
Edit/Delete Message Reply w/Quote
#11 Report this post to a moderator
Avatar Enlargement: We've got the solution

Well, I've been unable to come up with anything better, so the fixes are at:

http://apolyton.net/csd.php?http://...ay/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 on 08-11-2003 at 20:02

Maquiladora is offline Maquiladora
Emperor

Jun 2001
time: 05:31
  Old Post 08-11-2003 19:49 Visit Maquiladora's homepage!
Edit/Delete Message Reply w/Quote
#12 Report this post to a moderator
Support Apolyton buy from Amazon

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.

J Bytheway is offline J Bytheway
Emperor
England
Jul 2001
time: 05:31
  Old Post 09-11-2003 01:03 Visit J Bytheway's homepage!
Edit/Delete Message Reply w/Quote
#13 Report this post to a moderator
Put an end to popups!

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.

Maquiladora is offline Maquiladora
Emperor

Jun 2001
time: 05:31
  Old Post 12-11-2003 03:12 Visit Maquiladora's homepage!
Edit/Delete Message Reply w/Quote
#14 Report this post to a moderator
Help yourself to an AD-FREE life

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.

J Bytheway is offline J Bytheway
Emperor
England
Jul 2001
time: 05:31
  Old Post 12-11-2003 03:18 Visit J Bytheway's homepage!
Edit/Delete Message Reply w/Quote
#15 Report this post to a moderator
Help yourself to an AD-FREE life

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.

Maquiladora is offline Maquiladora
Emperor

Jun 2001
time: 05:31
  Old Post 12-11-2003 03:27 Visit Maquiladora's homepage!
Edit/Delete Message Reply w/Quote
#16 Report this post to a moderator
Inflate your Upload Space

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.

J Bytheway is offline J Bytheway
Emperor
England
Jul 2001
time: 05:31
  Old Post 12-11-2003 13:36 Visit J Bytheway's homepage!
Edit/Delete Message Reply w/Quote
#17 Report this post to a moderator
Inflate your Upload Space

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.

Maquiladora is offline Maquiladora
Emperor

Jun 2001
time: 05:31
  Old Post 30-11-2003 09:10 Visit Maquiladora's homepage!
Edit/Delete Message Reply w/Quote
#18 Report this post to a moderator
Support Apolyton, buy Alpha Centauri

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

Maquiladora is offline Maquiladora
Emperor

Jun 2001
time: 05:31
  Old Post 12-12-2003 00:52 Visit Maquiladora's homepage!
Edit/Delete Message Reply w/Quote
#19 Report this post to a moderator
Support Apolyton, buy Alpha Centauri

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 on 12-12-2003 at 01:02

Martin Gühmann is offline Martin Gühmann
Emperor
Berlin, Germany
Mar 2001
time: 06:31
Post  Old Post 12-12-2003 01:04 Visit Martin Gühmann's homepage!
Edit/Delete Message Reply w/Quote
#20 Report this post to a moderator
Support Apolyton, buy Alpha Centauri

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

J Bytheway is offline J Bytheway
Emperor
England
Jul 2001
time: 05:31
  Old Post 12-12-2003 04:00 Visit J Bytheway's homepage!
Edit/Delete Message Reply w/Quote
#21 Report this post to a moderator
Get a bigger avatar today!

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.

quinns is offline quinns
Emperor

Oct 2000
time: 21:31
  Old Post 18-12-2003 02:21
Edit/Delete Message Reply w/Quote
#22 Report this post to a moderator
Support Apolyton, buy Alpha Centauri

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! )

Keygen is offline Keygen
Emperor
Athens, Hellas
Jan 2000
time: 07:31
  Old Post 18-12-2003 02:41 Visit Keygen's homepage!
Edit/Delete Message Reply w/Quote
#23 Report this post to a moderator
Support Apolyton buy from Amazon

Good move Quinns

Maquiladora is offline Maquiladora
Emperor

Jun 2001
time: 05:31
  Old Post 18-12-2003 02:56 Visit Maquiladora's homepage!
Edit/Delete Message Reply w/Quote
#24 Report this post to a moderator
Support Apolyton, buy GURPS/ Alpha Centauri

Nice one quinns now we have 3 PBEM testers

quinns is offline quinns
Emperor

Oct 2000
time: 21:31
  Old Post 18-12-2003 04:54
Edit/Delete Message Reply w/Quote
#25 Report this post to a moderator
Suffering from ads?

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.)

Maquiladora is offline Maquiladora
Emperor

Jun 2001
time: 05:31
  Old Post 18-12-2003 14:56 Visit Maquiladora's homepage!
Edit/Delete Message Reply w/Quote
#26 Report this post to a moderator
Tired of ads?

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.

centrifuge is offline centrifuge
Prince
USA
Apr 2002
time: 22:31
  Old Post 18-12-2003 20:25
Edit/Delete Message Reply w/Quote
#27 Report this post to a moderator
Inflate your Upload Space

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:

Maquiladora is offline Maquiladora
Emperor

Jun 2001
time: 05:31
  Old Post 18-12-2003 23:10 Visit Maquiladora's homepage!
Edit/Delete Message Reply w/Quote
#28 Report this post to a moderator
Support Apolyton, pre-order Civilization IV

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.

EPW is offline EPW
King
California, USA
Jan 2004
time: 21:31
  Old Post 28-05-2004 08:07 Visit EPW's homepage!
Edit/Delete Message Reply w/Quote
#29 Report this post to a moderator
Support Apolyton or Terrorists Win

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

J Bytheway is offline J Bytheway
Emperor
England
Jul 2001
time: 05:31
  Old Post 28-05-2004 13:33 Visit J Bytheway's homepage!
Edit/Delete Message Reply w/Quote
#30 Report this post to a moderator
Full PM-box? Change here!

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 on 29-05-2004 at 14:11

 
Pages (2): [ 1   2   ]
< Last Thread     Next Thread > Post New Thread     Post A Reply
All times are GMT. The time now is 05:31.
Apolyton Time is 00:31.
    top of page
Rate This Thread:
Forum Jump:
Forum 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
vB code is ON
Smilies are ON
[IMG] code is ON
 




Contact Us - Apolyton Civilization Site - Support Us!

Building a better Apolyton through better information. Click here and take our poll!
Non-US visitors, click here!

Powered by: vBulletin Version 2.0.3
Copyright ©2000, 2001, Jelsoft Enterprises Limited.

Page generated in 0.0692 seconds (90.96% PHP - 9.04% MySQL) with 36 queries
Page Loading Time:

Support Apolyton: Amazon USA | Amazon UK | Amazon DE | Amazon FR |
Support Apolyton and get FREE PLUS, Buy from Chips&Bits: Galactic Civilizations | Galactic Civilizations: Deluxe Edition | Call to Power 2 | Civilization: The Boardgame | GURPS/ Alpha Centauri | Alpha Centauri | Civilization IV | Civilization III: Complete |


Front Page | Civilization IV | Civilization III | Civilization II | Call to Power II | Alpha Centauri | Master of Orion III
Rise of Nations | Galactic Civilizations | Galactic Civilizations II | Misc
Alt.Civs | Civ I | C:CtP I | About | News | Directory | Apolyton Store | Forums | Chat | Columns | Interviews | Newsletter
Scenario League | CSC | Clash of Civs | Spanish Site | CtP Maps | Cradle of Civ | WesW's Ctp1/2 Site | Civ3 Haven

apolyton.net | apolyton.com | civilization2.net | civilization3.net | civilization4.net | civilizationiv.info | calltopower.net | galciv.net | galciv2.net | moo3.net