Admin:Race Results System Documentation: Difference between revisions

From Hacky Racers Wiki
Line 10: Line 10:
<pre>
<pre>
==Results==
==Results==
{{RaceResult|vehicle=ACDC|driver=Vince|position=1|class=Full Size - Piloted}}
{{PublishRaceResult|vehicle=ACDC|driver=Vince|position=1|class=Full Size - Piloted}}
{{RaceResult|vehicle=Death Machine|driver=Brian, Tom, Bill|position=2|class=Full Size - Piloted}}
{{PublishRaceResult|vehicle=Death Machine|driver=Brian, Tom, Bill|position=2|class=Full Size - Piloted}}
{{RaceResult|vehicle=CYBR TRK|driver=Chris|position=3|class=Full Size - Piloted}}
{{PublishRaceResult|vehicle=CYBR TRK|driver=Chris|position=3|class=Full Size - Piloted}}


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


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


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


{{EventResult}}
{{EventResultsTable}}
</pre>
</pre>


You can repeat the <nowiki>{{RaceResult}}</nowiki> call for each result you want to enter for that event. Multiple classes and ties are allowed.
You can repeat the <nowiki>{{PublishRaceResult}}</nowiki> 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 <nowiki>{{EventResult}}</nowiki>
To display results associated with a specific event, call <nowiki>{{EventResultsTable}}</nowiki>


== Vehicle Page==
== Vehicle Page==

Revision as of 20:18, 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=Full Size - Piloted}}
{{PublishRaceResult|vehicle=Death Machine|driver=Brian, Tom, Bill|position=2|class=Full Size - Piloted}}
{{PublishRaceResult|vehicle=CYBR TRK|driver=Chris|position=3|class=Full Size - Piloted}}

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

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

{{PublishRaceResult|vehicle=Hammer Mouse|driver=Neil|position=1|class=Overall}}
{{PublishRaceResult|vehicle=CYBR TRK|driver=Chris|position=2|class=Overall}}
{{PublishRaceResult|vehicle=Bigger Trak|driver=Leo|position=3|class=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==
{{VehicleResults}}

Properties

How to add new classes?

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).
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.