Could a GRF or Script provide Locomotive style Speed Records?
Moderator: OpenTTD Developers
- NekoMaster
- Tycoon
- Posts: 4001
- Joined: 16 Aug 2008 22:26
- Skype: neko-master
- Location: Oshawa, Ontario, CANADA
Could a GRF or Script provide Locomotive style Speed Records?
I was just wondering today, would it be possible for a GRF or script to show a news message telling the player when something has reached a need speed record like top speed or average speed between stops?
If its not possible to generate new Newspaper messages, perhaps a GRF or script could put signs or messages in the console to let you know
If its not possible to generate new Newspaper messages, perhaps a GRF or script could put signs or messages in the console to let you know
Proud Canadian
Nekomasters Projects! (Downloads available on BaNaNaS!) \(>^w^<)/
# NARS ADD-ON SET 2CC | 2cc Rapid Transit For Me! (2ccRTFM) | 2cc Wagons In NML (2ccWIN)
# NML Category System (Organize your GRFS!) <- TT-Forums Exclusive Download!
Nekomasters Projects! (Downloads available on BaNaNaS!) \(>^w^<)/
# NARS ADD-ON SET 2CC | 2cc Rapid Transit For Me! (2ccRTFM) | 2cc Wagons In NML (2ccWIN)
# NML Category System (Organize your GRFS!) <- TT-Forums Exclusive Download!
- planetmaker
- OpenTTD Developer
- Posts: 9432
- Joined: 07 Nov 2007 22:44
- Location: Sol d
Re: Could a GRF or Script provide Locomotive style Speed Records?
I'm pretty confident that you could create such thing via a game script.
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
- NekoMaster
- Tycoon
- Posts: 4001
- Joined: 16 Aug 2008 22:26
- Skype: neko-master
- Location: Oshawa, Ontario, CANADA
Re: Could a GRF or Script provide Locomotive style Speed Records?
Though as I mentioned, would a script be able to create a news paper event like in Locomotion to tell the player(s) of your new speed record?planetmaker wrote:I'm pretty confident that you could create such thing via a game script.
Proud Canadian
Nekomasters Projects! (Downloads available on BaNaNaS!) \(>^w^<)/
# NARS ADD-ON SET 2CC | 2cc Rapid Transit For Me! (2ccRTFM) | 2cc Wagons In NML (2ccWIN)
# NML Category System (Organize your GRFS!) <- TT-Forums Exclusive Download!
Nekomasters Projects! (Downloads available on BaNaNaS!) \(>^w^<)/
# NARS ADD-ON SET 2CC | 2cc Rapid Transit For Me! (2ccRTFM) | 2cc Wagons In NML (2ccWIN)
# NML Category System (Organize your GRFS!) <- TT-Forums Exclusive Download!
Re: Could a GRF or Script provide Locomotive style Speed Records?
https://nogo.openttd.org/api/trunk/classGSNews.htmlNekoMaster wrote:Though as I mentioned, would a script be able to create a news paper event like in Locomotion to tell the player(s) of your new speed record?planetmaker wrote:I'm pretty confident that you could create such thing via a game script.
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
- NekoMaster
- Tycoon
- Posts: 4001
- Joined: 16 Aug 2008 22:26
- Skype: neko-master
- Location: Oshawa, Ontario, CANADA
Re: Could a GRF or Script provide Locomotive style Speed Records?
Ok, so if a Game Script can do news, I wonder how it might figure out the speed records from all your vehicles running if thats possible at all.
Proud Canadian
Nekomasters Projects! (Downloads available on BaNaNaS!) \(>^w^<)/
# NARS ADD-ON SET 2CC | 2cc Rapid Transit For Me! (2ccRTFM) | 2cc Wagons In NML (2ccWIN)
# NML Category System (Organize your GRFS!) <- TT-Forums Exclusive Download!
Nekomasters Projects! (Downloads available on BaNaNaS!) \(>^w^<)/
# NARS ADD-ON SET 2CC | 2cc Rapid Transit For Me! (2ccRTFM) | 2cc Wagons In NML (2ccWIN)
# NML Category System (Organize your GRFS!) <- TT-Forums Exclusive Download!
Re: Could a GRF or Script provide Locomotive style Speed Records?
https://nogo.openttd.org/api/trunk/classGSVehicle.htmlNekoMaster wrote:Ok, so if a Game Script can do news, I wonder how it might figure out the speed records from all your vehicles running if thats possible at all.
GSVehicle.GetCurrentSpeed (vehicle_id);
https://nogo.openttd.org/api/trunk/classGSEngine.html
GSEngine.GetMaxSpeed (engine_id);
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: Could a GRF or Script provide Locomotive style Speed Records?
just note that you'll probably run into performance issues if you try to read the speed of every vehicle every tick...
- NekoMaster
- Tycoon
- Posts: 4001
- Joined: 16 Aug 2008 22:26
- Skype: neko-master
- Location: Oshawa, Ontario, CANADA
Re: Could a GRF or Script provide Locomotive style Speed Records?
I imagine then one would have to have a script run through the engines running and query their max speeds or try to calculate their average speed between stops but do it every now and then so as not to bog down the computer too much.Eddi wrote:just note that you'll probably run into performance issues if you try to read the speed of every vehicle every tick...
If anything though this idea would probably be better done as a patch where one can set up the code to record whats running, the max/average speeds of stuff and save that over time so it can compare the speeds of current vehicles to the last records and alert the player when something has broken the previous records "World Speed Record! Train Achieves Average Speed of 115 km/h between stops!"
Proud Canadian
Nekomasters Projects! (Downloads available on BaNaNaS!) \(>^w^<)/
# NARS ADD-ON SET 2CC | 2cc Rapid Transit For Me! (2ccRTFM) | 2cc Wagons In NML (2ccWIN)
# NML Category System (Organize your GRFS!) <- TT-Forums Exclusive Download!
Nekomasters Projects! (Downloads available on BaNaNaS!) \(>^w^<)/
# NARS ADD-ON SET 2CC | 2cc Rapid Transit For Me! (2ccRTFM) | 2cc Wagons In NML (2ccWIN)
# NML Category System (Organize your GRFS!) <- TT-Forums Exclusive Download!
Who is online
Users browsing this forum: No registered users and 19 guests