[TOT] The Test Of Time Patch Project

Too bad it's not a Github project or something that can easily be updated. Now everyone who downloads the last ToTPP build has/will have this issue.

All that has to be done is for people to download a modified civlua.lua file to the lua folder, or for a scenario designer to maintain a separate copy of that file with the fixes implemented. I've corrected a couple bugs in that file in the past. There are things about TOTPP that we'd like to change but can't, however, this isn't one of them.

I'll update this thread later with the fix.
 
All that has to be done is for people to download a modified civlua.lua file to the lua folder, or for a scenario designer to maintain a separate copy of that file with the fixes implemented.
Yes, exactly. Which you probably only know once you run into the bug. It would be better if people could not run into the bug because it would be fixed in the original download.

There are things about TOTPP that we'd like to change but can't, however, this isn't one of them.
You would not want to fix it if you could? Why not? Can't some Mod update the initial thread page with up-to-date files, or at least the post that it links to? Just replace the ZIP file with a fixed version.
 
Sorry, I tend not to think of the civlua file as part of the TOTPP, because I can change it. All I meant was that we can change the file in question to fix the bug, so we don't need to wish for the source code of the TOTPP (though I would like to have it). I wasn't thinking in terms of Github being a place for a consistent link even if stuff is updated, which is silly, since I have used Github for that purpose with my own lua projects. I'll blame the fact that I wanted to write a response before leaving for work...

There is some merit to providing an alternate download with the updated civlua.lua file, especially since TNO hasn't been back for a couple years. I don't know if a moderator even frequents the Civ II forums regularly. I'm pretty sure this bug only affects the Scifi lua conversion, since the bug manifests whenever that function is called, not just on certain inputs. I never paid much attention to the lua version of the scifi game, and from what I remember, JPetroski at least didn't find it much use to learn from, so maybe no one else looked at it that closely either. And the scifi game is available with regular events anyway.
 
I looked at it. It's a nice tutorial to the lua API, maybe not the best but I understood it, especially since you can compare it to the traditional events file. I also saw how persisting the state is done. Instead of worrying about serializing the whole lua VM one only saves specific variables and load/compile/run the lua code each time the scenario ist started/loaded. Clever! I also did not know transporter building unlocks for everyone at once, I always thought it was per-player.

My opinion is just that if there is a bug that can be fixed with low/reasonable effort, why not do it. The earlier you fix something the less time there is for people to encounter the problem. :)
 
My opinion is just that if there is a bug that can be fixed with low/reasonable effort, why not do it. The earlier you fix something the less time there is for people to encounter the problem.

Well, I have provided an updated civlua.lua file in my bugfix thread. Since I'm not a moderator, I can't do more. Based on the thread, this bug was noticed a year ago, and I did ask to be reminded of it if the issue wasn't resolved, but no one ever did.
 
temp.png

To see an exemple, you may look at the Napoleon scenario for ToTPP
 
I am thinking the city and unit patch is bugged.

In a scenario currently being developed, I have over 700 units.
When a ground unit is selected, then the "GoTo" menu command "G" is used, the game crashes.

Full CTD - Thought it was a rules file missing comma bug, but all files have been checked in Lua, no bugs.

error1.png


Link to the dev thread where the error occurs.

https://forums.civfanatics.com/threads/overlord-scenario-playtest-thread.660509/page-17

I am using ToTPP 15.1
 
@CurtSibling

I think your error is the result of the game trying to create a selection menu that has too many entries.

I get the same error (except with "data: XX XX" different) in a brand new game without the cities and units patch enabled, if I create a stack of 500 units and then try to select one.

I also got the same error on a first or second turn save in Overlords after using Lua to transfer all landmass 1 cities to the Americans, and then pressing G for goto.
 
Seems very likely a crash caused by the high city limit having unforeseen consequences for the game menus.

I think the only ways forward for this now are:

1) The random landmasses created with Lua.
2) Avoid using the "G" key...!
 
And is the unit limit now 135? Or is that just a typo by @Thorvald of Lym ?
Yeah, I borked the math and multiplied '118' instead of '108'. :crazyeye:

Though verifying everything I didn't realize you could define the 127th slot; I assumed that was reserved for the barb leader.
 
Ah! My hopes were raised for a moment - Maybe one day we will crack CIV2 and have 300 unit slots and more than 7 tribes!
 
I've tried porting ToT-style graphics to Freeciv, unfortunately the way the UI hierarchy's set up, you can't use 64x64 units on 64x32 tiles without stuff like status indicators getting cropped in the city view, &c.
 
Quick question...

Does TOTTP work with Linux/Wine? Haven't played in forever, but my CPU is running Ubuntu currently.

Thanks!
 
As some of you know (or noticed from the recent documentation updates :mischief:), I've been working on a new version of TOTPP. I consider it stable enough for public release now, so here is release 0.16:

  • Mods will now load resource dlls and window graphics (dialog.bmp, city.bmp, civwin_back.bmp) from the mod directory.
  • Mods will now reload text files from the mod directory when starting a new game (e.g. menu.txt).
  • Added the Difficulty levels patch to support difficulty levels above Deity.
  • Added the Initial trade arrow for roads patch, which allows overriding the initial trade arrow for roads that's hardcoded to Desert, Plains and Grassland in vanilla.
  • Added the Extra settler flags patch, which provides a way to assign settler flags to non-settler units, and to take them away from settler units.
  • Added the Multiple instances patch to allow multiple instances of the game to run simultaneously.
  • Added an advanced mod parameter to support setting advanced rules when starting a new game.
  • Added a BarbResearch setting to the AI tweaks patch.
  • Many additions / updates to the Lua API. Some highlights:
    • tile.baseterrain and tile.terrain provide new ways of interacting with terrain types, resources, irrigation/mining, tile yields, etc.
    • Support for updating per-tribe maps through tile.visibility and tile.visibleImprovements.
    • A trigger to modify city yield, civ.scen.onCalculateCityYield
    • A new and better way to handle combat resolution through civ.scen.onInitiateCombat.
    For a full list of Lua changes see the Lua reference thread and search for "0.16".
  • Fixed a bug in the initialization of the Movement multipliers patch if no custom multipliers were defined.
  • Fixed game year calculation on pre-made maps for mods.
  • The city & unit limit patch now uses a growable heap for the Go To dialog, this one was missed in the v0.6 release.
  • Fixed some bugs in civlua.lua.

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

Attachments

Top Bottom