Station ratings
Moderator: Graphics Moderators
Station ratings
Version 1 now released - Here now and maybe at bananas later. All the files included, including source files so you can compile it yourself should you wish. Just drop this file into your newgrf folder. There's also a readme which might be useful.
--------
It seems that the latest FIRS has removed the station ratings control option. Well, as at least one player has been begging for it to be replaced, I thought I might be able to create a newgrf that does this.
It remains in SPI (my industry set based on FIRS) but I've just had a go at reusing the code to create a newgrf that does the station ratings bit...
...and it works. Just coal for now but as the screenshot shows, it works. That's the only newgrf loaded and I have a rating of 100% at that station...
I obviously have some work to do but I can possibly get a version soon for players to test.
I'm now busy thinking of how much I can customise this.
New version 19-Nov-19 to include 64 cargoes. UNTESTED - but hopefully it will work. It should be compatible with industry sets using fewer than 64 cargoes. It may only be compatible with later versions of OTTD (1.9x or 1.10x). Please report if it works (or doesn't).
--------
It seems that the latest FIRS has removed the station ratings control option. Well, as at least one player has been begging for it to be replaced, I thought I might be able to create a newgrf that does this.
It remains in SPI (my industry set based on FIRS) but I've just had a go at reusing the code to create a newgrf that does the station ratings bit...
...and it works. Just coal for now but as the screenshot shows, it works. That's the only newgrf loaded and I have a rating of 100% at that station...
I obviously have some work to do but I can possibly get a version soon for players to test.
I'm now busy thinking of how much I can customise this.
New version 19-Nov-19 to include 64 cargoes. UNTESTED - but hopefully it will work. It should be compatible with industry sets using fewer than 64 cargoes. It may only be compatible with later versions of OTTD (1.9x or 1.10x). Please report if it works (or doesn't).
Last edited by 3iff on 19 Nov 2019 10:17, edited 2 times in total.
Re: Station ratings
Station Ratings newgrf - BETA 1
======================
Should probably be called Cargo Ratings, what do you think?
This uses much of the code as from FIRS 1.4.3 by andythenorth.
This is a standalone newgrf that provides the opportunity to change station ratings, choosing one of the following:
Grim and Mean - exactly as standard OTTD
Favourable - Less harsh than standard
Insanely Generous - Always 100% (but will take time for a new station to reach this level).
As only 32 cargos are available, this newgrf configures every one except those listed below to use the selected station rating setting. This means that it should work for every industry set (even the default industries) and all climates without extra customisation. I've done a quick test of all except Toyland...I'm not going there.
Passengers and mail are NOT affected by this newgrf. Enough appear during the game and we don't need more.
CargoID
0 - Passengers, assuming passengers use cargo slot 0 everywhere.
2 - Mail, assuming mail uses cargo slot 2 everywhere.
30 - NARS 2 gearing (if there's a genuine cargo here then it won't be affected. This needs some thought).
Using this with an industry set that offers station rating changes may have unexpected consequences.
Specifically, any FIRS versions that have this option and SPI v1 and v1.1
BUG REPORTS are very welcome. Hopefully there won't be any (bugs).
Comments and suggestions are also welcome.
Licensed under GPL(v2).
======================
Should probably be called Cargo Ratings, what do you think?
This uses much of the code as from FIRS 1.4.3 by andythenorth.
This is a standalone newgrf that provides the opportunity to change station ratings, choosing one of the following:
Grim and Mean - exactly as standard OTTD
Favourable - Less harsh than standard
Insanely Generous - Always 100% (but will take time for a new station to reach this level).
As only 32 cargos are available, this newgrf configures every one except those listed below to use the selected station rating setting. This means that it should work for every industry set (even the default industries) and all climates without extra customisation. I've done a quick test of all except Toyland...I'm not going there.
Passengers and mail are NOT affected by this newgrf. Enough appear during the game and we don't need more.
CargoID
0 - Passengers, assuming passengers use cargo slot 0 everywhere.
2 - Mail, assuming mail uses cargo slot 2 everywhere.
30 - NARS 2 gearing (if there's a genuine cargo here then it won't be affected. This needs some thought).
Using this with an industry set that offers station rating changes may have unexpected consequences.
Specifically, any FIRS versions that have this option and SPI v1 and v1.1
BUG REPORTS are very welcome. Hopefully there won't be any (bugs).
Comments and suggestions are also welcome.
Licensed under GPL(v2).
- Attachments
-
- rating10beta1.grf
- (3.03 KiB) Downloaded 558 times
Re: Station ratings
I don't understand why you cannot just set cargo 30 too, there isn't any cargo gearing, but that shouldn't be a problem, would be my guess.
Being a retired OpenTTD developer does not mean I know what I am doing.
Re: Station ratings
It was disabled in the FIRS code so I carried it over to here. I will probably add cargo 30 too, eventually...that's what the beta is for, comments and suggestions.
I'm just a bit wary of breaking something that I don't need to break, especially stuff I don't understand.
I'm just a bit wary of breaking something that I don't need to break, especially stuff I don't understand.
Re: Station ratings
Thank you. Finally, I don't have to have way more trains than necessary to keep the rating high.
Re: Station ratings
From a FIRS point of view, if you provide station ratings for FIRS, then you shouldn't provide station ratings for non-FIRS cargoes. At least, that seems a reasonable argument against changing it.
Since Andy stayed away from cargo 30 to keep compatibility with NARS(?) train set, it would make sense to also stay away from changing its station ratings as well.
Since Andy stayed away from cargo 30 to keep compatibility with NARS(?) train set, it would make sense to also stay away from changing its station ratings as well.
Being a retired OpenTTD developer does not mean I know what I am doing.
- andythenorth
- Tycoon
- Posts: 5705
- Joined: 31 Mar 2007 14:23
- Location: Lost in Music
Re: Station ratings
NahAlberth wrote:Since Andy stayed away from cargo 30 to keep compatibility with NARS(?) train set, it would make sense to also stay away from changing its station ratings as well.


Nice to see this grf. Station rating hack it is a useful feature for some styles of play, but didn't belong inside FIRS.
FIRS Industry Replacement Set (released) | HEQS Heavy Equipment Set (trucks, industrial trams and more) (finished)
Unsinkable Sam (ships) (preview released) | CHIPS Has Improved Players' Stations (finished)
Iron Horse ((trains) (released) | Termite (tracks for Iron Horse) (released) | Busy Bee (game script) (released)
Road Hog (road vehicles and trams) (released)
Unsinkable Sam (ships) (preview released) | CHIPS Has Improved Players' Stations (finished)
Iron Horse ((trains) (released) | Termite (tracks for Iron Horse) (released) | Busy Bee (game script) (released)
Road Hog (road vehicles and trams) (released)
Re: Station ratings
Alberth...can you make up your mind?
I decided to go with modifying cargo 30 anyway, mainly for consistency. When coding this, I thought cargos were relevent by name but now I see it's just cargo slots regardless of which cargo has been allocated to that slot.
I've added a check for FIRS/SPI that already include this facility (just a bit of testing required). I have a bit more to check but it should be mainly finished.
andythenorth: Actually, most of this is your code, I just put it in the right order.
(You may not get that reference though).
I should have a proper version 1 ready later today, maybe. It will be compatible with the beta version.
Version 1 now released, see post 1 of this thread.

I decided to go with modifying cargo 30 anyway, mainly for consistency. When coding this, I thought cargos were relevent by name but now I see it's just cargo slots regardless of which cargo has been allocated to that slot.
I've added a check for FIRS/SPI that already include this facility (just a bit of testing required). I have a bit more to check but it should be mainly finished.
andythenorth: Actually, most of this is your code, I just put it in the right order.

I should have a proper version 1 ready later today, maybe. It will be compatible with the beta version.
Version 1 now released, see post 1 of this thread.
- andythenorth
- Tycoon
- Posts: 5705
- Joined: 31 Mar 2007 14:23
- Location: Lost in Music
Re: Station ratings
I think that yexo wrote this originally, my contribution was only to delete it from FIRS 23iff wrote:Actually, most of this is your code, I just put it in the right order.

FIRS Industry Replacement Set (released) | HEQS Heavy Equipment Set (trucks, industrial trams and more) (finished)
Unsinkable Sam (ships) (preview released) | CHIPS Has Improved Players' Stations (finished)
Iron Horse ((trains) (released) | Termite (tracks for Iron Horse) (released) | Busy Bee (game script) (released)
Road Hog (road vehicles and trams) (released)
Unsinkable Sam (ships) (preview released) | CHIPS Has Improved Players' Stations (finished)
Iron Horse ((trains) (released) | Termite (tracks for Iron Horse) (released) | Busy Bee (game script) (released)
Road Hog (road vehicles and trams) (released)
Re: Station ratings
Apologies to Yexo then, it's not easy to work out who did what...
I'd hate to give you credit for something you didn't do...
I'd hate to give you credit for something you didn't do...

Re: Station ratings
thank you very much, this is what i need 

Re: Station ratings
Hey there, I was going to attempt a project similar to this.
I was wondering if this GRF can be expanded to include these settings https://wiki.openttd.org/Game_mechanics#Station_rating and have the ability to change every single parameter separately within OTTD instead of bundling them all into a single setting, it's something that I didn't like about FIRS.
I'm willing to lend a hand in the project as I was hoping that I could make it myself, but I don't have the know-how to do that yet.
I was wondering if this GRF can be expanded to include these settings https://wiki.openttd.org/Game_mechanics#Station_rating and have the ability to change every single parameter separately within OTTD instead of bundling them all into a single setting, it's something that I didn't like about FIRS.
I'm willing to lend a hand in the project as I was hoping that I could make it myself, but I don't have the know-how to do that yet.
Re: Station ratings
I've no idea if those values can be accessed via newgrf. If they can then it should be easy to amend them.
My internet access is sporadic so it can be just once every 2 weeks or so. If you can find out more on this subject in the meantime...
Just reply here if you discover anything.
My internet access is sporadic so it can be just once every 2 weeks or so. If you can find out more on this subject in the meantime...
Just reply here if you discover anything.
Re: Station ratings
Before FIRS, I didn't know that station ratings could be altered in the way the newGRF accesses them.
As for GRFs in general, I have no idea on where to begin.
I looked at the nml with a text editor and it seems easy enough to work with, granted once I actually get familiar with the language.
https://newgrf-specs.tt-wiki.net/wiki/NML:Main The problem is that I find the wiki so hard to work with when introducing myself into the NewGRF language because I find that it doesn't explain the topic well enough for me to understand.
Also, about those values, in the event that they cannot be accessed, the NML language should be able to emulate it, right?
As for GRFs in general, I have no idea on where to begin.
I looked at the nml with a text editor and it seems easy enough to work with, granted once I actually get familiar with the language.
https://newgrf-specs.tt-wiki.net/wiki/NML:Main The problem is that I find the wiki so hard to work with when introducing myself into the NewGRF language because I find that it doesn't explain the topic well enough for me to understand.
Also, about those values, in the event that they cannot be accessed, the NML language should be able to emulate it, right?
-
- Tycoon
- Posts: 5954
- Joined: 27 Apr 2005 07:09
- Contact:
Re: Station ratings
Yes, it can (partly):Ben1338 wrote: I was wondering if this GRF can be expanded to include these settings https://wiki.openttd.org/Game_mechanics#Station_rating and have the ability to change every single parameter separately
- amount of cargo waiting -> var60
- days since last cargo pickup -> var61
- max speed last veh -> var64
- age in years last veh -> var64
- statue in town
- advertising campaigns
- rv crashed
- train crashed
=> custom station rating calculation -> CB145 allows to modify first 3 values for station rating calculation
regards
Michael
Re: Station ratings
While quite useful and will be fun to play around with, is there a way of extending this to also include Passenger and Mail cargo ratings?
Re: Station ratings
There may be, but I have no intentions of doing this at the moment. I find that pass/mail are always overwhelming anyway and I can never keep up with them. I hardly need even more. Also, I'm using the JGR version and that has a way of controlling town generation of pass/mail. I always turn this down.
Re: Station ratings
This GRF comes with the source, so you can quite simply add the two remaining cargoes to the NML file and recompile it, and that should do the trick.LabUser wrote:While quite useful and will be fun to play around with, is there a way of extending this to also include Passenger and Mail cargo ratings?
Re: Station ratings
Well, that's interesting, I've been trying to compile the source as-is following https://www.tt-wiki.net/wiki/NMLTutoria ... sing_NML_3, Including "Klmnc ERROR: "ratings.nml", line13: Unknown string "STR_GRF_NAME"
I've tried to implement patches by substituting them with names, and they seem to work. But I wondered if it compiles okay for you?
I've tried to implement patches by substituting them with names, and they seem to work. But I wondered if it compiles okay for you?
Re: Station ratings
That's weird. I didn't have to do anything special at all; just downloaded the NML win32 bundle from the link in the wiki, extracted the NewGRF source to the same folder as NML, performed edits, then used the nmlc ratings.nml command in the command prompt and that was it, it compiled successfully for me.
Who is online
Users browsing this forum: No registered users and 16 guests