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. Prof. Garfield

    Prof. Garfield Deity Supporter

    Joined:
    Mar 6, 2004
    Messages:
    3,225
    Location:
    Ontario
    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.
     
  2. AyCe

    AyCe Chieftain

    Joined:
    Mar 3, 2019
    Messages:
    48
    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.

    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.
     
  3. Prof. Garfield

    Prof. Garfield Deity Supporter

    Joined:
    Mar 6, 2004
    Messages:
    3,225
    Location:
    Ontario
    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.
     
  4. AyCe

    AyCe Chieftain

    Joined:
    Mar 3, 2019
    Messages:
    48
    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. :)
     
  5. Prof. Garfield

    Prof. Garfield Deity Supporter

    Joined:
    Mar 6, 2004
    Messages:
    3,225
    Location:
    Ontario
    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.
     
  6. Rui_TNV

    Rui_TNV Chieftain

    Joined:
    Aug 10, 2019
    Messages:
    38
    Gender:
    Male
    If you can have more unit types how can you create new ones?
     
  7. Dadais

    Dadais Warlord

    Joined:
    Oct 20, 2010
    Messages:
    232
    Location:
    France
    temp.png
    To see an exemple, you may look at the Napoleon scenario for ToTPP
     
  8. CurtSibling

    CurtSibling ENEMY ACE™ SLeague Staff Supporter

    Joined:
    Aug 31, 2001
    Messages:
    28,636
    Gender:
    Male
    Location:
    Innsmouth
    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
     
  9. CurtSibling

    CurtSibling ENEMY ACE™ SLeague Staff Supporter

    Joined:
    Aug 31, 2001
    Messages:
    28,636
    Gender:
    Male
    Location:
    Innsmouth
    And is the unit limit now 135? Or is that just a typo by @Thorvald of Lym ?
     
  10. Prof. Garfield

    Prof. Garfield Deity Supporter

    Joined:
    Mar 6, 2004
    Messages:
    3,225
    Location:
    Ontario
    @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.
     
  11. CurtSibling

    CurtSibling ENEMY ACE™ SLeague Staff Supporter

    Joined:
    Aug 31, 2001
    Messages:
    28,636
    Gender:
    Male
    Location:
    Innsmouth
    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...!
     
  12. Thorvald of Lym

    Thorvald of Lym A Little Sketchy

    Joined:
    Nov 21, 2005
    Messages:
    8,396
    Location:
    A Palace north of Oslo
    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.
     
  13. CurtSibling

    CurtSibling ENEMY ACE™ SLeague Staff Supporter

    Joined:
    Aug 31, 2001
    Messages:
    28,636
    Gender:
    Male
    Location:
    Innsmouth
    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!
     
  14. Thorvald of Lym

    Thorvald of Lym A Little Sketchy

    Joined:
    Nov 21, 2005
    Messages:
    8,396
    Location:
    A Palace north of Oslo
    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.
     
  15. CurtSibling

    CurtSibling ENEMY ACE™ SLeague Staff Supporter

    Joined:
    Aug 31, 2001
    Messages:
    28,636
    Gender:
    Male
    Location:
    Innsmouth
    I'm sticking with CIV2 with ToTPP, the Lua system is able to give scenario events and tweaks that blow my mind.
     
    PlutonianEmpire likes this.

Share This Page