If you haven't already done so, upgrade your game by downloading Dazzle's all-in-one upgrade pack. It comes with everything you need for today's servers. Does your blue bar freeze when joining servers? Do you lag in games? Do you get an annoying siren in Phobik's Servers? This is what you need. CLICK HERE TO DOWNLOAD.

Modding Info

Modding questions, answers, help.....

Moderators: Warfare, Moderator, Admin

Modding Info

Postby Cassie on Sun Jan 07, 2007 2:37 am

Editing and Creating Mission Files

Ok so you want to create your own maps huh? Well... first things first you have to know the limits and constraints. You also have to seriously question your ability.

Of course, you have two options. One is to edit the map files themselves in a text editor, the other is to settle with altering the objects on existing maps using my ModWizard utility and then renaming the file it saves.

If you are after information on the actual mission file itself and the extra information contained within it, then read on. Otherwise, follow that link to the ModWizard utility and have some fun driving around the map placing different objects.

Now I don't mean to question your computer knowledge or insinuate that you are too stupid to even try. The fact that you managed to get to this page puts you head and shoulders above some of the people who have asked me how to create maps. One such person hadn't even heard of Notepad or SimpleText.

What you will need:
- Any basic text editor. WordPad goes.
- You should also make a backup copy of any files you want to open up and tinker with.

Where are the files?

For PC:
Inside the ThinkTanks folder - wherever you installed it to, and by default:
c:\Program Files\BraveTree\ThinkTanks\
The mission files are located within:

For Mac (OSX):
On Mac OS X, CTRL-Click on the ThinkTanks application. Choose "Show Package Contents" from the pop-up menu. Mission files are located within:

The Filenames
The filenames in question are TT1_1.mis through to TT3_4.mis

Don't touch the files ending in .ml or .ter. These are mission lighting and terrain files and are both compiled by the Torque game engine. Each .mis file has an associated .ml and .ter file, but it is the .mis file that controls where to place everything and what colours / textures to use.

If any of this has confused you so far. Then stop right here, and just go to someone else's site and download theirs. You don't want to go messing up any files unless you know what you are doing. If you do, and Think Tanks no longer runs properly, or crashes unexpectedly, then you have messed up and will need to re-install (unless you have made backup copies of all the files you touched, in which case you can just rename them back again).

Mission file naming convention

The first number refers to the map type

The second number refers to the map in that section.
    TT1_1.mis = Medulla Mesa (Lush)
    TT1_2.mis = Hypothalamus Hills (Lush)
    TT1_3.mis = Cranium Crater (Lush)
    TT1_4.mis = Freudian Flats (Lush)
    TT2_1.mis = Hippocampus Hollow (Spooky)
    TT2_2.mis = Comatose Canyon (Spooky)
    TT2_3.mis = Greymatter Gorge (Spooky)
    TT2_4.mis = Pituitary Plateau (Spooky)
    TT3_1.mis = Synaptic Slopes (Frantic)
    TT3_2.mis = Ganglia Gully (Frantic)
    TT3_3.mis = Neurotic Nexus (Frantic)
    TT3_4.mis = Receptor Ridge (Frantic)

So we know the file.. now what?
Make a backup! You might think you can remember all the changes you made, but if you made a mistake editing it, why assume you won't when you try and put it back how it was!

Ok, so now open it in your text editor. You'll see that it's comprised of a whole load of configuration groups. Now to explain what they all are, and what does what.

Modding the mission (.mis) files

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

Code: Select all
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.

Code: Select all
   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.

Code: Select all
   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.

Code: Select all
   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.

Code: Select all
  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)

Code: Select all
   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.

Spawn Places

Now for the various spawn locations. It starts off as follows:
Code: Select all
   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.
Code: Select all
      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)
Code: Select all
         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.

Code: Select all
      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:
Code: Select all
   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
Code: Select all
   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
Code: Select all
   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.

Code: Select all
   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...
Code: Select all

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.

The Game Prefs

Ok, so we have looked through the .mis file and altered that a bit, now what about changing the preferences for the game and customising any Bot names and so on?
This file is called prefs.cs and is found in the ThinkTanks\Game\Server\ folder.
Again, be sure to back up and make a copy of the original before editing it.
In this file are all the bot names and tanks, and various other server settings. It will contain something similar to the following code snippets:

Code: Select all
$Pref::Server::BanTime = 1800;

Ignore this line as banning is not implemented in ThinkTanks. (NOTE: banning works with admin scripts - but they don't use this pref)

Code: Select all
$pref::Server::Bot0 = "GoldHeavyTank";
$pref::Server::Bot1 = "SilverMediumTank";
$pref::Server::Bot2 = "BronzeLightTank";
$pref::Server::Bot3 = "GoldLightTank";
$pref::Server::Bot4 = "SilverMediumTank";
$pref::Server::Bot5 = "BronzeHeavyTank";

These are the tanks driven by the bots. The first bot is Bot0, the next is Bot1 and so on. 6 Bots means you need to have from Bot0 to Bot5.

Options for the bots are:
Gold tanks are the most intelligent, followed by silver, and then the slightly more stupid bronze bots. The BabyBoss is the UFO.

Code: Select all
$pref::Server::BotName0 = "Hum [Bot]";
$pref::Server::BotName1 = "Tom [Bot]";
$pref::Server::BotName2 = "Mal [Bot]";
$pref::Server::BotName3 = "Ri [Bot]";
$pref::Server::BotName4 = "Gul [Bot]";
$pref::Server::BotName5 = "Gum [Bot]";

These lines are where the Bot names go. They can be anything you want, but makes sure there are te same number of bots as listed in the above section.

Code: Select all
$pref::Server::BotTeam0 = "GreenTeam";
$pref::Server::BotTeam1 = "GreenTeam";
$pref::Server::BotTeam2 = "GreenTeam";
$pref::Server::BotTeam3 = "BlueTeam";
$pref::Server::BotTeam4 = "BlueTeam";
$pref::Server::BotTeam5 = "BlueTeam";

These lines configure what teams the bots will be on (if a team game) even if you are playing regular scrum or battlemode, you will need to set this lines and to make sure that there are the same number of bots as the above two blocks.
Each Bot therefore has a line for the type of tank, its name, and its team.

Code: Select all
$Pref::Server::ConnectionError = "You do not have the correct
   version of the Torque Game Engine or the related art needed
   to connect to this server, please contact the server
   operator to obtain the latest version of this game.";

This just gives an error message that some unfortunate souls might see. I've certainly never seen it appear. Just leave it as it is or you might further confuse someone who is desperately trying to get the game working.

Code: Select all
$Pref::Server::DisplayOnMaster = "Always";

This controls whether or not to show your game on the main in-game server list. The values are "always" and "never".

Code: Select all
$Pref::Server::FloodProtectionEnabled = 1;

This controls whether or not to use Flood Protection. This will stop people from being able to continuously spam the game with repeated conversation. If a player prints too many lines too quickly in-game, he will be prevented from saying anything for a short period of time. Values are 1 (on) and 0 (off)

Code: Select all
$Pref::Server::gameTypeIndex = 0;

This is the type of game you are playing, and is fairly redundant especially as you launch either from a dedicated server shortcut (which includes the game type and will override this setting, or from in-game which will use its own setting anyway. This is more used for storing the 'last' game type played so that the in-game 'create server' can remember your previous settings. Therefore there is little point in changing this.

Code: Select all
$Pref::Server::KickBanTime = 300;

Irrelevant as banning and kicking are not implemented in ThinkTanks. (NOTE: banning/kicking works with admin scripts - but they don't use this pref)[

Code: Select all
$pref::Server::MaxBots = 6;

This indicates the maximum number of bots that are in the game. DO NOT set this higher than the number of bots you have configured. We have Bot0 - Bot5 = 6 Bots with these settings. If we wanted to increase this, we would need to add more Bots in the above configuration sections. Don't forget, the more players you have, the slower the game will get and the more lag you will introduce to the game.

Code: Select all
$Pref::Server::MaxChatLen = 120;

This defines the maximum length of any chat message. You might as well leave this at what it is anyway.

Code: Select all
$Pref::Server::MaxPlayers = 10;

MaxPlayers. This INCLUDES the number of bots. 10 players means 4 players and 6 bots. (However, if ReplaceBots is turned on, then bots will be kicked when players join)

Code: Select all
$Pref::Server::missionIndex = 1;

This tells it which the last mission played was. There is no point in changing this as the Map (MissionIndex) is set by the launching shortcut or from the in-game create game menu.

Code: Select all
$pref::Server::missionWorld = 1;

MissionWorld. Again, no point in changing this. This is set from the shortcut that launches the server, and that will override this setting. 1 = Lush, 2 = Spooky, 3 = Frantic.

Code: Select all
$Pref::Server::Name = "ThinkTanks Server";

This is the name of your server. Anything longer than 24 characters will get cut off when it is listed in the server list. The developers have also expressed that they would appreciate it if you include the word 'MOD' in the server name or any altered or modified maps.

Code: Select all
$Pref::Server::PasswordEnabled = 0;

If you want your server to be password protected, change this to a 1. Otherwise, leave it as a 0.

Code: Select all
$Pref::Server::Password = "bogus";

If you have specified that PasswordEnabled = 1; Then you will need this line telling the server what your password is. (this example shows the password 'bogus' is being used)

Code: Select all
$pref::Server::SavePassword = "oldpassword";

This is used to store an old password and is used by the in-game 'create server' option. Ignore this.

Code: Select all
$Pref::Server::Port = 28000;

Ignore this. Except you'dd like to host more then one server, then go up to 28001, and so on.

Code: Select all
$Pref::Server::RegionMask = 2;

Ignore this

Code: Select all
$pref::Server::ReplaceBots = 1;

If you want your bots to disappear when players join, then this is a 1, otherwise, to keep all the bots in game, change this to a 0.

Code: Select all
$Pref::Server::TimeLimit = 20;

Ignore this. It has no affect on the duration of the game.

All these information was made by -Z- for http://www.planetthinktanks.com and slightly edited by me.
To view the original files: Go Here.
User avatar
Veteran Member
Veteran Member
Posts: 371
Joined: Fri Dec 29, 2006 4:45 am
Location: Belgium, Ghent
Has thanked: 0 time
Been thanked: 0 time

  • Similar Topics
    Last post

Return to Modding

Who is online

Users browsing this forum: No registered users and 2 guests