Announcement

Collapse
No announcement yet.

Hey Units... Get a Move On!

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

  • Hey Units... Get a Move On!

    Hey everybody,

    Couple of questions regarding MOVEUNIT commands. I have been looking at Nemo's RF events trying to get a feel for them, but there are a few things I dont quite get. These references are from 'Events1' of RF.

    @IF
    RECEIVEDTECHNOLOGY
    technology=60
    receiver=Germans
    @THEN
    MOVEUNIT
    unit=AnyUnit
    owner=Germans
    maprect
    32,126,36,126,36,148,32,148
    moveto
    41,133
    numbertomove=ALL
    @ENDIF
    How exactly are those mapprecets working? Is Nemo refering to:
    32,126
    36,126
    36,148
    etc?

    Also, 'numbertomove'... Does that merely pick the top X number of units in a stack at those points? And I would surmise this is affected by the AnyUnit part to... so can you for instance have all kinds of units in a stack, and tell 5 tanks to go here, 5 different tanks to go there etc...? Even all tanks of this type go here and there?

    And the recieved technology trigger, can that be used with one tech that was given at the start of the scenario and is still obviously held throughout the game, or must a civ be given such a tech each turn in order to trigger the events? Can they be given the same tech everyturn by avoiding the JUSTONCE command?

    And this here is very interesting:

    @IF
    UNITKILLED
    unit=Red Army
    attacker=Germans
    defender=Soviets
    @THEN
    CREATEUNIT
    unit=Wehrmacht SG
    owner=Germans
    veteran=yes
    homecity=None
    locations
    47,53
    42,48
    38,50
    43,53
    34,50
    33,61
    30,68
    endlocations
    MOVEUNIT
    unit=AnyUnit
    owner=Germans
    maprect
    33,47,39,47,39,51,33,51
    moveto
    42,48
    numbertomove=ALL
    @ENDIF
    Notice that none of the places that the Wermacht SG is created are contained within the MOVEUNIT command. Why would this be added to this specific event?

    Thanks for any help,

    -FMK.

  • #2
    Re: Hey Units... Get a Move On!

    Originally posted by Field Marshal Klesh
    Hey everybody,

    Couple of questions regarding MOVEUNIT commands. I have been looking at Nemo's RF events trying to get a feel for them, but there are a few things I dont quite get. These references are from 'Events1' of RF.

    How exactly are those mapprecets working? Is Nemo refering to:
    32,126
    36,126
    36,148
    etc?
    Yes, but you write them all in one line, as outlined in the manual. The coordinates are as follows:

    #1 - #2

    #4 - #3

    Also, 'numbertomove'... Does that merely pick the top X number of units in a stack at those points? And I would surmise this is affected by the AnyUnit part to... so can you for instance have all kinds of units in a stack, and tell 5 tanks to go here, 5 different tanks to go there etc...? Even all tanks of this type go here and there?
    The AI selects units to move one at a time, regardles of whether there's a moveunit command or not. So the first 5 units the AI would have selected which are located in the event-defined rectangle are the ones the moveunit command affects. Anyunit means just that. Otherwise they must be identified by their specific name (eg. "T-34 Tank"). Using categories of units (eg. all tanks) is an invalid command.

    And the recieved technology trigger, can that be used with one tech that was given at the start of the scenario and is still obviously held throughout the game, or must a civ be given such a tech each turn in order to trigger the events? Can they be given the same tech everyturn by avoiding the JUSTONCE command?
    Using ReceivedTechnology as a trigger is a way of making the event repeat every turn (unless JUSTONCE is used in the action portion) from the point the technology is received.


    Notice that none of the places that the Wermacht SG is created are contained within the MOVEUNIT command. Why would this be added to this specific event?
    I'm just guessing, but it looks like he is creating an advance unit, then moving others into it's general vicinity. Perhaps it's a means of creating the rapid German advance. I hope this helps. There is also a tip on this by Nemo on 'Cradle of Civilization'.
    Tecumseh's Village, Home of Fine Civilization Scenarios

    www.tecumseh.150m.com

    Comment


    • #3
      When a maprect is defined, it effects any squares inside four coordinates given in the order of upperleft, upperright, lowerright and lowerleft corners.

      I'm not sure about this, but I think that numbertomove is actually type to move. ALL means all types of units. You can give a unit name like 'Red Guard' as well.

      receivedtechnology flag is checked every turn. It is more flexible then turn number=everyturn flag since you can start from a certain point into the game.

      Wermacht not in maprect: Nemo just combined two orders, create a unit and move, into one. He can of course separate them to enhance readability, but events.txt has a length limit so he might not want to waste space.

      Comment


      • #4
        Description
        see macro.txt This file can be found on your original Civ2 CD

        Following description for ToT
        ----------------------------------------------------------------------------------------------
        CreateUnit owner= civilization name
        unit= name of a type of unit
        [Count=] number from 1 to 255
        veteran= [Yes], [No], [False], or [True]
        homecity= city name or [None]
        [InCapital]
        locations
        x1,y1,z1
        ...
        x10,y10,z10
        endlocations
        ----------------------------------------------------------------------------------------------
        CreateUnit:

        Creates from 1 to 255 new units (at no expense) with specified characteristics and places them at the first of the specified locations. If that placement is invalid for any reason, the program tries the subsequent locations (there can be up to 10), in order, until one works or it reaches the EndLocations parameter. The x and y in these locations represent horizontal and vertical coordinates on the scenario map. The z is an optional coordinate specifying on which map the units should be created; if no z is entered, this defaults to map 0. The optional parameter InCapital forces the unit to be created in the capital city of the specified civilization. Even though this causes the locations to be ignored, you still must include the required Locations and EndLocations parameters and at least one location. Finally, you can use the optional Randomize modifier to have the location chosen at random from the list.


        ----------------------------------------------------------------------------------------------
        MoveUnit unit= name of a type of unit
        owner= civilization name
        [Map=] number of a map
        maprect x1,y1,x2,y2,x3,y3,x4,y4
        moveto x,y
        numbertomove= number or [All]
        ----------------------------------------------------------------------------------------------

        MoveUnit:

        This scans a specified rectangular region of the map (maprect), then orders a specified number of the owner's units of the given type in that region to move to a certain location. The program only activates units that are (1) not fortified, (2) not on sentry duty, (3) not already headed for a destination, (4) not building fortifications, and (5) not nuclear weapons. MoveUnit does not affect units owned by human players. MOVEUNIT must not be used in the same event as the DelayPerFlag modifier.

        The optional Map parameter allows you to specify which of the possible maps (the number available depends on how many are included in the particular scenario) the maprect and moveto locations refer to. Each action of this type affects only one map; the default is map 0.

        The maprect coordinates define the corners of the rectangular region. They must (1) be on the line immediately following the word maprect, (2) be separated by commas, and (3) be listed in the following specific order to be valid. (They also must be valid map coordinates.) The first coordinate must be the upper left corner; next comes the upper right, then lower right, and finally lower left. Thus:

        1--2
        4--3




        link for FW macro.txt



        link for ToT macro.txt

        Comment


        • #5
          Events
          Order of Execution
          -------------------
          from macro.txt

          This particular issue will rarely, if ever, be of concern in any but the most exactingly precise and complex scenarios. However, for those of you who need to know, here is the order in which the possible actions take place in any single event.

          1) PlayWaveFile
          2) PlayAVIFile
          3) PlayCDTrack
          4) CreateUnit
          5) MoveUnit
          6) Transportable
          7) ChangeTerrain
          8) MakeAggression
          9) ChangeMoney
          10) DestroyACivilization
          11) GiveTechnology
          12) TakeTechnology
          13) EnableTechnology
          14) Text
          15) ModifyReputation
          16) BestowImprovement
          17) EndGameOverride
          18) EndGame
          19) Flag
          20) Negotiator

          Comment


          • #6
            Re: Hey Units... Get a Move On!

            Originally posted by Field Marshal Klesh

            And this here is very interesting:

            Notice that none of the places that the Wermacht SG is created are contained within the MOVEUNIT command. Why would this be added to this specific event?
            Xin Yu is absolutely right, you can put several triggers into one event (it does not play a role if they are related to eachother or not) and save events space in that way. If you want to create different triggers, e.g. CreateUnit, GiveMoney, CityTaken, ChangeTerrain etc, etc simply write them into one event, like Nemo did, it cost not as much space as a new event for every trigger...

            Of course in ToT that is not a problem, but I think you´re under FW/MGE...
            Blah

            Comment


            • #7
              Wow, some excellent responses here!

              Thanks everybody!

              Anyunit means just that. Otherwise they must be identified by their specific name (eg. "T-34 Tank"). Using categories of units (eg. all tanks) is an invalid command.
              Yes, this is what I thought. And yes, 'all tanks' isnt a valid command.

              but I think you´re under FW/MGE...
              Yes, I am.

              Using ReceivedTechnology as a trigger is a way of making the event repeat every turn (unless JUSTONCE is used in the action portion) from the point the technology is received.
              Cool, so one can use a tech that a Civ has from the start of the game?


              Now, I still am not understanding the mapprecert thing.
              With every other location entry there are 2 numbers per square. Example being (15,37). However, this mapprecet thing uses 4 sets of numbers per square, and I understand that these represent the edges of the square in question.

              1 --2
              4 --3

              But how does one find these numbers? I mean, how does one look at the surrounding squares and attain the value for it seeing as the surrounding squares have 2 values for them (X,Y)? Here is a quick mock up that may help you all to convey this to me. I learn visually fairly well...

              What I have done is to have a square in question, given it an imaginary map coordinate (15,37), coloured the edges that would need to be identified in order to have the event work, and numbered them in the order they should be entered in the events. If you guys could tell me what the 4 coordinates that I would use in this situation, I might be able to rationalize it and understand better. Know what I mean?

              Anyway, you guys have helped alot here, and thank you very much for that. I am almost there...


              -FMK.
              Attached Files

              Comment


              • #8
                Your coordinates are 14,36,16,36,16,38,14,38 or if you meant to move units from only one square then 15,37,15,37,15,37,15,37

                It is more simple than you think. The coordinates of selected square are showed in window on the right side alongside with terraintype etc info. You can select rectangle with any size, for example in TSFE I use very big rectangles for simulating German mobilization for Barbarossa. The destination point can be inside or outside of the rectangle.

                The best if you read Nemo's good artickle about the subject but hold in mind that the artickle is written about moveunit command in FW. Several limitations and rules what Nemo describes there don't apply to MGE and ToT.

                Comment


                • #9
                  Re: Wow, some excellent responses here!

                  Originally posted by Field Marshal Klesh

                  Cool, so one can use a tech that a Civ has from the start of the game?
                  As far as I know, the tech must be received during the game to act as a trigger. This could be with the ScenarioLoaded trigger; therefore from the start of the game. A simple experiment would determine if a tech already owned at the start would also work.
                  Tecumseh's Village, Home of Fine Civilization Scenarios

                  www.tecumseh.150m.com

                  Comment


                  • #10
                    FMK finally gets it!!!

                    Ahhh now this clears it up very nicely fellas!

                    What I didnt understand was the way that you were to encircle the square in question. I wont bother to post about my confusion, but I am understaing this perfectly now.

                    And yes, I will just have to experiment with the tech thingy Techumseh.


                    -FMK.

                    Comment


                    • #11
                      Yiikes... just the thread I was looking for. Today I lost my MGE macro book. Is there anyone to post me MGE macro list?
                      "Io non volgo le spalle dinnanzi al nemico!!!" - il Conte di San Sebastiano al messo del comandante in capo, battaglia dell'Assietta
                      "E' più facile far passare un cammello per la cruna di un ago che un pensiero nel cervello di Bush!!!" - Zelig
                      "Live fire, and not cold steel, now resolve battles" - Marshall de Puysegur

                      Comment

                      Working...
                      X