Announcement

Collapse
No announcement yet.

SDC#3 entrants beware: ToT events bug

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • SDC#3 entrants beware: ToT events bug

    After several weeks of getting ToT flags to work in my scenario and failing I came to the conclusion that there is a logic bug in the events parser.

    When using a CHECKFLAG statement with the COUNT parameter the trigger returns a true condition when the count is equal to or greater than the COUNT. It is only supposed to return a true when the number of FLAGS in the MASK is equal to the COUNT.

    For example, if you have two statements where one is a CHECKFLAG, COUNT=1 and other is a CHECKFLAG, COUNT=2. If only one FLAG is ON then only the COUNT=1 trigger returns a true. However, if both FLAGS are ON then both statements return a true, not just the COUNT=2 statement. Which is, of course, the bug

    This hold true no matter how many flags you are testing. If ten FLAGS in the MASK are ON and you are checking for a COUNT of any number less then ten it will still return a true result.

  • #2
    Are you sure you are not using the threshold parameter?

    Comment


    • #3
      I think:
      Suppose the bug is really there, you can still do an exact number checking by using two sets of flags. The second set of flags will be the opposite events of the first ones. For example you have 10 flags for 'true' conditions, then 10 flags for 'false' conditions. When you need 4 conditions to be true, check 'N=4' in the true set then 'N=6' in the false set. only if both are satisfied it triggers the event.

      Comment


      • #4

        Ignore previous post! Sorry to have doubted you!

        I have just ran a testcase, setting 2 flags and seeing which checkflags fired and both do. This is a bummer of a bug...

        Typical, Xin beats me to the post...
        [This message has been edited by Miner (edited August 24, 2000).]

        Comment


        • #5
          Miner, don't let the settler thing in my profile fool you. Harris is my SDC#3 ID. I'm using it instead of my real handle to maintain my anonymity concerning the contest.

          Xin Yu, that is of course a valid work around. The problem with it is however, that it uses both conditions of the @IF leaving no room for another trigger such as UNITKILLED or CITYTAKEN, etc. in the event structure.

          In anticipation of your counter-point, Xin; yes, you could have flags set by using UNITKILLED and CITYTAKEN statements and then include those flags in the CHECKFLAG statement. The problem with that logic is that one flag would need to be dedicated to each condition. In other words, every time you wanted to use a UNITKILLED it would use up one of your flags. With only 32 flags per civ you would run out real fast.

          In anticipation of your counter-counter-point, using the flag sets of the barbarians and other civs that are not active in the scenario to extend the number of flags available sounds like a good idea, I'm glad you brought it up. I tried it and found, much to my chagrin, that the game ignores any CHECKFLAG statements that involve civilizations that are not active in the scenario.
          [This message has been edited by Harris (edited August 24, 2000).]

          Comment

          Working...
          X