[TOT] The Test Of Time Patch Project

Can confirm the Sci-Fi script works, but I've been trying to implement LUA in a custom scenario and while the platform can tell if there are coding errors, it never actually runs the events.lua and defaults to macro.

This was pretty much all copy-pasted either from the Sci-Fi demo or the posted conversion guide, so in theory it should work...

The text popup at the end is what should tell me the script ran, but even just using that alone in a test file it never prompts. When I have both events.lua and events.txt, no matter which I choose it only runs the .txt, and when I only have .lua it still prompts the selection on load yet doesn't run the file at all. Needless to say, I'm stumped.
I'm getting the same. I thought I'd poke around with the Lua scripting and learn the ropes by converting some old macro events. I found that if I start a game as one of the 3 official types or 'Play a Mod', the Civ library seems to load OK, but if I choose 'Begin a Scenario', it ain't happening. I know that events.lua is being loaded from the scenario folder because any print functions show up in the Lua console. You can test this using the Sci-Fi game Lua events; compare starting a new game, saving a game and reloading, and saving the game as a scenario (in the Scifi folder) and launching.

I just came here to post this after about 2 years away from the game, only to find a freshly minted version of the ToTPP same day.
 
Welcome back TNO!

So far I have released my PlutoRising Scenario, however I'm doing an unreleased overhaul so I can include the new map data provided by New Horizons. So far I've noticed the map replacement for Pluto doesn't allow the AI to settle on it, so that aspect is in impasse at the moment.

As for LUA, I fully intend to integrate it into PlutoRising, however I expect that to be a bit of a ways off for now.

And thank you for the patch fix! I look forward to more updates! :D
 
Last edited:
@TheNamelessOne returns from the Mysterious Void! This is truly good news!
 
Is there a change to have a mutually animated combat animation in Civ 2 ToT, p.e. where the attack animation is triggered for both units in combat and not only for the attacker?

The game is only capable of animating one unit at a time, so it would be some work to change this. Also, without having better ways of creating unit animation files (or making the game support a different format), I feel that no one will take advantage of such functionality.

The launcher never gets far enough to allow me to toggle options but crashes upon execution. I'll do more checking and see what happens.

Do you have any output, crash logs, etc. to go on? I'm not familiar with this ExaGear application unfortunately, so I can't really help you there. The launcher is a really simple application, so I find it strange that it doesn't even run for you.

I'm getting the same. I thought I'd poke around with the Lua scripting and learn the ropes by converting some old macro events. I found that if I start a game as one of the 3 official types or 'Play a Mod', the Civ library seems to load OK, but if I choose 'Begin a Scenario', it ain't happening. I know that events.lua is being loaded from the scenario folder because any print functions show up in the Lua console. You can test this using the Sci-Fi game Lua events; compare starting a new game, saving a game and reloading, and saving the game as a scenario (in the Scifi folder) and launching.

I've done some testing, and what I can reproduce when I begin a scenario is that the game loads both the Lua and the old events. This is definitely not intended, so I'll fix this. But I can't seem to get the game to only load the old events when there is a valid Lua file present.

So far I have released my PlutoRising Scenario, however I'm doing an unreleased overhaul so I can include the new map data provided by New Horizons. So far I've noticed the map replacement for Pluto doesn't allow the AI to settle on it, so that aspect is in impasse at the moment.

I've replied in the thread you mentioned, please take a look.
 
You are very kind. ExaGear really has little to no support about such things as crash logs. I'll do some checking later and see if one is being generated. It's really a black box application versus the straight Wine emulator.

After several days of looking into MGE and unofficial patches, it looks like one version of Civ Unlimited will do the main bug fixes but is in no way equal to your Herculean effort for ToT repair.

Just in case you are interested, Vince Ho did a MGE patch in 2016 on github. It may be that some correspondence might be mutually beneficial on your discoveries. Catfish had a copy of Civ Unlimited that worked on either ToT or MGE in 2007 and it might be worth investigating.

See:
https://forums.civfanatics.com/threads/civ-2-can-be-played-on-an-android-system.625959/

I would bet many Civ 2 players from the past would love to play on their Android tablet and many probably have no idea about ToT and the many diverse mods and scenarios here.
 
Last edited:
The game is only capable of animating one unit at a time, so it would be some work to change this. Also, without having better ways of creating unit animation files (or making the game support a different format), I feel that no one will take advantage of such functionality.

TheNamelessOne, thank you very much for your quick reply. :) I think it would be worth the work, as for Civ 2 ToT it would be a gigantic step forward, if it could handle animated units in high quality. Even standard Civ 2 had an animation for both units in battle, showing lost hitpoints for each of the units. There were a lot of civers who were sad about loosing these animations in Civ 2 ToT.

With Mercator´s sprite generator there exists a tool that allows to create such animated Civ 2 Tot units - and there are thousands of Civ 3 units, that could be converted.
 
I've done some testing, and what I can reproduce when I begin a scenario is that the game loads both the Lua and the old events. This is definitely not intended, so I'll fix this. But I can't seem to get the game to only load the old events when there is a valid Lua file present.
I was renaming the file extension for events.txt to prevent interference. In doing so, this has disabled the Lua events for scenarios. If there's no events.txt file detected in the scenario folder when you begin a scenario, none of the events from events.lua fire. However, since the print statements are showing up in the Lua console, it's clear that events.lua is being loaded. If I reintroduce events.txt to the folder, both sets of events fire. I hadn't noticed this before as I'd removed events.txt from the equation very early in the process.
 
I'm curious how you got around the 255 city limit as it can't be just hex editing the exe. I did tests of Civ Unlimited and Skyer's MGE patch which analyze this issue.

https://forums.civfanatics.com/thre...ed-on-an-android-system.625959/#post-14969319

You must have added code to assign higher values than 255+ for proper home city assignment. Everything else seems correct in terms of income and expense generation, trade with caravans, go to and airlifts, etc. It comes down to a specific unit support costs versus coming out in the wash on the balance sheet.
 
Hi TNO,

It’s great news to hear you are back!

Your project has proven to be a truly wonderful gift to our community and I think I can speak for all by thanking you again. It has opened up so many new possibilities. I was able to take full advantage of many of your features in my Vietnam scenario, whose design and final outcome simply would not have been possible otherwise.

I’m not certain if you had the opportunity to follow any of the development threads during your absence but we did encounter one issue with regards the Attacks per turn feature, which was discussed in my Vietnam thread here. If you are willing to review or require further information let me know.

With regards the lua integration, I was hoping to have some scenarios developed with the language, since you left, so I could have some concrete examples to review, but to my knowledge no such scenario exists (or at least none that have been released). As such, I didn’t even attempt use it for my Vietnam scenario as the task seemed much too daunting for a neophyte as myself (especially considering my event file ended up being twenty thousand lines long). Nonetheless, I fully grasp the advantage that the lua has over the macro language.

For my part, I’m still very interested in seeing whether you can develop the transport mechanism that you talked about in this thread. I believe after lua that this is the next feature that would bring the most value to the game. So, if you are interested in pursuing it and require further feedback please let us know.

Finally, I did have a question. Are you aware if it is possible to assign multiple civilizations to a single human player in ToT, other than in Hot Seat mode? Apparently, it was a feature that was possible in Fantastic Worlds. If not, is this something that would be programmable within your project?
 
Here's my first new suggestion for a new addition.

Right now, game.txt just has two dialogs for global warming. I was thinking of enabling different dialogs for different maps, so for example: Map 0 portrays AGW, Map 1 portrays Nuclear Winter, Map 2 portrays buildup of space trash, and Map 3 portrays a terraforming project.

Example code of above portrayals:
Code:
@FEARWARMING0
@width=320
@title=(News Media)
Scientists alarmed by rising temperatures.
Global warming feared!

@GLOBALWARMING0
@width=320
@title=(News Media)
Global temperature rises! Icecaps melt.
Severe drought.

@FEARWARMING1
@width=320
@title=(News Media)
Scientists shocked by falling temperatures.
Snowball effect feared.

@GLOBALWARMING1
@width=320
@title=(News Media)
Global temperature plummets! Icecaps grow.
Severe cold snaps.

@FEARWARMING2
@width=320
@title=(News Media)
Space tourists worried about increasing orbital junk.
Trash catastrophe feared.

@GLOBALWARMING2
@width=320
@title=(News Media)
Major trash buildup! Vessels struck repeatedly.
Old traffic routes blocked.

@FEARWARMING3
@width=320
@title=(News Media)
Engineers report increasing Martian temperatures.
Next stage of terraforming rapidly approaching.

@GLOBALWARMING3
@width=320
@title=(News Media)
Arean temperatures skyrocket! Forests grow.
Thunderstorms sighted as the air thickens.
 
I think it would be worth the work, as for Civ 2 ToT it would be a gigantic step forward, if it could handle animated units in high quality. Even standard Civ 2 had an animation for both units in battle, showing lost hitpoints for each of the units. There were a lot of civers who were sad about loosing these animations in Civ 2 ToT.

With Mercator´s sprite generator there exists a tool that allows to create such animated Civ 2 Tot units - and there are thousands of Civ 3 units, that could be converted.

I might look into it for a later release. Right now, there are some other features I want to develop first. Maybe in the future.

I was renaming the file extension for events.txt to prevent interference. In doing so, this has disabled the Lua events for scenarios. If there's no events.txt file detected in the scenario folder when you begin a scenario, none of the events from events.lua fire. However, since the print statements are showing up in the Lua console, it's clear that events.lua is being loaded. If I reintroduce events.txt to the folder, both sets of events fire. I hadn't noticed this before as I'd removed events.txt from the equation very early in the process.

I managed to reproduce and fix this now. There was one code path left that would unconditionally remove the 'events loaded' flag, even when Lua events were loaded already. This will be fixed in the next release.

I'm curious how you got around the 255 city limit as it can't be just hex editing the exe. [...]You must have added code to assign higher values than 255+ for proper home city assignment.

Exactly this. This was the hard part. Removing the limit itself is actually pretty simple. Tracking down and changing all instructions handling city assignment and changing them to handle words instead of bytes not so much.

I’m not certain if you had the opportunity to follow any of the development threads during your absence but we did encounter one issue with regards the Attacks per turn feature, which was discussed in my Vietnam thread here. If you are willing to review or require further information let me know.

I've taken a look at the thread; if I'm not mistaken, you removed the Attacks per turn feature in the latest version of your scenario? Do you still have the relevant files of the old version with this bug lying around somewhere? In that case, I'd be happy to take a look. I'm pretty sure this is caused by the Extra unit types patch being introduced after the Attacks per turn patch, so the latter might not be completely aware of the former.

With regards the lua integration, I was hoping to have some scenarios developed with the language, since you left, so I could have some concrete examples to review, but to my knowledge no such scenario exists (or at least none that have been released). As such, I didn’t even attempt use it for my Vietnam scenario as the task seemed much too daunting for a neophyte as myself (especially considering my event file ended up being twenty thousand lines long). Nonetheless, I fully grasp the advantage that the lua has over the macro language.

I'm working on stabilizing and ironing out the remaining bugs in v0.14 right now, but after that I'd be happy to help in the development of such a scenario. I understand that it is a daunting task, but if it were easy it wouldn't be fun right? ;)

For my part, I’m still very interested in seeing whether you can develop the transport mechanism that you talked about in this thread. I believe after lua that this is the next feature that would bring the most value to the game. So, if you are interested in pursuing it and require further feedback please let us know.

I do intend to finish that feature in the next major release.

Finally, I did have a question. Are you aware if it is possible to assign multiple civilizations to a single human player in ToT, other than in Hot Seat mode? Apparently, it was a feature that was possible in Fantastic Worlds. If not, is this something that would be programmable within your project?

I've just tested this by setting the human players bitfield of a saved game just as it is used for hot seat games. But upon loading the game set it back to a single tribe. When I removed this instruction, I was able to play with two human tribes just fine. But I'm not sure if this would cause any issues further on. I'll include the patch in the next release though.

Here's my first new suggestion for a new addition.

Right now, game.txt just has two dialogs for global warming. I was thinking of enabling different dialogs for different maps, so for example: Map 0 portrays AGW, Map 1 portrays Nuclear Winter, Map 2 portrays buildup of space trash, and Map 3 portrays a terraforming project.

I'll be sure to put this one on my list.

I've also started work on a little side project, which will become a stand-alone editor for ToT saved games and scenarios. This with the intent of finally being able to replace the old CivCity and CivTweak utilities, and probably adding some new features as well. I'm hoping to get a first working prototype done in a few days.
 
I might look into it for a later release. Right now, there are some other features I want to develop first. Maybe in the future.

One more time thank you very much for your reply. :coffee:

I've also started work on a little side project, which will become a stand-alone editor for ToT saved games and scenarios. This with the intent of finally being able to replace the old CivCity and CivTweak utilities, and probably adding some new features as well. I'm hoping to get a first working prototype done in a few days.

This tool sounds interesting. :cool:
 
I've also started work on a little side project, which will become a stand-alone editor for ToT saved games and scenarios. This with the intent of finally being able to replace the old CivCity and CivTweak utilities, and probably adding some new features as well. I'm hoping to get a first working prototype done in a few days.
 
Hi TNO,

Thank you for you replies. Here is my feedback:

I've taken a look at the thread; if I'm not mistaken, you removed the Attacks per turn feature in the latest version of your scenario? Do you still have the relevant files of the old version with this bug lying around somewhere? In that case, I'd be happy to take a look. I'm pretty sure this is caused by the Extra unit types patch being introduced after the Attacks per turn patch, so the latter might not be completely aware of the former.

Yes that is correct. I had to remove the APT feature in version 2 because too many players were reporting that they were unable to attack with some of the units in the slots above #80, i.e. they were getting the message telling them that they had exceeded their number of attacks for this turn even though they had made no attacks at all. What is particularly curious is that this behavior was inconsistent from one player to another. Whereas the feature worked for me and McMonkey, it did not for others.

I’ve attached version 1 of the scenario to this thread. I don’t believe the issue was related in any way to the scn file itself because all I did in version 2 was remove the attacks per turn section from the rules section and as consequence all the units were now able to attack again.

I'm working on stabilizing and ironing out the remaining bugs in v0.14 right now, but after that I'd be happy to help in the development of such a scenario. I understand that it is a daunting task, but if it were easy it wouldn't be fun right?
upload_2018-1-7_11-23-56.gif

I appreciate the offer. I might start off by asking some help on event types that I often use in my scenarios too see how they could be done in lua to help get a grasp how it works.

I do intend to finish that feature in the next major release.

This is great news. I believe the transport mechanism is one feature that will be most welcome by the designers.

I've just tested this by setting the human players bitfield of a saved game just as it is used for hot seat games. But upon loading the game set it back to a single tribe. When I removed this instruction, I was able to play with two human tribes just fine. But I'm not sure if this would cause any issues further on. I'll include the patch in the next release though.

I’m not certain I fully understood if this is a feature you need to implement in your patch or not. Though I’d certainly be glad to see if it can be achieved. It would be very useful for a scenario where you want the human player to control the different powers of a coalition but don’t want them to be able to build the different units of the respective powers in cities not related to each specific nation.

I've also started work on a little side project, which will become a stand-alone editor for ToT saved games and scenarios. This with the intent of finally being able to replace the old CivCity and CivTweak utilities, and probably adding some new features as well. I'm hoping to get a first working prototype done in a few days.

This sounds absolutely fantastic. I’ve never been able to take advantage of some of the utilities like CivCity and CivTweak because they were only compatible with 32 bit computers. Will your project be compatible for 64 bit computers?
 

Attachments

  • Nam65_Files.zip
    1.9 MB · Views: 116
Last edited:
I'm a Linux wine user myself and the fact this patch is alive and well has caused me to come back to the game again, thank you!
So you are using Linux but are you using it on an Android? If so then which OS and I am assuming you can run the patch? I cannot and I'm trying to track down why and post my result.

I think lots of Android tablet users would play both ToT and Civ 3 if they were aware that Wine facilitates this. We might see a huge uptick in people playing mods and scenarios. MGE so far cannot overcome the city limit and that is crucial as the really interesting battles are facilitated by huge maps but need lots of infrastructure.

It may be I have to jailbreak my tablet so I can upgrade the OS so I can actively use the emulator and sideload apps. Then I could possibly use the patch and even run Civ 3 Complete (though it is so huge that I would need an SD card to add storage.

Since ToT supports multiple maps, then it might be possible to have a strategy map and multiple battle maps so that true tactics could be used versus just taking over map coordinate points. Then the city map would be for strategy and the other maps might be for an intense air battle, repelling a bomber invasion, subs hunting each other across layers of maps ie a z axis or an invasion land battle that secures the terrain for city occupation.
 
Last edited:
It's great to have you back TheNamelessOne. Your work has undoubtedly saved revived the Scenario League which was beginning to draw its dying breaths. Now we're all like kids in a candy shop again, dreaming up new projects and concepts.

Getting CivCity and CivTweak utilities back would be a major boost. Civ City, in particular, is really useful for scenario building and I have missed not having it available. Great news!

I won't burden you with more requests as the ones you have outlined are already a major boost. We really appreciate the time and effort you have invested in this great old game.
 
I agree, re-tooling CivTweak and CivCity to work for 64-bit, is (in my view) the most important thing designers could use at the moment.

Let's focus on the big aspects we need, like more Civ-tribe-faction slots - Instead of small-fish things like individual scenarios.
 
Top Bottom