[GS] League Tables

Discuss the new AI features ("NoAI") introduced into OpenTTD 0.7, allowing you to implement custom AIs, and the new Game Scripts available in OpenTTD 1.2 and higher.

Moderator: OpenTTD Developers

Post Reply
xarick
Transport Coordinator
Transport Coordinator
Posts: 341
Joined: 26 Feb 2015 00:52

[GS] League Tables

Post by xarick »

I had this Game Script ready since 2022, but only now I decided to upload it to the Online Content. Hope you find it useful.
Unnamed, 1937-09-03.png
Unnamed, 1937-09-03.png (87.61 KiB) Viewed 869 times
League Tables
=============

This Game Script replaces the original League Table with a set of custom League Tables.

- Company Value Table:
Ranks companies by their current quarter value.

- Most Profitable Vehicle:
Ranks companies based on their vehicle with the best sum of current and last year profits.

- Rail Infrastructure Efficiency:
Ranks companies by profit of trains per number of rail pieces.

- Road Infrastructure Efficiency:
Ranks companies by profit of road vehicles per number of road pieces.

- Canal Infrastructure Efficiency:
Ranks companies by profit of ships per number of canal pieces.

- Airport Infrastructure Efficiency:
Airport Infrastructure Efficiency

- Most Profitable Train:
Ranks companies based on their train with the best sum of current and last year profits.

- Most Profitable Road Vehicle:
Ranks companies based on their road vehicle with the best sum of current and last year profits.

- Most Profitable Ship:
Ranks companies based on their ship with the best sum of current and last year profits.

- Most Profitable Aircraft:
Ranks companies based on their aircraft with the best sum of current and last year profits.

It has an untested feature where feedback is needed. It is sending data via GSAdmin, but I have no idea how to set that up. Anyone experienced enough with Admin stuff would like to test it?

Code: Select all

GSAdmin.Send({ league_name = league.name, company = c_id, company_val = c_val });
Formerly known as Samu
User avatar
odisseus
Director
Director
Posts: 564
Joined: 01 Nov 2017 21:19

Re: [GS] League Tables

Post by odisseus »

This should be accepted into the core game and replace the pathetic thing that is called "performance rating". The only default metric that is worth keeping and isn't present in this script is the number of different cargo types that are being transported by the company.
HGus
Engineer
Engineer
Posts: 121
Joined: 12 May 2013 22:28
Location: Argentina

Re: [GS] League Tables

Post by HGus »

Good job!
AAAHogEx
Engineer
Engineer
Posts: 117
Joined: 30 Jan 2022 15:37
Location: Japan

Re: [GS] League Tables

Post by AAAHogEx »

Wow, now I know what the cool thing about xarick's screenshot is!
By the way, I used it in a scenario and it crashed, so I'll report back.
Attachments
Unnamed, 1965-01-01.sav
(15.82 KiB) Downloaded 15 times
スクリーンショット 2024-03-25 094349.png
(1.34 MiB) Not downloaded yet
s26.scn
(14.24 KiB) Downloaded 14 times
xarick
Transport Coordinator
Transport Coordinator
Posts: 341
Joined: 26 Feb 2015 00:52

Re: [GS] League Tables

Post by xarick »

Thanks. Just uploaded v2 with a fix.
Formerly known as Samu
Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: No registered users and 16 guests