Report post

Are you sure you want to report the post shown below? This will send an email to the ATVO administrators. Please include a short reason for reporting.

Users reporting for no reason may be locked out.


Post

Posted by Nick Thissen
on
Starting from version 1.15.8, ATVO provides some support for displaying championship points and standings.

The following is supported:
  • The ChampionshipResult property on IEntity includes four properties:
    • Position: current champ position (before end of this race).
    • LivePosition: live champ position (updated according to position in current race).
    • Points: current champ points (before end of this race).
    • LivePoints: live champ points (updated according to position in current race).
    These properties will all be 0 by default, you must set them to the desired value using a script.
  • New Data Bindings for each of these properties:
    championshipposition, championshippoints, livechampionshipposition, livechampionshippoints
  • New Data Orders for Championship Position and Live Championship Position, allowing you to sort/order drivers by their championship standings, once set via your script.

The reason for the distinction between "current" and "live" points/positions is so you can show both the current standings (e.g. before the race) and live standings, or potentially a delta ("how many positions is a driver gaining in the championship if he stays in this position").


Setting the championship standings
To use the championship properties you must set them via a script. Your script must be a converter script that takes an object as the value input. Depending on which object you must dig down to the Entity and there you can find the ChampionshipResult property.

Binding to "entity_object":
IEntity entity = (IEntity) value;
IChampionshipResult champ = entity.ChampionshipResult;


Binding to "entitysessionresult_object":
IEntitySessionResult result = (IEntitySessionResult) value;
IChampionshipResult champ = result.Entity.ChampionshipResult;


Once you have the IChampionshipResult object, you can set its properties to the desired value:
champ.Position = 3;
champ.LivePosition = 4;
champ.Points = 192;
champ.LivePoints = 185;



Where do I get the amount of points I want to award?
To show current and live standings you will need at least a source of:
  1. Current champ standings (as they were before this race).
  2. Amount of points to award for each position

You can store both in a Spreadsheet object and read it via your script. Please let us know if you need assistance with this part.