s-victor / TinyPedal

Free and Open Source telemetry overlay application for racing simulation
GNU General Public License v3.0
75 stars 8 forks source link

[Feature / Suggestion] - Show Team like Brand #53

Closed DanRZ closed 3 months ago

DanRZ commented 3 months ago

Hello, somebody asked me if TinyPedal can show Teams ? I said No, sorry and checked in rF2SharedMemory ... No Team at all. Only Pitgroup could have been used, like for Brands lately, but most content doesn't set that Pitgroup properly. All skins use Pitgroup = 1. Each Pitgroup represents a team using multiple cars, and should use the same "Pit stop" (Multiclass). But that feature doesn't work well "as is" i think ...

And then, i had an idea ! Why not add Team just like Brand but in another Column in the Confg GUI ? Of course, it would be empty, but users can set it manually and show "Team" in their Standings. They will have to do it for all skins, but why not ...

Today we can already show Team by using Brand value modified as a Team Name, and activate the "Show Brand" in Standings.

Here is a simulation of the Config GUI that would be a good idea :

Capture

And it would be cool, to save all that in another json like brands.json, but teams.json that would be changeable manually.

The Team can be interesting to see. And maybe there is some other trick to get all Teams in all skins. I searched the API, and nothing seems to be available.

Isn't it a good idea ?

DanRZ commented 3 months ago

Some users already see Team names, but i don't see Team explicitly mentionned in TinyPedal Config.

Here is a screenshot they sent me :

Capture_decran_204

The 6th column is a Team tag.

I think some modders use the "Vehicule" description to show the Team Name. That is the only field corresponding i see in the config/display.

Maybe my feauture request is totally useless ... I'm not sure anymore.

s-victor commented 3 months ago

Hi, thanks for suggestion.

Yes, "Vehicle Name", in most cases, equals "Team Name". Here is explain:

Currently there is only 3 usable "name" stuff available directly in API, which are: mDriverName, mVehicleName, mVehicleClass. And mCategoryName in rF2PitMenu is not output in LMU currently so it is useless.

mVehicleName actually shows "skin livery name", which is taken from mod's VEH file "Description=" parameter. And this "Description=" parameter, in official guide here and here, suggests that it should be <Name of the car> <class> <car number> format. Yet in actual practice, its commonly done as <Team name> <car number> or <car number> <Team name> <class> or <car number> <driver name> (mostly seen in league skin package), hence it is like you mentioned in last post (there isn't really a standard everyone follow though). So it is indeed really up to mod or skin livery author to set "vehicle name" in "Description=" parameter correctly in mod in order to show vehicle name which is then accessible by API mVehicleName.

The suggestion to add team name conversion function in tinypedal is definitely possible. However it is already quite complex now with class/brand stuff, adding another layer is just not optimum and degrades performance. IMO, it is really up to mod author or should developer to add team name feature to either mod or API (such as mTeamName), not by adding more workaround in this APP.

ps: just add additional explanation for show_vehicle_name in user guide (wiki also updated): https://github.com/s-victor/TinyPedal/commit/4d8322a34fe58673c8d58f819d6c0de937166ef3

DanRZ commented 3 months ago

Thanks for that precise answer. I already noticed some modders use description of vehicule with Team instead of Car itself description. And now i know why. If you use real Manufacturer and Team in veh data they won't be available via rF2SharedMemory. You need to use "wisely" the 3 main descriptions available in rF2SharedMemory, depending on what you need for plugins or displays and any third part software using rF2SharedMemory.

I use Vehicle description to set a mass penalty by car, so in my case it can't be a Team. I need to have actual description of car. My plugin won't work properly on mods where Vehicule description is the Team, because different multiclass car would have same mass penalty.

Have a good day, and thanks again.

I think you can close this issue.