1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

The Test Of Time Patch Project

Discussion in 'Civ2 - General Discussions' started by TheNamelessOne, Dec 22, 2013.

  1. TheNamelessOne

    TheNamelessOne Chieftain

    Joined:
    Dec 18, 2013
    Messages:
    196
    Make sure you've extracted both TOTLauncher.exe and TOTPP.dll to the Test Of Time installation folder (containing civ2.exe). Then run TOTLauncher.exe!
     
  2. PlutonianEmpire

    PlutonianEmpire Socially Awkward Goofball

    Joined:
    Mar 11, 2004
    Messages:
    4,784
    Gender:
    Male
    Location:
    MinneSNOWta
    I just thought of something. Would it be possible to be able to remove a map from a particular game or scenario, such as if one mistakenly imported the wrong one during scenario building or world setup?

    Best way I imagine doing it would be deleting "top-down", like in the opposite direction of the import map process, and an additional option to select a replacement map instead of totally deleting it, if one so desired. The latter one I'm guessing might work regadless of the map level being replaced, eliminating the need for deleting the one above it just for replacing the current level?
     
  3. Catfish

    Catfish Chieftain

    Joined:
    Nov 2, 2003
    Messages:
    1,394
    Location:
    Wollongong, Australia
    I meant to post feedback before now, but I've had limited opportunities to test.
    That sounds incredibly sloppy on MicroProse's part.

    I have an issue where the ToTPP, on occasion, will unsuccessfully launch the game. I find that most of the time, a second attempt will be successful. That leaves me with two instances of Civ2.exe running simultaneously, and I'm unable to kill the first process. If this happens a second time, ie, two unsuccessful launches (see attached image), I will be unable to run a third or terminate either of the existing Civ2 processes. I must log out, then in to Windows to have another crack at launching the game. I have 4 sets of security software running. Disabling them doesn't appear to have any effect.

    I have more lists. :mischief: Some of these items I found when digging through my scenario development files from a decade ago.

    ToTPP Bugs
    • Attempting to load a saved game (Ctrl+L), when running a game with custom resources, produces a CTD. I've attached an example SAV.

    ToT Bugs
    • Fix the city window so that pollution icons are not displayed when pollution is disabled under Scenario Parameters.
    • Fix undiscovered cities showing up in the Trade Advisor's supply and demand lists.
    • Fix CreateUnit event action + Count parameter + randomised locations. Currently, if a map tile is blocked, due to the presence of another tribe's unit/city or impassable/ocean terrain, the game will select the next spawn location in the list. If there are no clear locations below this entry, the CreateUnit action will abort completely. Remaining units (Count parameter) are not processed at all. Normally that's fine, but when the locations list is randomised, it's possible to have clear tiles listed above the selected blocked ones. I actually exploit this bug in my WotR scenario.

    Feature Requests
    • A unit flag to prevent rehoming.
    • An additional UnitKilled event trigger parameter that defines the attacking unittype (default is AnyUnit).
    • Different cities.bmp files for secondary maps, as with the terrain graphics.
    • Would it look better (with ToT's resizing algorithm) if the 72x40 icons from Improvements.bmp were used for the Civilopedia's Improvements and Wonders sections instead of the 36x20 icons from Icons.bmp?
    • An option for the game to use the 8-frame combat animation from Icons.bmp when animated units are disabled - like the earlier versions of Civ2. I'm not fussed about this one, but it's been raised (usually by MGE players) multiple times in the past.
    • Shared vision option for allies.
    • The ability to write custom resources to SAV and SCN files with addresources.py.
    • The ability to mute resources on specific tiles in SAV and SCN files with addresources.py. [Edited]
     

    Attached Files:

  4. PlutonianEmpire

    PlutonianEmpire Socially Awkward Goofball

    Joined:
    Mar 11, 2004
    Messages:
    4,784
    Gender:
    Male
    Location:
    MinneSNOWta
    Nice timing with the cities, actually. :lol: Just last night I was doing heavy thinking as to what city graphics to use and how to apply them, since they are universal, which is a challenge when you have maps representing both habitable places and hostile, toxic places. Plus, the city graphics representing today's cities on Earth look rather out of place on Planets such as Mars, Venus and small lunar bodies.

    Also, has anyone requested a re-enabling of that city panorama view that MGE had? Or can that already be done without the ToTPP? Test of Time still has those graphics internally; I stumbled across them when looking through the DLL's with the Gif Xtractor.

    Edit: And if anyone's interested, I just now had a case of the AI going nuclear on itself without human assistance. I've no clue how AI programming works, but I'm posting this here in case anyone might end up discovering something. :)

    Eu_auto.sav is the most recent save, opening on the turn immediately after the AI went nuclear. Eu_auto2.save will probably need to be played a few turns; it may or may not be replicatable, but hopefully it is. :)

    The "just in case" saves are the only human interference ones, where I saved them before splitting two AI's (Japanese and the English, one of them twice) into the full list of 7 civs. The second one was because I was about to found a new city and didn't one anyone taking it in a sneak attack; feel free to disregard. :)
     
  5. ALongHardKnight

    ALongHardKnight Chieftain

    Joined:
    May 14, 2014
    Messages:
    2
    Posted the following almost TWO MONTHS ago and have seen no responses or even acknowledgements of the post. If it is something simple, stupid I'm missing, please enlighten me...

    I know it's gotta be here somewhere, but I can't find it. Started using the ToTPP v0.2 and ... can't save games... I know the ability has to be there but ... running Windoze 7, 64-bit, hard drive partitioned into 3 logical drives, games residing on d: (specifically - D:\games\Civilization\II - Test of Time.

    Thanks for all the work.
     
  6. TheNamelessOne

    TheNamelessOne Chieftain

    Joined:
    Dec 18, 2013
    Messages:
    196
    If you're able to have two civ2.exe processes running simultaneously, it means that something's failing very early on, since one of the first things the game does is registering the mutex "Civilization II Once Only", to prevent multiple instances. What version of Windows are you running? I've seen something similar for Win7, which was related to the infamous Windows Game Explorer, which tries to automatically enforce compatibility settings for certain old games (and ToT is one of them).
    It would be very helpful if you could post the command line of the hanging process, Process Explorer will show it when hovering over the process name. With Process Explorer you can also check whether TOTPP.dll is already loaded by the process or not, press Ctrl-F, and search for TOTPP.dll.

    Can't seem to reproduce it, the attached game loads fine, also loading other SAVs afterwards works fine. Any crash details you can share? Windows' Event Viewer logs application crash details (Win7: Control Panel -> Administrative Tools -> Event Viewer, then "Windows Logs" -> "Application", and look for relevant entries).

    Most of the code remains; the button and associated click-handler have been removed. Would require a patch, just like the throne room. Though I just checked it for a city in MGE, and the graphics look pretty bad. ;)

    Sorry mate, must have totally missed your first post. What's the error when you try to save? Are you getting a CTD? In that case, please attach crash details (see above), otherwise just any relevant information about what you're doing and what's happening.
     
  7. Catfish

    Catfish Chieftain

    Joined:
    Nov 2, 2003
    Messages:
    1,394
    Location:
    Wollongong, Australia
    Windows 7 64-bit, no compatibility settings. I run ToTLauncher from a shortcut in the Taskbar (Target: "C:\Games\Test of Time\TOTLauncher.exe", Start in: "c:\games\test of time").

    Command line is always ".\civ2.exe", success or failure. When the game fails to launch, totpp.dll is not loaded.

    I'm using ToT v1.1 Civ2.exe with Prof. Paco Ruiz's no-CD crack. Offsets:
    Code:
    0x0012B001 - 0x0012B002, 0x8D0F → 0x04EB
    0x0012B015 - 0x0012B016, 0x840F → 0x04EB
    0x0012B167 - 0x0012B168, 0x850F → 0x04EB
    0x0012B221 - 0x0012B222, 0x850F → 0x04EB
    I thought I was using Rebel's crack, but apparently not this time. Offsets:
    Code:
    0x0012B00B - 0x0012B00F, 0x000000AFE8 → 0x9090909090
    0x001B4BDA - 0x001B4BDE, 0x00000121E8 → 0x9090909090
    Event Viewer log attached. I've appended the contents of TOTPP.ini to the file.
     

    Attached Files:

  8. TheNamelessOne

    TheNamelessOne Chieftain

    Joined:
    Dec 18, 2013
    Messages:
    196
    I've attached a patched version of civ2.exe that loads TOTPP.dll through the import table and calls Initialize before jumping to the original entry point. This is more stable (but less flexible) than suspending the process and loading the dll on the fly, so it may resolve your problems. Run it without going through the launcher, or else it will try to load the dll twice.

    Looks like heap corruption, I'll look into it. Maybe I'll just rewrite it to use the new heap functions of 0.6.
     

    Attached Files:

  9. Catfish

    Catfish Chieftain

    Joined:
    Nov 2, 2003
    Messages:
    1,394
    Location:
    Wollongong, Australia
    Thanks, I'll try this out.
     
  10. TheNamelessOne

    TheNamelessOne Chieftain

    Joined:
    Dec 18, 2013
    Messages:
    196
    I've looked into this some more. What I think is happening is that some dialogs get created by the old code before TOTPP is inserted, and deleted by the new code. And that's a good way to get undefined behavior such as heap corruption.

    But I was wondering if the patched executable resolved the issue for you. I've been using it myself for a while now, probably the reason why I couldn't reproduce it in the first place. For 0.7, I've been rewriting the launcher to support patch mode, and I'll discontinue the old injection mode if there are no issues.

    I'll do you one better, 0.7 will feature in-game resource placement. I've just completed the code changes for it. With cheat mode enabled, Ctrl-F8 enables / disables custom resources for the map, and resources can be placed with Ctrl-0 (no resource), Ctrl-1 (resource #1) and Ctrl-2 (resource #2).
    This means that the python script is probably not needed anymore.

    Some other changes for 0.7 are: mouse wheel support for dialogs, a fix for properly restoring the zoom level when loading a game, fixes for native transport, and the city view from MGE has been restored.

    Expect it in a couple of days.
     
  11. Catfish

    Catfish Chieftain

    Joined:
    Nov 2, 2003
    Messages:
    1,394
    Location:
    Wollongong, Australia
    No, unfortunately. A loaded custom resource game (I've tried three) will crash ToT 100% of the time with subsequent attempts to use Load Game or even Quit. The behaviour is identical for patch mode and injection mode. I tried disabling all of my security software (services and EXEs) and all other EXEs running in the background. That made no difference. I tried it on another older Win7 64-bit machine with a similar software setup and the results were the same.

    BTW, Process Hacker can kill those orphaned Civ2.exe processes running in the background. I forgot I had a portable version already 'installed'.

    Excellent. :goodjob:
     
  12. TheNamelessOne

    TheNamelessOne Chieftain

    Joined:
    Dec 18, 2013
    Messages:
    196
    Here's 0.7. These are the changes:
    • Patch mode:The launcher will now request that you patch civ2.exe (this requires a vanilla 1.1 executable, no custom patches). The patch ensures TOTPP.dll is loaded before the game does anything else, and leads to better stability. Also, the launcher does version detection, which should help fix some common misconfiguration issues.
    • Fix for native transport, it will now respect the "not allowed on map" settings from @UNITS_ADVANCED.
    • Fix for the zoom level not properly being restored the first time a game was loaded.
    • No CD patch, another benefit of patch mode.
    • Restored the City view from MGE, press 'v' in the city screen to see.
    • Mouse wheel support for all dialogs with scrollbars.
    • Custom resources can now be placed in-game, removing the need for external tools. In cheat mode, they can be enabled/disabled for a map by pressing Ctrl-F8. Subsequently, they can be placed on tiles with Ctrl-1 (resource #1) and Ctrl-2 (resource #2). Ctrl-0 removes a resource from a tile.

    Also a fix for the issue Catfish reported (which I finally managed to reproduce last night):

    • Fixed a bug in the "Custom resources" patch where unloading a map could cause a CTD.

    As always, detailed information about the patches is available in the launcher. For an overview of all patches, see the included README.txt. Happy gaming! :)
     

    Attached Files:

  13. PlutonianEmpire

    PlutonianEmpire Socially Awkward Goofball

    Joined:
    Mar 11, 2004
    Messages:
    4,784
    Gender:
    Male
    Location:
    MinneSNOWta
    Awesome. :cooool: My favorites are the mouse wheel and the fact that the Enter key now works when entering text in text box dialogs. :goodjob:

    My only request this round is perhaps an option in a future version to disable some "spam" in the game, namely the flood of dialogs when enemy civs build spaceship components, and when nukes are shot down hundreds of times in a single turn by a neighboring city with SDI, regardless of city ownership or diplomatic relations statuses. :ack:
     
  14. Grishnach

    Grishnach Chieftain

    Joined:
    May 15, 2006
    Messages:
    51
    I just have to jump in here and repeat that - Awesome! :thumbsup:
    Thanks for all the effort, this solves and fixes so many points which bothered me over the years!

    I'd also like to second a request by Catfish. :D
    More specifically I wanted to ask if you think that stuff like that would be possible or probably out of scope (due to some internal restrictions I have no idea about):

    Feature Requests
    • An additional UnitKilled event trigger parameter that defines the attacking unittype (default is AnyUnit).
    and somewhat related:
    • Addition of an option to specify the coordinates of attacker and defender in the CREATEUNIT locations statement, like "Attacker_X, Attacker_Y" or "Defender_X, Defender_Y" (e.g. for recovering an artifact, or liberating some units or so)

    Those to features would add unthinkable possibilities i.m.o.

    But first and foremost - thanks again! :) :thumbsup:
     
  15. Catfish

    Catfish Chieftain

    Joined:
    Nov 2, 2003
    Messages:
    1,394
    Location:
    Wollongong, Australia
    With the Mountain Height option selected, I've noticed that when running scenarios with no MountainHeight parameter, the default height is the value from the Original folder. That causes graphical artefacts when you have non-standard mountain heights in the Original game. I can deselect Mountain Height on launch or add a @COSMIC2 section to the scenario, but was this intended? If I run a scenario based on the Fantasy game, it appears that the default value of 32 is used - rather than the MountainHeight value found in the Fantasy folder.

    My left paw keeps jumping to the Shift+Z position whenever I start a game. I'll get the hang of it. :mischief:
    Does that include the Description boxes (info from Describe.txt)? They're not working for me. Then again, I have a funny mouse with non-standard wheel scrolling.
    I've been playing around with the custom resources option, using my WotR scenario as the guinea pig. A few comments:
    • I've noticed that the muted resource bit from the map data block (I have a lot of these enabled in WotR) overrides the ToTPP custom resources data. This bit can be cleared with Change Terrain, but that's a laborious process.
    • Custom resources isn't implemented for secondary maps.
    • Could there be an edit existing resources mode; one that doesn't clear the entire map of resources - essentially what the Python script does?
    Yeah, that works. :goodjob:

    Yep.

    I posted something similar:
    Maybe you could have a trigger that checks for the presence of a UnitType within a location (defined by 4 co-ordinates) - a common trigger in other games. That way you could have a unit recover an artefact or deliver a message without necessarily engaging in combat. You could do away with specific trigger units and also set locations on friendly tiles; cities, for instance. FYI, last month, TNO posted the following:
     
  16. Grishnach

    Grishnach Chieftain

    Joined:
    May 15, 2006
    Messages:
    51
    I thought I remembered having read something similar in this thread, but wasn't completely sure. :)
    Additional scripting options in the (lets cross our fingers and say "near") future would really be extremely cool!

    About one of your comments:
    Probably I'm simply missing an important functionality, however the new "cheat menu options" (Ctrl-F8 then Ctrl-0, 1, 2) did work on second to quaternary maps for me. Only thing necessary was to Ctrl-F8 on each map individually. Didn't manage to test much further though - so sorry if I simply didn't get your point. :)

    That new patch-in process is very cool imo, but it was also a bit bothersome - took me several hours to get back to a "clean" 1.1 version without the x64 patch installed. :D
    I guess leaving in the old insertion method as an option would create technical problems?

    Anyway, awesome improvements & fixes - thanks again!
     
  17. Catfish

    Catfish Chieftain

    Joined:
    Nov 2, 2003
    Messages:
    1,394
    Location:
    Wollongong, Australia
    No, it's just me being obtuse. :crazyeye: You're absolutely right. I was hitting Ctrl+F8 and expecting it to affect the entire scenario. Individual map control is better.
     
  18. PlutonianEmpire

    PlutonianEmpire Socially Awkward Goofball

    Joined:
    Mar 11, 2004
    Messages:
    4,784
    Gender:
    Male
    Location:
    MinneSNOWta
    Yeah, seconded. It's stuff like this that's the reason why I will never give up physical media. CD's and DVD's FTW! :D

    (Took me all of 5 mins. ;) )
     
  19. TheNamelessOne

    TheNamelessOne Chieftain

    Joined:
    Dec 18, 2013
    Messages:
    196
    I can see how that gets annoying. I'll see what I can do, maybe some levels of filtering for more or less important dialogs.

    Cheers, mate. That is definitely possible, and I'm planning to make some scripting changes at a later time. But it will most likely mean breaking the saved game format, and I'm a bit worried about having multiple patches breaking the format in different ways. So maybe I'll have to add support for extending the saved game format first, before making such changes.

    It does when you click on the text first - then the mouse wheel messages get posted to the text control (this already worked before the patch by virtue of it being a standard windows control). I could forward the messages to the text control I guess, but it's just one click. ;)

    You're right, it's a bit silly to check this bit for custom resources. I'll change it.

    The python script also initializes the resource block with 0's (no resource), so I'm not quite sure how that's different. But you mean copy the seeded resources instead of clearing the map?

    There are some strange interdependencies between the folders, so it could well be a bug. I've seen something similar while working on the extra terrain types patch. I'll look into it.

    Speaking of extra terrain types, here's an in-game screenshot of the engine rendering 16 terrain types (still a long way away from being playable though):

    Spoiler :


    The old method has always caused technical problems. In the beginning it just seemed the best option, to preserve compatibility with the other patches out there. Since patches for similar purposes are now available in TOTPP, I decided to switch methods.

    There's a pre-patched executable available in this post. Maybe that's helpful for other people.
     

    Attached Files:

    • 16tt.png
      16tt.png
      File size:
      45.1 KB
      Views:
      458
  20. Greizer85

    Greizer85 Chieftain

    Joined:
    Mar 7, 2009
    Messages:
    1,210
    Wait -- so the extra terrain types are not yet enabled? Not that it's in a hurry, since I'm just starting to prepare a new world map (enticed by the fact that resources are now placeable in-game! :eek:). Also, how does the new fertility value thing work? How do I implement it, and does it mean that the AI can be totally restricted from settling certain terrain types, or is it merely a 'soft instruction' that it will sometimes follow and sometimes not?

    EDIT: Also, does the new max of 16 terrain types include hills, mountains and forests in it (so the real number of new terrains is 5), or does it not (so there's 8 new terrain types)? This could have implications in whether I decide to include the new Plateau terrain/resource or not (it will take up 4 terrain slots and 8 resource slots if I do include it -- ouch! Or I could replace Forests with it and have several different looking Forest tiles as regular terrains or resources...). It would eliminate most of these issues if any resource could be placed on any type of terrain, but I suspect that's beyond the game's capabilities. Although the current changes are nothing short of miraculous, so I'm still having my fingers crossed on this one. ;)
     

Share This Page