eckhchri / pcars-ds-liveview

Provides a html page for project cars dedicated server and display a map of the current race.
14 stars 1 forks source link

Show Livery Thumbnails in Driver Table #112

Closed viper4gh closed 6 years ago

viper4gh commented 6 years ago

If you click on a row in the Drivertable a Livery Thumbnail pops up. And/or adding a new column with the Livery Thumbnails embedded.

viper4gh commented 6 years ago

Livery Folder structure: data/liveries/[Vehicle ID]/[Car Nr. or Livery ID].png

The png files are available in two filename variantes: [Car Nr.].png - example: 2.png id[Vehicle ID].png - example: id50.png

The following Vehicle Classes are currently available: GT1, GT3, Ginetta Junior, GTE, LMP2, Indy Car, Touring Cars

viper4gh commented 6 years ago

Attention later: The "Ligier JS P2 Nissan" has the car number files "8.png" and "08.png". The same with number 9. If they will not work, then replace the name with the Livery IDs.

viper4gh commented 6 years ago

Extract vehicle number from Livery Name: https://jsfiddle.net/b9j4z651/

var LiveryName = "Cassius Racing #9"; var sliced = LiveryName.slice(LiveryName.indexOf("#")+1);

viper4gh commented 6 years ago

Next steps:

An example of the needed hash: VehicleLiveryListHash[9503224][51] = "Cassius Racing #9"

viper4gh commented 6 years ago

Feature is working in general now. Some problems:

Enhancements:

viper4gh commented 6 years ago

ToDo: generate a white silhouette of every available car for the "Custom Livery" HowTo with paint.net:

viper4gh commented 6 years ago

Feature fully implemented. Missing liveries will be added as soon as they are available.