Page 1 of 3 1 2 3 LastLast
Results 1 to 30 of 61

Thread: DEBUG: Pbem?

  1. #1
    Maquiladora
    Emperor
    Join Date
    17 Jun 2001
    Posts
    7,714
    Country
    This is Maquiladora's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 21, 2013
    Local Time
    14:28

    Pbem?

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

  2. #2
    J Bytheway
    Emperor J Bytheway's Avatar
    Join Date
    02 Jul 2001
    Location
    England
    Posts
    3,826
    Country
    This is J Bytheway's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 21, 2013
    Local Time
    14:28
    PBEM was the next thing I was planning to attack. If you could provide precise details of the problem, it would help .

  3. #3
    Maquiladora
    Emperor
    Join Date
    17 Jun 2001
    Posts
    7,714
    Country
    This is Maquiladora's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 21, 2013
    Local Time
    14:28
    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.
    Call to Power 2: Apolyton Edition - download the latest version (12th June 2011)
    CtP2 AE Wiki & Modding Reference
    One way to compile the CtP2 Source Code.

  4. #4
    MrBaggins
    King MrBaggins's Avatar
    Join Date
    03 May 1999
    Posts
    1,528
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 21, 2013
    Local Time
    13:28
    And human to human diplomacy. If you could have that done by lunch time tommorow, that would be great. Thanks

  5. #5
    J Bytheway
    Emperor J Bytheway's Avatar
    Join Date
    02 Jul 2001
    Location
    England
    Posts
    3,826
    Country
    This is J Bytheway's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 21, 2013
    Local Time
    14:28
    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.

  6. #6
    J Bytheway
    Emperor J Bytheway's Avatar
    Join Date
    02 Jul 2001
    Location
    England
    Posts
    3,826
    Country
    This is J Bytheway's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 21, 2013
    Local Time
    14:28
    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.

  7. #7
    J Bytheway
    Emperor J Bytheway's Avatar
    Join Date
    02 Jul 2001
    Location
    England
    Posts
    3,826
    Country
    This is J Bytheway's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 21, 2013
    Local Time
    14:28
    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...

  8. #8
    Maquiladora
    Emperor
    Join Date
    17 Jun 2001
    Posts
    7,714
    Country
    This is Maquiladora's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 21, 2013
    Local Time
    14:28
    okdat dont worry im still reading your prodress j although i cant help at all really epecially when im a little drunk
    Call to Power 2: Apolyton Edition - download the latest version (12th June 2011)
    CtP2 AE Wiki & Modding Reference
    One way to compile the CtP2 Source Code.

  9. #9
    J Bytheway
    Emperor J Bytheway's Avatar
    Join Date
    02 Jul 2001
    Location
    England
    Posts
    3,826
    Country
    This is J Bytheway's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 21, 2013
    Local Time
    14:28
    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.

  10. #10
    J Bytheway
    Emperor J Bytheway's Avatar
    Join Date
    02 Jul 2001
    Location
    England
    Posts
    3,826
    Country
    This is J Bytheway's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 21, 2013
    Local Time
    14:28
    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.

  11. #11
    J Bytheway
    Emperor J Bytheway's Avatar
    Join Date
    02 Jul 2001
    Location
    England
    Posts
    3,826
    Country
    This is J Bytheway's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 21, 2013
    Local Time
    14:28
    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 10:02.

  12. #12
    Maquiladora
    Emperor
    Join Date
    17 Jun 2001
    Posts
    7,714
    Country
    This is Maquiladora's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 21, 2013
    Local Time
    14:28
    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.
    Call to Power 2: Apolyton Edition - download the latest version (12th June 2011)
    CtP2 AE Wiki & Modding Reference
    One way to compile the CtP2 Source Code.

  13. #13
    J Bytheway
    Emperor J Bytheway's Avatar
    Join Date
    02 Jul 2001
    Location
    England
    Posts
    3,826
    Country
    This is J Bytheway's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 21, 2013
    Local Time
    14:28
    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.

  14. #14
    Maquiladora
    Emperor
    Join Date
    17 Jun 2001
    Posts
    7,714
    Country
    This is Maquiladora's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 21, 2013
    Local Time
    14:28
    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.
    Call to Power 2: Apolyton Edition - download the latest version (12th June 2011)
    CtP2 AE Wiki & Modding Reference
    One way to compile the CtP2 Source Code.

  15. #15
    J Bytheway
    Emperor J Bytheway's Avatar
    Join Date
    02 Jul 2001
    Location
    England
    Posts
    3,826
    Country
    This is J Bytheway's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 21, 2013
    Local Time
    14:28
    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.

  16. #16
    Maquiladora
    Emperor
    Join Date
    17 Jun 2001
    Posts
    7,714
    Country
    This is Maquiladora's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 21, 2013
    Local Time
    14:28
    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.
    Call to Power 2: Apolyton Edition - download the latest version (12th June 2011)
    CtP2 AE Wiki & Modding Reference
    One way to compile the CtP2 Source Code.

  17. #17
    J Bytheway
    Emperor J Bytheway's Avatar
    Join Date
    02 Jul 2001
    Location
    England
    Posts
    3,826
    Country
    This is J Bytheway's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 21, 2013
    Local Time
    14:28
    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.

  18. #18
    Maquiladora
    Emperor
    Join Date
    17 Jun 2001
    Posts
    7,714
    Country
    This is Maquiladora's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 21, 2013
    Local Time
    14:28
    I found these posts from Pyaray aaaages ago...

    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
    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
    Call to Power 2: Apolyton Edition - download the latest version (12th June 2011)
    CtP2 AE Wiki & Modding Reference
    One way to compile the CtP2 Source Code.

  19. #19
    Maquiladora
    Emperor
    Join Date
    17 Jun 2001
    Posts
    7,714
    Country
    This is Maquiladora's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 21, 2013
    Local Time
    14:28
    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 15:02.
    Call to Power 2: Apolyton Edition - download the latest version (12th June 2011)
    CtP2 AE Wiki & Modding Reference
    One way to compile the CtP2 Source Code.

  20. #20
    Martin Gühmann
    Administrator Martin Gühmann's Avatar
    Join Date
    02 Mar 2001
    Location
    Tübingen, Germany
    Posts
    7,248
    Country
    This is Martin Gühmann's Country Flag
    Thanks
    2
    Thanked 4 Times in 4 Posts
    Local Date
    May 21, 2013
    Local Time
    15:28

    Post

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

  21. #21
    J Bytheway
    Emperor J Bytheway's Avatar
    Join Date
    02 Jul 2001
    Location
    England
    Posts
    3,826
    Country
    This is J Bytheway's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 21, 2013
    Local Time
    14:28
    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.

    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.

    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.

  22. #22
    quinns
    Emperor
    Join Date
    12 Oct 2000
    Posts
    3,623
    Country
    This is quinns's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 21, 2013
    Local Time
    05:28
    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! )

  23. #23
    Keygen
    ACS Staff Member / Hosted Site Admin
    Join Date
    09 Jan 2000
    Posts
    7,528
    Country
    This is Keygen's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 21, 2013
    Local Time
    15:28
    Good move Quinns

  24. #24
    Maquiladora
    Emperor
    Join Date
    17 Jun 2001
    Posts
    7,714
    Country
    This is Maquiladora's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 21, 2013
    Local Time
    14:28
    Nice one quinns now we have 3 PBEM testers
    Call to Power 2: Apolyton Edition - download the latest version (12th June 2011)
    CtP2 AE Wiki & Modding Reference
    One way to compile the CtP2 Source Code.

  25. #25
    quinns
    Emperor
    Join Date
    12 Oct 2000
    Posts
    3,623
    Country
    This is quinns's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 21, 2013
    Local Time
    05:28
    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.)

  26. #26
    Maquiladora
    Emperor
    Join Date
    17 Jun 2001
    Posts
    7,714
    Country
    This is Maquiladora's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 21, 2013
    Local Time
    14:28
    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.
    Call to Power 2: Apolyton Edition - download the latest version (12th June 2011)
    CtP2 AE Wiki & Modding Reference
    One way to compile the CtP2 Source Code.

  27. #27
    centrifuge
    Prince centrifuge's Avatar
    Join Date
    09 Apr 2002
    Location
    USA
    Posts
    920
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 21, 2013
    Local Time
    06:28
    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:

  28. #28
    Maquiladora
    Emperor
    Join Date
    17 Jun 2001
    Posts
    7,714
    Country
    This is Maquiladora's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 21, 2013
    Local Time
    14:28
    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.
    Call to Power 2: Apolyton Edition - download the latest version (12th June 2011)
    CtP2 AE Wiki & Modding Reference
    One way to compile the CtP2 Source Code.

  29. #29
    EPW
    Emperor EPW's Avatar
    Join Date
    10 Jan 2004
    Location
    ??
    Posts
    3,887
    Country
    This is EPW's Country Flag
    Thanks
    1
    Thanked 1 Time in 1 Post
    Local Date
    May 21, 2013
    Local Time
    06:28
    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
    "

  30. #30
    J Bytheway
    Emperor J Bytheway's Avatar
    Join Date
    02 Jul 2001
    Location
    England
    Posts
    3,826
    Country
    This is J Bytheway's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 21, 2013
    Local Time
    14:28
    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.

Page 1 of 3 1 2 3 LastLast

Similar Threads

  1. DEBUG: How to debug?
    By Lui2 in forum CtP2 Source Code Project
    Replies: 8
    Last Post: July 29, 2004, 13:51
  2. Debug Mode
    By [Shane Hodgson] in forum Civilization III
    Replies: 19
    Last Post: February 13, 2004, 12:13
  3. DEBUG: infrastructure
    By Peter Triggs in forum CtP2 Source Code Project
    Replies: 6
    Last Post: December 4, 2003, 20:13
  4. DEBUG: about the sound...
    By jonwil in forum CtP2 Source Code Project
    Replies: 4
    Last Post: November 3, 2003, 23:39
  5. debug.txt
    By VetLegion in forum Civilization I and Civilization II
    Replies: 2
    Last Post: May 14, 2000, 07:18

Visitors found this page by searching for:

civilization 5 debug panel tutorial

civ 5 debug panel tutorial

civ 5 debug panel

debug panel civ 5 not working

civilization 5 how to move unit with debug panel

civilization 5 debug panel

civ 5 how to use the debug panel edit city

civ 3 debug mode

civilization debug panel how to move unit

civilisation 5 wie funktioniert debug panel

civ 5 debug panel help

civilization 5 debug

civ v debug panel move

civilization 5 debug panel move unit

civilization 5 cheat create unit debug panel

civ5 debug panel move unit

civilization 5 debug panel settings -cheat

debug panel is not pop civilization 5

civilization 5 debug mode panel create unit

Bookmarks

Posting Permissions