Battlezone 1

Community Forum
Home Page Home Page Home Page
  Register
Login 

Delete all board cookies


Contact Us | All times are UTC



Welcome
Welcome to Battlezone 1 Forum!

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. Registration is fast, simple, and absolutely free, so please, join our community today!


Home Page Home Page  [ 3 posts ] 
  Print view
Previous topic | Next topic 
Author Message
Offline 
 Post subject: IA Mission Tutorial
PostPosted: February 4th, 2010, 12:26 pm 

Joined: September 21st, 2007, 9:18 pm
Posts: 251
IA MAP MAKING FOR
BATTLEZONE


There's a lot of information out there about mapmaking for Battlezone, but it's scattered over a bunch of
different websites. Here I've tried to compile the best of the IA mapmaking info into one document to assist
Battlezone players interested in building Instant Action Maps. The information was compiled from some of
the classic Battlezone sites (some of which are no longer up) and I've also included a few neat
tricks that I've worked out myself. I won't spend much time on how to edit terrain, as that is well
documented in the mapeditor.doc file included with Battlezone.

Here the focus is on what sort of things you need to know after you've created that new map - like how to
get the most out of the Battlezone editor, how to edit ODF properties and BZN files and how to set up some
neat mission scripts, along with various other useful tips. It's divided into several sections for convenience
so that you can more easily find the information you need.

1. The Battlezone editor.
2. Unit scripting.
3. ODF editing.
4. BZN file editing.
5. Auxilary files.
6. Miscellaneous tips and tricks.
7. Utilities.

1. THE BATTLEZONE EDITOR

To make a brand new map, copy maketrn.exe from the Edit folder in your Battlezone directory into the
addon directory. Then copy over the *.trn and *.ini files from their subfolders for the planet of your choice.
Unless you are using the BZ Control Panel (see utilities section) you will be working from the
DOS command line when you run the Battlezone editor. Open a DOS box and switch to your
Battlezone\addon directory. Now run maketrn to create an empty map.

Example: maketrn.exe usrmsnXX /c /w=2560 /h=2560

This creates an IA map 2560 meters wide and 2560 meters deep. The official documentation states that the
w and h parameters can be one of four values- 1280, 2560, 3840 and 5120. These can be mixed and
matched, the unused terrain on the longer side of the map will appear as dark land on the minimap in-game.
Unofficially, it is possible to make much larger maps - I have made maps up to 10240 by 10240 that work
perfectly - the larger sizes must also be a multiple of 1280, the basic zone size for the HGT file. In reality,
these may not be so useful - they are way too big for DM maps, and most people won't want to travel 10 or
12 kilometers to the enemy base on an IA map, either. However, if you really like big maps, feel free to
experiment with these larger sizes.

UsrmsnXX can be anything from usrmsn01 to usrmsn99 - you will want to rename your mission later, but
Battlezone expects to see this while you are creating the terrain. Now, you will want to edit your TRN file.
Type EDIT to invoke the DOS style editor from the command prompt. Open up the TRN file for your
mission, and delete all but the [Size] section - this MUST stay. Open up the TRN file for the planet you
wish to create and copy its contents to your usrmsnXX.trn file. Save and exit.
Drop back one level to your Battlezone directory. Now you are ready to create your landscape. Below is a
list of some of the more useful command line switches Battlezone supports:

/sw runs Battlezone in software mode
/d3d runs Battlezone in Hardware Acceleration mode
/edit starts Battlezone in edit mode
/win starts Battlezone in a window
/nointro starts Battlezone without playing the intro movie
/shellmap creates a bitmap in your battlezone directory based on the minimap displayed in your mission
/largemap creates a bitmap as above, but in high resolution - takes up lots of space


You want to run in edit mode, and it's good to skip the intro movie to save time, so to launch into your
editing session, type:
bzone usrmsnXX /edit /nointro
Your map will appear flat all around you. Toggle CONTROL-E to go to texture edit mode, and from there
hit W to go to wireframe mode, where you can change the contours of your map. CONTROL-TAB will
refresh your minimap display. Your terrain is saved automatically, so if the game crashes just restart and
take up where you left off. You can take your time over several sessions to finish the terrain editing. You
may paint terrain when you are done by going back to the Battlezone\addon directory and typing:
maketrn usrmsnXX.trn /p="mars.ini" (if you are creating a map on Mars).
Notice that you must specify the TRN file for your mission. The INI file for the planet matching your TRN
file must be present in the addon directory. Don't forget the quotation marks. One thing I would like to
mention here is that some INI files are already present in the addon folder, however some of these look
more like developer files, and will not work correctly with maketrn - you will get error messages when you
run it. Make sure you use the INI files from the edit\ini folder.
If you find that making terrain in the Battlezone editor takes too long you are not alone, and there are other
tools to assist you in making the necessary files - BZFRAC and BZHGT are two of the best - check out the
utilities section for info on these.
Once you have finished creating your terrain, you are ready to place objects on your map. In order to place
objects you must run Battlezone in a window, and to manipulate them in SHIFT-F9 view you must run it in
software mode, at least on my system. Example:
bzone usrmsnXX /sw /edit /win /nointro
I usually set BZ to software mode when I do the last touch ups on the terrain from the Escape menu, before
I exit. Then I restart, to place objects. Once you are running in windowed software mode, there are 3 ways
you can place objects - from CONTROL-A mode, SHIFT-F10 view, and SHIFT F9 view. Before you
begin, though, you should type in the cheat codes that give you unlimited armor and ammo. Below is a list
of the cheat codes for Battlezone - to use, hold down the Control and Shift keys and type in the codes.
BZBODY gives unlimited health - will not protect you from snipers, though
BZTNT gives unlimited ammo
BZRADAR gives full radar coverage of the entire map - all enemies can be seen
BZVIEW allows satellite view without a Comm Tower present on the map
BZFREE allows the construction of units and buildings without scrap or pilots
BZTIME toggles mission time on/off - originally intended to give unlimited time on timed levels -
doesn't work properly


Control-A Mode
When you are ready to place objects hit CONTROL-A. Notice the new menu that appears in the upper left.

Friendly units are in the green menus, enemy units in the red menus, and neutral objects like scrap and
geysers in the white menu. It is possible to customize these menus so that you can put your own custom
units in the level, or build CCA or Black Dog missions. This is done by changing the build file ODFs - that
topic is covered in the ODF section. To leave CONTROL-A mode simply hit CONTROL-A again.
The first unit you place should be an enemy - I like to put a howitzer on the map as it doesn't wander
around like a tank or head for the nearest scrap deposit as turrets sometimes do. Notice that when you are in
CONTROL-A mode all activity is suspended, and you can travel through objects. Keep this in mind
because if you get out of your tank you will have to leave CONTROL-A mode to get back in.
I like to place all the static things like enemy buildings and scrap first - enemy combat and production units
should be placed last, especially if you intend to script them to do something. You will find most of the
standard buildings in the Buildings menus - note however that powerplants are in the production menu, with
the scavengers, tugs, and production units. The supplies menus have ammo, repair and Nav beacons - this is
a good time to note that if you intend to name your Nav beacons, you should place them all right after you
place your first enemy unit, as they will be easy to locate in the BZN file.
While you are placing scrap, you can place either individual pieces or fields of scrap. When you place a
scrap field it appears as a spawn point, and you must toggle CONTROL-A mode to make the editor actually
turn it into a scrap field (which contains 10 pieces of scrap).
IMPORTANT - the editor is limited in the number of scrap fields it can convert. If you place a whole bunch
of these on the map before leaving CONTROL-A mode you'll more than likely get an out of memory
message and Battlezone will crash, leaving you to start over - this happened to me the first time I built a
level. Place no more than 2 or 3 scrap fields at a time, then toggle CONTROL-A to convert these before
placing more.
Place your base buildings, if you intend to have any, and then your production and combat units. Finally,
place the enemy's units. Then you are ready to script any special behavior or attacks that you have in mind -
this topic will be covered in some of the sections below.

Shift-F10 Mode
From CONTROL-A mode you can enter SHIFT-F10 mode. This is an overhead view similar to Satellite
view in the game, except you can place objects on the map from the build menus. Use the +/- keys to zoom
in and out - press the Insert key to return to the standard view size. Units and buildings added from the
menus will be placed at the cursor position. You can move objects about the map by left clicking on them
and dragging them to the new position. You can rotate an object in place without moving it by right
clicking on it and dragging it about on its axis. Deleting an object is accomplished by left-clicking on it and
holding down the left mouse button, then pressing the Delete key. To leave SHIFT-F10 mode, press
SHIFT-F1.

Shift-F9 Mode
This mode is the one in which all tasks such as unit scripting, pathing, etc. are performed. When you enter
SHIFT-F9 mode, the map surface appears in blue. Non traversable areas, such as mountain peaks or
particularly rough terrain appear in yellow, and damaging terrain (lava) appears in red. All friendly units
and buildings appear as little green squares, enemy objects are red squares, and neutral objects are white.
Power ups, such as ammo, repair, etc. appear in yellow. You can zoom in and out by using the +/- keys.
Pressing the Insert key returns you to the default viewport. The arrow keys are used to move around to
different sections of the map. The menu for SHIFT-F9 mode has four main options, each with a number of
suboptions. Going through these in order, we first have option 1, Edit Mode. Press this and we have four
suboptions. The first, Find Path, has no real use for IA missions.

The second, Edit Path, is VERY useful. Paths have three main functions in IA missions - To provide routes
units can be tasked to follow, to define the edges of the map, and to define areas the AI will attack and
defend. These functions are covered in more detail in the Unit Scripting section. To create a path, left click
on the spot where you want the path to start. The first waypoint will appear in red. Subsequent left clicks
will add new waypoints to the path. When you are finished, right click on any of the waypoints or in the
small grey path box in the lower left hand corner of the screen to complete the path. You can reselect a path
by clicking on any of the waypoints. Waypoints can be moved about by holding down the left mouse button
and dragging them to the desired position. You can remove waypoints by pressing the Delete key - this will
remove the waypoints in the order that they were placed, beginning with the last waypoint. Paths may cross
back over themselves, and different paths may cross over each other. It is not possible to create looping
paths, the only real equivalent to an eternal looping path is the CMD_PATROL command, which the AI
uses to have its units circle around the enemy base and protect it. Unfortunately, this command cannot be
applied from within the Battlezone editor. When placing paths avoid having them cross over any
impassable terrain(yellow) and of course lava(red).
Suboption three is Edit Task mode. From this mode you can order a unit to do various things, like follow a
path or another unit, pick up a relic, etc. Click on a unit to activate it - its label with class label will be
displayed next to it, e.g. avtank1_wingman. In the upper right corner some information about the unit will
be displayed, including its current orders issued by the AI. For empty units and buildings the current level
of health is also displayed. At the bottom of the screen is a list of the tasks the unit can be ordered to
perform, and above this is the unit's current command and next command. If you have not issued any orders
to this unit, both the current command and next command should be CMD_NONE.
To issue a command to a unit:
Left click on the unit you want to issue a command to.
Left click on the command in the list that you want to issue to the unit. It will become highlighted.
Left click on the position or object you want the unit to go to, follow, attack, pick up, etc.
Right click on the position or object to make the command active. You will see the units next command
become the command you issued if you do it correctly.
Left click on an empty spot in the map to deselect the unit(s).
You should make sure you are in CONTROL-A mode when you order a unit to perform a task - otherwise
the command you issue immediately becomes the current command. Below is the list of commands
available in the editor, along with a description of their functions. There are more commands than this, such
as CMD_PATROL, CMD_RECYCLE, etc.; however, without a more sophisticated editor and/or a better
understanding of BZN files they are of little use for IA levels.
CMD_NONE: No command issued - AI controls the unit.
CMD_STOP: Use this command to cancel the current command - when the mission starts, the current command will become CMD_NONE.
CMD_GO: Order a unit to go to a specified location or object.
CMD_ATTACK: Order a unit to attack an enemy unit or building.
CMD_FOLLOW: Orders a unit to follow a path or another object. When ordering a unit to follow a path try to have the unit as
close to the first waypoint as possible if you want it to follow the whole path. It will go to the closest
waypoint (not necessarily the first one) and follow the path to the last waypoint. A unit ordered to follow an
enemy unit will attack when it is within range. A friendly unit ordered to follow a friendly unit or building
will not be commandable unless the object it is following is destroyed, although it will attack enemy units on its own.
CMD_FORMATION: Same command as "Follow Close" in the game.
CMD_PICKUP: You can give this order to a tug if you want it to pick up a relic or an empty tank.
CMD_DROPOFF: Orders a tug to drop whatever it is carrying at a given location.
CMD_NO_DROPOFF: Use this command to get enemy units to sit still. Order an enemy to CMD_NO_DROPOFF on itself and it
will remain where it is until it sees an enemy - then it will attack. You can also order friendly units to
CMD_NO_DROPOFF on themselves - this makes them uncontrollable, but they will still fight enemy
units.
CMD_GET_WEAPON: Not sure what this is for, maybe to order units to get weapon powerups, or the armory to deliver a weapon
powerup (maybe a Day Wrecker) somewhere. There doesn't seem to be a use for this one in IA levels.
Again, you should issue all commands in CONTROL-A mode and save the game before you toggle
CONTROL-A off. Otherwise, the mission will probably not function as you intended. There are a few
exceptions to this for some special attacks - you may have to give more than one command to an airborne
soldier, for example - see the Miscellaneous tips and tricks section for details.
The last suboption in the first menu is Edit Objects. Notice that when you choose this a fifth option appears
on the main menu entitled "New Object". You can use this menu to place new objects on the map just as
you can from CONTROL-A mode - new objects will appear at the current cursor position. Left clicking on
an object selects it - once it is selected you can drag it to a new position on the map. Doubleclicking on an
object in either Edit Task or Edit Object mode pops up a dialog box allowing you to change the object's
label. There is also a box for setting independence, although I don't know what this does. You can remove
an object from the map in Edit Object mode by selecting it and pressing the Delete key.
The second menu in SHIFT-F9 mode is titled "Draw Mode". Here you can toggle various options on and
off, such as Draw Goals, Draw Priorities, etc. These are not really relevant for IA missions, although one
that I find useful is "Draw Paths". If you run a completed mission in Edit Task mode with Draw Paths
turned on you can observe enemy activity in detail and get a feel for how the AI responds to the terrain and
your own activity.
The third menu, again titled "Edit Mode"(?) just toggles CONTROL-A mode on and off. I don't know why
they put that in there - it's easier just to use the hotkeys.
The fourth menu, "Commands", lets you add or subtract scrap and pilots from either the NSDF or CCA.
Just press the appropriate numbers - the display will update with the new figures.
Leaving SHIFT-F9 mode is done the same way as for SHIFT-F10 mode, by pressing SHIFT-F1.

Miscellaneous Editor Functions
You bring up a save dialog box from within the editor by pressing CONTROL-S. To bring up an "Open
File" dialog for editing a new mission, press CONTROL-O. Once you are placing objects, you must save
frequently, as the objects in the map will not be saved if the game should crash. You can edit objects over
more than one session, if you like - you must specify the BZN file from the command line when you launch
into edit mode - e.g. bzone usrmsnXX.bzn /edit /win /nointro
You should back up your terrain files (usrmsnXX.HGT, usrmsnXX.LGT and usrmsnXX.MAT) to a
different directory before you place objects - the HGT file can be modified while you are placing objects,
and this can cause problems if you need to start over from an empty map.


Top
 Profile  
 
 
Offline 
 Post subject: Re: IA Mission Tutorial
PostPosted: February 4th, 2010, 12:28 pm 

Joined: September 21st, 2007, 9:18 pm
Posts: 251
2. UNIT SCRIPTING
Simply placing a bunch of enemy units on the map will not necessarily give you the effect you want. You
might want a squadron of bombers to hit the player right at the start of the mission, only to find that the AI
assigns them to escort scavengers, or go sit in the corners of the map. You may want to delay the
production of enemy units, or have the player accomplish some objective before having access to the
Recycler. All this and more can be accomplished through unit scripting.

Pathing
This is the first and easiest way to regulate attacks. Simply create a long path that ends near the player's
base and place some enemy units at the start of it. Order them to follow the path by left clicking the unit,
then left clicking the path waypoint, and then right clicking the waypoint. The unit(s) will follow the path to
the end, and then attack any enemy units nearby. You can delay attacks considerably by using a slow unit
like the Walker for this purpose. Walkers move at about 4 meters a second so it takes them a good twenty
minutes to cover one side of a 5120 size map. Loop a path around three sides of a map and you've got a
considerable delay factor. You can also order units to follow the Walker or Walkers along their route -
having two or three Walkers and half a dozen Bombers show up later in the mission will be quite a suprise.
It's important to make sure none of your paths cross any impassable terrain - this appears in yellow while
you are in SHIFT-F9 mode. If your paths loop across themselves a unit may sometimes get confused, and
take a "shortcut" by moving directly onto another nearby waypoint rather than strictly following the path,
thus causing it to arrive earlier than expected. This can be an annoyance, though often as not it is
interesting, as you can't be sure through repeated plays exactly when a given batch of units will arrive to
attack you. This is something to keep in mind if you do loop paths over themselves, or very near to another
point on the path.
You can also order a unit to attack an object directly. This seems to be the only way to use APCs or
minelayers, as the AI never attacks with them unless you specifically order one to do so. You can place
individual soldiers on the map via custom build ODFs and order them to attack an object also. This is a nice
sneaky attack as the soldiers do not show up on radar.
Ever notice that in some of the single player missions you can't get all the way to the edge of the map?
There's a way to do this in IA missions, also, and it's a very handy method of keeping a player from being
able to prematurely attack units scripted as above. Go into SHIFT-F9 mode, and then hit 1,2, to edit paths.
Click in the first location where you want the playable map corner defined, and then where you want the
opposite corner. Before you right click to complete the path, click in the small grey path box in the bottom
left hand corner of the screen. A dialog box will pop up with some options. You should rename the path to
edge_path. Under Path Type, click Area. Under Area Options, click Interesting, and under Area Part, click
Inside. Now click OK, and right click to complete the path. The map color may change - just toggle SHIFT-F9
to change it back. Now, when you play the map only the area defined by the edge path will be accessible
to the player. AI units will be able to move freely past this boundary, however.
You can also define areas for the AI to attack frequently - just draw a path around the area and again click
the gray box to bring up the path dialog. Again select Area, Interesting, Inside, and in the Unit Type box,
select Attack. Try entering in 80 for the Value and Force parameters - make sure the scripting priority is the
same in the AIP file (see below). Click Ok, then right click to complete the path.
To delay the production of enemy units you can place the enemy recycler some distance away from its base
and order it to follow a path into the base. This also works for the player's units - it makes them
uncontrollable and the player must defend them against any enemies encountered until the end of the path is
reached.

Triggers and Timers
There are other ways to delay enemy production, as well as give it a boost later in the game. One way is to
place a neutral building in the enemy base and have the enemy Recycler follow it. Then order a slow
moving enemy unit such as a Walker to destroy the neutral building. The enemy Recycler will do nothing
until the building is destroyed and then deploy on the nearest geyser and start building units. You can use
such techniques on the player's units also. First make sure the unit is deployed on a geyser. You can then
order it to follow an enemy unit or building, or a piece of scrap, and the unit will not be available until the
enemy object is destroyed or the scrap is picked up. You can also order units to follow powerups which the
player must pick up in order to free the units - take care not to use something the unit itself could pick up, ie
repair, if the unit is damaged, or valid weapon powerups for combat units.
Even if you give the AI a ton of scrap in the mission.ODF file, sometimes it tends not to attack vigorously
anyway, unless (A) you have just built something it wants to destroy (especially a turret or scavenger), or
(B) it has just collected a certain amount of scrap. I'm not sure why this is, but it pays to have a generous
amount of scrap around the enemy base if you want a tough mission. You can control this to some degree
by setting aside some scrap fields in a closed off section of terrain, along with an enemy scavenger. Order
the scavenger to follow a unit (a good choice would be a Gun Tower guarding the enemy base), and when
that is destroyed the scavenger will pick up the scrap fields, triggering an enemy counterattack. You can
also order the scavenger to follow a powerup somewhere, and when it is picked up the scavenger will be
free to scavenge. This method is not so reliable though, as sometimes the unit doesn't get the powerup. A
better way is to create a custom APC carrying a single pilot(not a soldier!) with a very high setAltitude
variable (more on this in the Misc. Tips and Tricks section). Place an empty enemy scavenger in the closed
off area, along with scrap and a neutral building right next to the scavenger. Shoot the neutral building
down to its last few hit points. Then put the APC in the level and order it to attack the neutral building from
SHIFT-F9 mode. Toggle CONTROL-A so the APC attacks, then when you see the pilot come out, hit
CONTROL-A again to freeze the action. Reorder the pilot to attack the neutral building and delete the
custom APC. The pilot will descend from however high the APC was and shoot the neutral building, then
get into the scavenger you placed next to it. You may want to have 2 or 3 pilots come out of the APC as
occasionally a pilot will have trouble getting into the Scavenger. You can control the interval between the
mission start and the scavenger activation with a considerable degree of accuracy using this method, and
have a considerable delay factor as well (hours, if you want). It's a good idea with either of these methods to
place the closed off area off the playable map using the edge path method described above, so the player
can't reach the scavenger or scrap.
You can start the player off all by himself in a mission and have piloted units join him later in the game. To
do this simply place some friendly units on the map, and order each one to pick you up. When the pilot gets
out of the vehicle, kill him. You will end up with a bunch of friendly, empty units. These can be changed to
neutral units by editing the BZN file (see below) so that they are not in the units roster. Now order each
empty unit to go to whatever location you want, and then place some friendly pilots away off from the
units, and order one or two to go to each unit. When the pilots reach the units, they will get in, and the units
will go to the specified destination, becoming available to the player. Again, this trick is best done off the
edge of the playable map, so the player can't use the empty units. You can actually do this off the edges of
the map proper (the black area in SHIFT-F9 mode), although I prefer not to, as pilots and units tend to be
unreliable about following commands off the map edge.

Spawning
It is possible to spawn units in IA missions, although it requires custom ODF files in order to do this. This
topic will be covered in detail in the Misc. Tips and Tricks section.

3. ODF EDITING
ODF files, or object definition files, are simple text files that store a great deal of information about how a
unit behaves - how fast it can go, what weapons it has, etc. By creating your own custom odf files, you can
create tons of unique units, custom weapons, create spawning units, script missions, create unique attacks
not possible otherwise - the list goes on and on. Most of the actual odf files for the game are located in the
bzone.zfs file. Use the UNZFS tool to unpack the ZFS somewhere.

Once you have the ZFS unpacked, go ahead and take a look at some of the ODFs. Most of them aren't very
large (less than 1k, sometimes far less) and are easily edited with Notepad. Naming conventions are as follows:
American vehicles start with av or bv. CCA vehicles start with sv. American buildings start with ab, and
CCA buildings with sb. Powerups and Nav Beacons start with ap or sp. American pilots, soldiers, and
snipers start with as, CCA equivalents with ss. Most weapons start with the letter g. Alien objects start with
either hb or ob. There are some exceptions to these conventions but not many.
Let's take a look at avtank.odf, the odf for the American Grizzly tank. The definitions are in black, the
variables you can change in blue, and explanations of these various properties are commented in red.

[GameObjectClass] --what kind of object is it
classLabel = "wingman" --classLabel determines what type of object it is
scrapValue = 5 --scrap produced if recycled or destroyed
scrapCost = 8 --cost to build the unit
buildTime = 10.0 --time it takes to build the unit
maxHealth = 3000 --unit's level of armor (at full health)
maxAmmo = 1200 --unit's ammunition load
weaponMask=00001 --binary mask that determines which weapons are used by the AI
unitName = "Tank" --unit's name as displayed in the game
aiName = "TankFriend" --aiName and aiName2 determine how the unit will behave
towards
aiName2 = "TankEnemy" other units in the game. NULL string creates an inactive unit
heatSignature = 1.2 --determines how quickly a thermal missile(Hornet) will lock on
imageSignature = 3.0 --determine how quickly an image missile(Shadower) will lock on
radarSignature = 0.2 --determines how fast a radar missile(Comet, WASP) will lock on
weaponHard1 = "GC1" --cannon hardpoint
weaponName1 = "gatstab" --the AT-Stabber weapon
weaponHard2 = "GC2" --2nd cannon hardpoint
weaponName2 = "gminigun" --american Minigun
weaponHard3 = "GS1" --special hardpoint
weaponName3 = "gquake" --Thumper
weaponHard4 = "GM1" --mortar hardpoint
weaponName4 = "gmdmgun" --MDM mortar
[CraftClass] //Radar data
rangeScan = 400.0f --distance unit can see enemies on radar
periodScan = 5.0f --time between scans
velocJam = 5.0f --not implemented
//This section determines unit responses for various commands
selectWaitMsg = "avtankv0.wav" "Who's Next?"
selectAttackMsg = "avtankvj.wav" "Attacking enemy."
selectFollowMsg = "avtankvn.wav" "Yes, Sir."
selectGoMsg = "avtankvm.wav" "Moving."
selectOtherMsg = "avtankvp.wav" "Grizzly here."
goMsg = "avtankv1.wav" "Rolling."
attackMsg = "avtankv2.wav" "No mercy."
followMeMsg = "avtankv4.wav" "Lead on."
followMsg = "avtankvk.wav" "Protecting the flock."
repairMsg = "avtankv8.wav" "Repairing."
reloadMsg = "avtankv9.wav" "Reloading."

rescueMsg = "avtankvc.wav" "Stay Put."
recycleMsg = "avtankvd.wav" "Farewell, fine ride."
otherMsg = "avtankvn.wav" "Yes, Sir."
user1Msg = "avtankva.wav" "With pleasure."
killedMsg = "avtankv3.wav" "Eat dirt commie pinko."
diedMsg = "abetty3.wav" "Offensive unit lost."
[HoverCraftClass] //This section sets properties for vehicle maneuvering characteristics
setAltitude = 1.0 --the distance the vehicle sits off the ground
accelDragStop = 4.0 --drag value for vehicle at rest (inhibits coasting if bumped)
accelDragFull = 1.0 --drag value for vehicle coming to a stop
alphaTrack = 20.0 --controls pitch sensitivity during acceleration
alphaDamp = 5.0 --same as above - increasing value has same effect as enabling auto-leveling
pitchPitch = 0.25 --controls vehicle's up and down rate of pitch
pitchThrust = 0.1 --controls rate of pitch for forward and reverse acceleration
rollStrafe = 0.1 --controls roll rate during strafing maneuvers
rollSteer = 0.1 --control roll rate while steering? - apparently not implemented
velocForward = 20.0 --vehicle's forward velocity
velocReverse = 15.0 --vehicle's reverse velocity
velocStrafe = 20.0 --vehicle's strafe speed (side to side velocity)
accelThrust = 20.0 --thrust value for vehicle acceleration
accelBrake = 75.0 --determines how fast vehicle will come to a stop
omegaSpin = 3.5 --determines how fast vehicle can spin about
omegaTurn = 1.5 --value for turn sensitivity
alphaSteer = 5.0 --controls how quickly a unit can lock on to an enemy target
accelJump = 20.0 --value for vertical thrust (large increase creates "flying" vehicle)
soundThrust = "avtanke0.wav" --vehicle's engine sound
soundTurbo = "avtanke3.wav" --vehicle's turbo sound (what you hear when you press the jump key)


To create a custom unit from this odf, it's only necessary to change the values in blue to whatever new
values you want them to be. Below is a custom unit made from this odf file. Changes to the regular odf are
in green.

[GameObjectClass]
baseName = "avtank" --this line needed for custom unit odf files
classLabel = "wingman"
scrapValue = 5
scrapCost = 9 --added 1 to scrap cost, to reflect additional weapon costs
buildTime = 10.0
maxHealth = 3000
maxAmmo = 1500 -- added 300 units of ammo
weaponMask=00011 --changed binary mask so AI will use both SP-Stabbers
unitName = "Tank"
aiName = "TankFriend"
aiName2 = "TankEnemy"
heatSignature = 1.2
imageSignature = 3.0
radarSignature = 0.2
weaponHard1 = "GC1"
weaponName1 = "gspstab" --changed to the SP-Stabber
weaponHard2 = "GC2"
weaponName2 = "gspstab" --added a second SP-Stabber

weaponHard3 = --remove the thumper and also the
weaponName3 = hardpoint for special weapons
weaponHard4 = "GM1"
weaponName4 = "gpopgun" --changed to the Pop Gun mortar
[CraftClass]
rangeScan = 400.0f
periodScan = 3.0f --decrease the time between scans
velocJam = 5.0f
selectWaitMsg = "avtankv0.wav"
selectAttackMsg = "avtankvj.wav"
selectFollowMsg = "avtankvn.wav"
selectGoMsg = "avtankvm.wav"
selectOtherMsg = "avtankvp.wav"
goMsg = "avtankv1.wav"
attackMsg = "avtankv2.wav"
followMeMsg = "avtankv4.wav"
followMsg = "avtankvk.wav"
repairMsg = "avtankv8.wav"
reloadMsg = "avtankv9.wav"
rescueMsg = "avtankvc.wav"
recycleMsg = "avtankvd.wav"
otherMsg = "avtankvn.wav"
user1Msg = "avtankva.wav"
killedMsg = "avtankv3.wav"
diedMsg = "abetty3.wav"
[HoverCraftClass]
setAltitude = 1.0
accelDragStop = 4.0
accelDragFull = 1.0
alphaTrack = 20.0
alphaDamp = 5.0
pitchPitch = 0.25
pitchThrust = 0.1
rollStrafe = 0.1
rollSteer = 0.1
velocForward = 25.0 --added a bit of extra speed
velocReverse = 15.0
velocStrafe = 20.0
accelThrust = 20.0
accelBrake = 75.0
omegaSpin = 3.5
omegaTurn = 1.5
alphaSteer = 5.0
accelJump = 20.0
soundThrust = "avtanke0.wav"
soundTurbo = "avtanke3.wav"
The baseName line is needed for custom units - if you don't use it the unit will appear as a phantom in the
game. If it's a production unit, you'll get an unhandled exception as soon as you place it. The "avtank" refers

to the standard Grizzly - you could use "bvtank" to make it look like a Black Dog Grizzly. It's worth noting
that some of the standard odfs require the baseName line themselves - look for this while picking odfs to
customize, as you need to refer to the object in the baseName line instead of the odf name itself, if
baseName is present.
The weapons are changed to make a more dangerous tank - note that you can omit weaponHard and
weaponName parameters to change a unit's capabilities. You can also change the order in which they
appear in the weapon selection list. It's possible for a unit to have up to five different weapons - notice the
extra slot in the weapon list when you are playing. You can simply duplicate an existing hardpoint, e.g.
weaponHard5 = "GM1" and weaponName5 = "gproxmin" to add a mine dropping capability to the custom
unit above. You can place weapons into different weapon slots - for example, you could put a Hornet in a
Cannon slot - but the weapon hardpoints themselves can't be altered, as they are hardcoded into the 3d files
that make up the unit. For example, you can't assign a mortar hardpoint to a Scout, as it doesn't have one.
Similarly, there's no GC3 hardpoint for the Grizzly.
You can copy and paste the above custom odf to a file and use it in a mission - name it avtank1.odf, and
make sure you take out the comments in red - don't forget to save it as a plain text file. Place it in your
addon directory so Battlezone can use it.
The easiest way to place custom units in a mission is by using customized build files. There are 9 files in
the game assets named b_ambldg, b_amcmbt, b_amprod, b_amsign, b_nebldg, b_sobldg, b_socmbt, b_soprod,
and b_sosign. If you copy these to your addon you can change the units you can add and the teams they are
on. Let's look at b_amcmbt.odf, for example. This odf contains the NSDF combat units:
[Builder]
buildName = "Combat"
buildTeam = 1
buildItem1 = "avapc"
buildItem2 = "avartl"
buildItem3 = "avfigh"
buildItem4 = "avhraz"
buildItem5 = "avrckt"
buildItem6 = "avmine"
buildItem7 = "avltnk"
buildItem8 = "avtank"
buildItem9 = "avturr"
buildItem10 = "avwalk"
The unit and team variables are listed in blue. Notice the standard Grizzly, avtank, is buildItem8. Let's
change this, so we can add our own custom unit:
[Builder]
buildName = "Combat"
buildTeam = 1
buildItem1 = "assold"
buildItem2 = "avartl"
buildItem3 = "bvraz"
buildItem4 = "avhraz"
buildItem5 = "avrckt"
buildItem6 = "avmine"
buildItem7 = "avltnk"
buildItem8 = "avtank1"
buildItem9 = "avturr"
buildItem10 = "avwalk"
Now when we add a Grizzly to the game it will be our own custom Grizzly and not the standard tank. We
can also put NSDF soldiers (assold) on the map, instead of APC's, and Black Dog Scouts (bvraz) into the
level instead of the regular ones.
By changing the buildTeam value you can decide which team the objects in a specific menu will be on. By
changing buildTeam to 1 in all the Soviet build odfs, and to 2 in the American ones, you can create CCA
missions. Neutral objects are on Team 0, friendlies on Team 1, and enemies on Team 2. It's possible to add
a third team to the game, if you like - units on Team 3 will be hostile to you AND the primary enemy.
However, they will not be active threats - combat units will just sit until an enemy happens by, and
production units will not build anything. This is an occasionally useful feature - for example, if you want
some enemy soldiers to hang around a certain area and not return to their base you can place them in the
game as Team 3. I've also placed a fourth team in the game - Team 4 is hostile to all other teams as well,
including Team 3. I don't know if there is a limit to the team numbers, but it doesn't really matter, as
anything above Team 3 is really of no use.
The game seems to be somewhat confused as to what a neutral object is - for example, some supposedly
neutral enemy units will attack you, and a friendly unit next to a neutral silo will recycle into it if you order
it to. You receive the scrap value of the unit when it does so. I've also observed the AI attacking neutral
Gun Towers and Scavengers - something to keep in mind if your mission hinges on the player getting
control of a neutral unit.
You should remove the customized build odfs from your addon when you are done editing, as they can
prevent the game from building any enemy units, depending on the changes you have made. However, if
you've placed any custom units or buildings in the mission, you must include these specific unit or building
odfs in the mission zip file, as Battlezone needs them to run your mission.
You can change a great many things through the use of custom odf files - some of the things you can do are
covered in the Tips and Tricks section, but feel free to experiment for yourself - the easiest way to do this is
to copy the standard odf to your addon and change what you want to, then run the game to see your
modifications in effect. Note that if you play multiplayer having these modified odfs in your addon will
cause a version mismatch - delete them before you go online. Below is a list of some of the units and
objects you will find in the game assets, with descriptions of what they are to get you started. Some odfs are
already in the addon - if you don't see the odf you want to play with in the game assets, look for it there.

avrecy.odf - The standard NSDF Recycler
avmuf.odf - The standard NSDF Unit Factory
avslf.odf - The standard NSDF Armory
avcnst.odf - The NSDF Constructor
avfigh.odf - NSDF Scout
avltnk.odf - NSDF Light Tank
avhraz.odf - NSDF Bomber
avwalk.odf - NSDF Walker
avturr.odf - NSDF Turret
avartl.odf - NSDF Howitzer
avmine.odf - NSDF Minelayer
avhaul.odf - NSDF Tug
avscav.odf - NSDF Scavenger
avlamp.odf - NASA Apollo Moon Lander
abtowe.odf - NSDF Gun Tower
abspow.odf - NSDF Solar Power
ablpow.odf - NSDF Lightning Power
abwpow.odf - NSDF Wind Power
abbarr.odf - NSDF Barracks
abhang.odf - NSDF Hangar
absupp.odf - NSDF Supply Depot
abmbld.odf - NSDF Field HQ

abhqcp.odf - NSDF Command Tower
abstor.odf - NSDF Storage Crates
abcomm.odf - NSDF Satellite Tower
absilo.odf - NSDF Scrap Silo
ablpad.odf - NSDF Launch Pad
abcafe.odf - NSDF Cafeteria
abshld.odf - NSDF Shield
obdata.odf - Alien Database
oblema.odf - Lemnos Factory
obcycl.odf - Cyclops Drone
obheph.odf - Alien Haephestus craft
obstp1.odf - Omega Starport building
hbchar.odf - Charon Harvester
ubtart.odf - Tartarus Prison
apmini.odf - minigun powerup
apstab.odf - AT-Stabber powerup
apsstb.odf - SP-Stabber powerup

gminigun.odf - the minigun weapon in the tank
gatstab.odf - the AT-Stabber weapon in the tank
gspstab.odf - the SP-Stabber weapon in the tank
bullet1.odf - the bullet fired by the minigun
rocket.odf - the bullet fired by the AT-Stabber
rocket3.odf - the bullet fired by the SP-Stabber
eggeizr1.odf - geyser
npscr1.odf - piece of scrap
nparr.odf - Pylon
radarmsl.odf - the Comet missile in flight
waspmsl.odf - the Wasp missile in flight
xtorxpl.odf - the explosion caused by the Comet missile
xminxpl.odf - the explosion caused by proximity mines and the Wasp missile
4. BZN FILE EDITING
The BZN file is where all the objects and paths for your level are stored. Unfortunately it is in binary
format, so you will need a hex editor (preferably one with search and replace capabilities) in order to edit
these files. There is an ASCII format BZN file named demo01.bzn in the addon directory that you can
browse through with Notepad in order to get an idea of what BZN files contain. You cannot save BZN files
in ASCII format with the Battlezone editor for editing by hand, this seems to be an option that was used
during development and later taken out by the Activision team.

Renaming IA levels
You will almost certainly want to rename your level. In addition to renaming all the mission files, you must
also change the two references to the mission within the BZN file. Open it with your hex editor and look at
the beginning of the file for the 2 references. Change these to the new mission name - this should have 8
characters, also. You can make the mission name shorter if you cancel out the rest of the original name with
binary zeros inside the bzn file, but you should avoid making the name longer than 8 characters - people
have reported problems when attempting this.

Changing the player's vehicle and pilot type
Scroll down a bit further in the file and you will come to the first object entry, which is always the player's
entry. All BZN entries have 2 labels - if you are starting in the default tank, you should see player and a bit
further along the second label player0_wingman - this second entry has the object number and the object's
classLabel follows the underscore. It is easier to switch vehicles in the Battlezone editor by simply getting
into a new one in edit mode. However, there are some objects that by default have NO pilot, such as Furies
and Gun Towers. You can put the player in one of these by changing these two labels. For example, to put
the player in a Gun Tower, change player to abtowe and player0_wingman to abtowe0_turret.
You should make sure you have your tank parked next to a power supply if you plan on changing it to a
Gun Tower. To change to a blue flying Fury, alter the labels to hvsav and hvsav0_sav.
You should add binary zeros to cancel out the rest of the original label if it is longer than the one you are
changing it to. Note that once you get out of these units you can't get back into them, although they will
continue to fight on their own.
Scroll down another 420 bytes or so past the second label and you will come to the pilot in the player's tank
- this should be asuser if it's a standard mission. You can change this to assold to make the player a soldier,
or to aspilo to make the player a regular pilot. If you are building a CCA mission and have placed the player
in a CCA vehicle you should change this to ssuser to make the player a Soviet commander.
If you are creating a level in which the player begins on foot, you can change the pilot type as you do for a
vehicle by changing the two labels, i.e. from asuser and asuser3_person to ssuser and ssuser3_person. The
player on foot also has a pilot entry further down. You need to change this to the new pilot type also, if you
are switching sides - otherwise the in-game messages such as "Unit Lost" "Scavenger Lost" etc. will be
those for the other side.
Note the number in the second label for all objects, just before the underscore. You should leave this as is -
the game uses these numbers to keep track of like objects.

Changing objects
You can change objects into similar objects by altering their labels in the BZN file - for example, to change
an NSDF Grizzly to a Black Dog Grizzly you simply alter the 2 labels, as you would for the player, i.e.
avtank to bvtank and avtank3_wingman to bvtank3_wingman. This sort of thing can cause problems,
however, if you switch to something more than a little different than the original object, so it's better to use
the custom build odfs method described above for placing nonstandard objects.

Naming Nav Beacons and other objects
You can rename a standard Nav Beacon (and any other object in the game) with any of the text strings that
are valid for Battlezone. Just search for the hex string 02 51 20 00 in the object entry - in the player's entry I
looked at while writing this section this string is about 250 bytes below the second label. It's easy to spot
because it has a long string of binary zeros after it for a text string. Just add a valid text string (in
hexadecimal notation) after this - for example, to rename a nav to Drop Zone, find the Nav entry (an NSDF
nav will start with the label apcamr) and just add the string 44 72 6F 70 20 5A 6F 6E 65 after 02 51 20 00.
(If you have a good hex editor you should be able to type in the plain text in the ASCII display) Again this
works for all objects, not just nav beacons. It's a handy way to avoid having to include extra nav or other
odfs with your mission. Battlezone does not let you create your own text labels due to language localization
considerations - however, there are quite a few allowable strings that you can use. For a complete list of
these, look in the sprite table files found in your addon directory - they are named spritea.stb and
sprite8.stb. Open these with a hex editor and search for "Barracks" - this is the first name entry. Scroll down
from there to view all allowable strings. Objects appear in the BZN file in the order you placed them on the
map - keep this in mind when placing Navs, so you can name them in proper order.

Changing an object's team
You can change the allegiance, or team number of an object by altering a single byte. The allegiance byte is
located 8 bytes in front of the second label in the object's BZN entry - to change an enemy turret to a friend,
for example find its second label, i.e. svturr0_turrettank and count back 8 bytes from the first character.
This byte can be a binary zero, one, or two. To make it a friend, change the byte to 01. To make it a neutral,
change it to 00.

Changing and adding pilots to vehicles
You can add a pilot (or soldier, or a sniper) to vehicles that do not normally have one, such as Gun Towers,
Fury units, and production units. All BZN object entries start with 07 XX 08 00 - the XX byte varies from
map to map, depending on what system it was created on, but the 07, 08 and 00 are constants. This string is
used twice for each entry - once at the very beginning, and once near the end, about 20 bytes from the start
of the next object entry. This second string at the end of the entry is used to designate the pilot in the
vehicle. Look for a vehicle entry and after the second 07 XX 08 00 string you should see aspilo or sspilo as
the pilot designation. For vehicles with pilots, you can change this to a soldier or sniper - these pilots will
attack the enemy if they eject successfully. You can also remove the pilot altogether by changing the pilot
string to all zeros - this creates a sniperproof tank, as it will have no sniper dot. The unit will still be
controllable and fight, but it won't be able to pick you up. Some units, like Gun Towers and Fury units
already have this string set to zero. To add a pilot, just put the string for the pilot where it would normally
be. If the unit is destroyed, a pilot may eject, and if you have used a sniper or soldier pilot type - asuser,
assold etc. the pilot will attack the enemy. You still will not be able to get into these units, however, even
with a pilot entry, as the game doesn't normally consider these to be pilotable craft. This seems to work
with vehicles/Gun Towers only - you can't add a pilot to a static building like a barracks or comm tower.
Moving units off the map
Although you can place units off the map proper from SHIFT-F9 mode, you can't place them very far off
the edge. There is a way to place units tens of kilometers off the map by altering the placement bytes in the
BZN file. Look for the object you want to move and count 150 bytes forward from the header (07 XX 08
00). Count the very first byte, the 07, as byte 1. When you get to byte 150, stop. Byte 150, 151, 152 and 153
control how far east the object is on the map grid. Byte 150 won't move it very far, but bytes 152 and 153
will place it WAY off the map, if you substantially increase their values. The four bytes starting at byte 166
control how far north the object is and can be increased in the same fashion. I've experimented a bit with
this and managed to place units better than 80km (80 thousand meters) off the map. Needless to say it takes
a long time for a unit to get back to you from that distance. This could come in handy if you wanted a
scenario in which a Recycler was en route to a base and the player had to defend it with the units on hand
until the recycler arrived. Back up your BZN file if you decide to try this - I've encountered some strange
side effects while trying this trick. It's worthwhile though, if you get it to work right. Thanks to Avatar for this neat little trick.

5. AUXILARY FILES
The four files you MUST distribute for your IA map to run are the HGT, MAT, TRN, and BZN files.
However, you can include extra files in order to spice up your mission. Below is a list of these, and their
possible contents.
The mission ODF file
Each mission can have its own ODF file, in which you can specify starting scrap and pilots, the mission
start text, etc. Below is a list of all the parameters you can specify in the mission ODF file:

myScrap
hisScrap
myPilots
hisPilots
startVoice
missionObjective
successCondition
failCondition
shellSuccess
shellFail
timeLeft
shellOutOfTime

The variable myScrap sets the starting scrap for the player, while hisScrap sets the starting scrap for the AI.
This is a numeric value, and can be set very high if you so desire. Usage example: hisScrap = 100
The variables myPilots and hisPilots work the same way.
The line startVoice can be used to specify an audio file (in WAV format) that can be played at the start of a
mission. This can be one of the voiceover files used in the game (see the UNZFS description in the Links
and Utilities section for a way to get a list of these) or you can create your own voiceover and include it
with your mission. Usage: startVoice = "misn0403.wav" You must put the filename in quotation marks.
The missionObjective line lets you specify a text file that will display a message in the objective text box
when the mission starts. Example: missionObjective = "usrmsnXX.otf"
The line successCondition = 1 will end a mission successfully if the player has destroyed the first enemy
Recycler, Factory, Armory, and Constructor placed on the map. (You can have more than one of each on
the map.) If successCondition is set to 0 or the line is omitted the player must destroy all enemy production
AND combat units to win.
The line failCondition = 1 will cause the mission to end in failure if all the player's production units are
destroyed - if omitted, the player can continue until they get killed.
You can display a congratulatory message to the player if they win by specifying a filename with the line
shellSuccess and a suitable DES file. Example: shellSuccess = "usrmsnXw.des"
The shellFail line displays a message to the player if they should happen to lose; e.g.
shellFail = "usrmsnXf.des".
The timeLeft variable can be used to create a timed mission - the time is counted in seconds, and specified
like this: timeLeft = 1800.0f - this would give the player half an hour to complete the mission objectives.
You can specify values greater than 60 minutes, but the clock display won't show hours - it will count down
to zero and begin again on the time remaining.
The shellOutOfTime variable determines if the player wins or loses when time runs out, depending on
certain conditions - shellOutOfTime = 0 will cause the player to fail the mission, if the enemy units have
not been destroyed when time runs out. If you use shellOutOfTime = 1, the player will automatically win
the mission when time runs out, provided they have at least one production unit intact. Setting
shellOutOfTime to 2 counts the clock down, but nothing happens at the end of the countdown.
You can mix and match all these parameters to your heart's content, depending on your mission
requirements. Make sure the filename is the same as your other mission files - otherwise the parameters in
the mission odf will not be called.

The OTF or objective text file
This is a simple text file you create with something like Notepad. It must be specified in the mission ODF
file and will display a message on the screen. In order to fit it in the text box you must use no more than 10
lines of about 30 characters each. You can use more than this if you have to, sometimes this is necessary
when giving the player a detailed mission objective. Just make sure you check the text message in-game to
ensure that it does not get cut off by the screen edge or the hull/ammo indicators. The maximum number of
lines you can really use is about 20. The extension convention for this file is .OTF (the original objective
text files in the game all use this extension), but you can use whatever you like, so long as the extension is
referenced in the mission ODF.

DES files
As described above, these are simple text files that display a message at the end of the mission. You can
have one for a successful mission, and another in case the player fails. Again the conventional extension for
these is .DES, but you can use any extension you want provided you include the whole filename when you
specify it in the mission ODF file. The DES files can be fairly large, more than a page of text can be
displayed(I don't know what the actual limit is). Battlezone will word wrap these files so don't use carriage
returns when creating these files unless you want a paragraph break - otherwise your end mission messages
will display strangely.

WAV files
If you are inclined to do so you can include a voiceover WAV file to be played at the start of the mission.
This can be anything - many people use quotes dubbed from movies, or a piece of a song. Style doesn't
matter, but file format does, thus this little note. WAV files for Battlezone should be in 8 bit mono format at
11025 Hz. If you want a good program to create new files or save existing wav files to the right format try
Goldwave. The unregistered version only lets you perform a limited number of operations per session but
it's more than enough to convert a file to the right format. Use the Save As option to choose your new
format in the Save As dialog box. To change Hz use the Playback Rate option from the menu. Make sure
you specify the WAV file with extension in the mission odf file after the startVoice parameter. Now that the
newest version of UNZFS is available you may want to try cutting some of the original voiceovers into new
messages for a more authentic sounding mission statement - I have had a bit of success doing this.

TXT file
You should always include a text file that describes your mission. Most IA missions on the web have text
files created on a template you can simply copy for yourself - It includes a section for the planet, scrap
count, difficulty level etc. plus a section for the storyline. It also includes a legal disclaimer created by
Activision that you should distribute with your map.

The LGT file
The LGT file is automatically generated by Battlezone when a mission is run if it is not already present.
This is the file that contains the texture and shadowing you see in the in-game minimap. Before you
distribute your map you should delete this file and run the completed mission again to create an updated
LGT file. This is the one you should distribute with the level. Some people don't include this file to save
space - just be sure to include an updated file if you do. Since this file is created automatically if not
present, while you
are editing your terrain you can also delete it between editing sessions, if you want to see how the minimap
looks as your terrain making progresses.

INF files
If you have units created with custom odfs in your level, you can add a small text file (10 lines * 30 chars)
and give it the name of your custom odf, with the extension INF. This is the information file displayed
whenever you ID an object in Battlezone with the "I" key. Objects without this file just show the filename
required when you ID them in-game. This is not strictly necessary, but it's a nice touch. You can use these
files as part of a mission script if you like - you could place a custom headquarters or comm tower in the
game and instruct the player to fight his way to the building, then ID it to get his next mission objective.

BCP files
Back when BZ1 first came out someone made a handy utility for launching IA missions called the
Battlezone Control Panel. Among other things, this tool let you choose the command line flags, kept track
of how many times you played a level, and with the BCP file let you view a detailed description of the
mission. The format for these files is similar to the text template - you should be able to find an IA level on
the net with a BCP file to copy, if you want to include one. Unfortunately this tool was never updated so
some of the built in level description files are very out of date. However, there are people who still use this.

IAL files
Ial files can be included with your mission so that information on the mission will display in the IA
Launcher, a new utility by yours truly for launching Instant Action missions (see the utilities section for
details). These files are easy to make - just look in the ial\ialfile directory once you have it installed and you
will see a large list of ial files you can look at to see how the format works - it's very similar to the odf
format. Ial files just need to be unzipped to the addon with the rest of your mission files in order for IA
Launcher to use them.

BMP files
You may want to create a bitmap image of your map so people can see what it looks like before they
actually launch the mission. You can do this by using the shellmap flag when you run your mission, e.g.
bzone usrmsnXX.bzn /shellmap
This will create a BMP file in your Battlezone directory that you can include with your mission if desired.

The AIP file
Although Battlezone often behaves in an erratic and undesirable manner when confronted with landscapes
and custom units not found in the original game, it is possible to exert limited control over what the AI does
by including an Artificial Intelligence Plan, or AIP file. In the addon there is an AIP file named
demo01.AIP you can look at to get an idea of how it works. The first thing in the file is a list of priorities
that you can alter to change the importance of the AI goals. You can reduce some of these, in order to get
the AI to pay more attention to attacking the player. Below is one thing to alter:

int max_escort_force = 1;

The above line determines the maximum number of units assigned to follow a Scavenger. Here I've set it to
one, this leaves the AI with more units to attack you, as there is really no need for, say, 3 AI units to be
following a Scavenger around when they could be attacking the player's base instead.
Below is something else to alter:

int attack_enemy_base_priority = 9000;

The above line controls how important attacking the player's base is to the AI. Here I've jumped it up quite
a bit, to ensure the AI goes after the player's Recycler more often. You can also try altering the exploration
and perimeter priorities to lesser values, this will make the AI spend less time guarding and exploring, and
more time attacking.
The second section controls how the AI will deploy its troops - here you can decide how many units will
be diverted to explore the map, how many units will escort scavengers, etc. I like to reduce the exploration
force, there is no real need for the AI to be sending anywhere from 5-10 units to go sit in the corners of the
map.
Below this is a section containing types of AI goals, and the number of each to assign. Again, I like to
reduce the number of perimeter and exploration goals; in general, the AI seems to attack more often, and go
for the player personally more often, when these kinds of tweaks are made.
The next section contains 3 accounts, named Slush, Defense, and Offense. The budget caps determine how
much scrap is allotted for a specific account out of the total amount. The sections below this are the most
useful - here, you can tell the AI what units to build, and how many of each. This is particularly important if
you have custom units on your map, especially custom production units. Crashing can occur if you have
custom units not referenced in the AIP file, or if the AIP refers to units NOT on the map.
Under the BUILD TYPE column for each account in this section, you can use one of four build types -
RATIO_TO_HAVE, RATIO_TO_BUILD, NUMBER_TO_HAVE and NUMBER_TO_BUILD. If you use
the first two the AI will keep producing that unit until it runs out of scrap. If you have a large amount of
scrap, say 10000 for the AI in the mission ODF file the AI will build hundreds of units until the game
crashes. You should therefore stick to NUMBER_TO_HAVE and NUMBER_TO_BUILD for the build
type on levels like this. I have found that using NUMBER_TO_HAVE seems to work the best when you
have custom Recyclers and Factories building custom units. Often if you use the other build types the AI
will build one wave of units and then stop building things. I am not sure exactly how often this applies, you

should experiment with this on your own. One thing to keep in mind when using NUMBER_TO_HAVE is
that the AI takes into account the number of these units already on the map when it builds an attack wave -
for example, let's say you specify that the AI is to build 8 svtank (the CCA tank) using
NUMBER_TO_HAVE. If you have, say 4 other svtank units on the map, ordered to follow something, or
stay where they are, the AI will only build 4 more units to bring the number up to 8 total. This will lessen
the amount of units the AI will throw at you as the others are tasked to do something else. One way around
this is to assign a different unit to guard a location, follow a unit/ building, etc. For example, there is
another CCA tank, called svtk13 that is used on the 2nd Europa mission in BZ. By adding this into the
b_socmbt.odf along with the regular tank, you can put these tanks (they have SP-Stabbers) on the map also
where you want extra tanks, making sure the AI will build all the regular svtank units you specify in the
AIP file. You'll have to make sure you remember where each one is on the build list, so you don't put the
wrong units in by mistake. In the last few missions I've done where I use custom units I have gone to the
trouble of creating a second odf with the same characteristics as the one the enemy Recycler/MUF will
build, just so I can get around this problem and have the second identical unit guard stuff on the map, while
the AI builds the first type of custom unit unhindered.
Below the build accounts is a section called FORCE MATCHING. Here you specify which units the AI
will target by assigning a value to each. This works for both the enemy and your own AI units. Generally,
the AI seems to put a lot of emphasis on destroying scavengers, turrets, and gun towers regardless of what
values you enter here, though it does seem to have an effect on what offensive units the AI targets first. If
you do have a custom unit in the level you should reference it here, even if it is not something the AI can
build with a custom Recycler or Factory. Some custom units tend to cause crashing, especially stealth
Turrets and Howitzers (see the next section for more info on these) if you do not have them in the AIP file,
while others do not cause problems. You will have to experiment with any custom units you make and see
how the game deals with them.
Battlezone is very touchy about the AIP file syntax - if you leave out a quotation mark or semicolon the
game will probably crash. Make your changes carefully. The AIP file, like the mission ODF file, must have
the same name as the other mission files to be referenced. If you do not include an AIP file Battlezone uses
its default AI, and will only build scavengers, turrets, fighters and tanks.
If you wish to rename your level, first rename the BZN file, and change the two internal references to the
mission name with a hex editor to the new mission name as described above. Rename the HGT, LGT, MAT
and TRN files, along with the mission ODF file if there is one. Your new mission name should be eight
characters long, also - longer names cause problems with the game. You can use a shorter name, but make
sure you cancel out the rest of the old usrmsnXX name within the bzn file with binary zeros. Zip all the
files into an archive using a utility such as WinZip. Before you distribute your map, run it again from the
zip file you created to make sure everything is working properly. If your mission has more than a few files
you may wish to include a batch file other players can run to uninstall your level.


Top
 Profile  
 
Offline 
 Post subject: Re: IA Mission Tutorial
PostPosted: February 4th, 2010, 12:30 pm 

Joined: September 21st, 2007, 9:18 pm
Posts: 251
6. MISCELLANEOUS TIPS AND TRICKS
This section describes more of the things you can do to spice up a mission - some of them require a good
understanding of the odf system, so I put them here, rather than in the unit scripting section.

Extra ammo without a separate odf
When you save a level from edit mode, the ammo a unit has - stock or custom - is saved in the BZN file.
This means you can copy a stock odf to your addon and increase the ammo of the unit to a very high level
while building your mission, and then delete it later when you are finished building the mission - the high
ammo value will stick. In this way you can avoid having an extra odf for high ammo units that are already
on the map. This is useful for units that run out of ammo quickly, such as the CCA Walker - in this fashion,
you can give it 50 or 60 shots instead of 16. You can use this trick for sniper missions, also - copy the
asuser.odf or ssuser.odf to your addon and change maxAmmo to 100, and the player will have 100 sniper
rounds when the mission starts, if they are on foot. This doesn't apply to units produced within the game,
only those already on the map. In the same fashion, once the player with extra sniper ammo gets into a
vehicle, the sniper ammo capacity will drop back to three.

Adding powerups to units
An easy way to create a more dangerous unit is to place a weapon powerup right in front of it and path it to
go through the powerup. You could, for example, place some SP-Stabber powerups (apsstb.odf) in front of
some Bombers or Walkers and they will attack using these weapons once they pick them up. Sometimes
they don't get the powerups, so you will have to watch these units in the game and see if they are using the
weapons you scripted them to pick up.

Scrap and pilots
If you give the AI an enormous amount of scrap and pilots in the mission odf file, it will attack consistently
and usually with a significant force, especially if you've ordered it to build 30 or 40 combat units in the AIP
file. Try giving it 10000 scrap and 500 pilots, and you should see quite a difference in the intensity of the
attacks mounted against you.
Alternatively, you can start the player off with a very meager supply of scrap and pilots, which makes it a
lot harder for the player to build up defenses and muster a force capable of knocking out the enemy base.
You can also spread out the available scrap on the map so the player must pay more attention to resource
gathering to be successful. The Last of the Galilean mod by Existence makes good use of this technique -
the maps are quite large, and the player has to hunt around for the scrap fields, and protect the Scavengers
sent out to gather them up as well.
Yet another idea if you are using custom units is to change their scrap values. This is an idea I have used for
the secret level of the Red Wolf Missions - I had Howitzers come in to bomb the player from the cliff tops,
and as Scavengers have a nasty habit of ignoring the 300 pieces of scrap on the ground in front of their
noses while futilely trying to grab an unaccessible piece of scrap because it was created first, I set the scrap
value for the custom Howitzers to zero, to preclude this. On levels where the AI has been assigned 10000
scrap, you usually end up with a huge drift of scrap in front of your upgraded Turrets and Gun Towers,
making scrap too easily available. By setting the scrap value for custom enemy units to a low value, say 2
or 1, you will significantly reduce the excess scrap available to the player.
Another way to make things challenging is to start the player with virtually no scrap, in storage or
accessible scrap fields, and make them have to hunt down and recycle a custom relic or other object in
order to get the necessary starting scrap to survive. BS'er made an excellent mission like this for his Get
Arkin mission pack, and Floating Point employed this technique in Absolute Zero as well. Be sure that the
object to be recycled for scrap has a maxHealth of 0, so it cannot be destroyed - blowing up something
valued at 50-100 pieces of scrap will give you an instant Unhandled Exception.

Dual enemy bases
One way to put the heat on the player is to have two separate enemy bases at opposite corners of the map,
each with its own Recycler, Factory, and Armory. As stated above, you can have more than one of each of
these on the map. By placing the first Recycler at one base and the first Factory at another you can ensure
that the player must destroy both bases in order to win the mission. If you give the AI a lot of scrap and an
AIP that tells it to build a lot of units it will build attack forces at both bases. When the AI decides to attack,
the player often as not will get hit from both directions at once. I've noticed that once the first recycler is
destroyed, the enemy scavengers won't gather scrap unless there are scrap silos, so you should make sure
you place a few on the map - that way the AI can continue fighting.
Alternate mission objectives
A lot of missions in the end just require you to destroy the enemy recycler, factory and armory. This gets
boring after awhile, but you can create alternate ways for the player to win a mission. One way is to have
the player destroy a specific enemy building or unit in order to win. This can be done by placing an enemy
recycler at low health off the edge of the playable map and ordering it to follow a neutral pylon. You can
then place a custom sniper next to it. Below is an odf for such a sniper, built on asuser.odf:

[GameObjectClass]
baseName = "aspilo"
classLabel = "person"
scrapCost = 0
scrapValue = 0
pilotCost = 1
maxHealth = 0
maxAmmo = 5000

unitName = "Player"
aiName = "SoldierFriend"
aiName2 = "SoldierEnemy"
heatSignature = 0.2
imageSignature = 0.3
radarSignature = 0.2
weaponHard1 = "GC1"
weaponName1 = "gspstab"
weaponHard2 = "GC1"
weaponName2 = "gsnipe"
[PersonClass]
painSound1 = "pain1.wav";
painSound2 = "pain2.wav";
painSound3 = "pain3.wav";
painSound4 = "pain4.wav";
painSound5 = "pain5.wav";
painSound6 = "pain6.wav";
burnSound1 = "lburn1.wav";
burnSound2 = "lburn2.wav";
dieSound1 = "death1.wav";
dieSound2 = "death2.wav";
dieSound3 = "death3.wav";
dieSound4 = "death4.wav";
dieSound5 = "death5.wav";
crushSound = "squish.wav";
jumpSound = "jump.wav";
landSound = "land.wav";
stepSound = "running2.wav"
animRate = 5.0

Ammo is increased so that the sniper will be able to use the SP-Stabber weapon. I've set the maxHealth
value to zero - any object with a maxHealth of zero cannot be destroyed. (Just try to destroy a Pylon or a
CCA repair pod.) I don't know if this is a bug or intentional, but it's very handy here, as an enemy unit that
happens by can't kill the sniper. You could also place the enemy recycler and the sniper on some
unreachable plateau to counter this. Put the sniper in as team 3 and order him to attack the building the
player must destroy. When the player accomplishes this, the sniper will turn and destroy the enemy
recycler. If the line successCondition = 1 is used in the mission odf, the mission will end, provided there are
no other enemy production units on the map. You can create variants on this theme, i.e. require the player
to destroy multiple buildings, or a factory and a Launch Pad, etc.
You can also reverse this trick and use it on the player - put a friendly recycler off the map and have the
team 3 sniper attack a building or unit the player must protect.

No howitzers, no mortars
If you are using custom production units, you can deny the player access to certain units and powerups by
removing these items from the units' building capabilities. Look at the avmuf.odf file, for the NSDF Unit
Factory. The units it can build are beneath the [ProducerClass] line. To make a factory incapable of
building howitzers, just remove the line that says: buildItem4 = "avartl". This is a way to deny the player an

easy way to take out enemy Gun Towers. In the same way you can modify a recycler to deny the player
additional production units, or create an armory that can't build mortar powerups (check out my mission
Blockade for an example of a partially disabled armory). This technique was pioneered by Toni Chaffin
(Slingshot) and was used extensively in The Red Odyssey.

More dangerous AI units.
Most of the regular units do not pose a serious one on one threat to the experienced BZ player, with the
possible exception of Bombers and Walkers. Once you've played online against some experienced human
players, shooting at CCA tanks that turn away after taking one hit can become boring. One way of dealing
with this is to tweak the mission odf and aip to make the game send hordes of enemies at the player, as
described above. However, if you are willing to spend time perfecting some custom odfs, it is possible to
create some truly evil AI units. You may have noticed that some units will turn away when hit and circle
around you, while other units will stare you down as they try to kill you. This is due to the aiName and
aiName2 used in the odf. Units using "TankFriend" and "TankEnemy" will dance about trying to get behind
you, while units using "RocketTankFriend" and "RocketTankEnemy" will face you down, more like a
human player would. Given the right weapons, these latter units are much more dangerous. Try creating a
custom Stoli (CCA Light Tank) and give it an AT-Stabber or SP-Stabber and you'll see what I mean. You
can assign the RocketTank aiName to regular Fighters and Tanks, also, if you are building custom units.
Another way to improve the behavior of the AI units is to increase the values for omegaTurn and
alphaSteer, along with increasing their speed somewhat, so they move as fast as a human player. Units
assigned the aiName "TankFriend" and "TankEnemy" are much more able opponents when you tweak these
values to higher settings. You can of course change the weapons loadout for custom units also - changing a
tank's cannons to dual SP-Stabbers or giving a Rocket Tank dual TAG Cannons are 2 of the more obvious
modifications. If you are a Rocket Tank and missile fan there is a special Hornet odf, named ghrntai.odf,
that AI units can use properly. Put this in an AI Rocket Tank and they will fire barrages of Hornets at you.
This was never used in the original game, maybe they thought it was too dangerous. I can testify to the
effectiveness of this weapon; I built a level that used it, and got nailed plenty of times by Hornets that
seemingly came out of nowhere. When the AI targets you with this it will fire on you from hundreds of
meters away; seeing a salvo of Hornets coming at you from out of the darkness with no enemies nearby on
radar can be very disconcerting. You can also create your own devastating custom weapons. Fast firing
rockets, weapons that fire a stream of heavy MAG Cannon balls, and super powered prox mines are just a
few of the things I have seen on IA levels. The possibilities for new weapons are almost endless, just use
your imagination.

Sniperproof units
If you are building a difficult level with some heavy duty enemies and you don't want the player sniping
them for their own use, you can make them sniperproof. One way is to remove the pilot entry as described
in the BZN file editing section - however, this only works for individual units already on the map, and
doesn't apply to new units produced in the game. To get around this you can create a custom unit that
doesn't start with av, bv or sv. For example, a unit named dvtank or kvtank will not have a sniperdot visible.
These units can't pick you up, either, if they are friendlies. Build a custom recycler and/or factory to
produce them and you're in business. Adding the lines pilotCost = 0 and hasPilot=0 to the odf seems to
work for this also.

Stealth Turrets and Howitzers
Bs'er figured out a way to sneak turrets into the player's base without the
player being able to attack them en route. These stealth turrets are basically normal turrets with a high
altitude setting and a zero-time deployment. Open up avturr.odf, the odf file for the standard NSDF turret.
Under the [HoverCraftClass] section, change setAltitude to 1000. Then look under the [TurretTankClass]
line. Change timeDeploy and timeUndeploy to 0.0 - that's all you need to do. Add the line
baseName = "avturr" to make it look like an NSDF turret and save with a custom name.
You will need to include an AIP file if you use these, and under the FORCE MATCHING section list your
stealth turret and a value for it. You must make sure your level has at least one of these units in it when the
mission begins, otherwise you will experience game crashes. The same applies for the timeDeploy and
timeUndeploy lines in the unit's odf file - these must be set to zero to avoid crashing the game.
You can also create stealth Howitzers using the same method - however the classLabel MUST be changed
from howitzer to turrettank. You must also add a [TurretTankClass] section with the appropriate values. If
you use the howitzer classLabel the unit will deploy at whatever height you specified in the setAltitude
value and just sit there.
This is a great way to step up the danger the AI poses, as turrets and especially howitzers are very
vulnerable when traveling to a location - this way they get there without being exposed to the enemy until
it's time to attack. Just place a few of these in a level and path them to go to the player's base. They will
travel at altitude and appear instantly when they reach their destination. A downside to this is that although
the units are very high in the air your units will still sense them approaching and try to attack them while
ignoring other enemy units. To mitigate this, try to have the units go to a location where they pose a danger,
i.e. to a scrap field just outside the base, without causing excessive distraction. For stealth howitzers, try to
land them on a hill just about 200 meters from a production unit, out of the range of Gun Towers or other
defenses the player may erect in the meantime.

Airborne soldier assaults
Another neat special attack is an assault on the player's recycler by airborne troops. This is done by placing
a custom APC in the level with a high setAltitude value. Open up svapc.odf and you'll find the setAltitude
value under the [HoverCraftClass] line. You can also change the lines under the [APCClass] - the
soldierType line determines what comes out of the APC, and soldierCount determines the number of
objects that will spawn when the APC attacks. Try setting the setAltitude value to 4000. Save as a custom
odf (don't forget the baseName line) and put it in the b_socmbt.odf build file. Run your mission in edit
mode and place one of these by the player's recycler. Note that you can't see it when you place it - this is
just a side effect of the high setAltitude. Hit CONTROL-A to make it rise to altitude, then hit CONTROLA
once more so the APC doesn't wander off. Now, go to SHIFT-F9 mode. Order the APC to attack the
recycler. Press CONTROL-A again, without leaving SHIFT-F9 mode, and the APC will attack. Wait until
the troops come out and clear the APC, then HIT CONTROL-A once more to freeze the action. Go to Edit
Objects mode and delete the custom APC (You should not leave this in the mission, as it will distract
friendly combat units). Then go to Edit Task mode and reorder each individual soldier to attack the
recycler. This is not always necessary, as the troops will generally attack the recycler anyway, but
sometimes they wander (or fly) off and go back to the enemy base (especially if the recycler is moving), if
they lose sight of it. Make sure you do not try to move an airborne soldier from edit objects mode, or he
will appear at ground level, and immediately attack his intended target, which will undoubtedly screw up
your level.
Once you've done this, save the level as you would after any mission scripting you do without leaving
CONTROL-A mode again, so the scripting is saved. When you run the mission again the soldiers will
descend until they are within range and attack. It takes about 6 minutes for them to fall 4000 meters. You
can vary the time by changing the setAltitude value for the APC - anything from a few hundred meters to
hundreds of thousands of meters will work. (I don't know if there is an actual limit to an object's height in
Battlezone - I once built a custom tank that could fly and took it up over 500,000 meters just to see if I
could.
Soldiers falling from this height would take most of the day to reach ground level.) You can have several
waves of such attacks by using several custom APCs all attacking from different heights. You can have
regular pilots attack instead of soldiers by changing soldierType from "sssold" to "sspilo" in the custom
APC's odf file. This is useful if you want the pilot to get into a vehicle instead of returning to the recycler -
see the scavenger trigger trick in the Unit Scripting section above.
This trick works best against a recycler in the open - in a high walled canyon the soldiers sometimes get
hung up on the walls. On a side note, you can get APCs to spawn units other than soldiers - I've seen a level
in which an APC attacked with Comet missiles, and Bs'er created a map called "Skydiver" in which special
APC's attacked with bombers that were person class objects.

Day Wrecker attacks
Want to launch a Day Wrecker attack against the player? Unfortunately, you cannot do this directly - there's
no way to order an enemy Armory to launch one, and Day Wreckers detonate immediately when spawned
by other units, or if they are in flight when the mission starts. However, with a few custom odf files it is
possible to simulate such an attack quite nicely - and the player will not be able to counter the attack.
First, create a fake Day Wrecker. You can use apammo.odf to create the following custom file - name this
something like apfwrk.odf.
[GameObjectClass]
baseName = "apwrck"
classLabel = "ammopack"
scrapCost = 1
scrapValue = 0
maxHealth = 150
maxAmmo = 0
unitName = "Day Wrecker"
aiName = "PowerUpProcess"
[AmmoPackClass]
ammoUp = 500
soundPickup = "weapon.wav"
soundReject = "mnu_buzz.wav"
This is nothing more than an ammo pod made to look like a Day Wrecker - changes are in green.
Next, you will need to create a custom soldier - this unit will be carrying the REAL Day Wrecker. Create it
from the CCA soldier odf (sssold.odf) and name it sswrck.odf.
[GameObjectClass]
baseName = "sspilo"
classLabel = "person"
scrapCost = 0
scrapValue = 0
maxHealth = 250
[color]maxAmmo = 500[/color]
unitName = "Soldier"
aiName = "SoldierFriend"
aiName2 = "SoldierEnemy"
heatSignature = 0.2
imageSignature = 0.3
radarSignature = 0.2
weaponHard1 = "GC1"
weaponName1 = "gdwrck"
[PersonClass]
painSound1 = "pain1.wav"
painSound2 = "pain2.wav"
painSound3 = "pain3.wav"
painSound4 = "pain4.wav"
painSound5 = "pain5.wav"
painSound6 = "pain6.wav"
burnSound1 = "lburn1.wav"
burnSound2 = "lburn2.wav"
dieSound1 = "death1.wav"
dieSound2 = "death2.wav"
dieSound3 = "death3.wav"
dieSound4 = "death4.wav"
dieSound5 = "death5.wav"
crushSound = "squish.wav"
jumpSound = "jump.wav"
landSound = "land.wav"
stepSound = "running.wav"
animRate = 5.0

Once again, changes are in green. Only 2 things changed from the standard sssold.odf - first, the maxAmmo
is set higher. This really doesn't matter unless you specify a maxAmmo in the custom Day Wrecker the
soldier will fire, in which case the value must be equal to or greater than that value, so the soldier can fire it.
Also, the soldier's Chain Gun is replaced with the weapon which will dispense the custom Day Wrecker
(gdwrck.odf). Below is the custom odf for that weapon, based on gproxmin.odf:
[WeaponClass]
classLabel = "dispenser"
wpnName = "Daywrecker"
fireSound = "gprox00.wav"
wpnReticle = "gproxmin"
wpnPriority = 3
wpnCategory = "SPEC"
[DispenserClass]
shotDelay = 2.0
objectClass = "apwrkg"
The only important change here is the last line, which specifies the custom Day Wrecker itself. The shot
delay doesn't really matter, as the soldier will only be firing once. Now create the custom Day Wrecker
itself, apwrkg.odf. This is built off the standard apwrck.odf file. A custom one is necessary because we will
detonate it at least 200 meters up, and the explosion must be customized also because of this.
[GameObjectClass]
baseName = "apwrck"
classLabel = "daywrecker"
scrapCost = 20
scrapValue = 0
maxHealth = 300
maxAmmo = 0
unitName = "Day Wrecker"
aiName = "PowerUpProcess"
[DayWreckerClass]
xplBlast = "xdwrxpl"
The last line specifies our custom explosion (xdwrxpl.odf) which is listed below:
[Explosion]
classLabel = "quakeblast"
frameName = "rpuff.0"
frameCount = 16
frameDelay = 0.2
explRadius = 50.0
explSound = "xemt1.wav"
damageRadius = 450.0
damageBallistic = 0
damageConcussion = 1500
damageFlame = 0
damageImpact = 0
[QuakeBlastClass]
quakeCount = 12
quakeClass = "dayquake"

This is built on the xbmbxpl.odf - only the damageRadius and damageConcussion parameters are modified.
Once you have these five custom odfs you only need two custom APC's to drop the soldier and the fake
Day Wrecker out of, and you're in business. Put sswrck in one and apfwrk in the other (the soldierType).
Set soldierCount to one so one of each comes out of the APCs.
The setAltitude line for each depends on how long a delay you want before the bomb explodes. An
ammopack class object (apfwrk.odf) deployed from an APC descends very slowly - it takes about 25.5
minutes to fall 3000 meters. A person class unit descends 5 times as fast. Assuming we want this kind of
delay, and that we want the daywrecker to explode 300m above the ground, setAltitude for the APC
carrying the fake Day Wrecker should be 3000m, and setAltitude for the APC carrying the soldier should
be (2700 * 5) + 300. That's 5 times the total drop distance for the fake daywrecker, plus a 300m addon to
compensate for the height of detonation (It works out to 13800m).
Now, before you launch into edit mode, place the two custom APCs in the build files. The APC carrying
the soldier should be in a team 2 build file (enemy) and the APC with the fake Day Wrecker should be team
0 (neutral). Place one of each APC next to the friendly object you want to attack. This object must be
stationary, as the fake Day Wrecker will simply fall to the ground once deployed. Now toggle CONTROLA,
so the APCs go to altitude. Go to SHIFT-F9 mode. Order both APCs to attack the friendly object. Hit
CONTROL-A again, without leaving SHIFT-F9 mode. As soon as you see the soldier and fake Day
Wrecker deploy, hit CONTROL-A again to freeze the action. Delete the custom APCs, and then order the
soldier to attack the fake Day Wrecker. Save the mission, and you're done. When the level is played the
soldier will fall until he is within range of the fake Day Wrecker. He will then deploy his own custom Day
Wrecker, which will explode instantly, killing the soldier, the fake Day Wrecker, and maybe some units in
the player's base as well. The detonation needs to occur at a reasonable height so the player cannot interfere
with the attack. There is some variance involved as well - the soldier won't always set off the bomb at
exactly the same time, so it is necessary to allow for some extra distance to the ground. This is the reason
that a custom explosion is needed - a standard Day Wrecker will not cause any damage when it detonates at
that height.

You can tweak the explosion parameters to suit your mission requirements - the numbers I used in the
xdwrxpl.odf will cause moderate damage at 200-300m. If you are feeling sadistic you can cause far worse
damage over a much wider area. To keep the player from attacking the fake Day Wrecker you should avoid
having high terrain near the attack site that could put the player within shooting range of it. This is a very
neat effect when done right - the player may be busy fending off a heavy enemy attack and all of a sudden
notice a little yellow blip on the radar, slowly descending on the base...

Extra in-game messages
You've seen how to play a voiceover when your mission starts by specifying a WAV file in the mission odf,
but you may want to play additional messages to give further instructions to the player. Although
Battlezone doesn't allow this kind of scripting in IA missions, there is a way to play messages with a few
extra odf files. This is done by creating a custom mine and explosion. The following odf was created from
the proxmine.odf file - save it as scrapmin.odf.

[GameObjectClass]
baseName = "npscr2"
classLabel = "proximity"
scrapCost = 0
scrapValue = 0
maxHealth = 150
maxAmmo = 0
unitName = "Scrap"
[MineClass]
lifeSpan = 1e30
[ProximityMineClass]
searchRadius = 30.0
xplBlast = "xwavxpl"
The baseName line makes it look like a piece of scrap. The lifeSpan is increased so that the mine will not
self destruct. Under the [ProximityMineClass] section we specify the custom explosion that the mine will
use. This is based on the xminxpl.odf, and is listed below - save as xwavxpl.odf.
[Explosion]
classLabel = "planarexpl"
frameName = "rpuff.0"
frameCount = 0
frameDelay = 0
explRadius = 0
explSound = "avtankvp.wav"
damageRadius = 0
damageBallistic = 0
damageConcussion = 0
damageFlame = 0
damageImpact = 0

All the normal explosion values for graphical effect and damage are set to zero. The key line here is the
explSound line. When the "mine" goes off, the player will hear the the NSDF Grizzly saying "Grizzly
here." instead of the normal explosion sound. You can substitute whatever WAV file you want to play on
this line.
Place these two odfs in your addon, and put "scrapmin" in the neutral buildings build odf.
The best way to use this is to place a scrap field at the player's objective and put the custom mine with the
message you want to play in the scrap field. It will be indistinguishable from the other pieces of scrap.
When the player arrives the custom scrap mine will go off and play the message. Keep in mind that this
message cannot be replayed by pressing "R" like the mission start message, so you may want to use this as
an adjunct to a text message the player must read - for example, you could have a custom nav in the scrap
field with an INF file containing additional instructions.
This effect is best used at the start of a mission, as enemy units that wander by will set off the custom mine
as well - you may want to use this in conjunction with a script that delays the production of enemy units.
Any enemy turrets on the map should be given the CMD_NO_DROPOFF order so they don't go to the
scrap field. You can also use the trick of ordering the player's Recycler to follow the mine, and the Recycler
will not be available until the player reaches the scripted objective.

Sniper missions
Anyone who has played Slingshot's Snipe Run or the nightmarish 7th Chinese mission from the Red
Odyssey knows what a challenge this kind of level can be. Here I'll describe a few tricks that can help you
design a good sniper level.
To give the player additional sniper ammo copy the asuser.odf and ssuser.odf to the addon and set their
maxAmmo to a higher level - this gives the player sufficient sniper ammo (100 rounds is a good amount)
and makes the enemy snipers much more dangerous as well. You can leave these modified odf files in your
addon while you create your level and delete them after - the high ammo value will stick, as described
above. This way you don't need extra odfs, unless you are using a custom sniper with additional weapons.
People who have played The Red Odyssey will remember that in 2 of the Chinese missions the player had
to face enemy snipers without the ability to jump about, which made dealing with enemy snipers and
soldiers much harder. All this requires is a single line in the asuser.odf file (if you're playing as NSDF) that says:

velocJumpRun = 1.0

This will disable the jumping feature. You should put this right below the animRate line. If the player hits
the jump key the jump sound will be played very rapidly, so you may want to set jumpSound to a different
wav file sound (running.wav works ok for this) or to a null string between quotation marks. If you choose to
disable jumping you should use a custom odf based on asuser.odf or ssuser.odf and alter the player's entry
in the BZN file so the player on foot has the new characteristics. There are several other parameters which
can be used to alter pilot and soldier movement. For example, if you want to create a pilot that can't move,
add these lines to the custom odf:

velocJumpRun = 0.0
velocForwardRun = 0.0
velocReverseRun = 0.0
velocStrafeRun = 0.0


This will create a stationary pilot/soldier, sometimes useful for scripted IA levels. It is also possible to
make the player able to run very fast and jump to great heights by increasing these values. This may be
useful if you want the player to descend from the air and play the mission on foot, while having enemy
units scripted to attack them. Unfortunately even in Control-A mode you still descend from the air after you
bail out so you would have a difficult time ordering enemy units to attack you and save before you hit the
ground. However, by setting the velocJumpRun line higher (try 40 or 50) you can order enemy units to
attack you while your player on foot is standing on the ground, jump up, save, and just remove the altered
velocJumpRun line when you are done making the level.
It is also possible to modify movement characteristics for the player while the sniper rifle is deployed. This
is done by using the Crawl parameter. Using the line velocForwardCrawl = 1.0, for example, will permit
the player to move forward at 1 meter per second while in the sniping position. Snipers can also be made to
jump in the air using velocJumpCrawl, though this is not really practical. One more pilot parameter affects
how quickly a sniper can turn, very useful if you are making a level in which foot soldiers are defending a
base. The line that affects this ability is omegaSpinCrawl. Setting this to 5.0 makes the sniper turn much
more quickly than usual. There are other lines you can add that will affect the pilot movement but these are
really the key ones.
You may have noticed that pilots and soldiers always wander back to their base if there is a production unit
they can get into, even if you order them to stay put or follow something. Aside from some of the above
suggestions, another useful way is to use a custom pilot odf with the aiName and aiName2 parameters
altered to something else. Changing them to "RocketTankFriend" and "RocketTankEnemy" seems to work
the best. Pilots and soldiers with this aiName will stay where they are, and attack enemies that wander by.
They can also be ordered to follow objects, and they will obey. If you have a sniper level that also has
enemy production units on the map, and you need some enemy soldiers to stand guard somewhere this is
the way to go.
You can also modify a player's unit to use a radar scan like a regular tank does. By default asuser and ssuser
have no radar code, so everything shows on the radar map all the time, and the player cannot scan very far.
By adding a [CraftClass] section you can change these characteristics, for example:

[CraftClass]
rangeScan = 300.0f
periodScan = 3.0f
velocJam = 5.0f

This will give the player on foot the ability to see units on radar out to 300 meters, and the display will
update every 3 seconds.
When creating terrain for a sniper level, keep in mind that it looks different on foot than it does from a tank.
The terrain for these missions should be mostly rolling hills and valleys, with little or no rough terrain. If
you have tasked enemy pilots and soldiers to attack the player, they will get stuck very easily in a rugged
landscape. Snipers should be placed in gulleys and depressions where the player will have a chance to
engage them without being sniped from 300-400 meters away. Proximity mines can be used to channel the
player into areas where enemy soldiers and snipers wait in ambush. Turrets can be used for this also,
depending on what victory conditions your mission requires.
A player on foot can hardly hope to destroy a recycler with a plasma rifle, so you need to be creative in how
you end such a mission. You could have the player cross the map and capture an enemy tank by sniping it.
You could also give the player an Armory and have them drop a Day Wrecker on a weakened enemy unit at
the objective. Still another idea is to have the player make his way to an enemy outpost and assassinate an
enemy officer at a comm relay. This enemy could be targeted by a team 3 custom sniper off the playable
map, with a team 2 recycler at low health right next to the sniper following a piece of scrap or building.
When the enemy officer goes down the team 3 sniper turns and kills the team 2 recycler, ending the
mission.

Spawning units
You cannot create respawning units through the use of spawn points as you can for deathmatch levels. It is
possible to spawn units with a few custom odf files, however. To create a weapon that will spawn a unit,
open up gproxmin.odf and make the following changes to it - save as grecy.odf:

[WeaponClass]
classLabel = "dispenser"
wpnName = "Prox Mine"
fireSound = "gprox00.wav"
wpnReticle = "gproxmin"
wpnPriority = 2
wpnCategory = "SPEC"
[DispenserClass]
shotDelay = 1800.0
objectClass = "avrecy"
The delay is increased for this weapon so that it will only dispense one unit every half hour. The
objectClass line is altered so that instead of dispensing a Prox Mine, the weapon will dispense an NSDF
Recycler. You can change this to any vehicle you like - keep in mind that if it's a vehicle with a maxAmmo
line, such as a Tank or Bomber, the unit using the weapon must have at least as much ammo on its
maxAmmo line as the unit it is spawning, or it will not dispense the unit. If you are spawning a Recycler,
you only need one, so the unit creating it should be destroyed after spawning it. Below is a custom sniper
odf well suited for this purpose, built from asuser.odf - save it as asuser1.odf:
[GameObjectClass]
baseName = "aspilo"
classLabel = "person"
scrapCost = 0
scrapValue = 0
pilotCost = 1
maxHealth = 750
maxAmmo = 5000

unitName = "Player"
aiName = "SoldierFriend"
aiName2 = "SoldierEnemy"
heatSignature = 0.2
imageSignature = 0.3
radarSignature = 0.2
weaponHard1 = "GC1"
weaponName1 = "grecy"
weaponHard2 = "GC1"
weaponName2 = "gsnipe"
weaponHard3 = "GC1"
weaponName3 = "gflare"

[PersonClass]
painSound1 = "pain1.wav";
painSound2 = "pain2.wav";
painSound3 = "pain3.wav";
painSound4 = "pain4.wav";
painSound5 = "pain5.wav";
painSound6 = "pain6.wav";
burnSound1 = "lburn1.wav";
burnSound2 = "lburn2.wav";
dieSound1 = "death1.wav";
dieSound2 = "death2.wav";
dieSound3 = "death3.wav";
dieSound4 = "death4.wav";
dieSound5 = "death5.wav";
crushSound = "squish.wav";
jumpSound = "jump.wav";
landSound = "land.wav";
stepSound = "running.wav"
animRate = 5.0
The maxHealth and maxAmmo lines are increased to allow the use of the Solar Flare and to let the unit last
a bit longer. It has the weapon that dispenses the Recycler (grecy.odf) and also a solar flare.
One way to use this is to place a custom enemy turret with no ammo next to the custom sniper. Order the
enemy turret to CMD_NO_DROPOFF on itself so it stays put. Then order the custom sniper to attack an
enemy object across the map that the player must destroy to get a recycler. When the player destroys the
object the sniper will turn and attack the enemy turret, dispensing a recycler. It will also dispense a Solar
Flare, which will destroy the custom sniper within a few seconds (it will also melt the recycler a bit, but that
doesn't matter too much). If you don't want the enemy turret around when the player shows up, you can
create a second custom sniper armed with an SP-Stabber or similar weapon and script it as you did the first
one. Just make sure that the second sniper doesn't fire on the turret before the first one does. You'll also
want to make sure the enemy turret has a low health value so the second sniper destroys it quickly.
It should be noted that you can only spawn default units - trying to spawn a custom Recycler, Factory, etc.
will cause an unhandled exception when the spawn weapon is fired.

Other miscellaneous tips
One way to speed up editing your map is to copy the player.odf to the addon directory and increase the
velocForward and accelThrust values - in this way you can speed around the map while placing objects,
which saves time. Some people have even created special tanks which can place geysers and scrap through
the weapon hardpoints. You can also move yourself around the map in SHIFT-F9 mode by using edit
objects mode and dragging your tank about. Be careful not to delete yourself, or you'll wreck your level.

Don't move your tank off the map edge, either.
If you would like to try building IA levels on the preexisting BZ maps, you can - the HGT and MAT files
are already in the addon, but the TRN files are in the ZFS file. The old method for doing this was as
follows: open the bzone.zfs file with a hex editor. Search for misn01.des and change it to zisn01.des. Now
search for the TRN file you need - for example, misn12.trn. Change it to misn01.des. Now, start Battlezone.
Go to the training exercises, and the TRN file will be displayed as the mission briefing. Copy it and exit
Battlezone. Go back into the bzone.zfs file and put everything back the way it was. Now you can make
copies of the HGT and MAT files renamed usrmsnXX (substitute the appropriate numbers for XX) , along
with the TRN file you copied, and create an IA level from the map.
However, now that the newest version of unzfs is available, I strongly recommend you use this instead. You
can extract all the original TRN files out and use them to make your new maps, along with copies of the
HGT and MAT files from the addon. Be warned, all those unarchived zfs files will take up a lot of space on
your hard drive. For those with CD burners, I recommend you use unzfs on all the zfs files, each with its
own directory, and archive them on CD. This way you'll have all the game files at your disposal whenever
you get the urge to play around with them.

The cheats for The Red Odyssey are a bit different from the Battlezone cheats - hold down ALT-SHIFT and
type in the codes below to use the cheats:
TEBUFFY no vehicle or body damage - does not protect from sniping
TEDEADITE unlimited ammo
TEDONTDIE full map view
TERAT no scrap or pilots needed to build
TENERD gives satellite view without comm tower
The Red Odyssey also has a secret level - to access it, type "sammy" at any mission completion screen and
the next mission will be the secret level. You can access all the levels in The Red Odyssey the same way
that you do for Battlezone - the "iamadirtycheater" code works exactly the same way.

7. UTILITIES.
Below is a list of utilities, which you might find useful for BZ mapmaking.
They can be found at http://www.battlezone1.net/extras. A description of each is provided.

BZFRAC
This is a great utility that lets you create HGT files through the use of fractal algorithims. The program
permits large-scale manipulation of the HGT file, saving much time and tedium in the Battlezone editor. It
can't do everything, but it's a very useful program nonetheless.

BZACT
This is a great program for you dedicated planet and sky texture makers. Feed the program a folder full
of textures, and depending on the texture type and resolution (takes bmp and tga files), BZACT will
create a custom palette for the new planet that works with bz as it converts all textures to MAP format, or it
can also create palette independent 16 bit MAP files for use as sky textures in Hardware mode. This one is
also by Slight.

BZHGT
A bitmap conversion program by Slight. Lets you convert a BMP file to a HGT file, with elevations based
on color differentials in the BMP. Slight has recently redone this tool and named it BZHGT. The new
version
no longer requires DOS4GW and accepts TGA files as well as bitmaps.

BZLGT
Another new tool by Slight. This one converts a LGT file to a BMP, which you can edit to change your
map
shadows. Dropping the edited BMP back onto BZLGT creates a new LGT file, which you can use in your
mission. With this tool you can edit lava to glow brightly on dark maps or make terrain completely black
for night missions by using a very dark overlay for shadows.

BZNEd
A BZN file editor by Avatar, this program lets you view all objects within a BZN file. You can change and
add pilots to vehicles, change an object's allegiance, name Nav Beacons, etc. Saves you from editing the
BZN file by hand with a hex editor.

UNZFS
This program will extract all files from a ZFS file, so you can view the files contained within it. Very handy
for looking for the game's unused WAV files, vehicle GEO files, etc. - the latest version of this tool from
Blake Robinson (Dummy) will both extract and uncompress the zfs files, making all the original game files
available for modding and tweaking.

MAP Viewer
Another great tool by Blake Robinson, this one lets you load up and view all the MAP files from BZ1, save
them as bmps for editing, and write 256 color bmps as MAP files. Currently the tool only saves as 24 bit
bmp but you can still work successfully with the textures in PSP and Photoshop if you have the palettes -
much easier than the old screenshot method. Get this at the same place you get the new unzfs tool.

VDF Viewer
Finally, ship editing is possible in BZ1. This tool lets you import and view vdf files for the BZ1 ships. In
conjunction with the 3DS Max plugins Dummy has made, you can use these tools to create all new ships
for use in the game. You can also load existing GEO files in, if you want to make a tank with a new skin
and not have it interfere with the standard tanks in the game. Dummy has also posted an excellent tutorial
on his site explaining how to use these tools. 3D modeling is not the easiest thing in the world, but if you
are a dedicated modder you now have the tools you need to really transform your Battlezone world.

BZCP
The Battlezone Control Panel is a nifty program that saves you from the DOS command line. Lets you
launch IA levels without typing them in by hand at the command prompt, and provides descriptions of the
missions themselves (if the mission comes with a BCP file that the Control Panel can read).

Instant Action Launcher
The IA launcher is intended as an up to date replacement for BZCP. It works just like the BZ shell and has
detailed mission briefings built in for most of the maps out there. In addition it supports new maps with
addon ial files created by the mapmaker, and has multimedia capability, and displays planet graphics,
minimaps, and text files as well. People who are not comfortable working in dos should find this program
to be quite useful. You can edit maps from IA launcher as well - it supports most of the command line
switches.

EZBZ
Allows easy creation of the basic map for editing with the Battlezone editor. You pick the parameters and
EZBZ will run maketrn for you, and create the TRN file using the planet you choose.
Well, there's been a lot of activity on the BZ scene over the past several months, with many new tools being
introduced, so I have updated the tutorial to reflect this. I also corrected a few subtle errors and added some
new info here and there, also updated the website links.

last updated by ssuser 02/17/04
Edited mercilessly by Sporkinator 02/04/2010


Top
 Profile  
 
Display posts from previous:  Sort by  
Home Page Home Page  [ 3 posts ] 

Contact Us | All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum
Jump to:  

Donate Now
Donate Now


Powered by Skin-Lab © Alpha Trion
suspicion-preferred