Modding Info >> Modding the mission (.mis) files



Modding the mission (.mis) files

Let's examine file TT1_3.mis , "Cranium Crater". It begins:

//--- OBJECT WRITE BEGIN ---
new SimGroup(MissionGroup) {
   musicTrack = "Lush";

 

The first line here is just a comment. Anything beginning with a // is a comment line.

The next line creates the MissionGroup for the game. This will contain everything to do with the current level, the terrain, objects, spawn locations and so on.

musicTrack indicates which music file to play (if you have game music turned on) Options for this inclue: "Lush", "Spooky" or "Frantic".

Any statement line or variable declaration must end with a semi-colon. This signifies the end of the line when it is being compiled. If you omit one of these, it will not compile correctly and you'll ahve a messed up map.

All the data for new objects or groups is contained within squiggly brackets. { marks the beginning, and }; marks the end. You'll notice here that this one isn't yet closed. That's because all the other objects are held within this MissionGroup object. The last }; at the bottom of file is what closes this declaration.

   new ScriptObject(MissionInfo) {
      name = "Cranium Crater";
   };

This is what holds the map name. The only bit you should change here, is the bit inside the quotation marks - if you want to.

   new MissionArea(MissionArea) {
      area = "-256 -256 512 512";
      flightCeiling = "200";
      flightCeilingRange = "0";
      floor = "60";
      locked = "false";
   };

This group defines the size of the map, and the fog level.

Area = "x y width height"; (and thats imagining you are looking down on the map from above). If you want to allow people to travel to the islands beyond the main landmass, you will need to change these values to increase the area in which you can drive around without dying. Using "-512 -512 1024 1024" will do just that.

flightCeiling does nothing. Changing this value won't change anything in the game so you might as well just leave it as it is.

flightCeilingRange again, ignore this. It doesn't do anything.

floor = "height" This is what controls the kill zone of the fog. If set to "0" the the fog won't kill you, and the larger the number, typically the height of the fog, the higher the kill-zone will start. If you set it too high, then you won't be able to drive anywhere and will instantly die when you spawn.

locked again, this is irrelevant. Ignore it.

   new Sky(Sky) {
      position = "0 0 0";
      rotation = "1 0 0 0";
      scale = "1 1 1";
      visibleDistance = "1000";
      useSkyTextures = "1";
      renderBottomTexture = "0";
      SkySolidColor = "0.547000 0.641000 0.789000 0.000000";
      fogDistance = "300";
      fogColor = "0.820000 0.828000 0.844000 1.000000";
      fogVolume1 = "1 1 1";
      fogVolume2 = "1 1 1";
      fogVolume3 = "40 1 55";
      materialList = "~/data/skies/sky_day.dml";
      windVelocity = "1 1 0";
      windEffectPrecipitation = "0";
      noRenderBans = "0";
      fogVolumeColor1 = "128.000000 128.000000 128.000000
-222768174765569860000000000000000000000.000000";
      fogVolumeColor2 = "128.000000 128.000000 128.000000
0.000000";
      fogVolumeColor3 = "128.000000 128.000000 128.000000
0.000000";
      cloudSpeed1 = "0.0001";
      locked = "true";
      cloudSpeed3 = "0.0003";
      cloudHeightPer2 = "0";
      cloudSpeed2 = "0.0002";
      cloudHeightPer1 = "0";
      cloudHeightPer0 = "0";
   };

The only sections of this block that are relevant are:

visibleDistance : This controls how far into the distance you can see and tells the game how much to draw to the screen. Ensure that this value is higher than the fogDistance value.

useSkyTextures : "1" = yes to show sky textures, "0" is to turn them off.

renderBottomTexture : again, "1" is on, and "0" turns them off. Most of the time you wont need this as you wont see them anyway.

SkySolidColor : This is the "Red Green Blue Alpha" colour of the sky. Each colour component is within the range of 0 to 1 where 1 is a full amount of that colour.

fogDistance : This controls how far away the fog is visible from.

fogVolume1, fogVolume2, fogVolume3 : These control layers of fog/mist. The first value in the quotation marks is the density of the fog, the second if the height at which this 'band of fog starts, and the last is the height that the band stops at. Make sure that the three layers do not overlap. For example (if floor = 60; , you might have the following:
fogVolume1 = "150 1 20";
fogVolume2 = "100 21 40";
fogVolume3 = "50 41 60";
A density value of 1 is virtually clear and a higher value (eg 300) is very thick.

fogVolumeColor1, fogVolumeColor2, fogVolumeColor3 : These are the colour values (Red Green Blue Alpha) of the fog bands. and each colour component ranges from 0 to 255.

cloudSpeed1, cloudSpeed2, cloudSpeed3 : These are the speeds of the three cloud layers. Values range from between 0 and 1, but the current settings here are pretty good and I certainly wouldn't bother changing them.

cloudHeightPer1, cloudHeightPer2, cloudHeightPer3 : This is the height of each of the three cloud layers, again, there is not much point in changing these as they work nicely. Values range from 0 to 1.

   new Sun() {
      direction = "0.799447 0.368102 -0.474748";
      color = "0.988000 0.985000 0.980000 1.000000";
      ambient = "0.420000 0.420000 0.400000 0.400000";
      rotation = "1 0 0 0";
      locked = "true";
      scale = "1 1 1";
   };

This controls the position of the sun in the sky, again, most of these dont need to be touched, it's a very trivial thing to change and most people wont notice slight changes here.

direction : This is the "X Y Z" direction of the sunlight.

color : The "Red Green Blue Alpha" colour of the sunlight (each component ranges from 0 to 1)

ambient : The "Red Green Blue Alpha" colour of the ambient lighting emitted. (Values from 0 to 1)

   new TerrainBlock(Terrain) {
      rotation = "1 0 0 0";
      scale = "1 1 1";
      detailTexture = "~/data/terrains/details/detail1";
      terrainFile = "./TT1_3.ter";
      squareSize = "8";
      tile = "0";
      blockShift = "7";
      locked = "false";
      position = "-1024 -1024 0";
   };

This controls the terrain data (which can't be changed) so dont change anything in this section except perhaps the detailsTexture . This can be altered to point to a texture for extra terrain details (eg: a texture for cracks on the ground or something) Unless you really know what you are doing this whole group is best left as is.

The squareSize can also be adjusted to create alter the map, decreasing this value will squish the map up, making it smaller and the the mountains and hills taller. Increasing it will stretch out the map making everything larger and flatter.

Now for the various spawn locations. It starts off as follows:

   new SimGroup(PlayerDropPoints) {

This is creating the spawn points group. Inside this go two other groups, one for the Blue team, and one for the Green team. In non team games, all of these are combined by the game to one large set.

      new SimGroup(GreenPlayerDropPoints) {

And this marks the start of the Green teams spawn locations. Each Spawn location has the following structure, and ther are varying numbers of spawn points for each team on different maps. (The average number is about 8 per team)

         new SpawnSphere() {
            position = "-28.2286 84.5148 104.24";
            rotation = "-0.098637 0.0124813 0.995045 199.327";
            scale = "1 1 1";
            dataBlock = "SpawnSphereMarker";
            radius = "1";
            lockCount = "0";
            indoorWeight = "100";
            locked = "false";
            outdoorWeight = "100";
            sphereWeight = "100";
            homingCount = "0";
         };

Getting the coordinates and the rotation is the trickiest part, and its pure guesswork unless you get some kind of output in-game or within an editor. To this end, I have written a small script (PositionGrabber - available in the downloads section) which will dump the current coordinates of your tank (and its rotation) to the console (if you are running the game as a dedicated server). If you modify the shortcut to launch the server and add:
-log 1
to the end, the console window will be automatically logged to a file called console.log and you can then copy and paste the positions from there.

position : the position of the spawn location ("X Y Z")

rotation : angle of rotation (i.e. which direction it is facing) The first three values are X-axis rotation, Y-axis rotation and Z-axis rotation, and the fourth is the angle of rotation (in radians) about the pole that these rotations will yield. If you use the PositionGrabber, you'll get the values automatically. Trying to guess them correctly is a futile exercise.

Everything else is irrelevant and should be left alone. Scale works for no items in ThinkTanks.

      };
      new SimGroup(BluePlayerDropPoints) {

This closes the GreenPlayerDropPoints group and starts the BluePlayerDropPoints group. The blue spawn points are identical in structure to the green ones. The fact that they are within a different group is what determines that they are blue and not green.

      };
   };

Then the BluePlayerDropPoints group is closed, as is the still open main group: PlayerDropPoints. (within which both the green set and blue set were)

Ok.. now the various objects around the map

Trees and Rocks

There are various different objects around the maps and these look like the following:

   new TSStatic() {
      position = "42.2319 43.0103 82.8227";
      rotation = "-0.0475431 -0.967796 -0.247207 72.8298";
      scale = "1 1 1";
      shapeName = "~/data/shapes/Green/rockgreen03.dts";
      treeLighting = "0";
      lightBoost = "0";
   };

This (if you hadn't guessed by the shapeName value) is a rock.

Trees and Rocks have exactly the same structure but point to different files. the only other difference between them is the treeLighting value.

position : get this from using the PositionGrabber script.

rotation : get this from using the PositionGrabber script.

shapeName : this refers to a shape file. You can see which shapes you have available by checking within your shapes folders and can adjust the filepath accordingly to point to a different object if required.

treeLighting : If this static object is a tree, then you should change this value to a "1", otherwise it is a "0".

The other values are irrelevant and dont do anything.

Booster pads and arrows

   new Boost() {
      position = "-65.8657 -173.658 87.4534";
      rotation = "-0.439101 -0.526267 0.728171 5.27431";
      scale = "1 1 1";
      dataBlock = "TestJump";
      lightBoost = "0";
   };

These define any booster pads or arrows around the map.

position : get this from using the PositionGrabber script.

rotation : get this from using the PositionGrabber script.

dataBlock : This has three possible values, "Boost1" (a stationary arrow pad), "TestBoost" (a four-state arrow pad that rotates every use), or "TestJump" (a bounce pad)

The other values are irrelevant and dont do anything.

Ammo Reload

   new PowerUp() {
      position = "41.15 25.0831 83.0342";
      rotation = "0.0373977 -0.0634508 -0.997284 94.2066";
      scale = "1 1 1";
      dataBlock = "Reload";
      lightBoost = "0";
   };

This defines the position of the Ammo Reload gate.

position : get this from using the PositionGrabber script.

rotation : get this from using the PositionGrabber script.

dataBlock : This should be set to "reload";

The other values are irrelevant and dont do anything.

Power Ups

   new PowerUp() {
      position = "-28.3081 95.7332 107.95";
      rotation = "0 0 -1 66.4631";
      scale = "1 1 1";
      dataBlock = "TestPowerup";
      lightBoost = "0";
   };

These define the positions of the powerups.

position : get this from using the PositionGrabber script.

rotation : get this from using the PositionGrabber script.

dataBlock : This should be set to "TestPowerup";

The other values are irrelevant and dont do anything.

And finally...

};
//--- OBJECT WRITE END ---

Close the whole MissionGroup that was started at the top of the file. Again, the last line is just a comment to mark the end of the file.

Back to top

Web site designed, maintained and funded by -z- and Dan MacDonald