here you can download the Modding SDK for TEM2 : https://www.managames.com/download.php? ... SDK_b1.zip . (last update : February 2023)
It will let you see where the files have moved to compared from the TE2013 structure (which was also used in the TEM2 Legacy version).
After you just use the Mods folder like in TE2013 & TEM2 Legacy.
To use & mod the files :
- Launch the game, click on the "Show Data Folder" icon in Settings -> Profiles
- Locate the "Mods" subfolder and create in it a folder and name it whatever you want
- Copy the files you want, and make sure to re-create all the folders of their path ; eg: copy "TEM2-ModdingSDK.zip/Specifics/Ini/Music.ini" to "Mods\MySuperMod\Specifics\Ini\Music.ini" ; eg for the players: copy "TEM2-ModdingSDK.zip/Ini/Players.ATP.ini" to "Mods\MySuperMod\Ini\Players.ATP.ini"
- Warning : avoid copying the whole SDK into your Mod folder ; instead your final Mod should contain only the files you have actually modified ; this will lower the chance to have bugs with new versions of the game
- Outfit folder changed from "Data\Models\Textures" to "Players\Textures" ; TE2013 Outfit Mod should still work correctly in there ; however, you can use the file-based method from TE4 => topic60-33539.php
- Modding bases are still very close to TE2013 as explained here https://www.managames.com/tennis/doc/HowToMod.html & there topic29-4059.php
- A lot of things are compatible with TE4, but not all (mostly the outfit), and the images for the TE4 menus are missing
Ini Files :
All files within the "Ini" & "Specifics/Ini" Folders, and any other .ini file, can be modded in 2 ways :
1) As explained above, simply copy the whole file in your Mod folder, and then edit it ; this method completely replaces the built-in file, which means if the game is updated, your Mod won't see the changes and new stuff brought by the official update (for GameSys.ini & Model.ini and likely other .ini's, this will lead to crashes !)
2) Create an empty file named after an existing file, but with "_Mod" at the end of the name ; for example, "GameSys_Mod.ini" for "GameSys.ini" ; in it, you'll add only the Sections and the Entries you want to create or change. Using this method, your Mod won't prevent the built-in .ini file to be loaded, and it will only bring changes and additions to it. Moreover, if several Mods are loaded at once, each Mod can bring its own additions and changes (in the order specified in Mods.ini)
If you want to remove an existing entry, just write its name with nothing else after. eg: in GameSys.ini, there's the line "BallShadowReal = 0" ; so if you want to remove that, then in your "GameSys_Mod.ini", you just write "BallShadowReal".
You can edit the Ini files with the Windows Notepad or any other text editor, but not Word.
Language Files :
the Language files are in the "Text" sub-folder.
Like the Ini files, they can be modded in 2 ways : by completely replacing the built-in file, or by creating a new file with its name having "_Mod" at its end and then writing in this file only the new and changed Text Codes.
When possible, it is recommended to make all your Text Codes starting with a special character sequence, so your Mod Text Codes won't have any conflict with other Mods or game updates.
Different Tournaments each year :
To do so you have to use the following entries in your Tour.ini : YearPeriod, YearModulo & YearModulo+ .
Check Tour.ATP.ini for examples.
eg:
YearPeriod = -1978 1980 1982 1984-1990 2022-
=> starts with "-1978" means all years till 1978
=> ends with "2022-" means all years from 2022
YearModulo = X
=> Tournament happens every X years, starting at 0
YearModulo = -X
=> Happens the years which are not every X years
YearModulo+ = Y
=> Starts at -Y instead of 0
2D Court :
The Courts are in the "Courts" folder.
To preserve the Physics and other parameters, you have to create a "Court_Mod.ini" instead of a "Court.ini" (eg: "Mods\MySuperMod\Courts\Court01\Court_Mod.ini" for a 2D court replacing the clay court), and put this inside for a 2D court created for TE2013 :
- Code: Select all
[Data]
Boards = // This turns off the Match Time & Speed boards
[Camera]
Angle = -7.49429
Focal = // This turns off the default Focal
CustomFocal = 3.38351 // This entry is for legacy TE2013's Focals
Dist = 2722
Height = 429
AspectRatio = 16:10
Replace Angle, CustomFocal, Dist & Height with the values from the 2D court's court.ini .
AspectRatio can be "1.6" or "16:10", it's same. For a 16:9 court, put this instead :
- Code: Select all
AspectRatio = 16:9
/!\ Note for TE2013 2D Courts : if the court didn't have the entry 2dCourt16:9 set to 1, then it was seen as a 16:10 for the camera setting even if it was really a 16:9 court. In this case, you'll have to redo the camera setting within TEM2 (see Automatic line positioning for 2D courts just below, or Moving the camera for the 2D Courts here https://www.managames.com/tennis/doc/HowToMod.html , but use the Shortcuts as seen at the end of Settings -> Controls)
For a new court, you can copy over its Court.ini, no need to use a Court_Mod.ini , but if there's a Focal line in it, you should replace it by :
- Code: Select all
Focal = // This turns off the default Focal
For a 2D court whose camera has been set within TEM2/TE4, use the "Focal" entry, not "CustomFocal". ie: once you have saved the camera and closed the game, take Tennis.ini -> [Camera] -> CustomFocal, and copy it to the Court.ini (or Court_Mod.ini) -> [Camera] -> Focal.
Automatic line positioning for 2D courts :
You can now define the custom camera for 2D courts like this :
- Code: Select all
[Camera]
AspectRatio = 16:9
AutoU1 = 0.3323
AutoV1 = 0.2106
AutoU2 = 0.8297
AutoV2 = 0.7810
ie: no more manual positioning of the camera, you just note down where are the top left & bottom right corners of the lines ! To get these coordinates, divide the pixel's X by the width, and the pixel's Y by the height (so the coordinates will be normalized and thus will still work in case you resize the image afterwards). U1/V1 is the top left line corner, and U2/V2 is the bottom right line corner. A bit more explanations : viewtopic.php?p=281955#p281955 .
For courts without a corridor, add this line :
- Code: Select all
AutoNoCorridor = 1
To see the 2D Court in-game, turn on Settings -> Video -> Advanced -> 2D Background.
How to create a new 2D Background from the existing 3D stadium :
You can change the camera angle of the existing 2D Backgrounds very easily :
- Turn off the 2D Background (in Settings -> Video -> Advanced)
- Start a warm-up and set the camera to your liking
- Press the "Save to 2d Court" key (Right Shift + Print by default) (it can take 10 seconds or more to render & save the file)
- Exit the warm-up and click on Settings -> Profile -> Show Data Folder & Show Engine Log
- In the Data folder, copy TEM2_2dCourt001.png to Mods/MySuperMod/Courts/Court01/Court.png (for the Clay court)
- Locate "Put this in your Court.ini:" in the Engine Log, and copy everything under to Mods/MySuperMod/Courts/Court01/Court_Mod.ini
- Now you should be able to see your new 2D Background with your custom camera angle by starting a warm-up on the corresponding court
Editing .menu files :
The game can reload automatically the .menu files without restarting it if you activate the DevMode (HowTo => topic19-32161.php ), then when you focus back on the game (ie: after have changed a file), the game will reload the .menu files for the active menu.
Warnings:
- the game cannot detect a change to the .def files, so resave the corresponding .menu files if you want to see your changes
- sometimes the reloading doesn't work, especially if the file size didn't change, so add some characters in a comment and resave it to fix the issue
- dynamic variables defined in the .menu file will be set back their initial value, so the menu won't be correctly displayed if these dynamic variables had some different values before the reloading
Changing tournament backgrounds in the menus & text match :
add this to any tournament in Tour.ini :
- Code: Select all
Background = MySuperBackground
and put this image like this : Mods/MySuperMod/Menu/Art//CustomCourtBackground/MySuperBackground.jpg
Note: use power-of-2 dimensions so the images will be faster to load (eg: change from 1920x1080 to 2048x1024, or smaller size to save on loading time & memory)
If the image aspect ratio is not 16:9, you can add, for example if the ratio is 4:3 :
- Code: Select all
BackgroundAR = 1.333
How to add pictures for the players :
Add a line like this in the Players.ini for each player :
- Code: Select all
Photos = Federer_HS, 64, 64; Federer, 98, 158, 1.6
And then put the photos in "Mods\MySuperMod\Menu\Art\PlayerPhotos\ATP" (or WTA for women). The pictures can be in .png (favorite format), .tga, or .jpg.
For your coached players, you can put text files in "PlayerPhotos\ATP", named "Player1.txt" for your 1st Coached player, and "Player2.txt" for the 2nd one and so on. Content of the file is only, for example :
- Code: Select all
Player1_HS, 64, 64; Player1, 120, 160, 1.6
The format for the photo list is : <Headshot picture details> ; <Body picture details>
The headshot is a small picture visible in the Rankings & Draws ; the body is a big picture visible in the Charsheet, the Activity screen and the Travel screen.
The body photo is visible in the Charsheet only if you add the following line under [Menu], in your Tennis.ini : (HowTo => topic19-32161.php )
CharsheetPhoto = 1
The format for each photo description is : <Filename without extension>, <Width>, <Height> [, <SizeScale>]
Width & Height are the size of your original photo. SizeScale is the coefficient to bring that scale to the correct size for the game ; the default height for the body is 256 and for the headshot is 64.
Ideally, you should scale your photos to power-of-2 size ; eg; if your body photo is 350x600, then you resize it to 256x512, so it'll be faster to load, then you describe it like this :
- Code: Select all
MyBodyPhoto, 350, 600, 0.42
600 * 0.42 = 252 => about default height. If you put a bigger scale, the photo will be bigger on the screen.
So it's equivalent to write this :
- Code: Select all
MyBodyPhoto, 147, 252
Coaching Strategy :
In CPU vs CPU matches in the Training Club, you can define the Coaching strategy of a player and then click on "Save Strategy -> Copy the current Coaching Strategy code to the clipboard" (on the bottom right).
This will put a code like this in the clipboard (and the Player.log) :
- Code: Select all
Strategy = F 100 100 -90 -90 98 -80 99 0 0 0 0 0 0 -85 97 -90 0 P 100 100 -90 -90 98 -80 99 0 0 0 0 0 0 -85 97 -90 0
You can then paste this line (with CTRL+V) in a section of a player in your Players.ini so this strategy will be applied when he plays (without any penalty).
You can also define the default strategy of a Training Club player with "Save Strategy -> Enter Strategy code" & "Save the current strategy as the base strategy for this player".
Adding players to the base without invalidating your saved games :
1) Add the player at the end of the base and set him as you want
2) Lower by 1 FreePlayerSlots, under [WT_Static], at the start of the base.
eg, change :
FreePlayerSlots = 100
to :
FreePlayerSlots = 99
3) Save & launch the game
Existing Mods :
- cjs Modcorner - Database Mods (for 2019) : topic11-31544.php
- 2018 Calendar : topic11-30570.php
Warning October 2020 : these Mods might not be fully compatible with the latest version of the game and might make it crash.