Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Wed Dec 19, 2018 8:43 am

All times are UTC




Post new topic  Reply to topic  [ 27 posts ]  Go to page 1 2 Next
Author Message
 Post subject: Station ratings
PostPosted: Wed May 25, 2016 9:34 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Fri Oct 21, 2005 9:26 am
Posts: 966
Location: Birmingham, England
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.

Attachment:
Ratings1.0.tar [18 KiB]
Downloaded 214 times

--------

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.

Attachment:
Sarhattan Transport, 3rd Jun 1940#1.png
Sarhattan Transport, 3rd Jun 1940#1.png [ 106.04 KiB | Viewed 3879 times ]


I'm now busy thinking of how much I can customise this.


Last edited by 3iff on Thu May 26, 2016 8:47 am, edited 1 time in total.

Top
   
 Post subject: Re: Station ratings
PostPosted: Wed May 25, 2016 12:42 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Fri Oct 21, 2005 9:26 am
Posts: 966
Location: Birmingham, England
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).


Attachments:
rating10beta1.grf [3.03 KiB]
Downloaded 100 times
Top
   
 Post subject: Re: Station ratings
PostPosted: Wed May 25, 2016 2:23 pm 
Offline
OpenTTD Developer
OpenTTD Developer

Joined: Sun Sep 09, 2007 5:03 am
Posts: 4677
Location: home
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 OpenTTD developer does not mean I know what I am doing.
Also, other OpenTTD developers may have different opinions.


Top
   
 Post subject: Re: Station ratings
PostPosted: Wed May 25, 2016 2:35 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Fri Oct 21, 2005 9:26 am
Posts: 966
Location: Birmingham, England
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.


Top
   
 Post subject: Re: Station ratings
PostPosted: Wed May 25, 2016 4:20 pm 
Offline
Traffic Manager
Traffic Manager
User avatar

Joined: Sun Apr 22, 2012 2:21 pm
Posts: 131
Thank you. Finally, I don't have to have way more trains than necessary to keep the rating high.


Top
   
 Post subject: Re: Station ratings
PostPosted: Wed May 25, 2016 5:39 pm 
Offline
OpenTTD Developer
OpenTTD Developer

Joined: Sun Sep 09, 2007 5:03 am
Posts: 4677
Location: home
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.

_________________
Being a OpenTTD developer does not mean I know what I am doing.
Also, other OpenTTD developers may have different opinions.


Top
   
 Post subject: Re: Station ratings
PostPosted: Wed May 25, 2016 8:17 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Mar 31, 2007 2:23 pm
Posts: 4713
Location: Lost in Music
Alberth 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.


Nah :D I'd do cargo 30 as well, it's not going to do any harm to NARS 2, and excluding it is more likely to have unexpected side effects when/if some set does use cargo 30 ;)

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)
Squid Ate FISH (ships) (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, released)


Top
   
 Post subject: Re: Station ratings
PostPosted: Thu May 26, 2016 7:45 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Fri Oct 21, 2005 9:26 am
Posts: 966
Location: Birmingham, England
Alberth...can you make up your mind? :wink:

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.


Top
   
 Post subject: Re: Station ratings
PostPosted: Thu May 26, 2016 1:12 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Mar 31, 2007 2:23 pm
Posts: 4713
Location: Lost in Music
3iff wrote:
Actually, most of this is your code, I just put it in the right order. :)


I think that yexo wrote this originally, my contribution was only to delete it from FIRS 2 ;)

_________________
FIRS Industry Replacement Set (Released) | HEQS Heavy Equipment Set (trucks, industrial trams and more) (Finished)
Squid Ate FISH (ships) (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, released)


Top
   
 Post subject: Re: Station ratings
PostPosted: Thu May 26, 2016 2:06 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Fri Oct 21, 2005 9:26 am
Posts: 966
Location: Birmingham, England
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... :wink:


Top
   
 Post subject: Re: Station ratings
PostPosted: Mon Jun 13, 2016 3:16 am 
Offline
Engineer
Engineer

Joined: Tue Apr 21, 2015 10:02 am
Posts: 3
thank you very much, this is what i need :D


Top
   
 Post subject: Re: Station ratings
PostPosted: Tue Dec 13, 2016 12:17 pm 
Offline
Traffic Manager
Traffic Manager
User avatar

Joined: Sat Nov 17, 2007 5:23 pm
Posts: 162
Skype: ben313371
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.


Top
   
 Post subject: Re: Station ratings
PostPosted: Thu Dec 22, 2016 10:18 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Fri Oct 21, 2005 9:26 am
Posts: 966
Location: Birmingham, England
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.


Top
   
 Post subject: Re: Station ratings
PostPosted: Thu Dec 22, 2016 1:44 pm 
Offline
Traffic Manager
Traffic Manager
User avatar

Joined: Sat Nov 17, 2007 5:23 pm
Posts: 162
Skype: ben313371
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?


Top
   
 Post subject: Re: Station ratings
PostPosted: Thu Dec 22, 2016 3:06 pm 
Offline
Tycoon
Tycoon

Joined: Wed Apr 27, 2005 7:09 am
Posts: 5238
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

Yes, it can (partly):

- 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

_________________
Image


Top
   
 Post subject: Re: Station ratings
PostPosted: Sun Feb 19, 2017 11:09 am 
Offline
Engineer
Engineer

Joined: Sun Feb 21, 2016 12:10 pm
Posts: 38
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?


Top
   
 Post subject: Re: Station ratings
PostPosted: Tue Mar 07, 2017 11:19 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Fri Oct 21, 2005 9:26 am
Posts: 966
Location: Birmingham, England
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.


Top
   
 Post subject: Re: Station ratings
PostPosted: Wed Mar 15, 2017 7:24 pm 
Offline
Traffic Manager
Traffic Manager
User avatar

Joined: Sat Jun 07, 2008 10:07 pm
Posts: 160
Location: Portugal
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?

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.


Top
   
 Post subject: Re: Station ratings
PostPosted: Fri Mar 24, 2017 3:49 pm 
Offline
Traffic Manager
Traffic Manager
User avatar

Joined: Sat Nov 17, 2007 5:23 pm
Posts: 162
Skype: ben313371
Well, that's interesting, I've been trying to compile the source as-is following https://www.tt-wiki.net/wiki/NMLTutorial/Installation#Using_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?


Top
   
 Post subject: Re: Station ratings
PostPosted: Sat Mar 25, 2017 1:16 am 
Offline
Traffic Manager
Traffic Manager
User avatar

Joined: Sat Jun 07, 2008 10:07 pm
Posts: 160
Location: Portugal
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.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 27 posts ]  Go to page 1 2 Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000-2018 phpBB Limited

Copyright © Owen Rudge/The Transport Tycoon Forums 2001-2018.
Hosted by Zernebok Hosting.