MechWarrior 2
Scenario Implementation Guide

Activision
Copyright 1995, 1996 Activision
http://www.activision.com

Last updated: 10 Jan 1996

NOTE: These tools are provided as is with no claims made as to their usability or ease of use. WE WILL NOT RESPOND TO ANY QUESTIONS REGARDING THE TOOL SET ON OUR CUSTOMER SUPPORT LINES OR ON-LINE SUPPORT ACCOUNTS.

Table of Contents

Intro

Part I

Implementation Process

Part II

Mission Files- Overview
Scenario Files
Briefing Files
Formation Files
Gamepiece Spec Files
Planet Files
Palette Files
Maps Files
Shots Files
Explosions Files
World Files
Area Files
Navpoint Files
Scrounge Files

Part III

Mission Files- Specific
Scenario File xxxxSCN1.wld
Briefing File 1 xxxxBRF1.wld
Briefing File 2 xxxxBRF2.wld
Debriefing Fail xxxxDBFS.wld
Debriefing Success xxxxDBFF.wld
General Formations Formatns.wld
Specific Formations xxxxFRM1.wld
User's gp_spec Userstar.wld
Enemy's gp_spec xxxxENSx.wld
Friendly's gp_spec xxxxUSRx.wld
Tank gp_spec xxxxTANx.wld
Helicopter gp_spec xxxxENHx.wld
Turret gp_spec xxxxENTx.wld
Dropship gp_spec xxxxENDx.wld
Planet Files xxxxPLT1.wld
Palette File xxxxPAL1.wld
Maps File MW2_MAP1.wld
Shots File MW2_SHT1.wld
Explosions File MW2_XPL1.wld
World File xxxxWLD1.wld
Area File xxxxAREx.wld NEW
Startpoint xxxxSTx1.wld
User Goto Point xxxxGOUx.wld
Enemy Goto Point xxxxGOEx.wld
User Navpoint xxxxNAVx.wld
Leave Point xxxxLVEx.wld
Scrounge File xxxxSCRI.wld

Appendix A

Scenario Building Tools

Intro

This document was created as an aid to help understand and create scenarios for Activision's proprietary simulation engine and its related tools. The engine simulates ground based movements for the user and the other 'players' (human remote players or internally controlled computer players) in the world. The world is simulated with a ground plane and polygon based geometry representing objects (mountains, buildings, robots, etc...).

This document is separated into three main parts with an appendix. Part one gives a very rudimentary explanation of the simulation and the steps to take when putting mission design ideas to work in the sim. Part two gives a general explanation of the files used by the sim. It gives the naming convention for the files and how each file is used by the sim. The third part gives detailed descriptions of the commands used in each mission file and examples when helpful. The appendix contains a reference for the scenario building tools themselves.

After deciding what is going to happen in a mission or 'scenario', the first step is to create any necessary geometry for the world, then transform the mission proceedings, object locations and movements, lighting direction, types of 'players', and whatever else specific to that scenario into text files- following the format specified in the third part of this document. These text files are called world files as they are scripted text descriptors of the world that you are creating, and they use a WLD extension (i.e. userstar.wld).

Binary versions of these files are then created by a tool (assembler) called WASM which will automatically work with text files carrying a WLD extension.

(i.e. wasm userstar)

These binary files keep the same name but use a BWD extension.

The BWD files are then added to the project file (in MechWarrior II the project file was named mw2.prj). The project file is the game file that contains all of the binary versions of the mission files (BWD's), all of the gamepieces, all of the objects, sounds, animations, etc...

Then when the sim is started, a world loader will pull information from the project file and plug the numbers into the sim engine so that what you created will (hopefully) show up in the sim.

Part II: Mission Files - Overview

Everything specific to a mission could conceivably reside in just one world text file but this would lend itself to an unbelievably long file and sometimes it is necessary to separate files if there are mission objectives of the same type that relate to different parts of the world. Therefore the world files are separated into world files of different types, each type dealing with a different part of the world or scenario.

To keep the files organized according to what scenario they belong to and what part of the scenario they dictate, and to make mission changes and debugging easier, the world files use a naming convention. The first four letters of the world file name are used to differentiate the world file according to what scenario it belongs to. In MechWarrior II the different missions had colors for their codenames, therefore the scenario files for mission brown would use 'brow' for the first four letters of the filename. The last four letters are then used to describe the file type- what it does in the scenario. Therefore the second briefing file for mission brown would be 'browbrf2.wld' ('brf' standing for briefing and the '2' at the end because it is the second briefing file).

The sim can only actually load one file, so to get the information from all of the other files relating to the scenario a top level file will call out other lower level files relating to it, which will in turn call out other lower level files. This is done by using a command called include.

(i.e. include browbrf2)

Scenario Files

Scenario files are the top level file that call out all of the second level files. They are also the files that dictate the possible alliances (teams) of all the players and objects, then it specifies the alliances, formations, and dispositions of the gamepieces (the players: you, the enemies, or the friendlies), and finally, they also define the gamepiece mission tables (what the gamepieces do throughout the mission).

Scenario files follow the xxxxSCN1.wld naming convention.

Briefing Files

Briefing files contain information that is used by the shell rather than by the sim. These four files should always be included at the beginning of your SCN file. The first briefing file includes the mission briefing that comes up in the game shell. The second briefing file includes information on the recommended Mechs that come up in the shell for that particular mission, as well as a planet description for the instant actions missions. The third and fourth briefing files are for the debriefing that you get at the end of a mission depending on whether or not you succeed.

Briefing file names follow xxxxBRF1.wld, xxxxBRF2, xxxxDBFS, and xxxxDBFF

Formation Files

Formation files dictate the allowable formations that groups of gamepieces (players) can be assigned. There is one general formation file that all missions call out for all of the standard formations, and then there is a secondary, mission specific file that can be used when necessary to place gamepieces at specific orientations or distances.

General formation file follows Formatns.wld

Specific formation files follow xxxxFRM1.wld

Gamepiece Spec Files

Gamepiece spec (gp-spec) files define the players' vehicles (Mech or whatever), which alliance they belong to, their targeting text call-sign, and their AI values if they are not human. The mission tables in the scenario files apply mission objectives to any gamepiece within a given file, so these files often contain more than one gamepiece definition to group gamepieces together that will have the same mission objectives. These groups of gamepieces are called stars (based upon the Fasa's military grouping convention).

User's star file follows Userstar.wld

Friendly Mech stars follow xxxxUSR#.wld

Enemy Mech stars follow xxxxENS#.wld

Other vehicle star types are discussed in part iii of this document.

Planet Files

The planet files are used to declare several parameters that the sim uses to define a world's environment. The Planet file has declarations about the nature of the planet (gravity, slipperiness, atmosphere, etc...) and lighting (direction, type, intensity).

Planet files follow xxxxPLT1.wld

Palette Files

The Palette file has the declarations of palettes that the scenario will use for day, dusk, night, and during infrared mode.

Palette files follow xxxxPAL1.wld

Maps Files

Maps files define which textures from the library of maps stored in the project file get used for the scenario. There is one general maps file that all scenarios call, and then, if certain textures need to be more specific to a particular mission or different for only one scenario, a more specific map file will be called afterwards to overwrite the previous map calls.

The general map file follows MW2_MAP1.wld (for MechWarrior II)

Specific map files follow xxxxMAP1.wld

Shots Files

Like the maps file, this file calls out which shots (laser geometry, missile geometry, etc...) will be used for that particular scenario. This file also calls out the explosion file for the scenario.

The general shot file follows MW2_SHT1.wld

Explosions Files

Like the maps file, this file calls out which explosions (size, animation speeds, etc...) will be used for that particular scenario. This file is generally called out by the generic shot file unless it is a separate, scenario-specific, explosions file.

The general shot file follows MW2_XPL1.wld

World Files

This file is the specific world file that is considered the top level file related to calling out geometry, such as buildings, mountains, whatever, for the scenario. Most of the time, world files rarely include actual geometry calls, but instead include and place lower level Area Files that do the actual geometry calls. This is done to keep the different areas of the world more organized as well as separated for different mission objective purposes.

World files follow xxxxWLD1.wld

Area Files

Area files define which geometry is called out for that particular area in the scenario. These files are called out in the world file and are also placed throughout the world by the world file. These files also include any animations, ambient sounds, paths or any other tasks attached to the geometry included in these files.

Area files follow xxxxARE#.wld

Navpoint Files

Navpoint files define points in the world that gamepieces can use as starting points, navpoints to head to for mission objectives, etc... Navpoint files will usually contain only one type of declaration- the navpoint declaration. There can be only one of these in a navpoint file. There may instead be a navobject declaration which is a navpoint that is attached to an object so that the user can always keep track of the object's location.

Start points follow xxxxST#1.wld (# = 0 for userstar, 1 for the next star, etc...)

Navpoint files follow xxxxNAV#.wld

Other navpoint types are explained in part iii of this document.

Scrounge Files

Scrounge files are specific files to each scenario that define which scrounge (the rubble, plants, rocks, or whatever is lying about the ground) is used for the world. These could conceivably be used to create clouds or stars instead of ground objects. Scrounge places a grid of objects around the user that help accentuate the environment as well as the user's movement. As the user gets X meters away from the last row of objects behind him/her in the grid, the row is pulled away and placed X meters in front of the user, therefore the scrounge objects will always stay around the user to simulate rubble, plants, cracks, whatever, throughout the world. But because it is only done near the user there is a smaller speed hit as fewer polygons are being cached into memory or being drawn.

Scrounge files follow xxxxSCRI.wld

Part III: Mission Files - Specific

Scenario File xxxxSCN1.wld

The SCN1 file is the top level file which includes all other files pertinent to the scenario. This includes the SCN1 file start with the briefing and formation files at the beginning of the file; and then, at the end of the file, it includes the gp_spec files, planet file, map file, shot file, WLD1 file, and navpoint files. Any other necessary files can also be included in this SCN1 file unless they can be included in a second or third level file, which would be more appropriate to house them (i.e. all area files (files that do geometry calls) are included by the wld (world) file, which is considered the top-level geometry file).

INCLUDE

include <called_file>

called_file is the name of the file that you wish to include in this file. An include can be used in any file, but most occur in the SCN1 file and the WLD1 file.

ALLIANCE

alliance

<alliance1>

<alliance2>

<alliance3>

...

end

alliance1, alliance2, alliance3, etc.. are all possible alliances (teams) for that particular scenario. These get used later in the SCN1 file in the star declaration fields to assign the proper bitmaps and camos to the players' vehicles.

STAR

star

<star_filename> <star_alliance> <star_formation> <star_disposition>

<star_filename> <star_alliance> <star_formation> <star_disposition>

<star_filename> <star_alliance> <star_formation> <star_disposition>

...

end

The star declaration fields determine the alliances, formations, and dispositions that all of the gamepiece players in the world will have. The order in which you enter these will also determine which 'group' each star is numbered. The first star declared will become star 0, the next star 1, star 2, etc... These group numbers will be used later in the gp_spec files. Furthermore, the order in which the stars are declared here must be followed when making mission tables (i.e. if the userstar is the first star declared, its mission table must be the first one).

star_filename is the gp_spec file that is being defined in this part of the star declaration for the particular scenario that you are working on (i.e. Userstar, xxxxENS1, etc...).

star_alliance is the alliance that you want the star to be grouped with. This has nothing to do with how one star will react to another (whether they are considered an ally or enemy), but rather dictates what camos and texture maps will show up on their vehicle (i.e. clan insignias). This has to be one of the alliances declared in the alliance field (above).

star_formation is the formation that you want the star to start out in when the sim begins. The possible formations come from the list in the formatns.wld file or any other scenario specific formation files that have already been included in the SCN1 file.

star_disposition determines what side the star is on (friendly, enemy, neutral), and how each star will react when in contact with another star. Any of the same type will not fire upon eachother. Friendlies will fire upon enemies and vice-versa. Neutrals are only supposed to fire if fired upon (not used yet).

Mission Tables


MISSION

mission <star_filename> <total_mission_time> <mission_result_audio>

<ID#><action><type><target ><(start)>< time><mpt><dnd><priority><critical><audio>"<text>"

<ID#><action><type><target ><(start)>< time><mpt><dnd><priority><critical><audio>"<text>"

<ID#><action><type><target ><(start)>< time><mpt><dnd><priority><critical><audio>"<text">

...

end

These mission tables are necessary for every star you include in the scenario. They determine exactly what each star will try to do and how they will react to other stars or occurrences in the game. Furthermore, the mission tables should follow the order given in the star declaration fields (i.e. if star declaration field gives userstar first then browens1, browent1, browusr1, then the userstar mission table should come first followed by browens1's, browent1's and then browusr1's).

star_filename is the gp_spec file to which you wish to give these orders to (i.e. userstar, browens1).

total_mission_time is the total time for the mission in seconds. If the mission is not already successful before this time expires, then the mission will fail automatically. This is used to keep people from sitting around and waiting for things to happen. If the time is set to -1 then the mission's time limit never ends.

mission_reslt_audio is the audio file that gets called up when the user either fails or succeeds a mission. If a mission is successful, the sim plays the mission_result_audio with an 's' appended to the end of it. If the mission is failed, it appends an 'f". Therefore, if the mission_result_audio is 'gene001', the resultant audio file called up upon a successful mission will be 'gene001s'. These filenames must be seven characters or shorter so that when the "s" or "f" is appended to it, it will still be only eight characters long.

ID# is the objective number (0,1,2,3,4,...). The objective to start the Mech out at its starting point is always the first objective (0), so any real objectives start from ID# 1 and go from there. Unfortunately, the sim cannot simply look at the ID number to know what order to check the objectives and therefore the objective must follow the order of the ID# (i.e. objective with id# 0 comes first, id# 1 comes second, etc...). AI stars look for the first active objective among the mission table as its current one, therefore, the order in which the objectives are placed is very important (i.e. if you want to have a particular star of Mechs to attack the user above all else if the user destroys a particular item, the ID# for that objective should be 1), otherwise, the objectives should follow the order in which they are supposed to be done. The user's star of Mechs will ignore the objectives in the mission table. In that case the table is used solely for keeping track of what the user has done, and therefore the order, except for the start objective, is of no importance.

Tip: The mission tables, especially for the userstar, get very complex, so if at all possible, leave comments after each objective with a rem statement (#) so that comprehension and debugging will not be impossibe a month later.

action is the command that you want to give for that particular objective. The list of possible commands follows:

Begin- puts the star at its begin file's (startpoint) location in its predefined (in the star declaration) location. This objective is always successful.

Recon- means that every object in the target file that is labeled with Recon must be reconnoitered, or "reconned" (i.e. the user must get up to the targets and press the inspect key). Reconning the labeled objects can be done in any order, and they can also be destroyed immediately after successful inspection. It will succeed once all labeled objects are successfully inspected. Failure of this objective will only come once the objective time has expired, once the mission time has expired, or if a forced failure (another objective) has been applied to it. This has only been used for user's stars- whether or not this can be used for AI Mechs is not known.

Destroy- means that every object in the target file labeled with Destroy must be destroyed. This will succeed once all objects labeled with Destroy are destroyed. Failure of this objective will only come once the objective time has expired, once the mission time has expired, or if a forced failure (another objective) has been applied to it.

Defend- means that the star must protect the objects listed as Defend in the target file. This will fail as soon as any of the labeled objects are destroyed. Success of this objective will only come once the objective time has expired, once the mission time has expired, or if a forced succeed (another objective) has been applied to it.

Goto- means that the leader of the star must come within X meters of the navpoint, object, or gamepiece labeled with Goto in the target file. The distance (X) is 100 meters for all objects and gamepieces. The distance for navpoints is determined in the navpoint file. Success of this objective comes as soon as the leader has reached X meters from the target. Failure of this objective will only come once the objective time has expired, once the mission time has expired, or if a forced failure (another objective) has been applied to it.

Wait- is mainly used for AI stars. It forces that star to go to within X meters of the targeted navpoint labeled with a Goto and wait until the objective is completed or another objective with a lower ID# has been activated. The distance (X) is defined in the navpoint file.

Sleep- is mainly used for AI stars. It forces that star to go to within X meters of the targeted navpoint labeled with a Goto and sleep until the objective is completed or another objective with a lower ID# has been activated. Sleeping means that the star is shutdown, not visible on radar, and will only wake up if an enemy star comes within a certain distance (defined in the gp_spec file of the sleeping star) or is shot at. The distance (X) is defined in the navpoint file.

Shutdown- is mainly used for AI stars. It forces that star to go to within X meters of the targeted navpoint labeled with a Goto and sleep until the objective is completed or another objective with a lower ID# has been activated. Shutdown means that the star is shutdown, not visible on radar, and will not wake up until the objective is completed or another objective with a lower ID# has been activated. The distance (X) is defined in the navpoint file.

Return- is mainly used for AI stars. The Return objective forces the gamepieces within that star to go to the targeted and Return labeled navpoints if they go into a retreat or if they are given a Return objective. This objective is infrequently used as the AI Mechs will automatically return to their return labeled navpoints automatically if retreating, and Goto objectives are just as easy to use.

Objsucceed- forces the objective in the target field to succeed. The target field must list the objective as follows: <star_filename'_'objective_number> (i.e. to succeed the user's fifth objective it would be userstar_5) . This has only been used with user's mission tables.

Objfail- forces the objective in the target field to fail. The target field must list the objective as follows: <star_filename'_'objective_number> (i.e. to fail the user's fifth objective, it would be userstar_5) . This has only been used with user's mission tables.

Objshow- forces the objective in the target field to toggle its type. If the type is Visible, it switches to hidden and vice-versa (see type field later in this mission section). The target field must list the objective as follows: <star_filename'_'objective_number> (i.e. to toggle the user's fifth objective from visible to hidden or vice-versa, it would be userstar_5) . This has only been used with user's mission tables.

Msnsucceed- forces the mission to succeed. The target field must be userstar_0. This has only been used with user's mission tables.

Msnfail- forces the mission to fail. The target field must be userstar_0. This has only been used with user's mission tables.

Leave- used as an opposite to Goto. This will succeed if the star (only used with user's stars so far) goes X meters away from the targeted, Leave- labeled navpoint. The distance (X) is defined in the navpoint file.

type defines whether or not the objective is visible on the user's objective list screen. If it is tagged visible, it is seen. If it is tagged hidden, it is not.

target lists the file that the sim looks in to attach the appropriately labeled objects to the objective (i.e. on a destroy, the star must destroy all of the objects that are listed in the targeted file with a destroy label attached to it).

(start) - Start (<result> <objective_number>) defines when the objective has become active and when the countdown on the time begins. Activation is done upon failure or completion of other objectives. In the <result> field of the start declaration, a letter is used to dictate whether the current objective should become active on the Success (S), Failure (F), or just completion (C) (completion means success or failure) of another objective. Then the <objective_number> field is the ID# of the objective that is being watched for completion. If the objective being watched is in the same mission table as the objective that is watching it is, then simply use the ID# in the <objective_number> field (i.e. a start based on the failure of objective three would be (F 3)). If the objective being watched is in another star's mission table then the <objective_number> should be preceded by the star's filename and an underscore (i.e. if activation of an enemy star's objective is based on the user succeeding its fifth objective, then the start field would look like (S userstar_5).

Start fields can also call a table to use ANDs or Ors to link the activation of an objective to the result of many other objectives. In this case the start field would simply become (table). The next line would then state either Table and or Table or (can only be one or the other). Then, on the next lines, use the <result> <objective_number> format to pick which objective results are to be watched. Finally, end the table with endtable.

(Example: a destroy objective that would start on the success of the third objective, the failure of the second objective, OR just the completion of the sixth, tenth, and thirteenth objective would be:

4 destroy hidden userstar (table) -1 1 0 None None None ""

table or

S 3

F 2

C 6

C 10

C 13

endtable )

time defines how long the star has to complete the objective. If the objective is not completed before the countdown completes, then it automatically fails. If the time is set to -1 then the objective's time limit never ends.

mpt means Mechs-per-target. This defines how many Mechs from the star will attach themselves to each target from the list of labeled objects.

dnd is the do-not-disturb setting. This changes how stars will react around enemy gamepieces. If dnd is set to 0 and an enemy Mech comes in range (defined in the gp_spec file), then the star will send out gamepieces to fight. If it is set to 1 then the star of Mechs will ignore any approaching enemies and continue its objective unless they are shot. If it is set to 2, then the star will ignore everything and just try to complete its objectives. This applies to AI Mechs only.

priority is set to either primary, secondary, tertiary, or return. These settings define the priority of the objectives for the userstar. These objectives don't actually effect how they're seen by the sim at all; they only change how they show up in the sim objective screen. If no priority is desired then None should be used.

critical is set to either Mandatory or Optional. This determines whether or not the objective must be completed before the mission is considered successful.

audio names the audio files that get played when an objective is succeeded or failed. If the objective is succeeded then the sim plays the audio file with the same name as the audio string appended with an 's'. If the objective is failed then the sim plays the audio file appended with an 'f' (i.e. if the objective with an audio string of 'brow002' is succeeded then the sim plays the audio file named 'brow002s", and if failed then 'brow002f'). If no audio is desired then None should be used.

text is the text string that shows up as the objective on the sim objective string. This text must be enclosed in quotes (i.e. "Destroy the Reactor at Nav Omega").

Briefing File 1 xxxxBRF1.wld

orders_begin

<text w/ control characters>

orders_end

text w/ control characters - contains the body of the briefing. The following control characters may be used; all must be proceeded by a backslash (\)

n - carriage return. The text will auto wrap unless a carriage return is specified. \n on a blank line will cause the shell to display a blank line.

c -centers text on line.

t - tab.

s - hard page.

q - includes information returned by sim (used in de-briefing).

r# - If #=0 then this character gets replaced by the player's current rank. \r1 for the next rank, \r2 for the rank after next.

Briefing File 2 xxxxBRF2.wld

S_desc (es-desk), or star description, is used to define certain parameters about the make-up of the user's star in all missions and also for the enemy stars in Instant Action missions. The first s_desc is always for the userstar. Every mission must have one. The second s_desc will be applied to all enemy stars in Instant Action missions. A second s_desc is not used or necessary in other types of missions.

s_desc<pilot_rank><max_tonnage><rec_mechs><max_mechs><default_mech1><default_mech2>

pilot_rank determines the A.I. values (pilot skill, gunnery skill, rubberband radius, target radius, sleep radius) that will be set in the gp_spec declaration for A.I. controlled Mechs. The A.I. controlled Mechs start at the rank declared, but each succeeding wave has better skills. Allowed values are between 1 to 8, with 1 the best and 8 the worst.

(table showing A.I. values and ranks corresponding to pilot_rank value?)

max_tonnage determines the heaviest Mech that can be taken into a mission. The user will not be allowed to select a Mech, either for himself or his starmates, whose weight exceeds this number.

rec_mechs determines the recommended number of Mechs for a mission. This is the number of Mechs that will appear in the shell star configuration and will be brought into the mission by default.

max_mechs determines the maximum number of starmates that the user can bring into a mission. This should always be equal to or greater than recommended_mechs. If the value is greater than recommended_mechs, the user can add Mechs until max_mechs is reached.

default_mech should name an MEK file (i.e. smn03std). The first default_mech will be the user's default Mech. Additional default_mech declarations must be included so that all possible starmates have a default declared. If max_mechs is 2, than there should be 3 default_mech declarations, one for the user and one for each starmate. Even if recommended_mechs is less than max_mechs, there must still be a default_mech for every possible Mech.

supscreen <start_up_screen>

start_up_screen names an existing launch screen that the shell will display while the world is loading. It is a file name, but 7 characters long, since the last character tells the shell what resolution the picture is.

Planet_desc declarations are only necessary for Instant Action missions. They have no effect on career missions, and are not currently being used for Net missions.

planet_desc_begin <planet_anim_#>

<text>

planet_desc_end

planet_anim_# gives the number of the small planet animation that should be shown on the Instant Action screen.

text can be any three lines of ASCII text that will be displayed in the shell to describe the setting for an Instant Action mission.

Debriefing Fail xxxxDBFS.wld

De-briefing file for a failed mission. Format is the same as for the BRF1 file.

Debriefing Success xxxxDBFF.wld

De-briefing file for a successful mission. Format is the same as for the BRF1 file.

General Formations Formatns.wld

(No doc?)

Specific Formations xxxxFRM1.wld

(No doc?)

User's gp_spec Userstar.wld

(No doc?)

Enemy's gp_spec xxxxENSx.wld

The Star files only contain one type of declaration, the gp_spec declaration. A Star file can declare any number of Mechs, but the sim will always treat them as a "star" and they will usually act as a group.

The userstar contains the user's Mech and his starmates. The ENS files contain enemy Mechs. Other special purpose Star files are explained below.

gp_spec <chassis_name> <configuration> <group_id> <authority> <control> <appl_actions> "<target_text>" "<contents_text>"

gp_spec <chassis_name> <configuration> <group_id> <authority> <control> <appl_actions> <gunnery_skill> <rubberband_range> <sleep_range> <target_range> <pilot_skill> "<target_text>" "<contents_text>" <targeting>

but see also the new syntax for Mercenaries.

chassis_name is the name of the MEC file (converted to BWD) for this Mech. MEC (BWD) file should contain the geometry declarations for a Mech. It is described elsewhere in this document.

configuration is the name of the MEK file to use for this Mech. MEK file should contain the weapons, armor, and other configuration information for a Mech. It is described elsewhere in this document.

group_id is the number given to this star in the SCN file. All Mechs in a star have the same group_id. The userstar is always 0, the next star declared is 1, the third star declared is 2, etc.

authority is either leader or follower. A star can have only one leader and any number of followers.

control can be user, internal, or remote. A gamepiece with user control is controlled by a human player. There can be only one of these in a mission. A gamepiece with remote control is controlled by a network player. A gamepiece with internal control is controlled by the A.I.

appl_actions are actions that can be applied to a gamepiece as an objective in the SCN file for a mission. There can be any number of these in a gp_spec declaration; they are separated by a semicolon (i.e. destroy;defend;explode).

The following five fields are only applicable to Mechs with internal control. They have no effect on Mechs with user or remote control. They are usually excluded from the gp_spec declarations for user and remote Mechs.

gunnery_skill is a number between 1 and 5, with 1 being the best and 5 being the worst.

rubberband_range is the distance a Mech will go from his star leader, in meters. Default value is 250 meters.

sleep_range is the distance at which a sleeping Mech will be awakened by the presence of an enemy Mech, in meters. Default value is 250 meters.

target_range is the distance at which a Mech shoots at an enemy mech, in meters. Default value is 250 meters.

pilot_skill is a number between 1 and 5, with 1 being the best and 5 being the worst.

The following two text fields are not applicable to a Mech with user control in a career mission, but should be used in Net missions.

target_text is the string that appears when the gamepiece is targeted. Length is 20 characters.

contents_text is the string that appears when the game piece is inspected. Length is 20 characters.

The targeting field is only applicable to Mechs with internal control.

targeting can be NoTarget, NeverTarget, AlwaysTarget. A gamepiece set to NoTarget is not put on the user's targeting list, and can only be targeted by a "Q" target. A gamepiece set to NeverTarget is not put on the user's targeting list, and cannot ever be targeted, even with "Q" target. A gamepiece set to AlwaysTarget will always be on the user's targeting list, regardless of range, unless the Mech is shutdown or sleeping.

Friendly's gp_spec xxxxUSRx.wld

gp_spec file for a friendly Mech or vehicle gamepiece stars.
See enemy gp_spec description.

Tank gp_spec xxxxTANx.wld

gp_spec file for a friendly tank gamepiece star.

Helicopter gp_spec xxxxENHx.wld

gp_spec file for a enemy helicopter gamepiece star.

Turret gp_spec xxxxENTx.wld

gp_spec file for a enemy tank gamepiece star.

Dropship gp_spec xxxxENDx.wld


xxxxEND#

gp_spec file for a enemy dropship gamepiece.

xxxxDOR#

gp_spec file for a door gamepiece. (Gamepieces are used as doors when they must be able to move (open or close) as a reaction to another gamepiece's objective.)

xxxxBOOM

gp_spec file for a nuke gamepiece. (Used as an objective-based trigger of a nuclear blast.)

Planet Files xxxxPLT1.wld

xxxxPLT1

planet <gravity> <atmosphere> <seconds_in_day> <days_in_year> <tilt> <circumference>

gravity is the force of gravity felt on the planet's surface, in Gs. Usable values range from 0.0 - 2.0.

atmosphere Unknown. Use default value 0.

seconds_in_day number of seconds in a day. Must be an integer.

days_in_year number of days in a year. Must be an integer.

tilt Axial tilt of the planet. Must be an integer.

circumference Circumference of the planet. Must be an integer.

planet2<mean_temp><max_jump_height><max_height><min_height><coef_friction><can_eject>

mean_temp sets the ambient temperature for the planet, in degrees Celsius. This only affects the Mech's rates of heat dissipation. If mean_temperature < -30, heat is dissipated at a faster rate than normal. If mean_temperature > -30, but < 50, the rate of heat dissipation is normal. If mean_temperature > 50, heat is dissipated at a slower rate than normal. Must be an integer.

max_jump_height in centimeters. The sim will limit jumpjets so a Mech will be able to get to half of the value set in max_jump_height with fully charged jumpjets.

max_height sets the maximum height of the terrain for a world, in centimeters. The sim uses this information to color code the map view.

min_height sets the minimum height of the terrain for a world, in centimeters. The sim uses this information to color code the map view.

coef_friction can range fro 0.0 to 1.0. It determines the how steep of a surface that a Mech can walk up. The higher the coef_friction, the steeper the surface.

can_eject is a boolean value that determines whether the user can eject or not in this world. 0 for no, 1 for yes.

planet3 <reverse_damage_shade> <no_light_shifting> <hide_sky> <hide_ground> <hide_horizon>

reverse_damage_shade is a boolean value. If it is set to 1, then the Mech's damage shade in reverse. Usually only used in a world with an inverted fog palette.

no_light_shifting is a boolean value. If it is set to 1, then the sim never does light source shifting for explosions.

hide_sky is a boolean value. If it is set to 1, then the sim will not draw or refresh the sky. Usually only used for enclosed missions.

hide_ground is a boolean value. If it is set to 1, then the sim will not draw or refresh the ground.

hide_horizon is a boolean value. If it is set to 1, then the sim does not draw the horizon.

now <now_in_day> <now_in_year>

now_in_day the sim will start a mission at the time indicated, in seconds.

now_in_year the sim will start the mission the indicated number of days into the year. Has no effect.

light <x,y,z> <type>

x,y,z is the coordinates of the light source, in centimeters.

type if type is set to 0, the sim will use a "point" light source, if type is set to 1, the sim will use a "omni-directional" light source.

ambient <amount>

amount varies the amount of ambient light in the sim. Values can be integers from 0 to 256. Lower numbers give a higher proportion of directional light and therefore produce more contrast on visible objects.

shadedist <distance>

distance is the distance beyond which objects receive only ambient light.

view <hither_clip_plane> <yaw_clip_plane>

hither_clip_plane in centimeters. Objects will no longer be drawn if they are closer to the user than the value set in hither_clip_plane. Usually set to 64.

yaw_clip_plane in centimeters. Objects will no longer be drawn if they are farther from the user than the value set in yaw_clip_plane.

luma <type>

type tells the sim the type of luminosity for this planet. Almost always standard.

hidden_text "<text>"

text is the default string that the sim will display if an object or a gamepiece does not have a value entered in its contents_text field.

horizon_map <color>,<height>

color unknown. Set to 0.

height determines the height, in pixels, of the horizon ramp.

lightobj <object>

object to tie the light source to. It must be placed in a static block, and the object must be declared immediately before the lightobj declaration.

The planet file for a mission should include the palette file for that mission.

include xxxxPAL1

Palette File xxxxPAL1.wld

xxxxPAL1

palette_grp <type> <standard> <explosion> <flash> <smoke>

type of palette being declared. Types currently being used are day, dusk, night, ir (for infrared).

standard name of the palette file (COL) that will be called out as the standard palette.

explosion name of the palette file (COL) that will be called out as the explosion palette.

flash name of the palette file (COL) that will be called out as the flash palette.

smoke name of the palette file (COL) that will be called out as the smoke palette.

palette_misc <black> <red> <cockpit> <alternate>

black name of the palette file (COL) that will be called out as the black palette. The sim will fade up from this palette at startup.

red name of the palette file (COL) that will be called out as the red palette. The sim will fade to and from this palette when the user has taken a substantial amount of damage.

cockpit name of the palette file (COL) that will be called out as the cockpit palette.

alternate name of the palette file (COL) that will be called out as the alternate palette.

Maps File MW2_MAP1.wld

(No doc?)

Shots File MW2_SHT1.wld

(No doc?)

Explosions File MW2_XPL1.wld

(No doc?)

World File xxxxWLD1.wld

These just include Area Files, e.g.
include testare1.wld
include testare2.wld
etc.

Area File xxxxAREx.wld

This section added Nov 23, 1996

Block

block x,y,z dx,dy,dz
...
endblock
surrounds a static block of data that should be cached together. When the eyepoint enters the given range of coordinates, the data is loaded.

Block_xform

block_xform sx,sy,sz rx,ry,rz tx,ty,tz
Sets the scale (only integer scaling allowed), rotations, and translation used when loading objects inside the next block.

Object

object instanceName=geometryFile scaleX,Y,Z rotX,Y,Z positionX,Y,Z scroungeType objectType parentObject
where instanceName is the name you'll refer to this object by later in the file,
geometryFile is the name of the file containing the object you want to use,
scaleX,Y,Z are usually 1,1,1
rotX,Y,Z define which way the object is facing
positionX,Y,Z are the position of the object (units are centimeters)
scroungeType is 0 except for scrounge objects, when it can be 0 or 1 (??)
parentObject is either fixed, world, or the instanceName of another object
objectType is one of the following:

Collision

collision instanceName collisionType
where instanceName is the instanceName given in the object declaration above
collisionType is one of the following: Here are details of how each collision type works:

Task

Each animation type is defined in the world file using the task directive. The format for the task directive is
 task <taskname> <period> <parameters>

where taskname is the name as described below, period is how often in program cycles the animation is updated, and parameters are different for each type of task, as described below.

Period can be used to lower the load on the sim of calculating animations. If period is zero, the animation task will be updated every cycle. For slow moving tasks, period can be used to have it updated only periodically.

Taskname is one of the following:

Example

mangle_on
block -12830,-1630,-14100 29080,15500,29450

  light_begin
    position -1296,20,123
    radius 10000
  light_end

  object tl1sigcb=tl1sigcb 1,1,1 0,0,0 -20376,0,153042 0 terrain fixed
  collision tl1sigcb ground

  object smo2_0210=fir2_3 6,10,6 0,0,0 -1296,20,123 0 flame world
  task ambientsound 0 smo2_0210;400,mecfire1,1

endblock
mangle_off

Startpoint xxxxSTx1.wld

User Goto Point xxxxGOUx.wld

Enemy Goto Point xxxxGOEx.wld

User Navpoint xxxxNAVx.wld

Leave Point xxxxLVEx.wld

ST files are for start points of all gamepieces. All stars in a world need a start point. The first star file should correspond to the first start point file, etc.

NAV files are for the user's visible navpoints. These will be targetable in the sim and usually relate to the user's mission objectives.

GOU files are for the user's hidden navpoints. These are often used for triggering other objectives in the mission table.

GOE files contain navpoints for enemy stars.

LVE files contain navpoints that are associated with a leave objective. Often, two of these are used to define the area for a mission. Both have the same center, but one has a slightly larger radius. If the user leaves the smaller navpoint, they are given a warning. If they leave the larger navpoint, they fail the mission.

navpoint <x,y,z> <angle> <enable> <flags> <key> <group_id> <radius> <appl_actions> "<text>"

navobject <group_id> <object> <radius> <appl_actions> "<text>"

x,y,z coordinates of the navpoint in the world, in centimeters.

angle if the navpoint is used as a start point, this is the angle at which the gamepieces will start facing. 0 is due north.

enable is a boolean value. If it is set to 1, then it will be targetable by the group that "owns" this navpoint (see group_id). All navpoints used by A.I. gamepieces should be enabled. GOU points that the user should not see should not be enabled, but NAVs should.

flags not used. Set to 0.

key not used. Set to 0.

group_id the number of the group that "owns" this navpoint. A gamepiece cannot ever goto, leave, target, or otherwise interact with another group's navpoint.

radius in meters. This is the radius at which the sim will register a gamepiece as being at the navpoint.

appl_actions are actions that can be applied to the navpoint as an objective in the SCN file for a mission. There can be any number of these in a navpoint declaration; they are separated by a semicolon (i.e. begin;goto;wait).

text is the text that will appear when the navpoint is targeted. Up to 20 characters.

object is the name of the object that will be the navobject. navobjects currently do not work as intended.

Scrounge File xxxxSCRI.wld

(No doc?)

Appendix A: SCENARIO BUILDING TOOLS

Wasm

Wasm is the primary world building tool. It converts the text WLD (WorLD) files into the binary BWD (Binary WorlD) files used by the sim.

wasm </a> </wX> </v> </p=pathname> <input_file_name> <output_file_name>

/v Optional. This causes WASM to simply echo the version number of the program and exit.

/p=pathname Optional. This overrides the pathname that WASM uses to find the project file. If no switch is given, WASM looks for an environment variable called "MW2PROJ". Otherwise it uses the default directory.

/a Optional. This causes WASM to parse all included files. This is a guru option; don't use it unless you know what you are doing.

/wX Optional. Set the warning level to X (default is 3)

input_file The input file must be a text MW2 world data file. The WASM tool defaults to an extension of .WLD if none is given.

output_file Optional. The output file identifies the name of the file for writing out the binary version of the world text file. A default extension of .BWD is used if none is specified. If no output file is specified then the input file with a .BWD extension is used.

Stripwld.exe

Stripwld is a utility that writes out a batch file for processing a world.

Stripwld will read through a world following the includes and build a bat file that processes the includes in reverse order so that you can properly process and add a world to the project file.

Usage:

stripwld <world>

world: is the name of the world to be processed.

Output:
Stripwld will output a bat file that is a series of lines with the includes used throughout the world files in reverse order.