• Apolyton CTP2 Edition: Revision 1111 (12-Jun-2011)

    The Apolyton CTP2 Source Code team proudly presents the Apolyton CTP2 Edition Revision 1111 from June the 12th 2011.

    This new version focuses mainly on improving the AI. Especially how the AI handles its oversea conquest with land and air transporters. A bug fix makes the AI also a little bit relaxed with enemy units that could be a potential thread.

    We have also a few bug fixes and minor corrections.

    The Apolyton Edition can be directly installed over CTP2 v1.0, v1.1, or v1.11.

    If you found a bug please report here as much relevant information as possible. This includes how to reproduce the problem, an attached screenshot or savegame may be helpful. If the game crashes (terminates without user intention) then include a crash log. You can enable crash logging by editing your userprofile.txt (in [Your CTP2 directory]\ctp2_program\ctp\) to set EnableLogs=Yes. The log can then be found at [Your CTP2 directory]\ctp2_program\ctp\logs\crash.txt. Please do not attach the crash.txt to a post, instead include the content of that file in your post.

    For further changes check out the change log in the readme.

    If you cannot forget the past here is the previous thread.

    Code:
    Changelog:
    2011-06-12 (Revision 1111)
    Fixed:    The game does not crash, if a city is supposed to be converted and the
              converting unit was killed the turn before.
    Fixed:    The AI does not try to disband settlers anymore.
    Fixed:    After a reload, the correct strategy is loaded for the AI.
    Fixed:    The AI does not use units for garrison if they are not needed. This
              frees troops for other tasks.
    Fixed:    Thread and power calculation have been corrected so that the AI does
              not waste ressources to fullfil its tasks.
    Fixed:    The AI does not hunt enemy units far away from home, just because one
              has been seen by a spy.
    Fixed:    The AI uses the nearest unit as rally point for rallying troops. This
              way the AI does not get distracted.
    Fixed:    When the AI is rallying armies, it marks all armies as being used,
              even so they are not used. This prevents the AI from assigning those
              armies to other tasks, so that the original task can still be
              fullfilled.
    Fixed:    The AI ungroups stealth units from non-stealth units if their goal
              is a stealth goal.
    Fixed:    The AI does not move ships before all passangers are on board.
    Fixed:    The AI does not use units for beach assault that cannot beach assault.
    Fixed:    The AI unloads cargo helicopters if they reached land, and there is
              only land up to the target.
    Fixed:    Finished the Oceanforming tab for modders.
    Changed:  Reduced memory requirements for the AI and sped up the AI.
    Fixed:    Fixed inccorect calculation of ZOC.
    Fixed:    The AI unloads its cargo from helicopters in front of the target city
              instead of flyring there with the helicopter.
    Fixed:    Fixed city happiness calculation so that it depends correctly on crime
              and pollution. This way the numbers are the same if an entertainer has
              been added and then removed.
    Changed:  The AI waits with building wonders until it has four cities or no
              space for more cities.
    Changed:  The userprofile options crash logging, show city production, civ flags,
              enemy health, and new combat have been enabled by default. The
              userprofile option scroll delay has been disabled by default.
    Changed:  The difficulty were renamed to classic civ difficulty names.
    Updated:  The AE mod to the current state of the Apolyton Edition.
    Changed:  The AI reconsideres the plans for its units like their paths if they
              reveal foreign units.
    Fixed:    The calculates the strengths of its units correctly even if they are
              transported.
    Changed:  The AI is more likely to conquer cities that are on another continent
              but on another side of a strait the AI has access to.
    Changed:  The AI does not try to use its transporters as attackers, so that
              their goal does not fail.
    Fixed:    The AI recalculates the needed numbers of transporters for it goals
              after a process match cycle, this prevents the goal from failing.
    Fixed:    The AI continues on a goal even after grouping in a city.
    Fixed:    Fixed city support cost calculation.
    Added:    Added /beginscheduler command to the chat window. This way the AI
              unit movement can be tested without waiting on the other AIs.
    Fixed:    When the AI steps on an invisible unit it is revealed to the AI so
              the Ai can bypass this unit or kill it.
    Fixed:    Fixed the AI desire war calculation.
    Fixed:    If a slave raid fails, because the slaver has not enough movement
              the victim does not hear that.
    This article was originally published in forum thread: Apolyton CTP2 Edition: Revision 1111 (12-Jun-2011) started by Martin Gühmann View original post
    Comments 73 Comments
    1. Tomite's Avatar
      Tomite -
      Thank you Martin! The changes listed here look great! Sadly, I'm going out of town soon and have no time to try it out for 2 or 3 weeks.
    1. Dinner's Avatar
      Dinner -
      I loved this game back in the day, I was one of the few because most people thought it was just too different from Civ2, so I'll have to reinstall it too see what has changed.
    1. Tamerlin's Avatar
      Tamerlin -
      Thanks Martin, it's great to see that the project is still alive.
    1. Robert Plomp's Avatar
      Robert Plomp -
      Let me dig up my CtP2 copy, see if I can install it (I think it gave me problems last time I tried) and install this over it to see if I like it.
      Is there a list of everything it does somewhere available? (not just this built but the complete picture)
    1. Martin Gühmann's Avatar
      Martin Gühmann -
      Quote Originally Posted by Robert Plomp View Post
      This quote is hidden because you are ignoring this member. Show Quote
      Let me dig up my CtP2 copy, see if I can install it (I think it gave me problems last time I tried) and install this over it to see if I like it.
      Is there a list of everything it does somewhere available? (not just this built but the complete picture)
      Well, the readme list all the changes from revision number one, but I guess it is faster to play 200 or 300 turns than reading that whole thing.

      Here is the CTP2 Revision Report thread. It lists all the things we have done with source code files and also with the text files, it is much more technical, and also contains stuff that just modifies the debug version of the game but leaves the final version alone.

      -Martin
    1. Fugi the Great's Avatar
      Fugi the Great -
      Thanks for the last update. Been working fine since the 13th, all until last night. I was trying to finish off the 2 remaining cities of the purple team, I forget their names, bombarding an inland city with Warwalkers and bombarding a coastal city with Battleships and Destroyers. I was having a little trouble with the destroyers being able to bombard the city, but the battleships had no problem. Every once in a while it would not let me bombard no matter how many times I tried, even using "Control B" which sometimes happens when trying to bombard planes, so I sent the destroyers in. Ouch that hurt - still has 3-4 each of tanks and warwalkers in the city. Retreated and healed the destroyers in the nearby cities and bombarded for a few more turns. Had the same problem with the destroyers a couple turns later, so again assumed a plane, sent the destroyers in again, almost the same number of tanks and warwalkers in the city, but then I got a "No such object" error, and the game aborted.
      Crash.txt:
      Version 2011-06-12
      0x004ed88d [?GetHP@UnitData@@QBENXZ + 0xd]
      0x004a0fad [?ReportUnits@CombatField@@QAEXPAVBattle@@PAVBattle Event@@_N@Z + 0xed]
      0x004a31be [?DoMovement@CTP2Combat@@AAEXXZ + 0x7e]
      0x004a3323 [?ResolveOneRound@CTP2Combat@@QAE_NXZ + 0x143]
      0x0049edb8 [?GEVHookCallback@RunCombatEvent@@EAE?AW4GAME_EVENT _HOOK_DISPOSITION@@W4GAME_EVENT@@PAVGameEventArgLi st@@@Z + 0x98]
      0x005823b7 [?Activate@GameEventHook@@QBE?AW4GAME_EVENT_ERR@@PA VGameEventArgList@@HAAH@Z + 0x37]
      0x00582d78 [?ActivateHook@GameEventManager@@QAE?AW4GAME_EVENT_ ERR@@W4GAME_EVENT@@PAVGameEventArgList@@HAAH@Z + 0x28]
      0x00580e9d [?Process@GameEvent@@QAE?AW4GAME_EVENT_ERR@@XZ + 0x2d]
      0x0040c491 [?Process@CivApp@@QAEHXZ + 0x201]
      0x004070e4 [?CivMain@@YGHPAUHINSTANCE__@@0PADH@Z + 0x394]
      0x00406b15 [WinMain@16 + 0x65]
      0x00810c1c [WinMainCRTStartup + 0x134]
      0x7c817077 [__onexitbegin + 0x7be3cfbf]

      What ever happened, the program will not start now, every time I click the icon for it it bombs out Windows. Looks like it took out the Userprofile.txt file, the file is 2658 bytes long with nothing in it, I looked at the file from a previous version it shows several game settings.
      Hope this helps.
      Attachment is autosave of game.

      edit:
      I still think there is too much emphasis on special units like slavers and spies. If my enemies would have put those resources that they wasted on them (and the ships to get them there) to better use by making an army (or a real navy)and taking over their part of the world, the world would have a lot less countries, and fighting them would be a bigger challenge with a lot more casualties on my side then there are now. Still no fighters, bombers, or diplomats. Almost seems that as soon as the AI gets Hover Infantry that they stop building/replacing tanks and become "weaker" because that is all they build and infantry is a lot easier to kill. The AI has much better air defences now, but got that by being less able to defend against ship bombardment. I see that Artillery upgrades to Mobile Sams/War Walkers and gain the "CanCounterBombard" ability but "CanBombard: Water" is missing so cities will no longer defend against ships. I don't have that problem because I never upgraded and still use my primitive Artillery, to take out incoming ships.
      What world size is the number of cities a government can have based on, and can this number be changed automatically when we change world size? Why does the red pollution bar increase when I have pollution turned off? Why does it seem that Capitalization doesn't really get you much? It looks like you get the same amount of gold as you do Public Works if you switch to Infrastructure, but given that unit upgrades can be in the ten of thousands each, I think it needs a bit work. When you get 60k gold per turn and switch every city to Capitalization, I would think I should get a bit more then an extra 3k. Why do helicopters still have infinite fuel? Now that you gave us the ability to use the Ocean Terraform tab, what is this tab called when trying to add stuff to it since there is nothing currently added to it to use as an example?
      I used the "new combat", weird to see slavers damaging military units, and settlers killing them, but then I suppose that settlers unit that represents 10k people that are about to die are going to fight as hard as they can.
    1. Tamerlin's Avatar
      Tamerlin -
      Quote Originally Posted by Fugi the Great View Post
      This quote is hidden because you are ignoring this member. Show Quote
      edit:
      I still think there is too much emphasis on special units like slavers and spies...
      I am trying to remove some of these special units from the game. I find Slavers, Abolitionists, Televangelists, Lawyers and [place the name of the unit dressed in blue with a suitcase here] to be boring, too much uninteresting micromanagement (like the Workers in Civ). I am keeping Spies and other Infectors in the game though.

      For each of these units, I have added an "ObsoleteAdvance" line with the same technology that is enabling it. I have not yet tested what happens when you discover the said advance. Through the "ObsoleteAdvance" line, I hope that there will be no crash with an AI trying to build something that does not exist.
    1. Fugi the Great's Avatar
      Fugi the Great -
      It's not that I don't want those units in the game, they do have their use, but the AI uses them too often. If I see a spy steal secrets, I kill the spy, so we are now at war, so I also kill the transport and any other ship/unit I see. What does the AI do? Builds another spy and transport and tries again, but this time I sink the transport before it gets to my shore, so it builds some more... So it ends up building and losing 20 spies and 20 transports before it finally gives up and asks for a peace treaty. What did it get for those other 19 spies and transports? To me that was just wasted resources, it would have made more sense (if it really wants to continue trying to steal more secrets while we are at war) is to build a few naval units to escort those transports instead, maybe then they would make it to my shores, and maybe a few ground units to protect the spy so I don't kill it as soon as it steps off that transport, and give it a chance to do something, though there is still no guaranty that I won't simply destroy that army the very next turn with my land armies. Same thing with the slavers, I kill one, we are at war, it just builds another slaver which won't help much when my armies are heading toward its cities.

      The AI should also realize that stealing secrets or enslaving my population can trigger a war (not really sure if it really understands that), so it should really determine if it can survive that war, or at least not lose more than it's gaining because of one stupid decision, sort of like the last Apolyton version when units were given the priority to attack other units just because it knew it could win a battle, but no calculation was done to determine if it could win that war. Does it really want to trigger a war with a nation several times its military strength and an economic output that has the ability to double that strength in a short period of time? If its not ready for a blitzkrieg and 500 pound hailstones falling on its cities, then that answer I would think should definitely be - no. It's different if we are already at war, it should then send in the spies and slavers, but it shouldn't forget it's defences - which it seems that it does because there is too high a priority to make special units.
      Those units do get annoying once in a while, especially when you kick a spy out and next turn it's right back inside your borders again, that's gets old hat real quick, especially if you get from multiple nations. I would be nice to have a way to remove them from the game without starting a war with another nation, like the ability of lawyers to sue other lawyers, only it would be the spies taking out other spies with a special attack, and they would get a chance to take out my spies in my borders as well, who ever gets the chance to do it first. I usually just make the spies sue-able so I don't start going crazy and start pulling out my hair.
    1. Interfector's Avatar
      Interfector -
      Thanks for keeping the game alive. I like it much more than Civ 5..

      So, ran into a problem on turn 387. The turn just won't finish, is 3/5 done, but stuck in a loop or something.
      Game hasn't crashed on me so far.

      Here's a save.

      Attachment 169561

      Or maybe I should read whether there's any fix possible. Maybe if I start war with everyone, the game won't get stuck, as different stuff will be happening.
    1. Fugi the Great's Avatar
      Fugi the Great -
      Since my last posting:
      Since the Userprofile.txt file was junk, I deleted it and restarted the game, figuring it would recreate the file, and theoretically reload some of the information needed from the game save. Reloaded the last game, with no problems, played a complete turn and finished by hitting the end turn button. Oops, major mistake, my empire revolted and left me with a single island city. Some how it didn't remember that I picked no city limit, I would have thought that should have been saved within the game save just in case I change the rules for a different game and want to come back to this one some day. How do you check out a game for troubleshooting if it doesn't get the game settings from the game save? Oh well, that game was screwed, so I started a different one. All was well until last night when the game locked up, it was late so I shut the game down and turned off the computer for the night, figuring I would just reload the Autosave next day, which usually worked just fine.
      Loaded the game today, but it killed Windows again. Same thing happened as last time, Userprofile.txt has nothing in it. Luckily I made a copy of that file the night before when I saved the game, just in case it did it again. What ever was done lately seems to have introduced a nasty little bug to the game. When does Userprofile.txt get written? You might want to change that.
    1. Martin Gühmann's Avatar
      Martin Gühmann -
      Quote Originally Posted by Fugi the Great View Post
      This quote is hidden because you are ignoring this member. Show Quote
      Some how it didn't remember that I picked no city limit, I would have thought that should have been saved within the game save just in case I change the rules for a different game and want to come back to this one some day.
      For that we would have to change the savegame format, that is still something on the list but it has not high priority. For that I also want to have some additions for the savegame format so that we don't have to change it to offen.

      -Martin
    1. Fugi the Great's Avatar
      Fugi the Great -
      reloaded autosave, worked fine for several turns, then Crash to desktop.
      Crash.txt:
      Version 2011-06-12
      0x00448b1f [?DrawColorizedOverlayIntoMix@TiledMap@@QAEHPAGHHG@ Z + 0x18f]
      0x00415af3 [?DrawSelectionBrackets@UnitActor@@QAEXXZ + 0x183]
      0x004149bb [?Draw@UnitActor@@QAE_N_N@Z + 0x33b]
      0x0043def3 [?PaintUnitActor@TiledMap@@QAEXPAVUnitActor@@_N@Z + 0x43]
      0x0043e9ea [?RepaintLayerSprites@TiledMap@@QAEHPAUtagRECT@@H@Z + 0x6da]
      0x0043f035 [?RepaintSprites@TiledMap@@QAEHPAVaui_Surface@@PAUt agRECT@@_N@Z + 0x95]
      0x006f1eff [?background_draw_handler@@YA?AW4AUI_ERRCODE@@PAX@Z + 0xaf]
      0x00433385 [?dh_centerMap@@YAXPAVDQAction@@PAVSequence@@W4DHEX ECUTE@@@Z + 0x55]
      0x0042bac1 [?HandleNextAction@Director@@QAEXXZ + 0xf1]
      0x0040c3ab [?Process@CivApp@@QAEHXZ + 0x11b]
      0x004070e4 [?CivMain@@YGHPAUHINSTANCE__@@0PADH@Z + 0x394]
      0x00406b15 [WinMain@16 + 0x65]
      0x00810c1c [WinMainCRTStartup + 0x134]
      0x7c817077 [__onexitbegin + 0x7be3cfbf]

      Attachment of Autosave.
    1. Fugi the Great's Avatar
      Fugi the Great -
      What ever happened to being able to see if your trade routes were being Pirated or having the ability to tell another nation to stop Pirating them? Do I have something set up incorrectly or was that removed?
    1. Martin Gühmann's Avatar
      Martin Gühmann -
      Quote Originally Posted by Fugi the Great View Post
      This quote is hidden because you are ignoring this member. Show Quote
      What ever happened to being able to see if your trade routes were being Pirated or having the ability to tell another nation to stop Pirating them? Do I have something set up incorrectly or was that removed?
      It should be still in, if your routes are pirated it should show up in the diplomacy window, I guess even if they are not. For the trade routes I would assume that you find that in the trade manager.

      -Martin
    1. Petrell's Avatar
      Petrell -
      Nice work as always Martin. Wish project had more contributors like you.

      I'll host the file like last time in case Apolyton expreriences problems or downtime.

      It can be found from Petrell's Domain Downloads section inside ctp2 folder or using the link attached to project entry in Civilization section (Links -> Civilization). I repacked it using 7zip to conserve space.

      Keep up the good work and good luck!
    1. Fugi the Great's Avatar
      Fugi the Great -
      Quote Originally Posted by Martin Gühmann View Post
      This quote is hidden because you are ignoring this member. Show Quote
      It should be still in, if your routes are pirated it should show up in the diplomacy window, I guess even if they are not. For the trade routes I would assume that you find that in the trade manager.

      -Martin
      That's what I used to see, but I do not see any indication in the trade manager tabs of them being pirated, and no option to tell other nation to stop (even if they aren't pirating). I can clearly see that my routes are being pirated (ship sitting right on my trade route, and hear the pirating noise), and as soon as I remove that trade route the ship leaves and pirating noise stops. Is this an "option" that was added, or something not set up correctly in the Userprofile.txt file?

      The only other things I have seen with this version is that it may take 20 seconds to delete a unit in the modern era (upgrading Marines to Hover Infantry / Artillery to Mobile Sams), actually longer than the AI's turn, (well it was until I liberated a city with the Globe Sat). Not sure if this is because I have so many units or memory getting a little messed up (seems to work very quickly when on the first turn after a reload of a game save.
    1. Fugi the Great's Avatar
      Fugi the Great -
      Okay, I just had a really weird thing happen in my last game. The year was 2189AD, I was just getting ready to finish liberating the last 6 very small nations. I hit the next turn button, then got the message that we can't afford this many units. Huh? I'm not using any coins for upkeep and still was making a nice profit money-wise which was quick buying a lot of expensive buildings, and the extra production was used for pumping out lots of Public works to all the liberated territories. Well just to make it happy I sent an aircraft carrier into a city and deleted it - which paid for a hover infanty for next turn. I look at the number of units I have: 932 total, 749 of those defending cities, but only using up 20% of production. Hit the next turn button. Ooops, I now have 2 units left, had to listen to the other 930 just dieing. You can see what the empire manager showed afterwards, looks a little messed up. The only thing that was maybe "different" from the last turn was that I added a lot more trade routes. 249 caravans in use, 90 caravans available, 1862 total profit from trade, 64 total trade routes. Too many trades routes or caravans? I hope not, this was only on a "normal" world, what would we get when we have a Gigantic World? Other than that, everything was working fine.

      Attachment 169813

      PS. Still no ability to tell them to stop pirating or see routes being pirated. Is this disabled in some checkbox or in the INI file, or do I just need to reload the game?

      PSS. Oh, and the 20-30 seconds it takes to delete units only seems to happen if I open up the unit manager too often, seems to slow deleting of units the more often it gets opened. Something not giving back some memory when it's no longer needed?
    1. Martin Gühmann's Avatar
      Martin Gühmann -
      Could you attach the save game, Fugi? Probably, I won't get to it too soon, but without it there would be no chance to fix it.

      -Martin
    1. Fugi the Great's Avatar
      Fugi the Great -
      game save attached, hope it helps,
      Started another game since then, lots of islands, so far so good.

      After looking back at the file sizes of the game saves, I see that the expanded size of this game save is 200k smaller than the one from 2178AD, and the autosave file isn't much bigger than the size of this RAR file. Or is it just smaller because there are fewer nations to keep track of?

      Seems to me the last time the game went nuts like this was another game I uploaded and the problem seemed to be some underwater cities, of which this game has a few.

      After looking at the that game some more, using the National Manager, I see the problem areas are only in the size 60 cities.
      Neuva Guinea
      Yasodharapura
      Harihalara
      Xanthos
      Torino

      And the problem seems to move around between those cities, click one, another city get problems, click on the new one and it fixes another. Weird.
      Attachment 169819
    1. Martin Gühmann's Avatar
      Martin Gühmann -
      Quote Originally Posted by Fugi the Great View Post
      This quote is hidden because you are ignoring this member. Show Quote
      After looking back at the file sizes of the game saves, I see that the expanded size of this game save is 200k smaller than the one from 2178AD, and the autosave file isn't much bigger than the size of this RAR file. Or is it just smaller because there are fewer nations to keep track of?
      If you have less AIs in the game, there is less stuff to store, each AI has units, armies, wonders, cities, etc. So that does not need to be saved. The autosave is smaller, because it does not contain images, which you see as preview when you select a non-autosave for loading: The map and the power graphs.

      Quote Originally Posted by Fugi the Great View Post
      This quote is hidden because you are ignoring this member. Show Quote
      Seems to me the last time the game went nuts like this was another game I uploaded and the problem seemed to be some underwater cities, of which this game has a few.
      When I checked it it turned out that it was something that I fixed while I changed something else.

      -Martin