Company rating via Server Admin Port
Moderator: OpenTTD Developers
Company rating via Server Admin Port
Is there a way to get company rating via the server admin port?
I'm talking about the rating shown in Company League Table.
I'm talking about the rating shown in Company League Table.
Keep it simple.
Re: Company rating via Server Admin Port
There is an Ottd stats project that stores company information into the SQL databaseHezkore wrote:Is there a way to get company rating via the server admin port?
I'm talking about the rating shown in Company League Table.
https://dev.openttdcoop.org/projects/ottdstats/
Owner and admin of servers with names "Experimental games" .
My heightmaps: Flat Earth Map and United nations logo
My scenarios: Game Fallout 1,2,3 Map scenario
My gamescripts: City Founder GS
My heightmaps: Flat Earth Map and United nations logo
My scenarios: Game Fallout 1,2,3 Map scenario
My gamescripts: City Founder GS
Re: Company rating via Server Admin Port
Hmm, alright.
I'm not really finding any proper information about how they're getting league table information though.
I basically want to know what company is leading (according to the Company League Table found in-game).
I'm not really finding any proper information about how they're getting league table information though.
I basically want to know what company is leading (according to the Company League Table found in-game).
Keep it simple.
Re: Company rating via Server Admin Port
Easier it is probably through the "companies" console command. But GSCompany also has some interesting commands: https://nogo.openttd.org/api/1.8.0/classGSCompany.html
Owner and admin of servers with names "Experimental games" .
My heightmaps: Flat Earth Map and United nations logo
My scenarios: Game Fallout 1,2,3 Map scenario
My gamescripts: City Founder GS
My heightmaps: Flat Earth Map and United nations logo
My scenarios: Game Fallout 1,2,3 Map scenario
My gamescripts: City Founder GS
Re: Company rating via Server Admin Port
Sadly the `companies` command does not show the rating of the company, only ID and some economy stats that I'm already able to track.agentw4b wrote:Easier it is probably through the "companies" console command.
Keep it simple.
Re: Company rating via Server Admin Port
static int32 GetQuarterlyPerformanceRating (CompanyID company, uint32 quarter)Hezkore wrote:Sadly the `companies` command does not show the rating of the company, only ID and some economy stats that I'm already able to track.agentw4b wrote:Easier it is probably through the "companies" console command.
Get the performance rating of the given company in the given quarter.
---------------------------------------------------------------------------------------------------
GSCompany.GetQuarterlyPerformanceRating (company, quarter);
Owner and admin of servers with names "Experimental games" .
My heightmaps: Flat Earth Map and United nations logo
My scenarios: Game Fallout 1,2,3 Map scenario
My gamescripts: City Founder GS
My heightmaps: Flat Earth Map and United nations logo
My scenarios: Game Fallout 1,2,3 Map scenario
My gamescripts: City Founder GS
- planetmaker
- OpenTTD Developer
- Posts: 9432
- Joined: 07 Nov 2007 22:44
- Location: Sol d
Re: Company rating via Server Admin Port
Correct me, if I'm not well informed here: To me that means it's available to GameScripts. But the GameScript can make it in turn available to the admin port via GSAdmin::Send.agentw4b wrote:static int32 GetQuarterlyPerformanceRating (CompanyID company, uint32 quarter)Hezkore wrote:Sadly the `companies` command does not show the rating of the company, only ID and some economy stats that I'm already able to track.agentw4b wrote:Easier it is probably through the "companies" console command.
Get the performance rating of the given company in the given quarter.
---------------------------------------------------------------------------------------------------
GSCompany.GetQuarterlyPerformanceRating (company, quarter);
OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML
Re: Company rating via Server Admin Port
That's what I believe and I'm trying to figure out...
But the server wants a JSON structure of the code, not just raw game script.
So I'm guessing it's related to `ServerGS`, but I don't think you need the ServerGS script anymore.
I believe the server just has it built-in these days.
I'm trying to send stuff like:
Which I found via the ServerGS readme - https://dev.openttdcoop.org/projects/gs ... me.txt#L44
But the server never responds with anything other than basically saying "I got this piece of code" in the console.
There's never any reply or even error message.
I've tried installing the ServerGS script, but there's no error or reply anyways.
But the server wants a JSON structure of the code, not just raw game script.
So I'm guessing it's related to `ServerGS`, but I don't think you need the ServerGS script anymore.
I believe the server just has it built-in these days.
I'm trying to send stuff like:
Code: Select all
{
"action" = "ping",
"number" = 0
}
But the server never responds with anything other than basically saying "I got this piece of code" in the console.
There's never any reply or even error message.
I've tried installing the ServerGS script, but there's no error or reply anyways.
Keep it simple.
Re: Company rating via Server Admin Port
after downloading ServerGS, you must enable it in openttd.cfg, and then start a new game (or upload a savegame where it has been activated in your client)
Re: Company rating via Server Admin Port
I downloaded the repo from https://dev.openttdcoop.org/projects/gs ... repository
Extracted into `openttd/game/servergs`
Edited the `openttd.cfg` (which btw should be called `.ini`):Restarted my server.
Joined my server and called `rcon _PASS_ newgame`
And sent an `AdminGamescript` packet to the server.
But as always, the reply is just:No reply from the gamescript, no error, no result.
Extracted into `openttd/game/servergs`
Edited the `openttd.cfg` (which btw should be called `.ini`):
Code: Select all
[game_scripts]
ServerGS =
Joined my server and called `rcon _PASS_ newgame`
And sent an `AdminGamescript` packet to the server.
But as always, the reply is just:
Code: Select all
Packet: ServerConsole
message: [admin] GameScript JSON from '_USER_' (_VER_): '{"action"="ping","number"=0}'
origin: net
Keep it simple.
Re: Company rating via Server Admin Port
I did not try to use this, but:
ServerGS 2 is downloable from oficial Bananas server.
ServerGS 3 is here:
viewtopic.php?f=65&t=68828
ServerGS 2 is downloable from oficial Bananas server.
ServerGS 3 is here:
viewtopic.php?f=65&t=68828
Owner and admin of servers with names "Experimental games" .
My heightmaps: Flat Earth Map and United nations logo
My scenarios: Game Fallout 1,2,3 Map scenario
My gamescripts: City Founder GS
My heightmaps: Flat Earth Map and United nations logo
My scenarios: Game Fallout 1,2,3 Map scenario
My gamescripts: City Founder GS
Who is online
Users browsing this forum: No registered users and 34 guests