Patch: Visual and Sound Effects for NewGRF Narrow Gauge
Moderator: OpenTTD Developers
Patch: Visual and Sound Effects for NewGRF Narrow Gauge
Visual Effects and Sound Effects for Narrow Gauge Trainsets
Some NewGRF trainsets, that replace the maglev track with narrow gauge rail, have problems with their visual effects and sound effects. With both the Serbian Narrow Gauge set and the narrow gauge trains in the Canadian set, the steam trains and diesels show no visual effects and all narrow gauge trains have maglev sound effects.
This patch fixes these problems. Visual effects are now based entirely on Action 0 property 0x22 (visual effect type) for NewGRF rail vehicles. Default values are given to original vehicles. Sound effects are now based on Action 0 property 0x19 (traction type) rather than the rail type.
Hopefully I haven’t messed up anything but, as usual, I make no guarantees. One thing I know will need doing is the correct selection engine types for 2 company colours. As far as I know, there are no narrow gauge sets that support 2cc at present, so this is not an issue.
With my update to the Narrow Gauge rails grf it makes both the Canadian and the Serbian Narrow Gauge sets more playable in OpenTTD.
Edit: patch updated to r8832. 21/02/07
Edit: patch updated to r8907. 26/02/07
Edit: patch updated to r8984. Some problems with Serbian set Pendolino fixed. 02/03/07
Edit: patch updated to r9072. Tilting effect for Serbian set Pendolino added (action 2 var 45) 08/03/07
Some NewGRF trainsets, that replace the maglev track with narrow gauge rail, have problems with their visual effects and sound effects. With both the Serbian Narrow Gauge set and the narrow gauge trains in the Canadian set, the steam trains and diesels show no visual effects and all narrow gauge trains have maglev sound effects.
This patch fixes these problems. Visual effects are now based entirely on Action 0 property 0x22 (visual effect type) for NewGRF rail vehicles. Default values are given to original vehicles. Sound effects are now based on Action 0 property 0x19 (traction type) rather than the rail type.
Hopefully I haven’t messed up anything but, as usual, I make no guarantees. One thing I know will need doing is the correct selection engine types for 2 company colours. As far as I know, there are no narrow gauge sets that support 2cc at present, so this is not an issue.
With my update to the Narrow Gauge rails grf it makes both the Canadian and the Serbian Narrow Gauge sets more playable in OpenTTD.
Edit: patch updated to r8832. 21/02/07
Edit: patch updated to r8907. 26/02/07
Edit: patch updated to r8984. Some problems with Serbian set Pendolino fixed. 02/03/07
Edit: patch updated to r9072. Tilting effect for Serbian set Pendolino added (action 2 var 45) 08/03/07
- Attachments
-
- Serbian Narrow Gauge.png (67.76 KiB) Viewed 6942 times
-
- Canadian Narrow Gauge.png (82.09 KiB) Viewed 6943 times
-
- Vis_Effects_r9072.patch
- (25.43 KiB) Downloaded 265 times
Last edited by mart3p on 08 Mar 2007 23:15, edited 4 times in total.
- Toni Babelony
- Tycoon
- Posts: 1389
- Joined: 07 Jul 2006 09:34
- Skype: toni_babelony
- Location: Sagamihara-shi, Japan
- Contact:
Thanks Toni.
I have attached a win32 exe if you want to try it. This was built from 0.5.0-RC5 with my changes added. It uses the data and language files from 0.5.0-RC5 so these aren't included. You can simply replace the exe in an RC5 installation with this one.
Edit: exe updated to 0.5.0-RC5. 22/02/07
I have attached a win32 exe if you want to try it. This was built from 0.5.0-RC5 with my changes added. It uses the data and language files from 0.5.0-RC5 so these aren't included. You can simply replace the exe in an RC5 installation with this one.
Edit: exe updated to 0.5.0-RC5. 22/02/07
- Attachments
-
- OTTD-0.5.0-RC5-M3P-win32.zip
- win32 exe - use data and language files from 0.5.0-RC5
- (707.24 KiB) Downloaded 223 times
I have posted an update of the NewGRF Effects patch in the first post. It has one new feature; the Pendolino in the Serbian set now tilts on corners - see screenshot.
To support this I have implemented action 2 variable 45 (curvature info), does anyone know of other sets that use this variable?
Edit: win32 exe added. This exe also contains some new changes that correct problems in the Serbian set with cargos and refits. I will be posting a new patch soon...
This exe (hopefully ) gives almost full support for both the Serbian Standard Gauge and Narrow Gauge sets in OpenTTD. The one thing still missing is support for callback 18; purchase selection of vehicles for the AI.
Of course, the additional NewGRF support also benefits other sets as well. I would also be interested to hear of any problems found when using other GRFs with this exe.
To support this I have implemented action 2 variable 45 (curvature info), does anyone know of other sets that use this variable?
Edit: win32 exe added. This exe also contains some new changes that correct problems in the Serbian set with cargos and refits. I will be posting a new patch soon...
This exe (hopefully ) gives almost full support for both the Serbian Standard Gauge and Narrow Gauge sets in OpenTTD. The one thing still missing is support for callback 18; purchase selection of vehicles for the AI.
Of course, the additional NewGRF support also benefits other sets as well. I would also be interested to hear of any problems found when using other GRFs with this exe.
- Attachments
-
- Tilting Pendolinos.png (38.39 KiB) Viewed 6876 times
-
- OTTD-win32-r9073-M3P.zip
- (1.84 MiB) Downloaded 253 times
You write that the narrow gauge replaces the maglev tracks. Does it only replace track graphics, so that the trains still have the railtype set to RAILTYPE_MAGLEV? This is important for the acceleration properties. If the trains would technically be of maglev type, they would also behave as maglevs (which is different from the other railtypes), which is -I assume- not intended. If not, then what railtype are they set to?
If the maglev menus/graphics disappear and narrow gauge appears in their place, then I'd strongly suspect that the trains are marked as traveling on "maglev" track.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
hertogjan: As DaleStan suspects, the railtype for narrow gauge trains will be set to RAILTYPE_MAGLEV. The actual engine characteristics are controlled by the vehicle 'engclass', which is set by action 0 property 19 (traction class). This property selects the engines sound effects and visual effects (if none are set by property 22). You should probably use 'engclass’ to control the acceleration properties.hertogjan wrote:You write that the narrow gauge replaces the maglev tracks. Does it only replace track graphics, so that the trains still have the railtype set to RAILTYPE_MAGLEV?
The problem will be, that without my patch, the 'engclass' is set to 'electric' for electric trains, monorail and maglev. My patch adds seperate values for monorail and maglev.
Brianetta: I have not attempted to add a new railtype. Current GRFs that use narrow guage rail replace the maglev track. My patch just implements this in compliance with the NewGRF spec.Brianetta wrote:OpenTTD's railtypes are designed such that new types are easy[1] to add, without having to replace an existing type.
Yabbut there's no way (yet) to add a track type in pure NFO.Brianetta wrote:OpenTTD's railtypes are designed such that new types are easy to add, without having to replace an existing type.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
-
- Traffic Manager
- Posts: 141
- Joined: 30 Apr 2007 10:26
Do they tilt in TTDPatch? If not, they're not going to in Open either.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
- Wile E. Coyote
- Tycoon
- Posts: 8515
- Joined: 08 Jul 2004 22:14
- Skype: wile.e.coyote2
- Location: Belgrade, Serbia
- Contact:
There is only one tilting Pendolino in Serbian set, and it's standard gauge.
Serbian rail set with Serbian scenario (ECS, PBI, FIRS and Tourist set compatible) Website | Topic and download | Latest version: 03.06.2015.
Serbian tram set Tracking table | TTD Patch tram set Latest version: 17.06.2015. | Open TTD Remix Latest version: 11.07.2015.
WIN-DOS GRF Converter Topic and download | Version 0.2.1: 09.01.2005.
Runner-up in "Best avatar Forums award" for years 2006 and 2010!
Serbian tram set Tracking table | TTD Patch tram set Latest version: 17.06.2015. | Open TTD Remix Latest version: 11.07.2015.
WIN-DOS GRF Converter Topic and download | Version 0.2.1: 09.01.2005.
Runner-up in "Best avatar Forums award" for years 2006 and 2010!
Who is online
Users browsing this forum: No registered users and 34 guests