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.

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.

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 to be shown in the Concourse window at the top of the screen so that the player has 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 and 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.

How you go about making the skins can be involved and won't be detailed here, but all installations of TFTC include a guide on how to make them and call them out in the mission. See \TFTC\Readme\Editing\Skins and Profile Guide.pdf in your installation.

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.