Announcement

Collapse
No announcement yet.

Some questions about ToT events makro language

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

  • Some questions about ToT events makro language

    I hope you can help me. Lets start with this one... Is it possible to use the same kind of trigger at once with the @AND modifier?
    For example:

    @IF
    ReceivedTechnology
    receiver=CivA
    technology=1
    @AND
    ReceivedTechnology
    receiver=CivA
    technology= 2
    @THEN
    MakeAggression
    who=CivA
    whom=CivB
    @ENDIF

    And where do I have to place the continuous modifier?
    Last edited by Dr Kellogg; February 12, 2005, 20:39.

  • #2
    Re: Some questions about ToT events makro language

    Originally posted by Dr Kellogg
    I hope you can help me. Lets start with this one... Is it possible to use the same kind of trigger at once with the @AND modifier?
    For example:

    @IF
    ReceivedTechnology
    receiver=CivA
    technology=1
    @AND
    ReceivedTechnology
    receiver=CivA
    technology= 2
    @THEN
    MakeAggression
    who=CivA
    whom=CivB
    @ENDIF


    And where do I have to place the continuous modifier?
    You CAN combine two @IF's, BUT they must be different, eg. ReceivedTechnology and CityTaken


    The Continuous modifier is used only with CityDestroyed, CityTaken, RandomTurn, Turn and UnitKilled triggers, and the FLAG action. If you want one trigger to remain "true" until the other trigger is satisfied, then include it in the definition of that trigger.

    eg:

    @IF
    CityTaken
    city=Paris
    attacker=CivA
    defender=CivB
    continuous
    @AND
    ReceivedTechnology
    receiver=CivA
    technology= 2
    @THEN
    MakeAggression
    who=CivA
    whom=CivB
    @ENDIF
    Last edited by techumseh; February 13, 2005, 15:53.
    Tecumseh's Village, Home of Fine Civilization Scenarios

    www.tecumseh.150m.com

    Comment


    • #3
      Ah, thanks a lot!

      ...but this brings me to another question...
      Is it possible to take a tech right after this tech has been researched?

      @IF
      ReceivedTechnology
      receiver=CivA
      technology=1
      @THEN
      TakeTechnology
      whom=CivA
      technology=1
      @ENDIF

      I want to simulate troops located outside the map given order to enter the theater, so everytime tech 1 is researched unit1 is given to CivA. I know there are several ways to solve this, but this one would be the easiest.

      @IF
      ReceivedTechnology
      receiver=CivA
      technology=1
      @THEN
      Delay
      delay=
      CreateUnit
      owner=CivA
      unit=unit1
      veteran=
      homecity=
      locations
      x1,y1,z1
      endlocations
      @ENDIF

      @IF
      ReceivedTechnology
      receiver=CivA
      technology=1
      @THEN
      TakeTechnology
      whom=CivA
      technology=1
      @ENDIF

      Comment


      • #4
        Re: Re: Some questions about ToT events makro language

        Originally posted by techumseh
        The Continuous modifier is used only with CityDestroyed, CityTaken, RandomTurn, Turn and UnitKilled triggers, and the FLAG action. If you want one trigger to remain "true" until the other trigger is satisfied, then include it in the definition of that trigger.
        Do I really need the continuous modifier when using flags?

        Comment


        • #5
          I doubt that the one above will work, since the tech is taken away the same time it's given. If you use a seperate event with a one turn delay, it might work:

          @IF
          ReceivedTechnology
          receiver=CivA
          technology=1
          @THEN
          Delay
          delay=1
          TakeTechnology
          whom=CivA
          technology=1
          @ENDIF

          You'll have to experiment, much of this is new territory.

          Use the continuous modifier if you want the flag to stay on more than just the one turn. And don't forget the @INITFLAG at the start of the events text to initialize the flags.
          Tecumseh's Village, Home of Fine Civilization Scenarios

          www.tecumseh.150m.com

          Comment


          • #6
            Thanks again

            Mmh... Yes, this might work. I'll have to test it.

            Originally posted by techumseh
            Use the continuous modifier if you want the flag to stay on more than just the one turn. And don't forget the @INITFLAG at the start of the events text to initialize the flags.
            Ok, I wasn't sure about that...

            Comment


            • #7
              I tested it and it works perfectly! And you're right, it doesn't work without the delay.

              Comment


              • #8
                Glad to hear it. When do we get to know what you're working on?
                Tecumseh's Village, Home of Fine Civilization Scenarios

                www.tecumseh.150m.com

                Comment


                • #9
                  Well, I have started to work on a classical all-civs-playable WWI scenario long time ago. I think i have some interesting ideas particularly about economic warfare which I could finally realize with the ToT macro language.
                  However, I'm not sure about this one. As all 7 civs should be playable and as I don't want to make separate event files it could be quite difficult to make the AI work properly and it would probably result in a multiplayer-only scenario.


                  A while ago I downloaded an old scenario for vanilla civ called 'San Lorenzo'. It is the story of Ché Guevara bringing the Revolution onto the fictional island of San Lorenzo. I think one could make an interesting remake of this one with lots of stereotypes of brave peasants, cigar smoking rebels, and the dictator's stupid officers.
                  There would be many roleplay elements similar to those in Jagged Alliance 2. So you'd need to finish several quest before being strong enough to attack the capital where the dictator is hidden behind the palace walls.
                  There could be supporters of the revolution who tell you at which exact turn you have to attack a certain harbour, station or airport to capture the dictator's arms delivery. There could be a local warlord who is willing to support you if you find the prison where his wife and children are arrested and if you liberate them. And so on...

                  Well, at the moment it's just an idea I'm playing with because it wouldn't be easy to make this one fun and not just and ToT events showcase.

                  Comment


                  • #10
                    Let me know it you need any help on the WWI scenario, or if you go ahead on the Che one, it as well.
                    Tecumseh's Village, Home of Fine Civilization Scenarios

                    www.tecumseh.150m.com

                    Comment


                    • #11
                      *bump* I'm very busy at college at the moment.

                      Anyway I'm still working on that WWI scen. Unfortunately, there are still some basic questions to be answered before I can work any further...

                      However, I have still another ToT-related questions. Is there any way to give units with the missile flag individual sounds? I guess the answer will be 'no' but there is still hope...

                      Comment


                      • #12
                        AFAIK, there can only be one 'missile' sound. While ToT allows the assignment of specific sound to units generaly, there are limitations left over from FW/MGE. So missile, sub and air sounds have the same restrictions as in other Civ2 versions: one only for missile and subs, 2 types of sounds for air units depending if they're before or after the helicopter slot. Sorry.
                        Tecumseh's Village, Home of Fine Civilization Scenarios

                        www.tecumseh.150m.com

                        Comment


                        • #13
                          I'm still somewhat confused about this flag stuff. Could you tell me if the following example works?

                          I want the Russian civ to get supplies as long as flag 1 is set off (I assume all flags are set off automatically at the beginning):

                          @IF
                          CHECKFLAG
                          Who=Russian Empire
                          flag=1
                          state=off
                          @AND
                          TURNINTERVAL
                          interval=5
                          @THEN
                          CREATEUNIT
                          [...]
                          @ENDIF


                          Flag 1 is set on when the Ottoman Empire researches tech 93 (Dardanelles Blockade); flag 2 and flag 3 are then set on as well:

                          @IF
                          RECEIVEDTECHNOLOGY
                          technology=93
                          receiver=Ottoman Empire
                          @THEN
                          continuous
                          flag=1
                          Who=Russian Empire
                          state=on
                          @ENDIF

                          @IF
                          RECEIVEDTECHNOLOGY
                          technology=93
                          receiver=Ottoman Empire
                          @THEN
                          continuous
                          flag=2
                          Who=Russian Empire
                          state=on
                          @ENDIF

                          @IF
                          RECEIVEDTECHNOLOGY
                          technology=93
                          receiver=Ottoman Empire
                          @THEN
                          continuous
                          flag=3
                          Who=Russian Empire
                          state=on
                          @ENDIF


                          Flag 2 / flag 3 is set off when Istanbul / Gallipoli is conquered:

                          @IF
                          CITYTAKEN
                          city=Istanbul
                          attacker=ANYBODY
                          defender=Ottoman Empire
                          @THEN
                          continuous
                          flag=2
                          Who=Russian Empire
                          state=off
                          @ENDIF

                          @IF
                          CITYTAKEN
                          city=Gallipoli
                          attacker=ANYBODY
                          defender=Ottoman Empire
                          @THEN
                          continuous
                          flag=3
                          Who=Russian Empire
                          state=off
                          @ENDIF


                          To enable the supplies for Russia I want the Entente Civs to conquer both Gallipoli and Istanbul:

                          @IF
                          CHECKFLAG
                          Who=Russian Empire
                          flag=3
                          state=off
                          @AND
                          CITYTAKEN
                          city=Istanbul
                          attacker=ANYBODY
                          defender=Ottoman Empire
                          @THEN
                          continuous
                          flag=1
                          Who=Russian Empire
                          state=off
                          JUSTONCE
                          @ENDIF

                          @IF
                          CHECKFLAG
                          Who=Russian Empire
                          flag=2
                          state=off
                          @AND
                          CITYTAKEN
                          city=Gallipoli
                          attacker=ANYBODY
                          defender=Ottoman Empire
                          @THEN
                          continuous
                          flag=1
                          Who=Russian Empire
                          state=off
                          JUSTONCE
                          @ENDIF

                          Comment


                          • #14
                            First, you must set the flags at start. Make sure your events file has these 3 things at the beginning:

                            @BEGINEVENTS
                            ;@DEBUG
                            @INITFLAG

                            Remove the semi-colon before @DEBUG when you want to run the events parser, it will then generate a REPORT txt. file that you can check for event errors (NOT flag errors - these will not show up in the debug report!)

                            The @INITFLAG sets all the flags to 0, or off.

                            One problem is that RECEIVEDTECHNOLOGY is a continuous trigger - it will change the flag status each turn.

                            What you want to do as I understand it, is to have supplies reach Russia while Turkey is neutral, cut them off when Turkey enters the war, and restore them if the Allies capture Galipolli and Istanbul. Correct?

                            It would be simpler if you divided them into 2 separate events- one set to give the supplies until Turkey enters the war, and the second to give the supplies if the 2 cities are captured.

                            Start by turning the first supply flag ON:

                            @IF
                            TURN
                            Turn=0
                            @THEN
                            JUSTONCE
                            FLAG
                            continuous
                            flag=0
                            Who=Russian Empire
                            state=on
                            @ENDIF

                            Then, if the Dardanelles Blockade tech is received, the flag is turned off:

                            @IF
                            RECEIVEDTECHNOLOGY
                            technology=93
                            receiver=Ottoman Empire
                            @THEN
                            continuous
                            flag=0
                            Who=Russian Empire
                            state=off
                            @ENDIF

                            While the flag is ON, the Russians receive supplies:

                            @IF
                            Checkflag
                            Who=Russian Empire
                            Mask=0b00000000000000000000000000000001
                            Threshold=1
                            State=On
                            @AND
                            RANDOMTURN
                            denominator=4
                            @THEN
                            CREATEUNIT
                            unit=Supply Unit
                            owner=Russian Empire
                            veteran=no
                            Count=2
                            homecity=none
                            Randomize
                            locations
                            26,16
                            26,20
                            25,19
                            23,21
                            endlocations
                            @ENDIF

                            Now we create a separate set of events if the straits are reopened by force.

                            If you want two cities captured to trigger the end of the blockade, you're going to have to use a mask. This is not as hard as it sounds.

                            First, use these events to turn on flags 1 and 2 when Istanbul and/or Galipolli are captured:

                            @IF
                            CITYTAKEN
                            city=Istanbul
                            attacker=ANYBODY
                            defender=Ottoman Empire
                            @THEN
                            continuous
                            flag=1
                            Who=Russian Empire
                            state=on
                            @ENDIF

                            @IF
                            CITYTAKEN
                            city=Gallipoli
                            attacker=ANYBODY
                            defender=Ottoman Empire
                            @THEN
                            continuous
                            flag=2
                            Who=Russian Empire
                            state=on
                            @ENDIF

                            Then, when both flags are ON, this mask will trigger the reinforcements:


                            @IF
                            Checkflag
                            Who=Russian Empire
                            Mask=0b00000000000000000000000000000110
                            Threshold=2
                            State=Off
                            @AND
                            RANDOMTURN
                            denominator=3
                            @THEN
                            CREATEUNIT
                            unit=Supply Unit
                            owner=Russian Empire
                            veteran=no
                            Count=2
                            homecity=none
                            Randomize
                            locations
                            31,11
                            31,13
                            33,13
                            33,9
                            37,11
                            41,11
                            38,10
                            39,9
                            42,8
                            endlocations
                            @ENDIF

                            There you have it. While its technically possible that all three flags could be on at the same time, resulting in 2 sets of supply units being delivered, it's very unlikely. If necessary this problem could be soved by adding a GIVETECHNOLOGY event to the last event, so if both cities are captured, Turkey also gets tech 93, cancelling the first set of supplies.

                            I hope this helps.
                            Tecumseh's Village, Home of Fine Civilization Scenarios

                            www.tecumseh.150m.com

                            Comment


                            • #15
                              Re: Re: Some questions about ToT events makro language

                              Originally posted by techumseh
                              You CAN combine two @IF's, BUT they must be different, eg. ReceivedTechnology and CityTaken
                              I seem to be a bit late on this one, but I'm quite sure that this is not true. You CAN use two of the same. The Midgard events do it, for one, and seeing as how @AND'ed events are stored as two events structures in the savegame, it's at least technically possible too.
                              Civilization II: maps, guides, links, scenarios, patches and utilities (+ Civ2Tech and CivEngineer)

                              Comment

                              Working...
                              X