[TOT] The Test Of Time Patch Project

Youve got to be kidding me!!!
I just loaded TOT into WIN 8.1 and now I find this? Precious!!!
And in 2018 it is being revisited by the developer?!?
AWESOME !!!

Already it has been helpful in setting up and playing the music ripped from the cd!!!
 
I would love to oblige by Curts request, but I can't help asking a question... Is it even possible for a combat to conclude without one unit being destroyed? If possible, that would be a true game changer.

The next major release (so that's after bug fixing), will get some new Lua triggers. One of them will trigger at the end of combat, and it will allow you to prevent the losing unit to be destroyed. So that's basically what you want ;)

Another bug you may or may not be aware of is that units which can navigate rivers are also invisible.

Never noticed this, but you're absolutely right. Should be easy to fix. On second thought, I can't reproduce it (I tested it with a unit that actually was invisible, so thought you were right at first). Make sure you add the '1' on the left for units that should be able to navigate rivers, and not on the right. The right-most bit is the flag for invisibility, so maybe this is what happened?

Further, they can't use "go to" commands while on rivers.

Yes, this I was aware of. This might be a bit harder to fix, but I'll take a look as well.

Not a priority, but I am wondering if it is possible to make the "Settler" unit restricted to building cities only, and the "Engineer" restricted to doing only tile upgrades, etc?

Yup, this is definitely possible, and even better, it's already on my list ;)

I have this working in wine, but there's no music. Is there a way to make that work?

Have you tried encoding the audio tracks from the CD, putting them in the Music folder, and enabling the DirectMusic patch?

Looking at the following thread for CIV II MGE User Interface by FoxAhead, I see he's been working on a similar type of project for MGE. There's one feature in particular which is lacking in ToT which I believe would be extremely useful to have in ToTPP and that's item #2; Scrollbar was added to Activate Unit popup dialog with more than 9 units in stack. I can't say how extremely convenient it would have been to have this feature while playing McMonkey's Korean War Redux scenario.

Indeed, this would be a nice addition. It shouldn't be very hard, so I'll put it on my list.
 
Last edited:
*cheers* Welcome back TNO!
Your announcment that you're (at least somewhat) back to enhancing TOTPP even further is great news - a great start into 2018 :)

The next major release (so that's after bug fixing), will get some new Lua triggers. One of them will trigger at the end of combat, and it will allow you to prevent the losing unit to be destroyed. So that's basically what you want ;)

The comment about the lua triggers means I don't have to ask one dumb question I had in my mind :) - if you could comment sometime which triggers are feasible in principle that would be great. I remember that a "KeyPressed" Trigger or something, which would be one of the most flexible interactions I can think about, is almost impossible, but if a "on-unit-blinks" or something which allows quasi-continuous scanning is possible that would allow fantastic possibilities already ...

If I may restate two questions from ages ago - would it be possible to define something like a "on the fly" hex functionality, like a "byte(i)" method for a unit or city object, that allows the i'th byte as described in Catfish's Save game structure to be "set" and "get"? (I'm going on a limb here and speculating that the save game structure maps to the basic memory structure of the game? Perhaps thats complete nonsense anyway ...)
Of course that's a highly dangerous path, but it would allow massive flexibility without you having to provide additional interfaces in lua - and scenario/event writers could try and see what would help in scenarios and this could then be implemented in a structured way in the future ...

And do you think it might be possible to define units such that the function a bit like the privateer unit in Colonization - it can always attack and always be attacked without triggering a breaking of treaties? This could be simulated by having it appear as a Barbarian unit for all purposes of attack etc (but of course not when checking for unit commands etc).

EDIT: Sorry, please strike the following stupid question
And one final question - in case the "byte" idea does not work, do you think it is possible to modify the unit.location method such that it can also be "set"? Or would this create to much havoc behind the scenes?
Would allow a nifty teleporting feature, e.g. to connect maps along the east-west axis etc :)
- I overlooked
civ.teleportUnit(unit, tile)
which is of course the perfect solution! :)
 
Last edited:
After installing and running TOTPP, I was so filled with enthusiasm, that I decided to inform the German civers about your great project here.
TheNamelessOne, you are a genius! :bowdown:

tootall_2012, I hope attaching your very informative PDF document about TOTPP to that post is o.k.
 
tootall_2012, I hope attaching your very informative PDF document about TOTPP to that post is o.k.

Hi Civinator,

Of course I don't mind. That's why I created the PDF so it could be shared with the members of our community. I plan on updating it once TNO releaes his next major update to ToTPP.

If you like, feel free to share the following "Scenario Creation Excel Sheet" link as well. I've attached many Civ ToT resources to that thread which many might find useful.
 
tootall_2012, thank you very much! :)
 
I'm working on a scenario using the Patch Project, and a few things have occured to me.

First, I'm pleased you're considering splitting the settler functions (building cities vs. constructing improvements). Can you similarly split the submarine functions: semi-invisibility, inability to attack units on land, and ability to carry missiles?

Second, is it possible to have combat where both units suffer damage (or not) without one necessarily being destroyed? I believe this is a common outcome in many combats. I'm thinking mainly of air and sea battles here.

Third, is it possible to have units that can't be attacked? In pre-flight scenarios we can use stationary air units, but in modern scenarios they are just magnets for fighter attacks.

Finally, are ranged attacks possible? I know Civ 3 included this.

Thanks for what you're doing. We all appreciate it. Cheers.
 
Release 0.14.3:
  • Fixed a bug in the Lua scenario events patch where Lua events would not fire properly in some cases.
  • Fixed a bug in the Attacks per turn patch which did not take into account the extra units from the Extra unit types patch.
This release has some new undocumented Lua features already, which I still have to finish for the next major release, but an interesting one is civ.scen.onKeyPress, which fires when you press a key, and which takes a callback function that receives the code of the key pressed. An easy way to test this is by running civ.scen.onKeyPress(print) in the console. More Lua changes will come soon!
 

Attachments

I remember that a "KeyPressed" Trigger or something, which would be one of the most flexible interactions I can think about, is almost impossible ...

See the new release ;)

If I may restate two questions from ages ago - would it be possible to define something like a "on the fly" hex functionality, like a "byte(i)" method for a unit or city object, that allows the i'th byte as described in Catfish's Save game structure to be "set" and "get"? (I'm going on a limb here and speculating that the save game structure maps to the basic memory structure of the game? Perhaps thats complete nonsense anyway ...)
Of course that's a highly dangerous path, but it would allow massive flexibility without you having to provide additional interfaces in lua - and scenario/event writers could try and see what would help in scenarios and this could then be implemented in a structured way in the future ...

I consider this too dangerous as well, unintuitive and not in the spirit of Lua, so I'd rather spend some extra time expanding the Lua civ library.

And do you think it might be possible to define units such that the function a bit like the privateer unit in Colonization - it can always attack and always be attacked without triggering a breaking of treaties? This could be simulated by having it appear as a Barbarian unit for all purposes of attack etc (but of course not when checking for unit commands etc).

This is not a bad idea, yes, that could work. I'll put it on my list.

After installing and running TOTPP, I was so filled with enthusiasm, that I decided to inform the German civers about your great project here.

Thank you for the kind words! :)

First, I'm pleased you're considering splitting the settler functions (building cities vs. constructing improvements). Can you similarly split the submarine functions: semi-invisibility, inability to attack units on land, and ability to carry missiles

The carrying ability will be overhauled in the future in the transport mechanics patch. This would also affect submarines. The other two could maybe be handled with a cosmic flag (i.e. SubmarinesAttackLand)? Unless you're planning on having multiple "submarine" units with different abilities of course. The cosmic flag is definitely easier though.

Second, is it possible to have combat where both units suffer damage (or not) without one necessarily being destroyed? I believe this is a common outcome in many combats. I'm thinking mainly of air and sea battles here.

There will be a Lua event that triggers at the end of combat, which will allow you to prevent the losing unit from being destroyed. By setting unit.damage you can subsequently restore health etc.

Third, is it possible to have units that can't be attacked? In pre-flight scenarios we can use stationary air units, but in modern scenarios they are just magnets for fighter attacks

As an option it wouldn't be very hard to implement, but I'm a bit worried about the AI's ability to deal with them and not spend all its moves trying to attack them anyway. It might work by setting very high defensive values on such units, hence deterring AI attacks.

Finally, are ranged attacks possible? I know Civ 3 included this.

Maybe in conjunction with some new Lua triggers, onKeyPress and onClickTile to initiate such an action and query a target location, and then doing your own damage calculations. But I'm not entirely sure how this would work out yet, this is still work in progress. ;)
 
TheNamelessOne, is there a possibility to bring the 'Gates of Hel' as an option for a random connection between all kinds of different maps in TOTPP, and especially for premade maps?

The "Gates of Hel" are a random set connection between normal Earth and subdirt maps, but they seem only to appear, when the game creates these maps itself. It did never work with the premade maps of my space mod, even when they were set as normal earth and subdirt maps. I would use them as a wormhole to connect two galaxies or two different quadrants in space. I asked this question at CFC long time ago, but I never received an answer.

Spoiler :

gates-of-hel1-jpg.487152


gates-of-hel2-jpg.487153



Land carriers:

I did read in this thread, that it is very difficult to do working landcarriers, but as you wrote in your last post, that the carrying ability will be overhauled in the future in the transport mechanics patch, please let me say that I am very interrested in working land carriers, too.

'Landmaps' are very comfortable for space mods and the free move of spaceships on those maps. So I would need normal carriers for fighters and missilies and also carriers working as troop transports.
 

Attachments

  • Gates of Hel1.jpg
    Gates of Hel1.jpg
    111.9 KB · Views: 614
  • Gates of Hel2.jpg
    Gates of Hel2.jpg
    84.7 KB · Views: 560
TheNamelessOne, is there a possibility to bring the 'Gates of Hel' as an option for a random connection between all kinds of different maps in TOTPP, and especially for premade maps?

The "Gates of Hel" are a random set connection between normal Earth and subdirt maps, but they seem only to appear, when the game creates these maps itself. It did never work with the premade maps of my space mod, even when they were set as normal earth and subdirt maps. I would use them as a wormhole to connect two galaxies or two different quadrants in space.

There's nothing special about them, they're normal transporters. The game will attempt to create one (if it can find a suitable spot) during map generation when you have a map of type 2 (underground) in @SECONDARY_MAPS. Since pre-made maps (i.e. map files) do not contain transporter data (this makes sense, since transporters are relationships between 2 maps, it does not mean anything for them to be present in a single map file), this is impossible. If you want to place transporters yourself, you have to save them in a scenario.
 
TheNamelessOne, thank you very much for your answer. :)
 
As an option it wouldn't be very hard to implement, but I'm a bit worried about the AI's ability to deal with them and not spend all its moves trying to attack them anyway. It might work by setting very high defensive values on such units, hence deterring AI attacks.
Unfortunately not. In late games, both in PlutoRising and my unreleased 4000 bc spinoff mod, the AI will waste countless air units attacking cities defended by UrbanShields, which have 0a, 127d, 127f, and 12h.

Additinally, Ive noticed that large numbers of hyper-defence-only units such as these seem to unfairly boost my civ in "Most Powerful In the World" rankings. Any way to exclude all 0a units from the calculations no matter what their defense, firepower, and hitpoints values are?
 
I remember that a "KeyPressed" Trigger or something, which would be one of the most flexible interactions I can think about, is almost impossible, but if a "on-unit-blinks" or something which allows quasi-continuous scanning is possible that would allow fantastic possibilities already ...
See the new release ;)
*loud cheering* Awesome. You know, I don't think I ever had that much fun with a "Hello World" snippet like this one:
Code:
local testPrint = function(keyID)
 civ.ui.text(func.splitlines(tostring(keyID)))
end

civ.scen.onKeyPress(testPrint)
and it works! *cheers again*

If I may restate two questions from ages ago - would it be possible to define something like a "on the fly" hex functionality, like a "byte(i)" method for a unit or city object, that allows the i'th byte as described in Catfish's Save game structure to be "set" and "get"? (I'm going on a limb here and speculating that the save game structure maps to the basic memory structure of the game? Perhaps thats complete nonsense anyway ...)
I consider this too dangerous as well, unintuitive and not in the spirit of Lua, so I'd rather spend some extra time expanding the Lua civ library.
I completely get that, and it means I'll prepare a long list of interfaces :)
E.g. getting(/preferably setting) the current city production, getting the number of specialists in a city, a set human player feature ...
But I won't swamp you with that right away :)
(perhaps some things already exist and I did not find them yet?)

And do you think it might be possible to define units such that the function a bit like the privateer unit in Colonization - it can always attack and always be attacked without triggering a breaking of treaties? This could be simulated by having it appear as a Barbarian unit for all purposes of attack etc (but of course not when checking for unit commands etc).
This is not a bad idea, yes, that could work. I'll put it on my list.
Cool! Looking forward to it!
Just because it popped into my mind, let me speculate - how would such a unit interact, if it enters a tile with barbarian units in it? Could it simply "move in"? Or are there other game mechanics which would break in such a case?
If that would work, and it might be possible to "mascarade" as other players ... I'm thinking spies able to move through fortified lines, or something along that ... would be quite awesome too!



And one last unrelated question concerining triggers - do you think it might be possible to define a trigger based on negotiations, which triggers if a contact actually occurs? The way I understand it the current negotiation trigger fires if a negotiation could potentially be started (like opening the foreign dialog window), right?
 
Hello everybody, I'm new to this site. I greatly enjoy the fantastic TOTPP, lots of thanks to TNO for the hard and skillful work. I'm very glad to find this thread alive and well.
I have some suggestions/questions/possible bugs I would like to ask about, if it's not too much trouble:

  • Units with the [submarine] flag are visible to any unit if more than one of them occupy the same square. Not sure if this is a bug/feature from the original game.
  • I'm having trouble with the color inside the city-size number box. For one of the civs, the color is totally different from the shield color. It should be the same color (the two pixels in cities.bmp.) It's fine for the other civs.
  • When trading techs with other civs, you get the options [no, we don't need...] [okay, lets exchange...] and [would you like xxx instead], and you choose to trade, sometimes the AI gets your techs, and you don't get theirs in return. This happens in MGE and regular TOT too. You can trade until they have all of your techs, and you haven't got any of theirs.
  • When different units are stacked in a square, what determines which unit is "visible", or "on top?" Is it the one with the best defense value? Any way to "force" a particular unit type to be visible?
  • Would it be difficult to allow the use of high-color BMP image files as leader portraits in the diplomacy screen?
  • Any way to make the AI use cruise missile units against land targets instead of ships?
 
Thanks for a quick answer, Catfish. I've been a frequent visitor to your Fishcave :)

There must be something I don't quite understand, shouldn't the color in the city size box be the same as the color on the unit shield and within the diplomacy screen? In my situation, the city box is yellow, while the shield and the other relevant places is dark blue. This only happens for civs set to have color nr.6 (English, Greek.) Don't know where that yellow is coming from.

EDIT: Seems like the game doesn't like certain colors when it comes to the city box. Some colors works fine, while others will produce wildly different colors in the game (different than the ones you set in cities.bmp.) I guess the problem can be avoided by being careful with what colors you choose.
 
Last edited:
Back
Top Bottom