Assistance with Commentaries

General discussions about the tennis games Tennis Elbow
Forum rules
Speak English and don't hijack topics, troll, use profanities nor insults

Assistance with Commentaries

Postby Andynator7 » 06 Nov 2022, 18:11

Hi Manu,

It occured to me that you must be working on matching the commentaries up with relevant things in the game right now. I was wondering if there is any part of this that others can help with. Like perhaps some aspect of this involves somehow indicating what conditions are needed for a particular audio clip. I would be happy to do something like that that doesn't require a lot of technical knowledge, and perhaps others might too.
Andynator7
court stakhanovite
court stakhanovite
 
Messages: 41
Gaming Since: 18 Nov 2019, 21:30
Location: United States

Re: Assistance with Commentaries

Postby manutoo » 07 Nov 2022, 10:52

Hello,

yes, as exposed in the last mini-blog post ( => viewtopic.php?p=284282#p284282 ), I'm working on the commentaries now.

Unfortunately, it turned out to be significantly more complicated than expected, as it's kinda hard for me to create all the little formulas, so for someone with 0 coding knowledge, it might be pretty daunting.

However, when there's no need to create new variables, it gets significantly easier (ie: to create a variable, I need to think how to get it from the engine, and only me can do that), but it's still a long & tedious task, probably error prone.

Here a couple of examples about how to convert Darren's human instructions to formulas for the engine :
Code: Select all
Player hits winner, averaging >X unforced errors per point.
{$1.UnforcedErrorsPerPoint} < 0.20 && {Match.NbGamePlayed} > 6

Return of fast first serve hit to within 30 cm of baseline, point ends in <5 shots.
{$1.Returning} && {Rally.1stServiceSpeed} > IfElse({$1.Female}, 175, 195) && {Rally.ReturnDepth} > BaseLine-30 && {Rally.NbStrike} < 5 && {Rally.NbStrike} >= 2

Favorite ranked in top 20 hits third unforced error or more in 4 points.
{$1.Rank} <= 20 && {$1.Favorite} && CountBit({$1.UnforcedErrorTracking}, 4) >= 3


A little explanation about $1 & $2 :
Code: Select all
//$1 : section of interesting player (ie: the one doing the winner, fault, etc.) ; for generic category, the winner
//$2 : opponent ; for generic category, the loser


How do you feel when you see this ? Does it make you want to run away in screams..? :blackeye:

There are something like nearly 2000 more lines to do, and it takes me about 1 hour to do 25 of them (although ~500 of them are easy ones). My brain melts after 1 hour of doing that, so I think I could do only 5 hours at best per week (which would have the benefit to let me focus on bigger tasks and I'd work on the commentaries only in small sessions), so it'd take me almost 4 months to do them all... :fear:
ManuTOO
== Mana Games ==

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

Re: Assistance with Commentaries

Postby Andynator7 » 27 Dec 2022, 21:13

Hi Manu,

Sorry I never responded! I was crazy busy in November and December. I have free time and I would be happy to try and help out with this. I do have some experience with coding (in python), the example you posted doesn't scare me away, so I would be happy to try and work on some of them. Just let me know what the next step is!
Andynator7
court stakhanovite
court stakhanovite
 
Messages: 41
Gaming Since: 18 Nov 2019, 21:30
Location: United States

Re: Assistance with Commentaries

Postby manutoo » 30 Dec 2022, 10:32

I'm going to quote this mini-blog post : viewtopic.php?p=285046#p285046 .
manutoo wrote:At 1st, I was hoping it'd be possible to ask for help from the community to do that, but it's actually tough coder work, and not everybody can do it. Moreover, you can't just throw 20 minutes and be done to give me a bit of help. You cannot do that without having a least a rough idea of what are the ~300 existing variables and what you can do with them


But if you want to have a deeper look anyway, here is the variable list :
Code: Select all
   01 - {$1.1stBrokeInPreviousSetOnGame}
   02 - {$1.1stServeInTracking}
   03 - {$1.AcrossFromBody}
   04 - {$1.Age}
   05 - {$1.AverageStrongServiceSpeed}
   06 - {$1.AwayFromLinesStrikeTracking}
   07 - {$1.Breath}
   08 - {$1.BrokeOnPreviousGame}
   09 - {$1.CloseCallInTracking}
   10 - {$1.CouldHaveHitTheBall}
   11 - {$1.Country}
   12 - {$1.DistanceMovedBeforeServe}
   13 - {$1.DominantWinnerType}
   14 - {$1.DropShotTracking}
   15 - {$1.Energy}
   16 - {$1.EnergyMax}
   17 - {$1.ErrorTracking}
   18 - {$1.Favorite}
   19 - {$1.Female}
   20 - {$1.ForcedToRushNetByNetClipping}
   21 - {$1.ForceGlobal}
   22 - {$1.ForceRally}
   23 - {$1.ForceServe}
   24 - {$1.ForehandPowerShotTracking}
   25 - {$1.FormOfDay}
   26 - {$1.GameScore}
   27 - {$1.GameWon}
   28 - {$1.GameWonTracking}
   29 - {$1.GoodPosTracking}
   30 - {$1.Height}
   31 - {$1.HitLobAfterBounce}
   32 - {$1.Leading}
   33 - {$1.LobTracking}
   34 - {$1.LongDefendingRallyWonTracking}
   35 - {$1.LongTravel}
   36 - {$1.LowestPointWonRate}
   37 - {$1.MaxBackhandSpeed}
   38 - {$1.MaxForehandSpeed}
   39 - {$1.MaxRunDistanceToReachStrike}
   40 - {$1.MaxRunningSpeed}
   41 - {$1.MinNbBreakPerSet}
   42 - {$1.MinY}
   43 - {$1.NbBreak}
   44 - {$1.NbConsecutiveUE}
   45 - {$1.NbDifficultStrike}
   46 - {$1.NbGoodGet}
   47 - {$1.NbGreatGet}
   48 - {$1.NbLobWinner}
   49 - {$1.NbPointInaRow}
   50 - {$1.NbPointLostBeforeThatPoint}
   51 - {$1.NbPowerShot_Game}
   52 - {$1.NbPowerShot}
   53 - {$1.NbRallyWithGreatGet_Set}
   54 - {$1.NbSameStrikeTypeInaRow}
   55 - {$1.NbServiceGameDone_Set}
   56 - {$1.NbServiceWinner_Game}
   57 - {$1.NbServiceWinnerOnKeyPoint}
   58 - {$1.NbSet}
   59 - {$1.NbSlamTitle}
   60 - {$1.NbStretchedStrikeBehindTheBaseline}
   61 - {$1.NbStrike_Match}
   62 - {$1.NbStrikeFarFromBaseline}
   63 - {$1.NbStrikeFarFromOpponentInaRow}
   64 - {$1.NbTopspinStrike}
   65 - {$1.NbTournamentTitle}
   66 - {$1.NbUnconsecutiveGoodPos}
   67 - {$1.NbUnforcedError_Game}
   68 - {$1.PointWonRate}
   69 - {$1.PointWonTracking}
   70 - {$1.PowerShotErrorTracking}
   71 - {$1.PowerShotOnShortBallTracking}
   72 - {$1.PowerShotTracking_Match}
   73 - {$1.PowerShotTracking}
   74 - {$1.PowerShotWinnerTracking}
   75 - {$1.PrevStrikeY}
   76 - {$1.Rank}
   77 - {$1.Returning}
   78 - {$1.RunDist_Match}
   79 - {$1.RunDist}
   80 - {$1.ServeVolley}
   81 - {$1.ServiceSideSpin}
   82 - {$1.ServiceTopSpin}
   83 - {$1.Serving}
   84 - {$1.ServingInfoNext}
   85 - {$1.SetWon}
   86 - {$1.ShoulderHeight}
   87 - {$1.SK_Backhand_Consistency}
   88 - {$1.SK_Backhand_Power}
   89 - {$1.SK_Backhand_Precision}
   90 - {$1.SK_ColdBlood}
   91 - {$1.SK_Concentration}
   92 - {$1.SK_Counter}
   93 - {$1.SK_Dropshot}
   94 - {$1.SK_Focus}
   95 - {$1.SK_Forehand_Consistency}
   96 - {$1.SK_Forehand_Power}
   97 - {$1.SK_Forehand_Precision}
   98 - {$1.SK_Lob}
   99 - {$1.SK_LongTermForm}
   100 - {$1.SK_Motivation}
   101 - {$1.SK_NetPresence}
   102 - {$1.SK_Passing}
   103 - {$1.SK_Positioning}
   104 - {$1.SK_Return}
   105 - {$1.SK_SelfEsteem}
   106 - {$1.SK_Service_Consistency}
   107 - {$1.SK_Service_Power}
   108 - {$1.SK_Service_Precision}
   109 - {$1.SK_ShortTermForm}
   110 - {$1.SK_Smash}
   111 - {$1.SK_Speed}
   112 - {$1.SK_Stamina}
   113 - {$1.SK_Tonicity}
   114 - {$1.SK_Topspin}
   115 - {$1.SliceTracking}
   116 - {$1.Soul}
   117 - {$1.ST_1stService%}
   118 - {$1.ST_1stService}
   119 - {$1.ST_1stServiceWr}
   120 - {$1.ST_BackhandOut}
   121 - {$1.ST_BackhandWr_Set}
   122 - {$1.ST_ForehandWr_Tracking}
   123 - {$1.ST_ForehandWr}
   124 - {$1.StartBreath}
   125 - {$1.StartEnergy}
   126 - {$1.StrikeCloseToLineTracking}
   127 - {$1.StrikeNearBaseLineTracking}
   128 - {$1.StrikeNearLeftLineTracking}
   129 - {$1.StrikeNearRightLineTracking}
   130 - {$1.StrikeTypeFlag}
   131 - {$1.Style}
   132 - {$1.TL_BallFeeling}
   133 - {$1.TL_Chameleon}
   134 - {$1.TL_Champion}
   135 - {$1.TL_EarlyBall}
   136 - {$1.TL_Elderly}
   137 - {$1.TL_GlobeTrotter}
   138 - {$1.TL_Prodigy}
   139 - {$1.TL_Service_Kick}
   140 - {$1.TL_Service_Slice}
   141 - {$1.TL_Service_TopSpin}
   142 - {$1.TL_Slice}
   143 - {$1.TL_Upsetter}
   144 - {$1.TopForceForThisAge}
   145 - {$1.TopSpinStrikeTracking}
   146 - {$1.TotalBreak_Set}
   147 - {$1.TotalBreak}
   148 - {$1.TotalBreakPoint_Set}
   149 - {$1.TotalBreakPoint}
   150 - {$1.TrailingInMatch}
   151 - {$1.Underdog}
   152 - {$1.UnforcedErrorRate_Set}
   153 - {$1.UnforcedErrorRate}
   154 - {$1.UnforcedErrorTracking}
   155 - {$1.WinnersPerPoint}
   156 - {$1.WinnerTracking}
   157 - {$SetStat1.UnforcedError}
   158 - {$Stat1.UnforcedError}
   159 - {Bounce.CloseCall}
   160 - {Bounce.CloseToLine}
   161 - {Bounce.Height}
   162 - {Bounce.In}
   163 - {Bounce.LongOut}
   164 - {Bounce.VeryCloseToLine}
   165 - {Bounce.WideOut}
   166 - {Bounce.Winner}
   167 - {Bounce.x}
   168 - {Game.Done}
   169 - {Game.LongestRally}
   170 - {Game.NbBreakPoint}
   171 - {Game.PointNum}
   172 - {Game.Returner}
   173 - {Game.Server}
   174 - {Game.ServingInfo}
   175 - {Game.Tie}
   176 - {LastStrike.Angle}
   177 - {LastStrike.BallBounced}
   178 - {LastStrike.BallX}
   179 - {LastStrike.BallZ}
   180 - {LastStrike.Control}
   181 - {LastStrike.CounterBonusSpeed}
   182 - {LastStrike.CrossCourt}
   183 - {LastStrike.DownTheLine}
   184 - {LastStrike.EasyBall}
   185 - {LastStrike.FromBounceY}
   186 - {LastStrike.GoodPos}
   187 - {LastStrike.GreatGet}
   188 - {LastStrike.Guessed}
   189 - {LastStrike.KeySkill}
   190 - {LastStrike.Lob}
   191 - {LastStrike.MaxPossibleSpeed}
   192 - {LastStrike.MaxRunningSpeedBefore}
   193 - {LastStrike.NbErrorOfThatType}
   194 - {LastStrike.NbWinnerOfThatType}
   195 - {LastStrike.Net}
   196 - {LastStrike.NetClearance}
   197 - {LastStrike.NetPushedBallOut}
   198 - {LastStrike.NetTrickle}
   199 - {LastStrike.OnRise}
   200 - {LastStrike.OpponentClosestDistToTheBall}
   201 - {LastStrike.OpponentSpeedWhenClosestToTheBall}
   202 - {LastStrike.OpponentX}
   203 - {LastStrike.OpponentY}
   204 - {LastStrike.PassingShot}
   205 - {LastStrike.PlayerSpeed}
   206 - {LastStrike.PowerShot}
   207 - {LastStrike.PreparationTime}
   208 - {LastStrike.PreviousControl}
   209 - {LastStrike.PreviousType}
   210 - {LastStrike.RunDistance}
   211 - {LastStrike.RunDy}
   212 - {LastStrike.RunningSpeedOnPreviousStrike}
   213 - {LastStrike.SharpAngle}
   214 - {LastStrike.SideSpin}
   215 - {LastStrike.SkillConsistency}
   216 - {LastStrike.SkillOverall}
   217 - {LastStrike.SkillPower}
   218 - {LastStrike.SlowShot}
   219 - {LastStrike.Speed}
   220 - {LastStrike.Timing}
   221 - {LastStrike.TopSpin}
   222 - {LastStrike.ToughPos}
   223 - {LastStrike.Type}
   224 - {LastStrike.Volley}
   225 - {LastStrike.WrongFooting}
   226 - {LastStrike.x}
   227 - {LastStrike.XonOpponentStrike}
   228 - {LastStrike.y}
   229 - {Match.Close}
   230 - {Match.CourtSpeed}
   231 - {Match.CourtType}
   232 - {Match.Done}
   233 - {Match.NbDebreak}
   234 - {Match.NbGamePlayed}
   235 - {Match.NbPoint}
   236 - {Match.NbRallyLongerThan19}
   237 - {Match.NbRallyShorterThan7}
   238 - {Match.NbSet}
   239 - {Match.TotalPoint}
   240 - {PrevBounce.x}
   241 - {PrevBounce.y}
   242 - {Rally.1stServiceSpeed}
   243 - {Rally.BreakPoint}
   244 - {Rally.BreakPointNext}
   245 - {Rally.CrowdLevel}
   246 - {Rally.KeyPoint}
   247 - {Rally.KeyPointNext}
   248 - {Rally.LongestDeltaLength}
   249 - {Rally.NbStrike}
   250 - {Rally.PlayerWinner}
   251 - {Rally.PossibleBreakPointNext}
   252 - {Rally.ReturnOfServeDepth}
   253 - {Rally.ServiceBounceX}
   254 - {Rally.ServiceNum}
   255 - {Rally.SetPoint}
   256 - {Rally.Top5Longest}
   257 - {Set.Done}
   258 - {Set.Final}
   259 - {Set.NbGamePlayed}
   260 - {Set.NbGameToWin}
   261 - {Set.Num}
   262 - {Trn.Country}
   263 - {Trn.NbRound}
   264 - {Trn.Round}
   265 - {Trn.TypeRank}


And the full Commentary SDK that I just created :
https://www.managames.com/download.php? ... SDK_v1.zip

Read 1st the "!__ReadMeFirst.txt" file.

The best would be to start with the "Serve.txt" file ; it has only 215 lines and shouldn't require too many new variables. (ie: it mostly feels like an extension of the already done "General.txt" file)

If you start to do anything, to indicate what you have worked on, try to put this at the start of each line like this :
- === : didn't know how to do that
- == : did it, but not sure if it's correct
- = : did it and confident it's correct enough

Open "2020-10-09 - TE4 scripts (v7) - TOO.xlsx" and click on the "Serves" tab to get all Darren's descriptions (it's best to have both windows visible at the same time : the formula one, and the excel one).

If you want to check if the engine can parse correctly your formulas, activate the DevMode (HowTo => topic19-32161.php ), rename "Serve.txt" to "General.txt" and put it in : "Mods\MySuperMod\Specifics\Commentaries\" ; launch the game, close it, and open Player.log (next to the Mods folder). Check for "Warning:". If you add some variables, it should create a list of them in the log.

If you feel it's too much, no worry ; if you'd like some explanation or anything, let me know ! :yes:
ManuTOO
== Mana Games ==

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

Re: Assistance with Commentaries

Postby Andynator7 » 06 Jan 2023, 22:04

This makes sense to me and I've started working on the formulas for the serve commentaries. I am wondering how you want the files formatted when I finish them. Should I try to format it like General.txt, or just give you a list of the formulas in the Serve.txt file?
Andynator7
court stakhanovite
court stakhanovite
 
Messages: 41
Gaming Since: 18 Nov 2019, 21:30
Location: United States

Re: Assistance with Commentaries

Postby manutoo » 07 Jan 2023, 09:16

Ouch, I botched the process to test in-game, you actually have to do that :
- import in Excel the serve.txt file
- copy/paste the whole column into a new column of the Serves tab of "2020-10-09 - TE4 scripts (v7) - TOO.xlsx"
- change the column name from "Conditions" to "Formula"
- save the Serves tab as Unicode Text to "Mods\MySuperMod\Specifics\Commentaries\General.txt"

If you do that, you'll get a file formatted like the current General.txt .

You can send me the original Serve.txt with only 1 column as well, but it'd be safer to check the formulas for errors 1st. :blackeye:
ManuTOO
== Mana Games ==

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

Re: Assistance with Commentaries

Postby Andynator7 » 28 Jan 2023, 20:37

Hi Manu. I'm sorry to say that I've put quite a bit of time trying to get through some of these but I think this is a bit beyond my ability. Like you guessed, the problem is that it's difficult for me to determine how the different variables work and remember all of them on the list. Though I expect with the existing variables most of the lines are possible, I am unable to figure out which variables might be applicable to certain shots/simulations. I'm sorry to have had you prepare the SDK and everything!

I am still going to try and help out, but I will focus on something which falls more in my knowledge (which includes many many hours of watching pro tennis). I've started going through players on the men's side and compiling the relevant talents. I have just a few questions before I send those to you.

1) What is the best format for this? Should I send you the players.ini, or a list of players and talents?
2) Up to how many talents can a player have? Could a player like Federer have more than is common, but then some of their skills are slightly decreased to compensate?
Andynator7
court stakhanovite
court stakhanovite
 
Messages: 41
Gaming Since: 18 Nov 2019, 21:30
Location: United States

Re: Assistance with Commentaries

Postby manutoo » 29 Jan 2023, 08:53

0) No worry, it wasn't too long to prepare the SDK, and like this, if someone in a distant future wants to create his own commentaries, he'll have all the tools needed to incorporate them into the game... :P

1) The best would be to send me the Players.ini if you have the latest one from the Modding SDK ; but next week, I'm going to update the player base, so I'd need it today or tomorrow at worst. If not, either you wait for the new Players.ini, or you send me the list of players with their Talent list (ready to be copied/pasted in the Players.ini)

2) There's no limit ; the skills are usually not lowered as Talent influence is often low or very low.
ManuTOO
== Mana Games ==

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


Return to Tennis Elbow 4

Who is online

Users browsing this forum: Majestic-12 [Bot], MethrenaPeks, Petal [Bot], Yandex [Bot] and 15 guests