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. Catfish

    Catfish Emperor

    Joined:
    Nov 2, 2003
    Messages:
    1,373
    Location:
    Wollongong, Australia
    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.
     
    PlutonianEmpire likes this.
  2. PlutonianEmpire

    PlutonianEmpire Socially Awkward Goofball

    Joined:
    Mar 11, 2004
    Messages:
    4,786
    Gender:
    Male
    Location:
    MinneSNOWta
    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: Jan 1, 2018
  3. Patine

    Patine Deity

    Joined:
    Feb 14, 2011
    Messages:
    8,265
    @TheNamelessOne returns from the Mysterious Void! This is truly good news!
     
  4. TheNamelessOne

    TheNamelessOne Warlord

    Joined:
    Dec 18, 2013
    Messages:
    196
    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.

    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'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've replied in the thread you mentioned, please take a look.
     
    PlutonianEmpire likes this.
  5. Cassius Critzer

    Cassius Critzer King

    Joined:
    Dec 27, 2017
    Messages:
    918
    Gender:
    Male
    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: Jan 2, 2018
  6. Civinator

    Civinator Blue Lion Supporter

    Joined:
    May 5, 2005
    Messages:
    6,731
    Gender:
    Male
    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.
     
  7. Catfish

    Catfish Emperor

    Joined:
    Nov 2, 2003
    Messages:
    1,373
    Location:
    Wollongong, Australia
    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.
     
  8. Cassius Critzer

    Cassius Critzer King

    Joined:
    Dec 27, 2017
    Messages:
    918
    Gender:
    Male
    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.
     
  9. tootall_2012

    tootall_2012 King

    Joined:
    Feb 11, 2012
    Messages:
    610
    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?
     
  10. PlutonianEmpire

    PlutonianEmpire Socially Awkward Goofball

    Joined:
    Mar 11, 2004
    Messages:
    4,786
    Gender:
    Male
    Location:
    MinneSNOWta
    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.
    
     
  11. techumseh

    techumseh Emperor

    Joined:
    Mar 12, 2002
    Messages:
    1,737
    Location:
    in the frozen north
    I'm really pleased that you're back, TNO, and much appreciate what you've done for this game. Cheers.
     
  12. TheNamelessOne

    TheNamelessOne Warlord

    Joined:
    Dec 18, 2013
    Messages:
    196
    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 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.

    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'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.

    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? ;)

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

    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'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.
     
    PlutonianEmpire likes this.
  13. Civinator

    Civinator Blue Lion Supporter

    Joined:
    May 5, 2005
    Messages:
    6,731
    Gender:
    Male
    One more time thank you very much for your reply. :coffee:

    This tool sounds interesting. :cool:
     
  14. Thorvald of Lym

    Thorvald of Lym A Little Sketchy

    Joined:
    Nov 21, 2005
    Messages:
    8,370
    Location:
    A Palace north of Oslo
     
    PlutonianEmpire likes this.
  15. ryanmusante

    ryanmusante Regular Supporter

    Joined:
    Jan 4, 2018
    Messages:
    1,088
    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!
     
  16. tootall_2012

    tootall_2012 King

    Joined:
    Feb 11, 2012
    Messages:
    610
    Hi TNO,

    Thank you for you replies. Here is my feedback:

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

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

    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.

    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?
     

    Attached Files:

    Last edited: Jan 7, 2018
  17. Cassius Critzer

    Cassius Critzer King

    Joined:
    Dec 27, 2017
    Messages:
    918
    Gender:
    Male
    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: Jan 7, 2018
  18. CurtSibling

    CurtSibling ENEMY ACE™ SLeague Staff Supporter

    Joined:
    Aug 31, 2001
    Messages:
    28,556
    Gender:
    Male
    Location:
    Innsmouth
    Welcome back, TNO!
    Can I formally ask posters here, not to crowd the ToTPP patch author and not overload him with requests/questions?

    Thanks.:)
     
    PlutonianEmpire likes this.
  19. McMonkey

    McMonkey ----Evertonian---- SLeague Staff

    Joined:
    May 9, 2005
    Messages:
    2,794
    Location:
    Cardiff
    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.
     
  20. CurtSibling

    CurtSibling ENEMY ACE™ SLeague Staff Supporter

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

Share This Page