Announcement

Collapse
No announcement yet.

Calling ToT Flag/Events experts! Could someone check my file?

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

  • Calling ToT Flag/Events experts! Could someone check my file?

    Sorry for the multiple ToT-related questions folks!
    I am learning Flags and masks on the hop, and have another mystery to crack!

    In my events structure:
    I have made various masks that check a load of flags associated with cities that are captured.

    But as of yet, not even a peep of these events has appeared, while other events are working OK...

    Obviously I am not doing the flags correct, though I followed SL's tutorials closely...

    Can anyone (of the ToT crew) look at my events and tell me if I am doing things wrong?

    Verily, I am stumped!

    PS
    The flags section is added at the start of events for checking the masks...

    Thanks for any advice!
    Attached Files
    http://sleague.apolyton.net/index.php?title=Home
    http://totalfear.blogspot.com/

  • #2
    Curt, could you please lay out which events are involved, what they're supposed to do and what, if anything, is actually happening? Thanks.
    Tecumseh's Village, Home of Fine Civilization Scenarios

    www.tecumseh.150m.com

    Comment


    • #3
      I just gave the file a quick scan and the flag events seemed to be structured OK. One thing I noticed, unrelated to flags, is that all of your JustOnce modifiers are placed at the end of each event. Here's a quote from macro.txt:

      The JustOnce statement should be included immediately after the @THEN statement.
      Whilst I've never detected any problems related to this, I follow this rule as a precaution.

      How are you testing the events, Curt? The flags must be initialised before they will work. If you are running delevent.exe on a .sav file and reloading then the flags will not be initialised until the following turn.
      Catfish's Cave - Resources for Civ2: Test of Time | Test of Time FAQ | War of the Ring scenario

      Comment


      • #4
        Hi there, chaps!

        @Tech:
        mostly all of the major events have flags that pertain to particular cities of interest to each civ.

        Also the major WW2 attacks need certain flags to be on for activation...

        I was really wondering if I had missed something.
        This is my first set of events with flags, so I was assuming it would be error-riddled...



        @Catfish:

        Good point, I think I might run through the events and follow that 'justonce' convention.
        If the guys who made the macro document say it is needed, I had better heed them...

        Yep - I have been using del-events and reloading.
        I had an inkling that the flag events are a one shot - But wasn't sure.
        I will restart the scenario and check again...

        I'll let you know my findings...

        PS
        Cheers for scanning the events, at least I know the flags are not screwed up...

        http://sleague.apolyton.net/index.php?title=Home
        http://totalfear.blogspot.com/

        Comment


        • #5
          I don't know if this has anything to do with the functioning of the flags, but why don't you have a @THEN in your first event (with noschism)? The second event misses both @THEN and @ENDIF.
          Civilization II: maps, guides, links, scenarios, patches and utilities (+ Civ2Tech and CivEngineer)

          Comment


          • #6
            Have you debugged the file?
            Tecumseh's Village, Home of Fine Civilization Scenarios

            www.tecumseh.150m.com

            Comment


            • #7
              @Merc:
              I must have deleted the bits of those files by error.
              There has been a ton of cutting and pasting going on!

              They are fixed now!

              @techumseh:
              Once too often!
              I had a massive events file made up, bit had to do extensive pruning of the thing to meet the bytes limit...

              http://sleague.apolyton.net/index.php?title=Home
              http://totalfear.blogspot.com/

              Comment


              • #8
                I'm confused. Are the events working or not?

                If you did debug the file, the errors Merc found would have come up first time.

                If there are events NOT working, then please be specific about which ones.
                Tecumseh's Village, Home of Fine Civilization Scenarios

                www.tecumseh.150m.com

                Comment


                • #9
                  The scenario opens properly and the events are working, even with the bits Merc stated were missing.

                  It was the flags that where not activating that spurred me to open this thread.

                  Event errors I can fix without too much trouble, it was the flags that I wanted checked...

                  I am still testing out the new version of events I made one hour ago.

                  http://sleague.apolyton.net/index.php?title=Home
                  http://totalfear.blogspot.com/

                  Comment


                  • #10
                    Gaaah! - Still having troubles!

                    I started a totally new scenario game and the flag event setup still refuses to work!

                    Here is one of the culprits...

                    Playing as Germany:
                    When you capture or lose London and Glasgow - it activates these flags...

                    @IF
                    CITYTAKEN
                    city=LONDON
                    attacker=Third Reich
                    defender=British Allies
                    @THEN
                    Flag
                    Who=Third Reich
                    State=on
                    Flag=0
                    Continuous
                    @ENDIF

                    @IF
                    CITYTAKEN
                    city=LONDON
                    attacker=British Allies
                    defender=Third Reich
                    @THEN
                    Flag
                    Who=Third Reich
                    State=off
                    Flag=0
                    Continuous
                    @ENDIF

                    @IF
                    CITYTAKEN
                    city=Glasgow
                    attacker=Third Reich
                    defender=British Allies
                    @THEN
                    Flag
                    Who=Third Reich
                    State=on
                    Flag=7
                    Continuous
                    @ENDIF

                    @IF
                    CITYTAKEN
                    city=Glasgow
                    attacker=British Allies
                    defender=Third Reich
                    @THEN
                    Flag
                    Who=Third Reich
                    State=off
                    Flag=7
                    Continuous
                    @ENDIF

                    It causes the downfall of the UK, and this event should launch:

                    @IF
                    Checkflag
                    Who=Third Reich
                    Mask=0b0000000000000000000000010000001
                    Count=2
                    State=on
                    @THEN
                    JUSTONCE
                    TEXT
                    ^
                    ^^ Total victory over England!
                    ^
                    ^^ Great Britain has been smashed, the once-proud British armed forces are
                    ^^ scattered and destroyed. The Führer can now order his forces to fortify
                    ^^ the UK as a massive bulwark against the Americans.
                    ^
                    ^^ "Der sieg wird unser sein!"
                    ^
                    ENDTEXT
                    PlayWaveFile
                    GERVICTOR.wav
                    @ENDIF

                    But nothing happens in-game!
                    I wonder what is going wrong here?

                    I am bamboozled!

                    Anyone got any pointers?

                    http://sleague.apolyton.net/index.php?title=Home
                    http://totalfear.blogspot.com/

                    Comment


                    • #11
                      Originally posted by curtsibling
                      Cheers for scanning the events, at least I know the flags are not screwed up...
                      I only checked the basic structure. You seemed to have a handle on that.

                      Originally posted by techumseh
                      If you did debug the file, the errors Merc found would have come up first time.
                      Not necessarily. If so he would probably have also received the "There was an error encountered in the 'events.txt' file. Please read the manual to find out how to debug this file." message.

                      Originally posted by curtsibling
                      @IF
                      Checkflag
                      Who=Third Reich
                      Mask=0b0000000000000000000000010000001
                      Count=2
                      State=on
                      @THEN
                      JUSTONCE
                      TEXT
                      ^
                      ^^ Total victory over England!
                      ^
                      ^^ Great Britain has been smashed, the once-proud British armed forces are
                      ^^ scattered and destroyed. The Führer can now order his forces to fortify
                      ^^ the UK as a massive bulwark against the Americans.
                      ^
                      ^^ "Der sieg wird unser sein!"
                      ^
                      ENDTEXT
                      PlayWaveFile
                      GERVICTOR.wav
                      @ENDIF
                      Count the number of zeros in that binary mask. You should have 32 (0-31) digits; you've got 31. Edit: Just testing. Actually, it shouldn't make a difference in this case as:
                      Mask=0b00000000000000000000000010000001
                      is the same as:
                      Mask=0b10000001

                      Remember, when you test, capture the cities in the second turn after reloading otherwise nothing will happen. The CheckFlag event won't occur until the turn after that.
                      Last edited by Catfish; November 11, 2004, 23:45.
                      Catfish's Cave - Resources for Civ2: Test of Time | Test of Time FAQ | War of the Ring scenario

                      Comment


                      • #12
                        Cheers, Catfish!

                        I am going to start afresh and test the event again.

                        I'll post in and tell how I fare.

                        http://sleague.apolyton.net/index.php?title=Home
                        http://totalfear.blogspot.com/

                        Comment


                        • #13
                          Aha!

                          I may have cracked it!
                          It seems the 'Continuous' command must come after the 'Flag' command - Or the event won't run!

                          So this means that:

                          @IF
                          CITYTAKEN
                          city=LONDON
                          attacker=Third Reich
                          defender=British Allies
                          @THEN
                          Flag
                          Who=Third Reich
                          State=on
                          Flag=0
                          Continuous
                          @ENDIF

                          Should actually read as:

                          @IF
                          CITYTAKEN
                          city=LONDON
                          attacker=Third Reich
                          defender=British Allies
                          @THEN
                          Flag
                          Continuous
                          Who=Third Reich
                          State=on
                          Flag=0
                          @ENDIF

                          Now the flag events seem to work OK!

                          I also fixed all the masks to have the correct amount of zeros, just to be sure...

                          Thanks, guys!
                          Any more troubles and I will post in again.
                          For now, things seem to be progressing!

                          http://sleague.apolyton.net/index.php?title=Home
                          http://totalfear.blogspot.com/

                          Comment


                          • #14
                            Originally posted by curtsibling
                            It seems the 'Continuous' command must come after the 'Flag' command - Or the event won't run!
                            That's the way I always do it, but it should work either way. Techumseh does it the other way in Market-Garden and it works.

                            Originally posted by curtsibling
                            Now the flag events seem to work OK!

                            I also fixed all the masks to have the correct amount of zeros, just to be sure...
                            Good to hear , but somehow I don't believe either of these was at fault. It's a conclusion you can draw when you change several factors at once.
                            Catfish's Cave - Resources for Civ2: Test of Time | Test of Time FAQ | War of the Ring scenario

                            Comment


                            • #15
                              It is sort of odd how the events just decided to work - Indeed ToT is a mysterious beast...

                              Might be something to do with the way the events are stored in a save - Or something...

                              When I get back from university, I woill check them again...

                              http://sleague.apolyton.net/index.php?title=Home
                              http://totalfear.blogspot.com/

                              Comment

                              Working...
                              X