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

An appeal to TheNamelessOne

Discussion in 'Civ2 - General Discussions' started by techumseh, Feb 8, 2020.

  1. techumseh

    techumseh Emperor

    Joined:
    Mar 12, 2002
    Messages:
    1,398
    Location:
    in the frozen north
    Appeal to to the TheNamelessOne :

    The Patch Project has been a godsend for ToT scenarios. But it has one serious bug. It renders the "continuous" modifier of the Macro events inactive. While I know that you would like to encourage scenarios designers to utilize LUA as a preferred alternative, many scenarios were made before this. If they have events that use the modifier "continuous", they can't be played on a Civ exe. that has been patched. Please fix this bug. Thank you.
     
    CurtSibling likes this.
  2. CurtSibling

    CurtSibling ENEMY ACE™ SLeague Staff Supporter

    Joined:
    Aug 31, 2001
    Messages:
    28,883
    Gender:
    Male
    Location:
    Innsmouth
    With great respect to TNO, I second this request.
     
    techumseh likes this.
  3. Prof. Garfield

    Prof. Garfield Deity Supporter

    Joined:
    Mar 6, 2004
    Messages:
    2,493
    Location:
    Ontario
    I agree that this is important to address when @TheNamelessOne decides to re-visit Civ II.
     
  4. techumseh

    techumseh Emperor

    Joined:
    Mar 12, 2002
    Messages:
    1,398
    Location:
    in the frozen north
    Thank you.
     
  5. JPetroski

    JPetroski Deity

    Joined:
    Jan 24, 2011
    Messages:
    2,133
    Yes, please fix this on your return. There is a large library of scenarios that face this issue, @TheNamelessOne
     
  6. Catfish

    Catfish Emperor

    Joined:
    Nov 2, 2003
    Messages:
    1,399
    Location:
    Wollongong, Australia
    Just dropping by the forum and this thread caught my eye. So I tested it using ToTPP v0.15.1 and v0.13.2 (pre-Lua), Windows 7 64-bit for a couple of simple Flag/CheckFlag->Text events in a couple of scenarios, as well as for a few more sophisticated events in my WotR scenario. The Continuous modifier worked correctly in every test, although, unlike unpatched ToT, it appears (on trying to break it) that the ToTPP strictly applies the 'modifier must never be the last parameter of a trigger or action' syntax rule from Macro.txt. Ignore the rule and the game ignores the modifier. Apart from that I don't know what may be causing it to fail on other people's systems. Perhaps it's a Windows 10 thing.
     
    JPetroski and Prof. Garfield like this.
  7. Prof. Garfield

    Prof. Garfield Deity Supporter

    Joined:
    Mar 6, 2004
    Messages:
    2,493
    Location:
    Ontario
    That's interesting, and would explain why I didn't come across the issue when doing tests for my legacy event converter. It's not a Windows 10 thing, since @techumseh said in this thread that he plays Test of Time on an old Windows XP machine.

    It also means that a Lua script can be written to detect (and even automatically fix, though I might have to learn something new) this problem.
     
  8. Catfish

    Catfish Emperor

    Joined:
    Nov 2, 2003
    Messages:
    1,399
    Location:
    Wollongong, Australia
    I need to correct this: 'unlike unpatched ToT'. I'd assumed this was the case for reasons I can't remember. So I just tested that, too. Not true. The rule also applies to vanilla ToT.

    Looking at the Sea Lion scenario mentioned in the link, there are 16 Flag events in the scenario where the Continuous modifier is in the wrong location. Unfortunately, these are doomed to fail. They are at lines 5439, 5455, 5470, 5485, 11297, 13922, 13935, 13949, 13962, 13975, 13988, 14001, 14014, 14027, 14040 and 14052. You can see that the game has failed to find the Continuous modifier in the debugging Report.txt. Note that @DEBUG was already enabled in this scenario. The events at lines 11250 and 11262 each have two instances of the Continuous modifier, however, they both should work, as one is in the right place. I place the Continuous modifier on the line immediately following Flag (the action). Avoid placing it on the last line of the action statement.
     
    Prof. Garfield likes this.
  9. techumseh

    techumseh Emperor

    Joined:
    Mar 12, 2002
    Messages:
    1,398
    Location:
    in the frozen north
    Thanks for looking into this, Catfish. The Sea Lion events were done before I realized that the continuous events weren't working properly. I dug into this more thoroughly when I redid the Burma events. I totally eliminated the 'continuous' events, and used give and take technology events as a form of repeating trigger. Then I added back a couple of events using the 'continuous' modifier, triggering a text message. Going back and re-reading the manual, I had noted the rule you quoted, and made sure the syntax was correct, as follows:

    @IF
    Turn
    turn=2
    @THEN
    Flag
    Continuous
    who=Japanese
    state=on
    flag=11
    @ENDIF

    I found that the text message reappeared a varying number of times, in the range of 1-5 or so, and usually 2 or 3, and then stopped. As John says, I have
    Windows XP on my computer, but also Win7 on my laptop. I get the same results with both.
     
  10. Prof. Garfield

    Prof. Garfield Deity Supporter

    Joined:
    Mar 6, 2004
    Messages:
    2,493
    Location:
    Ontario
    I did a small test using TOTPP15 (I use Linux and WINE, if we end up finding that it matters). After four tries, the continuous flag lasted at least 20 turns, and I tried saving and loading twice, to no effect.

    Can you please post an events file (and accompanying scenario, if appropriate) where this happens?

    Here are a couple questions to try to narrow down this bug:

    1. Are there flag events that are not continuous, but also set the flag in question? (I think, then, that it would be 'normal' behaviour.)

    2. Has this been observed in scenarios that don't take advantage of TOTPP features, but still running in TOTPP? Maybe some data was accidentally copied to that part of the saved game or something, if it is only observed with some TOTPP feature.
     
  11. techumseh

    techumseh Emperor

    Joined:
    Mar 12, 2002
    Messages:
    1,398
    Location:
    in the frozen north
    I tried a quick experiment. I added this to the Burma events files (all 5):

    ;Continuous Modifier Test

    @IF
    ScenarioLoaded
    @THEN
    FLAG
    Continuous
    Who=Japanese
    state=on
    flag=20
    @ENDIF

    @IF
    Checkflag
    Who=Japanese
    Flag=20
    State=on
    @THEN
    TEXT
    Flag 20 is on.
    ENDTEXT
    @ENDIF

    First I moved the 'continuous' from the end of the event to the front, right after @THEN. It didn't trigger at all after the first turn. Then I moved it to just behind FLAG. Then it worked for the first 7 turns and then stopped. If you guys are getting better results, then perhaps is has something to do with my setup, or how my setup interacts with ToTPP, since I haven't experienced these issues prior to installing it. Or at the very least, I didn't notice.
     
    Prof. Garfield likes this.
  12. Catfish

    Catfish Emperor

    Joined:
    Nov 2, 2003
    Messages:
    1,399
    Location:
    Wollongong, Australia
    If it's a ToTPP bug, one area of suspicion would be the EventHeapSize parameter under @COSMIC2, especially with very high heap values and/or dynamic event allocation enabled. At least if that were the case, older scenarios would be unaffected. My tests certainly didn't push that area. Can't test now.

    Oh, and one other thing I noticed when shooting through the Sea Lion events file is that you were using the Continuous modifier when turning flags off. It's not required. Off is the default position. Once a flag has been turned off, it stays off permanently unless otherwise instructed. A flag in ToT is like a switch that you have to keep holding down (continuously) to keep an appliance on.
     
  13. Prof. Garfield

    Prof. Garfield Deity Supporter

    Joined:
    Mar 6, 2004
    Messages:
    2,493
    Location:
    Ontario
    I did get the same effect as @techumseh for the Burma scenario a few days ago, but haven't had time to examine stuff since then.
     
  14. techumseh

    techumseh Emperor

    Joined:
    Mar 12, 2002
    Messages:
    1,398
    Location:
    in the frozen north
    Catfish, I have also suspected the heap size may be the issue, as the two scenarios where this is a problem (Sea Lion and Burma Campaign) both have events files in excess of 200K. During my remake of Burma, I did try it both with and without the dynamic event allocation, and got the same outcomes.
     

Share This Page