TFTC Custom Missions

From Emperor's Hammer Encyclopaedia Imperia

Introduction

The Emperor's Hammer (EH) has adopted the TIE Fighter Total Conversion (TFTC) mod for X-Wing Alliance (XWA) as a supported platform for custom EH missions. For the most part, the creation of missions is the same between XWA and TFTC but there are a few differences that will be identified below. Additionally, TFTC has built into it many hooks that have increased the things that can be done in missions and below will be a quick overview of some of them and how to implement them into a mission/battle. This entry is not expected to be a comprehensive guide to all the things that can be done in TFTC but just a documenting of the things that have been used in EH missions so far.

Main Differences Between XWA and TFTC

  • The most noticeable difference is the Imperial theme of the Concourse/Briefings and the greatly improved graphics.
  • Functionally, the per region craft limit has been eliminated. It was 96 craft per region, now it is 3,072 and has been tested higher.
  • AI is able to attack more with lasers and warheads. Formerly the AI was limited to 64 simultaneous lasers/warheads in space. Now the limit is 1,024.
    • This is one of the main balance differences between the versions. Capital ships are more deadly, but bomber squadrons are even more so. Defending capital ships from bombers is much more critical in TFTC due to the shear number of warheads that could be launched at it by a large enough squadron.
  • TFTC has added many new fighters, freighters, transports, capital ships, stations, and other objects such as extra large asteroids.
  • TFTC has added the SLAM feature back to the Missile Boat. This can also be added to any craft by modifying a configuration file. In game you activate/deactivate SLAM via the K key.
    • If you plan for players in your mission to use the SLAM feature, you should tell them that it is available and to use the K key in a briefing or radio message.
  • TFTC has fixed the gimbal lock issue allowing you to fly directly up or down without issues.
  • TFTC has added time acceleration and deceleration. This is activated in game by pressing Ctrl+Q to activate/deactivate time acceleration and Ctrl+A to activate/deactivate time deceleration.
    • If you plan for a player to use this feature, tell them how via a briefing or radio message.
  • You now can have a basic HUD in the external view, allowing you to play in 3rd person view if you wish.

Differences in EH Battles between XWA and TFTC

The primary difference between XWA battle and TFTC battles in the EH is that a different battle and mission number is used for the first EH mission in TFTC than in XWA. For XWA, EH battles are all Battle 8 and start and Mission 53. For TFTC, EH has decided to start all battles at Battle 20 and Mission 100.

This, and other reasons, make it so that all TFTC missions will be installed manually via the zip files rather than using the Emperor's Hammer Battle Launcher (EHBL). And all TFTC battles will need to include a blank pilot file enabled to start at mission 100. If you do not know how to make the needed pilot file, please contact the TAC Office and a file will be sent to you.

Additionally, to ensure the fairness of all High Scores (HS) all TFTC battles, or free battles, must be "locked" to TFTC. This can be done in a number of ways but the four main ways are:

  1. Have more that 96 craft in a region when a mission critical craft is to spawn. This will ensure that if run in XWA it will not be able to be completed as the mission critical craft will not spawn. This method is NOT recommended as so large of battles can be hard to make fun to fly and can be quite taxing on those who have older systems.
  2. Have the player fly as a TFTC added craft in a mission. This works well as a way to lock a battle, but can limit your design decisions as few of the TFTC added craft are truly meant to be a player craft.
  3. Have the mothership of the player, or other mission critical craft, be a TFTC added craft. This works well as many cruisers and other capital ships were added by TFTC.
  4. Have a mission critical craft be a TFTC added craft. This can be done either by having the craft appear in mission, or by using a TFTC craft as a dummy/trigger craft for a mission critical role/aspect/goal. This is likely a superb way to lock a battle.

If, for your mission you will OVERWRITE any original game files, whether original or TFTC added, you MUST include clear and explicit instructions in your readme on what files the player will need to backup prior to installing your mission. You should take every care that, if possible, the modifications to the files are not such that it will break a player's game if they do not remember to restore their backups after completing your battle.

Advanced Features/Hooks

Most of these advanced features will require your mission to have a configuration file to tell the hooks what you want done in the mission. To create the configuration file you need to have a file in the \Mission directory, along side the mission.tie file, that it the same file name as your mission but with a .ini file extension. So, for example, if my mission file is 1B20M1_AR1.tie then my configuration file will be 1B20M1_AR1.ini.

It is highly recommended to install the XWA Tools Package from the X-Wing Alliance Upgrade Project's website. These tools will enable you to do many things, not the least being able to create your own pilot files, look at and modify the craft .opt, look at and modify the .dat files and .cmb files in the game and many, many more things.

Activate Hanger Red Alert

Base XWA already had functionality to have the hanger danger alarms playing when you would board your mothership if it had taken hull damage in the mission. Now, through hooks, you can specify a mission begins with the hanger alarms blaring. This is a fun idea for missions where the player is scrambling to protect the ship that is already under attack. How you enable this is in the mission.ini file add a section that says:

[mission_tie]
IsRedAlertEnabled = 1

Control the Background Planet in the Concourse

Front Planet DAT Editor

To be able to control what planet, or other image, is to be shown in the Concourse window at the top of the screen is now possible. This allows the player to have a greater sense of place in the battle. The author of this article strives to have the image in the concourse match the primary planet/backdrop of the initial region as much as possible to sell that the player is on the mothership in the initial region prior to going into the briefing. To change the backdrop shown in the window, first you should determine the backdrop you want to use. To do this use a .dat editor/explorer and look at the FRONTPLANET_TFTC.DAT in the \Resdata\ folder in the TFTC directory. There you will find the backdrop you want to use and make note of its ID.

Then, then in the mission.ini file add a section that says:

[concourse]
FrontPlanetIndex = 15014
FrontPlanetPositionX = 350
FrontPlanetPositionY = 85

Where the FrontPlanetIndex is the ID from the DAT file and the X and Y positions control where in the window the backdrop will be seen. You will likely need to do some trial and error to determine where you want each backdrop to be in the window.

Custom Backdrops

To be able to use the high definition backdrops included in TFTC, or to be able to use your own custom backdrops, you will need to enable it in the mission configuration file. At a minimum it is recommended to enable the built in HD backdrops by adding the following section to the mission.ini file:

[Resdata]
Resdata\PlanetTFTC.dat

But, if you would like, you can also use this to add your own custom backdrops to a mission too. To do that first you will need to create a custom .dat file that contains your backdrops. A recommended way is to first backup the main backdrop file you are going to be using (Planet2.dat or PlanetTFTC.dat) and then opening the DAT file in a DAT editor and finding a backdrop, or backdrops, you do not plan to use in your mission/battle and replace them with your own images (highly recommended to select the BC7 compression after you have added the files to reduce the file size of the images). Then save this modified DAT file in the \Resdata directory of the installation you are working on. Once you reload YOGEME, assuming your mission.ini file points at this new DAT file, it will be able to display your custom backdrops in the backdrop selection window and you can add them as normal.

Once you are done building your battle, you should identify what custom backdrops you used and delete all other backdrops from your custom file, except for your needed custom backdrops. Name this DAT file something unique (highly recommend naming it after your battle) and restore your backup copy of the main backdrop file. Then, in the mission.ini file update the Resdata section to call out both DAT files. The hook will look at the first file in the list first, and only if there is no backdrop in the slot called out will it look at the next file in line.

[Resdata]
Resdata\Planet_AR2.dat
Resdata\PlanetTFTC.dat

This allows for you to only need to include in your custom backdrop file your new backdrops, preventing excessively large file sizes for these files (the whole PlanetTFTC.dat file is over 700 MB).

Custom Ship Stats

One of the more powerful, and dangerous, abilities granted by the TFTC hooks is the ability to change any ships primary stats at a per FG and difficulty level, well really at a per FG color level. This gives the mission designer full control of how easy or hard it is to kill a craft, how fast it is, its maneuverability, etc. The danger of this is that you will need to modify the .ini file for any craft you wish to alter.

If a player forgets to restore the original craft configuration file after uninstalling your battle this can quickly cause issues for breaking other missions if you delete an existing craft profile or can cause inadvertent "cheating" for the player if you modify and existing one or use a generic name and another uses the same name. Therefore, it is EH TAC Office policy that if you are going to use custom craft profiles you must:

  1. Start with the baseline TFTC craft configuration file and only add your profile to the list. No modifying existing profiles.
  2. You must use a unique name (i.e. the Battle Name) for your profile.

How you go about using the custom craft stats is first, you open the configuration file for the craft you want to have altered stats. These files are located in the \FlightModels folder and have the same name as the craft .opt, but with a .ini file extension. In the configuration file, near the bottom of the file, there will be a section Named Stats Profile with a default profile provided. Here is an example from the TIE Fighter's Configuration file (TieFighter.ini):

[;StatsProfile_Default]
Speed = 100
Acceleration = 20
Deceleration = 23
Roll = 46
Pitch = 26
Yaw = 48
HasShieldGenerator = 0
HasHyperdrive = 0
ShieldStrength = 20
HullStrength = 9
SystemStrength = 10

Copy that default profile and paste it at the end of all the existing profiles. Delete the ; and change "Default" to your custom profile name. You can also add a _Easy, _Medium, and/or _Hard after the profile name to allow you to specify different stats for different difficulty levels. Now, modify the stats as you desire (you can delete any lines you don't modify, but also don't have to). Here is an example, again for a TIE Fighter:

[StatsProfile_WS1_Easy]
Speed = 100
Acceleration = 20
Deceleration = 23
Roll = 46
Pitch = 26
Yaw = 48
HasShieldGenerator = 0
HasHyperdrive = 0
ShieldStrength = 20
HullStrength = 72
SystemStrength = 80

[StatsProfile_WS1_Medium]
Speed = 100
Acceleration = 20
Deceleration = 23
Roll = 46
Pitch = 26
Yaw = 48
HasShieldGenerator = 0
HasHyperdrive = 0
ShieldStrength = 20
HullStrength = 45
SystemStrength = 45

[StatsProfile_WS1_Hard]
Speed = 100
Acceleration = 20
Deceleration = 23
Roll = 46
Pitch = 26
Yaw = 48
HasShieldGenerator = 0
HasHyperdrive = 0
ShieldStrength = 20
HullStrength = 9
SystemStrength = 10

You can see, with this profile in place, on Easy, a TIE Fighter will have 8 times more hull strength, on Medium, it will have 5 times more, and on Hard it will not have any additional hit points.

To use this modified stat profile in a mission, add the following section to the mission.ini file:

[StatsProfiles]
TieFighter_fgc_0 = WS1

This tells the game to use the modified profile for all TIE Fighters with a Flight Group Color (fgc) of 0, or the first position in the mission editor (Red for rebel craft and no markings for Imperial). This allows you to have different FG with different stats in the mission as the "0" can be any number between 0-255 (note that if a craft does not have any defined markings at a fgc value, it will use the default, 0, markings). If you wished all craft to have the modified stats profile you would leave out the "_fgc_0".

Skins

You are also able to add custom skins to overlay, or even replace, the textures on any craft used in the mission. This can be used to add a custom color to your craft in the mission, add squadron patches to the outside of the ships, etc.

A basic overview of how to make a simple overlay style skin to add custom markings and squadron patch is detailed below.

First, ensure you have installed an .opt editor, see tools link above. Second, ensure you have a image editor that allows for layers and changing the opacity of the layers.

  1. Identify the craft you wish to add markings to. You will need to know the exact .opt file name for the craft.

    Note: Nearly all craft that as a player you can fly will have three separate .opt files for them. They will be the "main" .opt that is displayed when the craft is being flown by an AI, the cockpit .opt which is what you will see when flying the craft, and the exterior .opt which is what the craft will look like if you switch to the external view while flying.
  2. Check the /FlightModels/Skins folder to see if a folder exists for the .opt(s) you wish to add skins for. If there isn't an existing folder you will need to create it with the same "base name" as the .opt (I.E. if I want to add a skin for the TIEFighter.opt, there either must be a folder named TIEFighter or I need to create one).

    Create a folder in this folder with the name you wish to call your skin. It is best practice to pick a name that will be unique but also informative to what it is.

    If the folder does exist check to see if there is a folder named "Void" or "Blank" within it. If there is you can skip the need to export out of the .opt the textures you wish to modify or make overlays for.
    OPT Editor-Main View
  3. Next, open the .opt in an .opt editor and determine what textures you want to modify or add overlays to.

    This can be a difficult thing to determine as the same texture may be used for multiple parts and sections of larger textures can also be used for smaller parts. One method is to the main “Edit” tab of the editor and select the “Face Groups” tab in the middle window. Now you will be able to navigate the different parts of the .opt and have them displayed on the right with an overall view of where the part is in the model and a detail view of just the section you have highlighted. The Face Groups will allow you to see the different parts of the section and what textures are used on them.
    OPT Editor-Textures
  4. Once you have determined the textures you wish to modify/add an overlay too go to the “Textures” tab on the left where you will now see a list of all textures used by the .opt. Right click the textures you want and “Save As” the texture as a “Color Map”. Note: If the textures you are modifying are not the default “Version 0” textures write down what the texture name is for that default (I.E. If I was modifying the yellow side panel for the X-Wing Exterior, TEXT00083, I would need to know that the default texture is TEX00012).
    Save a Texture
  5. Now open the textures you have saved in your image editor and either edit them directly or add layers to apply your new markings. One thing to be cognizant of is that the flat textures are often applied to curved surfaces or stretched/warped when applied in the model so if you are adding a patch or other image where these distortions would make a difference you will need to compensate your image to counteract these effects. If your intended use is as an overlay, you can delete the original texture from the base layer before saving the image as a PNG with the EXACT same dimensions and EXACT same name as the DEFAULT texture in the location you wish to replace. Note that the game will revert any textures effected by your skins to the default ones, so if you are wanting to add things to a different preexisting color scheme you will need to include the texture that you want to be used in your image. Place all your new textures/overlays in the folder you created.
  6. To call out this new set of textures in your mission, add the following to your mission.ini file. In this example, this will cause the game to overlay any textures in the “Typhoon” folder over all AI controlled TIE Fighters.
[Skins]
TieFighter_fgc_0 = Typhoon

This has been only a basic example of how to make and add skins to a mission. For more details, all installations of TFTC include a guide on how to make them and call them out in a mission. See \TFTC\Readme\Editing\Skins and Profile Guide.pdf in your installation.

Fast Hyperspace Exit

Normally when ships are exiting from hyperspace into the region you see them slowly decelerate from hyperspace for several seconds. This gives you plenty of warning that they are coming, and even allows you to start trying to get a warhead lock on them before they really have finished spawning into the region. If you want to change this behavior to more closely match the movies, think Vader's Star Destroyer coming out in an instant in Rogue One, where ships nearly instantly "pop" into the region it can be done via a hook. This will give missions a more cinematic feel and make missions more challenging as the player won't have time to plan for the next wave as they will just be in the region and fighting by the time the radio message appears.

How you enable this is in the mission.ini file add a section that says:

[Hyperspace]
ShortHyperspaceEffect = 1

Other Enhancements

Here are some other modifications you can make to your mission that do not use the new hooks.

Adding Custom Crests

This was already done and released as patches for Battlegroup 3 and the TIE Corps (TC) in general for XWA. If you only want to use one of these crests it is as simple as copying the wanted .cbm file from the patched version of XWA and including it in your mission files along with modifying the FRONTTXT.txt file with the desired squadron/group names. If you want to add your own, custom crest you can use a .cbm editor to open one of the squad#.cbm files and replacing the image with your own. Note: the new image should be roughly the same pixel height and width as the original and should be a PNG file with a transparent background to display well.

Adding Custom Battle Medals

To place your custom medal into the game, and have it awarded at the end of your battle:

  1. Create a PNG file of the medal with a transparent background.
  2. Create a small version to be displayed in the medal case in the quarters that is approximately 39x80 pixels.
  3. Create a large version to be displayed when the medal is awarded that is approximately 111x221 pixels.
  4. Using a .cbm editor, open the Battle0.cbm file in the \Frontres\Medals folder and replace the image with your small version of the custom medal.
  5. Using a .cbm editor, open the LBattle0.cbm file in the \Frontres\Medals folder and replace the image with your large version of the custom medal.
  6. Open the MEDALS.txt file in the \Frontres\Medals folder and edit it to change the first row number to the final mission of your battle. If you have a 4 mission battle, and you start at mission 100, the final mission number will be 103. Edit the other lines to be greater than the final mission number.
  7. Open the MedalsDescriptions.txt file in the main directory and edit the file to have your medal name as the first line.