How to Mod Tennis Elbow 2013 ?

 

     

Tennis Elbow 2013 has a very open engine, allowing easy modifications of many things.
The most obvious ones are about the player & tournament databases. But with a bit more time, you can also change the courts, and even add outfit or animations for the players !

Before to do modifications to TE2013, be sure to agree the License. To do modifications, you must have purchased the complete game. You shouldn't modify the demo version.

After, you need a tool to access the files within the file “Pak01.PAK” located in the “Data” directory. The format of this file is the same than the one of Quake 2 .Pak files. So, for example, you can use the tool here:
http://www.managames.com/download.php?qped211.exe (old website here www.planetquake.com/qped has been discontinued)
http://www.managames.com/download.php?QPed.zip (version that doesn't require installation ; works on Win7, but you'll have to manually register the .exe to automatically open .pak files)

/!\ Important: the directories in the .Pak file are relative to the Tennis Elbow 2013 root directory, not from the Data subdirectory. Ie: if you want to export the Menu directory, it should be to : "[TE2013 Dir]\Menu", not "[TE2013 Dir]\Data\Menu".

You can also easily edit the .ini files in the “Data” directory:

  • Players.ATP.ini & Players.WTA.ini: contains all the players; by default, you can have up to 3000
  • Tour.ATP.Ini & Tour.WTA.Ini: contains all the tournaments; by default, you can have up to 350
  • TourCategory.ATP.ini & TourCategory.WTA.ini: contains all the tournament categories; you can have up to 50

"ATP" files are for the men tour, and "WTA" are for the women tour. Later in this document, the files are refered without their ATP or WTA part; just edit the one for the tour you want to modify.


When you do modifications, don't forget to test them, and even if everything looks fine, you should open the "System.log" file(within your TE2013 directory) with the Windows Notepad, and look for "Warning" and "Error" (use CTRL+F). Through these messages, the TE2013 Engine will let you know if something seems wrong. Sometimes, something is wrong, but the Engine will not detect it and crashes instead, so be cautious... ;-)


Players & Tournaments

If you want, you can raise the maximum of players and tournaments by changing these lines in the Tour.ini and Players.ini, under the section [WT_Static] :

MaxTournament = 500
MaxPlayer = 5000

But be careful, the saved games will take much more disk space with such parameters !

Moreover, when you change any of these settings, you'll lose your current saved games.

If you need to count the number of players per country, change this line in Tennis.ini (or the .ini of your current profile), under the section [WT_Static], from:
CountCountry = 0
to :
CountCountry = 1

/!\ Important:

  • You need to have at least 2 players per country in the Davis Cup for each year of the game!

Invalid Saved Games:

  • Most changes to the Tournament Banks will invalidate your current saved games ; so you'll be forced to start a new game to enjoy your changes
  • Changing the number of Players or the years they played will also invalidate your current saved games
  • If you install a new version, the previous Banks will be renamed to -LastUsed , allowing you to get back your changes easily, else you wouldn't be able to go on with your saved games

The “Players.ini” file is quite self-explaining, and contain many parameters.
The skills of the players are normalized during the game according their current rank.
The number after “[Player” is not important, the engine will sort the players by the ranking.

Be very careful to always keep enough players for the Davis Cup / Fed Cup (ie: at least 2 players every year for all countries in the Final & Qualif Draws).

Explanations about the parameters :
Most parameters are well self-explaining.
Here more details :
RankPerYear = 1, 2, 2, 1, 1, 1.05, 1, 28, 9
This line will determines the rank of the player for each year. The player won't be necessary at this rank at the end of the year, but he should be quite close. It's used to determine his strength. This strength will be used to normalize most of the skills.
A rank of "-1" means the player won't play on this year.
A rank of "-2" means the rank will be the same than the previous year.
A rank of "1.05" means the player will get the strength to reach the 1st rank + a bonus of 5% ; you can give such bonus to any ranking, for example "2.03", but it makes sense only for the top 3 or 4, else just raise the ranking directly ; for example, you can have 2 players with a rank of 1 on the same year ; in this case, both will have a good chance to end up #1.

These skills are not normalized : "Concentration", "ColdBlood", "Constancy", "Motivation".
Instead, they are interpolated between the value in the base (when rank is on BestRank) to half of the base value (when at the 1000th rank).
Example :
ColdBlood = 78
with :
BestRank = 3
When RankPerYear is 3, then ColdBlood will be 78%; if RankPerYear is 1000, then ColdBlood will be 78 / 2 = 39% .

Off Time : you can specify off time for the player, making him not enter any tournament on some specific weeks ; to do so, add the weeks you want him to miss after his rank ; for example : "28 -5.15.20-25.40-," instead of "28," in the RankPerYear line above will make the player misses the week 1 to 5, then 15, then 20 to 25, then 40 to 52 ; it's equivalent of "28 1-5.15.20-25.40-52", but you can omit the 1st "1" and last "52". You need to set [WT_Static]MaxOffTimePlayer to at least the total number of players with off time values.

"FirstYear" is the player's career starting year.

"SingleDouble" is the affinity for the singles or the doubles :
-1 => only singles
-0.5 => mostly singles
0 => equally singles & doubles
+0.5 => mostly doubles
+1 => only doubles

Body = 177 62
means 177cm for 62kg .

How to set the skills ?
As all the skills (except Concentration, ColdBlood, Constancy & Motivation) are normalized in real time by the game engine depending of the rank to reach during the current year, it won't make the player any stronger to set all his skills to 90 instead of 10.
So the idea is to set the skills around the value 35 :
- set to 35 if the player is normally skilled for this skill
- set above 35 if the player is relatively more skilled in this skill than in his other skills, to 40 if only a bit, to 50 if a lot, to 60 if very much
- set below 35 if the player is relatively less skilled in this skill than in his other skills, to 30 if only a bit, to 20 if a lot, to 10 if very much

For Concentration, ColdBlood, Constancy & Motivation for the best players, set them high from 75 to 95 depending of the best rank (from 20 to 1), and lower them a bit when the player has a weakness in this particular area.

Outfit Code :
Each player can have an optional Outfit Code, that defines his appearance and strike styles. If he doesn't have an Outfit Code, then he has a default random appearance.
An Outfit Code looks like this :
Outfit = C s0 n2 E p6 G n0 H p2 n6 Ht n0 R s0 b0.25 n2 RH Si h72 n3 Se h120 n3 So h-120 b0.4 n3 d-2 Sk p2 Sc s0
To obtain such kind of code :

  • go to Training Club -> Player Sheet -> Customize Character , and configure your player the way you want
  • once it looks good, click on the "Copy Outfit code to Clipboard" button, and then paste the code in his Player section within Players.ini
  • if the code isn't copied correctly (on Windows, it bugs sometimes, and on Mac OSX, it doesn't work at all), then you can find the code at the end of the file System.log within your game folder



The use of “Tour.ini” is less obvious, here a line per line explanation:

[Tournament001]
Name            =       Doha
Ground          =       HD
DrawSingle      =     32
DrawDouble      =    16
Category        =      9
Country         =       QA
Week            =       1
PrizeMoney      =    $1000000  142000   83600    49000   29000    17000    10000

  • “Name” is the name
  • “Ground” is the ground: CL = Clay; GR = Grass; HD = Cement; RA = Synthetic; IN = Indoor synthetic; HD_BG = Blue-Green Cement; PC = NewLine Synthetic; HR = Green Clay
  • “DrawSingle” is the size of the draw for the Single competition; 0 means no Single draw
  • “DrawDouble” is the size of the draw for the Double competition; 0 means no Double draw
  • “Category” is the number of the category in the file “TourCategory.ini”
  • “Country” is the code of the country where the tournament is located. You have the list of the codes within the file “Countries_English.txt” located in the same directory “Data”.
  • “Week” is the number of the week in the year, from 1 to 52
  • “PrizeMoney” is the money earnt in tournament; 1st number = total prize; 2nd number = prize for winner; 3rd = for finalist; 4th = for semi-finalists; and so on

To add a tournament, just copy/paste this entire section. The number after “[Tournament” is not important, the engine will sort tournaments by week and importance.

You can have up to 30 tournaments per week per competition (ie: 30 for singles, and 30 for doubles). Don't forget the qualifications count for 1 tournament apart, and Davis Cup Qualification as well.
So for example, you can have 15 tournaments / week, every week, if all your tournaments have a qualification draw.


The use of “TourCategory.ini” is even a bit more complicated.

[Category01]
Type             =        GrandSlam
EntryPoints   =        1000   700    450    250    150    75      35      5
RacePoints   =        200    140    90      50      30      15      7        1
QualifEntryPts         =        15
QualifRacePts         =        3
Seed            =        32
QualifDraw   =        -1                 // Last direct acceptance = Draw - NbQualified
QualifSeed    =        16
QualifNbRound        =        3
QualifDrawDouble= 0
QualifSeedDouble= 0
NbSetFinal    =        3
NbSetRound =        3
SetType                 =        3
NbDoubleSet =        2
NbDoubleSetFinal    =        2
TopPresence          =        0.95
TieInLastSet =        0
ForcedRank  =        1

  • “Type” can be Future, Challenger, IntlSeries, IntlSeriesGold, MasterSeries, GrandSlam, MasterCup, or TeamCup
  • “EntryPoints” is the points earned for the Entry Ranking; 1st number = for winner; 2nd = for finalist; 3rd = for semi-finalists; and so on
  • “RacePoints” is same than “EntryPoints”, but for the Race Ranking
  • “QualifEntryPts” is the bonus points received by qualified players reaching the final draw, for the Entry Ranking
  • “QualifRacePts” is same, but for the Race Ranking
  • “Seed” is the number of seeded players in the draw
  • “QualifDraw” is the size of the Single qualification draw; ‘-1’ means the qualification draw will have the same size than the final draw set by the tournament in “Tour.ini”
  • “QualifSeed” is the number of seed for the Single qualification draw; ‘-1’ means it’ll have 2 seeds for each qualified player
  • “QualifDrawDouble” & “QualifSeedDouble” are same than “QualifDraw” & “QualifSeed”, but for Double draw
  • “NbSetFinal” is the number of sets in single for the final
  • “NbSetRound” is the number of sets in single for other rounds
  • “SetType” is the type of number of set, for the human players (it can be edited for each type when beginning a new game)
  • “NbDoubleSet” & “NbDoubleSetFinal” is the number of sets in double
  • “TopPresence” is the chance ratio that a “top” player will enter this tournament
  • “TieInLastSet” : ‘0’ means won’t have tie-break in the last set; ‘1’ means will have tie-break in the last set
  • “ForcedRank” to 1 means that this tournament counts for the ranking, if the player has the needed ranking to enter it directly

The menus work with scripts.
You can find a little doc in the file “Menu.doc” containing the instructions in the Menu directory, in the “Pak01.PAK”.

If you add a lot of stuff in menus, you'll need to raise the following values in the "Scripts\GameSys.ini" , under [Menu] : MaxAction, MaxAction, MaxCfg, MaxParam, MaxIniCode. Check in the "System.log" to know how much of these you're using, try to have about 10 or 20% more than needed.


The Render Engine uses Shaders, contained in the “Scripts” directory, in the “Pak01.PAK”, with a little doc in the file “Shader.doc”. You can edit them with the Notepad, it’s only plain text.


How to add a court ?

To add a court, with QPed extract the directory "Data\Court07" (you can't extract other courts' pictures), and then copy everything from it to "Data\CustomCourt01" (you have to create this directory).

Edit the icon "Menu\Art\ico\CustomCourt01.tga".
Now, it's done, Tennis Elbow will see this new court !

You can have up to 4 custom courts visible in the Training Club menu.

Alternatively, you can put everything in the new folder "Data\Court10".

For the 2D Courts : (visible only when "3D court" is "Off" in the "Video Options")

To edit the texture, launch your favourite painter program (Photoshop, Paint Shop Pro, etc...) and open the file "Data\CustomCourt01\Court.jpg" . You'll have also to modify all the .bmp files, which are the sprite files.

For the 3D Courts :

Open the file "Pak01.Pak/Scripts/GameSys.ini" & look for [Stadium01] . Each 3D court uses a 3D Mesh + 1 texture. You can easily edit & add new texture, but you can't edit the existing 3D meshes.

The ground texture will be : "Data\CustomCourt01\CourtTex.jpg" ; the default settings texture for the outdoor stadium is : "Data/Models/Textures/Stadium/CourtA01.jpg" ; for the indoor stadium, it is : "Data/Models/Textures/Stadium/CourtIn1.jpg" .

Adding a skin means the game engine will look for CourtA01.jpg or CourtIn1.jpg in the subfolder : "Data/Models/Textures/Stadium/[NameOfSkin]".

Physics & World Tour :

You can also edit the Court.ini to modify the ball rebound physic & sound, and the skid sounds.

If you want to see this court in tournament mode, edit the "Data\Tour.Ini" file.
In section "[Court]", add this line :
NewCourt = 10
(you can replace NewCourt by anything you want)
And then, in a tournament section, change the ground to :
Ground = NewCourt

You can have a total of 200 courts used in the World Tour.

To set a icon in World Tour for your new court, you add a "Icon" entry in your [StadiumXX] section which tells what existing icon (from 1 to 9) to display ; for example, the new court 10 will show the icon from the court 7, the Blue-Green Cement, with this :

[Stadium10]
Icon = 7


Moving the camera for the 2D Courts

If you add or change an existing court view angle, you'll want to move the camera to match your custom view angle.

To do so, edit the "Tennis.ini", and change this line, under [3dEngine], from :
DevMode = 0
to :
DevMode = 1

Be careful : when the DevMode is turned on, the settings & current World Tour game aren't saved when you exit the game by clicking on the top right cross of the window, or by pressing ALT+F4 .

After, in game, press F9 till the line judges and the chair umpire are removed : they are not in 3D, so they won't move when you move the camera.

Keys on keypad :

  • 1 : zoom out
  • 2 : zoom in
  • + : rotate camera up
  • - : rotate camera down
  • 4 : move camera up
  • 5 : move camera down
  • 7 : move camera back
  • 8 : move camera front
  • 9 : save camera (so it'll be already set next time you enter the court) ; the camera settings are saved in the [Camera] section of the Tennis.ini
  • 6 : reset camera
  • 3 : toggle custom camera on/off (only work after the camera has been saved)

At the same time, press these keys to affect the movement speed :

  • Left Shift : 5 times faster
  • Left Alt : 20 times faster
  • Left Shift + Alt : 100 times faster
  • Left Control : 10 times slower

Once you're done, locate the [Camera] section within your "Tennis.ini", and then copy these entries into the "Court.ini" of your new court :

[Camera]
CustomFocal = 2.8
Angle = -2.2266
Dist = 3086
Height = 85

Note: of course, the values will be the ones that you'll have set during the game, so they might differ from these ones.


How to add a new T-shirt ?

To add a new T-shirt, you should extract all these directories & files, using QPed :

  • Data\Models\Textures : contains all the textures, both for male & female
  • Scripts\GameSys.Ini : contains the number of available outfit styles for each part

Step 1 : create the new T-shirt (or any other outfit part), and save it in the correct directory (look into the .pak "Data/Models/Textures") with a correct name : "ShirtXX.jpg" where "XX" is the number of the new T-shirt

Step 2 : edit "GameSys.Ini", and locate this text : "NbPreset & NbType & FirstType" . Just under, you'll see the list of all possible outfit parts. You just have to increase by one the "NbType" of the part you added a style to. For a male T-shirt, it's [Male_Shirt] .

Step 3, only for Female's T-shirt & skirt, and the Male's T-Shirt : you'll have to define on what 3D model to put the new T-shirt or skirt texture. To do so, open "Data\Models\Textures\Female.Ini" (or Male.ini) and look for [Female/Shirt], [Female/Shorts] or [Male/Shirt]. If you add a T-shirt, look this line:
Model = Tshirt01 1-5 Tshirt02 6-11
and change it to :
Model = Tshirt01 1-5 12 Tshirt02 6-11
or :
Model = Tshirt01 1-5 Tshirt02 6-11 12
depending if you want to use the 1st or 2nd 3D model. The 1st model is the shirt with short sleeves, and the 2nd model is the sleeveless shirt.

For the T-shirt, you'll also need to define a mask to tell the engine what part is the skin in the texture.

Step 4 : you should be done now, just launch the game, and look if your new part style is available in the outfit customization screen..!


How to distribute your Mod to other users ?

The best way to create a Mod that you can release so other people can install it easily is to do the following :

  • never modify the Pak01.pak nor the Pak02.pak
  • create a Pak03.Pak and every time you want to modify a file, extract it from Pak01.pak and put it in Pak03.Pak (don't forget to create the correct folder & sub-folders when needed)
  • publish only the Pak03.Pak and tell people to put it in "Mods\<NameOfYourMod>\Data" sub-folder ("Mods" is a folder created on 1st launch of the game, more info here http://www.managames.com/Forum/topic29-11960.php )
  • be sure to never include "Menu\Build.txt" nor "Menu\BuildMac.txt" within your .Pak, except if you want to force people to be able to use your Mod only with the same version of Tennis Elbow than yours ; these 2 files are used by the game engine to determine if TennisElbow.exe and the .Pak files match ; if they don't, the game will refuse to start stating "Missing, Wrong Version, or Corrupted Data Files. Please re-install the game."
  • if you modified files that are outside a .Pak file, then don't put them in the Pak03.Pak (example : all Players & Tour .ini files) ; just keep them along Pak03.pak, so for example, your Mod will contain these 2 files : Pak03.pak and Players.ATP.Ini
  • if you modify some game limits (especially for the menus, but also the number of outfits and strike styles), notify users about that, so it'll be easier for them to update their GameSys.ini in case they want to merge 2 Mods together, or want to use your Mod with a newer version of the game

A little explanation how the game engine loads files :

When the game engine wants to load a file, it'll look for the file in the hard drive 1st, then if it didn't find it, it looks for it in the last .pak file (Pak02.pak on a unmodified installation), then if it still didn't find it, it looks in the previous .pak files till the 1st one (Pak01.Pak). So if you add Pak03.pak, the game engine will look for files in it after the files in your hard-drive and before to look for them in Pak02.pak . In both cases (hard drive, then .Pak), the game check the Mods subfolder 1st and then the game folder.

 


If you need any additional information, you can ask for help in the Forum :
http://www.managames.com/Forum/forum29.php

And read the FAQ here that explains a lot of other topics, including animation:
http://www.managames.com/Forum/topic29-4059.php

 

ManuTOO – December 14th 2014