Thread Tools
Old February 27, 2002, 20:18   #1
klesh
King
 
klesh's Avatar
 
Local Time: 17:07
Local Date: October 31, 2010
Join Date: Jan 2000
Location: Massachusetts, USA
Posts: 2,048
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.

Quote:
@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:

Quote:
@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.
__________________
It's a wonder that you still know how to breathe.
klesh is offline  
Old February 27, 2002, 21:24   #2
techumseh
Civilization II PBEMScenario League / Civ2-Creation
Emperor
 
techumseh's Avatar
 
Local Time: 15:07
Local Date: October 31, 2010
Join Date: Apr 1999
Location: of the frozen North.
Posts: 4,197
Re: Hey Units... Get a Move On!
Quote:
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

Quote:
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.

Quote:
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.


Quote:
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'.
techumseh is offline  
Old February 27, 2002, 21:27   #3
Xin Yu
Apolytoners Hall of Fame
King
 
Xin Yu's Avatar
 
Local Time: 13:07
Local Date: October 31, 2010
Join Date: Dec 1969
Location: Emeryville, CA, USA
Posts: 1,658
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.
Xin Yu is offline  
Old February 28, 2002, 04:26   #4
Thoddy
Warlord
 
Local Time: 22:07
Local Date: October 31, 2010
Join Date: Jan 2001
Location: Hannover, Germany
Posts: 227
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
http://www.civ2-forum.gamigo.de/atta...p?postid=30485


link for ToT macro.txt
http://www.civ2-forum.gamigo.de/atta...p?postid=30486
Thoddy is offline  
Old February 28, 2002, 04:30   #5
Thoddy
Warlord
 
Local Time: 22:07
Local Date: October 31, 2010
Join Date: Jan 2001
Location: Hannover, Germany
Posts: 227
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
Thoddy is offline  
Old February 28, 2002, 08:59   #6
BeBro
Emperor
 
BeBro's Avatar
 
Local Time: 23:07
Local Date: October 31, 2010
Join Date: Mar 2000
Posts: 8,278
Re: Hey Units... Get a Move On!
Quote:
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...
__________________
Banana
BeBro is offline  
Old February 28, 2002, 11:31   #7
klesh
King
 
klesh's Avatar
 
Local Time: 17:07
Local Date: October 31, 2010
Join Date: Jan 2000
Location: Massachusetts, USA
Posts: 2,048
Wow, some excellent responses here!
Thanks everybody!

Quote:
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.

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

Quote:
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 Thumbnails:
Click image for larger version

Name:	numbers.gif
Views:	87
Size:	37.3 KB
ID:	10658  
__________________
It's a wonder that you still know how to breathe.
klesh is offline  
Old February 28, 2002, 13:33   #8
Marko
Prince
 
Local Time: 21:07
Local Date: October 31, 2010
Join Date: Sep 1999
Location: Tartu, Estonia
Posts: 393
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.
Marko is offline  
Old February 28, 2002, 14:01   #9
techumseh
Civilization II PBEMScenario League / Civ2-Creation
Emperor
 
techumseh's Avatar
 
Local Time: 15:07
Local Date: October 31, 2010
Join Date: Apr 1999
Location: of the frozen North.
Posts: 4,197
Re: Wow, some excellent responses here!
Quote:
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.
techumseh is offline  
Old February 28, 2002, 15:40   #10
klesh
King
 
klesh's Avatar
 
Local Time: 17:07
Local Date: October 31, 2010
Join Date: Jan 2000
Location: Massachusetts, USA
Posts: 2,048
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.
__________________
It's a wonder that you still know how to breathe.
klesh is offline  
Old February 28, 2002, 17:29   #11
Prometeus
Spanish Civers
King
 
Prometeus's Avatar
 
Local Time: 22:07
Local Date: October 31, 2010
Join Date: Jun 2000
Location: of Old Europe - "In America we don't trust"
Posts: 2,470
Yiikes... just the thread I was looking for. Today I lost my MGE macro book. Is there anyone to post me MGE macro list?
Prometeus is offline  
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 17:07.


Design by Vjacheslav Trushkin, color scheme by ColorizeIt!.
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Apolyton Civilization Site | Copyright © The Apolyton Team