Admin:Race Results System Documentation: Difference between revisions

From Hacky Racers Wiki
Line 42: Line 42:


== Properties ==
== Properties ==
How to add new classes?


{| class="wikitable"
{| class="wikitable"
Line 55: Line 53:
| [[Property:Has position]] || The finishing position of the vehicle in the race (e.g., 1, 2, 3).
| [[Property:Has position]] || The finishing position of the vehicle in the race (e.g., 1, 2, 3).
|-
|-
| [[Property:Has class]] || The class category in which the vehicle competed (e.g., Full Size - Piloted, Moxie, Overall).
| [[Property:Has class]] || The class category in which the vehicle competed (e.g., Full Size - Piloted, Moxie, Overall). Click for full list and further documentation.
|-
|-
| [[Property:Event]] || Links the results to the specific event page where the results are recorded.
| [[Property:Event]] || Links the results to the specific event page where the results are recorded.

Revision as of 21:01, 28 October 2024

This documentation provides an overview of the race results system implemented in Semantic MediaWiki, focusing on how to publish and display results for events and vehicles. The system may not make complete sense, as the language is horrible, and it was mostly written by ChatGPT.

Publishing Race Results

To publish results for a new event, create a new event page.

To add results, use the RaceResult template within the event page. Here’s how you would structure the data:

==Results==
{{PublishRaceResult|vehicle=ACDC|driver=Vince|position=1|class=00 - Full Size - Piloted}}
{{PublishRaceResult|vehicle=Death Machine|driver=Brian, Tom, Bill|position=2|class=00 - Full Size - Piloted}}
{{PublishRaceResult|vehicle=CYBR TRK|driver=Chris|position=3|class=00 - Full Size - Piloted}}

{{PublishRaceResult|vehicle=Fish Stick|driver=William Woodward & team|position=1|class=40 - Robotics - A4 Autonomous}}

{{PublishRaceResult|vehicle=Hammer Mouse|driver=Neil|position=1|class=90 - Moxie}}
{{PublishRaceResult|vehicle=Chugga Boom|driver=@PiDrogen|position=1|class=90 - Moxie}}
{{PublishRaceResult|vehicle=CYBR TRK|driver=Chris|position=2|class=90 - Moxie}}
{{PublishRaceResult|vehicle=Babe|driver=Neil|position=2|class=90 - Moxie}}
{{PublishRaceResult|vehicle=Bigger Trak|driver=Leo|position=3|class=90 - Moxie}}

{{PublishRaceResult|vehicle=Hammer Mouse|driver=Neil|position=1|class=99 - Overall}}
{{PublishRaceResult|vehicle=CYBR TRK|driver=Chris|position=2|class=99 - Overall}}
{{PublishRaceResult|vehicle=Bigger Trak|driver=Leo|position=3|class=99 - Overall}}

{{EventResultsTable}}

You can repeat the {{PublishRaceResult}} call for each result you want to enter for that event. Multiple classes and ties are allowed.

To display results associated with a specific event, call {{EventResultsTable}}

Vehicle Page

To display results associated with a specific vehicle, use the following query format on the vehicle's page:

==Race Results==
{{VehicleResultsTable}}

Properties

Property Description
Property:Has vehicle The name of the vehicle that participated in the race.
Property:Has driver The name of the driver of the vehicle.
Property:Has position The finishing position of the vehicle in the race (e.g., 1, 2, 3).
Property:Has class The class category in which the vehicle competed (e.g., Full Size - Piloted, Moxie, Overall). Click for full list and further documentation.
Property:Event Links the results to the specific event page where the results are recorded.

Templates

Note: templates in SMW are more like subroutines/functions than an actual template. These are essentially subroutines/functions.