New way to add 2D courts in TE4 v0.54

Everything about Modding the game, from new courts to the modifications of the player & tournament bases (and including all the bugs they may be creating ! ;) )

New way to add 2D courts in TE4 v0.54

Postby manutoo » 07 Apr 2022, 10:25

Hello,

in a few days, the version 0.54 of TE4 will be released and it'll change the way to add 2D courts to the game.

Let's start with an example :
MyClayCourt.zip

You can install this new court in the folder "Mods\<YourModName>\Courts\Stadiums", so you'll get : "Mods\<YourModName>\Courts\Stadiums\MyClayCourt\Court.jpg".

So the main change is that now the 2D courts can use any name for their folder, and this folder is in "Courts\Stadiums" instead of "Courts".

Important note : you shouldn't put spaces in the folder name. (although it seems to work anyway, except if you want to localize your stadium & surface names in different languages :blackeye: )

This allows having your 2D court shown in the Training Club without touching any menu file.

The legacy Court.ini is split into 2 .ini :
- 1 in "Courts\Stadiums\<NameOfStadium>\Stadium.ini", for the stadium related information
- 1 in "Courts\Surface\<NameOfSurface>\Surface.ini", for the surface related information

So if you use the surfaces from the game, you don't need to add your own Surface.ini. Also if you want a new Surface, different new 2D courts can reference it through their Stadium.ini, which allows faster tuning of its physical properties.

The image itself is still called "Court.jpg" (and should be in power-of-2 dimensions for faster loading time ; eg: 2048x1024 instead of 1920x1080), and beside it, you can add an "Icon.jpg" file (or .png), preferably of 128x128 size. The stadium will be automatically displayed in the new stadium selection menu, with this icon.


New Stadium / 2D Court :

Here the content of the sample Stadium.ini :
Code: Select all
[Stadium]   // French Slam
Scene      =   FrenchSlam
SignColor   =   0xBF8E9A94
DefaultGround   =   Clay
NameDirect   =   My Clay Court
Only2dSelection   =   1

[Data]
Boards      =   // This turns off the Match Time & Speed boards
//LinesColorFor2D = 0   // Uncomment this to disable the court lines when displaying the associated 2D court

[Camera]
Angle      =   -16.3228197752185
CustomFocal   =   //
Dist      =   2968.73095703125
Height      =   859.098022460938
Focal      =   2.30787014961243
AspectRatio   =   16:9


The [Stadium] section is the same as the legacy [StadiumXX] sections that were in the GameSys.ini ; here is an explanation for each entry :
- Scene : the 3D scene to display if the 2D Background option is disabled
- SignColor : to change the color of the ads in the 3D scene (0 = no ads)
- DefaultGround : the surface to use by default ; it can be one from the original game, or one you have created
- NameDirect : allows you to define the name of the stadium shown in the menu without adding it to the Lang_*.txt files
- Only2dSelection : if 1, then the Stadium won't be shown in the Stadium selection screen if the 2D Background option is disabled

[Data] is for the Boards entry, allowing you to choose the disposition the speed & match time amongst the ones available in the original stadiums.

[Camera] is the section from the legacy Court.ini, without changes (it's very recommended to read the "Automatic line positioning for 2D courts" section here to ease the line positioning process : topic11-31376.php )

To add a new 2D court to the World Tour, add this line to any tournament of your Tour.ini :
Code: Select all
Stadium   =   MyNewStadium

Replace "MyNewStadium" with the folder name of your court in the "Stadiums" folder.


New Surface :

If you want to add a new surface, just create a file like this : "Mods\<YourModName>\Courts\Surfaces\<NameOfYourSurface\Surface.ini" .

And copy this inside (or copy one from the Modding SDK, once the v0.54 will have been released) and then edit it to your liking :
Code: Select all
[Surface]
NameDirect   =   My Super Name      // Name shown directly without looking into Lang_English.txt
SelectableInTC   =   1         // Set to 0 to hide this surface from selection in the Training Club

[Physics]   // Bleu-green Cement
CoF      =   0.62
CoR0      =   0.82
SurfaceSpeed   =   0.25
Type      =   4   // Hard

[Sound]
Bounce      =   Bounce_Hard
Skid      =   Skid_Hard

[Data]
LinesColor   =   0xFFFFFFFF   // format is : 0xAARRGGBB => Alpha / Red / Green / Blue
MaterialIn   =   Blue
MaterialOut   =   Green


To add a new surface to the World Tour, add this line to any tournament of your Tour.ini :
Code: Select all
Surface   =   MyNewSurface

Of course, change "MyNewSurface" to the folder name of your new surface... :blackeye:
You do not have the required permissions to view the files attached to this post.
ManuTOO
== Mana Games ==

>> I don't answer Private Message, except if it's really a _Private_ topic <<
User avatar
manutoo
Game Author
 
Messages: 17497
Gaming Since: 24 Jan 2004, 15:38
Location: France

Re: New way to add 2D courts in TE4 v0.54

Postby Fed1 » 11 Apr 2022, 15:24

This is modding porn :D:D:D:D so much easier to work with, specially with the name. Quick question, Would it be possible to have multiple courts/stadiums for a single tournament?
Fed1
crazy of the little yellow ball
crazy of the little yellow ball
 
Messages: 105
Gaming Since: 09 Jun 2020, 20:09

Re: New way to add 2D courts in TE4 v0.54

Postby wilddog79 » 11 Apr 2022, 16:08

When it's available the update 0.54 will be necessary in the "Court_Mod.ini or Court.ini" file make modifications to adjust the parameters of a court' screenshot?

I mean, Will we must to work with the parameter Devmode yet?
wilddog79
crazy of the little yellow ball
crazy of the little yellow ball
 
Messages: 307
Gaming Since: 08 May 2017, 04:32

Re: New way to add 2D courts in TE4 v0.54

Postby manutoo » 12 Apr 2022, 06:00

Fed1,
yes, it'll come at some point.

wilddog79,
with the next version, you should usually always add a new Stadium when you want to add a new court photo.
But if you want to replace an existing 2D court, then you'll have a Stadium_Mod.ini with your Camera parameters, instead of a Court_Mod.ini .
ManuTOO
== Mana Games ==

>> I don't answer Private Message, except if it's really a _Private_ topic <<
User avatar
manutoo
Game Author
 
Messages: 17497
Gaming Since: 24 Jan 2004, 15:38
Location: France

Re: New way to add 2D courts in TE4 v0.54

Postby wilddog79 » 12 Apr 2022, 14:46

I understand, but when I talk about of Camera parameters I refer If I'll have to make adjusts between Devmode, Photoshop and in this case Stadium_Mod.ini as always or the adjust will be automatic?

I don't know If I explain clearly!
wilddog79
crazy of the little yellow ball
crazy of the little yellow ball
 
Messages: 307
Gaming Since: 08 May 2017, 04:32

Re: New way to add 2D courts in TE4 v0.54

Postby manutoo » 13 Apr 2022, 06:09

wilddog79,
you still have to position the lines by yourself, but it's very recommended to read the "Automatic line positioning for 2D courts" section here to ease the line positioning process : topic11-31376.php .
ManuTOO
== Mana Games ==

>> I don't answer Private Message, except if it's really a _Private_ topic <<
User avatar
manutoo
Game Author
 
Messages: 17497
Gaming Since: 24 Jan 2004, 15:38
Location: France

Re: New way to add 2D courts in TE4 v0.54

Postby wilddog79 » 13 Apr 2022, 15:03

How long time more and less you have estimated launch the update 0.54?

Note: I'm not rushing and pressuring either, i'm just asking.
wilddog79
crazy of the little yellow ball
crazy of the little yellow ball
 
Messages: 307
Gaming Since: 08 May 2017, 04:32

Re: New way to add 2D courts in TE4 v0.54

Postby wilddog79 » 13 Apr 2022, 15:03

manutoo wrote:wilddog79,
you still have to position the lines by yourself, but it's very recommended to read the "Automatic line positioning for 2D courts" section here to ease the line positioning process : topic11-31376.php .


Thanks for your explanation.
wilddog79
crazy of the little yellow ball
crazy of the little yellow ball
 
Messages: 307
Gaming Since: 08 May 2017, 04:32

Re: New way to add 2D courts in TE4 v0.54

Postby manutoo » 14 Apr 2022, 06:22

The new version has been released yesterday.
ManuTOO
== Mana Games ==

>> I don't answer Private Message, except if it's really a _Private_ topic <<
User avatar
manutoo
Game Author
 
Messages: 17497
Gaming Since: 24 Jan 2004, 15:38
Location: France

Re: New way to add 2D courts in TE4 v0.54

Postby Tincho18 » 14 Apr 2022, 18:03

Where can we put the lines color?
Tincho18
crazy of the little yellow ball
crazy of the little yellow ball
 
Messages: 50
Gaming Since: 09 Jun 2021, 01:53

Re: New way to add 2D courts in TE4 v0.54

Postby Roms » 14 Apr 2022, 19:55

Tincho18 wrote:Where can we put the lines color?


In surface.ini for linecolor :yes:
it seems to me :wink:
Roms
crazy of the little yellow ball
crazy of the little yellow ball
 
Messages: 128
Gaming Since: 13 Oct 2018, 02:37

Re: New way to add 2D courts in TE4 v0.54

Postby liquidwhip » 15 Apr 2022, 06:57

@manutoo

As far as specific sounds for serve and hit for a particular court are concerned, do I need to add the info in the stadium.ini?

Would I add something like below to the stadium.ini?

Code: Select all
[Sound]
Hit        =   Hit_MyCourtName
Serve     =   Serve_MyCourtName


If not, how do I assign hit and serve sounds in this new modding method? Any help would be greatly appreciated. Thanks!
liquidwhip
tennis curious
 
Messages: 4
Gaming Since: 28 Feb 2017, 20:36

Re: New way to add 2D courts in TE4 v0.54

Postby manutoo » 16 Apr 2022, 13:28

liquidwhip,
yes, you do like that (with yesterday's update).

You can also override the Hit & Serve sounds in the Surface.ini ; if there's none, then the game looks into the Stadium.ini .
ManuTOO
== Mana Games ==

>> I don't answer Private Message, except if it's really a _Private_ topic <<
User avatar
manutoo
Game Author
 
Messages: 17497
Gaming Since: 24 Jan 2004, 15:38
Location: France

Re: New way to add 2D courts in TE4 v0.54

Postby wilddog79 » 17 Apr 2022, 04:15

Hello,

1) I created a new court of "Dallas Open", I created the "042 Dallas" subfolder inside of the Stadiums folder, and there we found court.jpg, Icon.png & Stadium.ini

In Stadium.ini I added these lines:

[Stadium] // Dallas
Scene = IndoorTET250
SignColor = 0xBF8E9A94
DefaultGround = 042 Dallas
NameDirect = Dallas
Only2dSelection = 1
NetSkin = Nets/XKT
NetWidthScale = 1.1

[Data]
Boards = // This turns off the Match Time & Speed boards

[Camera]
Angle = -14.3697841530735
Dist = 3258
Focal = 1.70018434524536
Height = 775
AspectRatio = 16:9



2) Inside of the "Surfaces" folder I created the "042 Dallas" subfolder, inside we find "Icon.png" file & the "Surface.ini" file too.

In Surface.ini I added these lines:

[Surface]
NameDirect = Dallas
SelectableInTC = 1 // Set to 0 to hide this surface from selection in the Training Club

[Physics] // Concrete
CoF = 0.63
CoR0 = 0.77
SurfaceSpeed = 0.5
Type = 4 // Hard

[Sound]
Hit = Hit_ROTTERDAM2022
Serve = Service_ROTTERDAM2022
Bounce = Bounce_Hard
Skid = Skid_Hard
Bounce = Bounce_Indoor
Skid = Skid_IndoorHard

[Data]
Crowd = 0
LinesColor = 0xF0F0F0F0
MaxAttrition = 1.0 //1.10
Smoothness = 0.05
LightRotX = 50
LightRotY = 330
MaterialIn = Red
MaterialOut = Green
Boards = IndoorTET250
LineJudgeX = -1020
LineJudgeY = 1980

I created all these subfolders and files copying, pasting and modifying other ones. I have a problem because I can't adjust the lines of the court, I have made all the possible, I mean, in my XKT profile I enable DevMode and after I use the shortcuts trying to adjust but what happen is that not "Save changes", when i comeback to the game noone change is done.

I will let screenshot.

Image


Could you tell me what I'm making not correctly?
wilddog79
crazy of the little yellow ball
crazy of the little yellow ball
 
Messages: 307
Gaming Since: 08 May 2017, 04:32

Re: New way to add 2D courts in TE4 v0.54

Postby manutoo » 17 Apr 2022, 06:22

wilddog79,
1) Do not put space in your folder names ; the game may not work well with them

2) You just use the new way to position lines.
But if you use the old way, IIRC, the camera parameters are saved in your Tennis.ini and you have to copy them to your Stadium.ini .
ManuTOO
== Mana Games ==

>> I don't answer Private Message, except if it's really a _Private_ topic <<
User avatar
manutoo
Game Author
 
Messages: 17497
Gaming Since: 24 Jan 2004, 15:38
Location: France

Next

Return to Modding - TE4

Who is online

Users browsing this forum: CCBot [Bot] and 0 guests