Narrow gauge and electrified rails: some kind of conflict

Discuss, get help with, or post new graphics for TTDPatch and OpenTTD, using the NewGRF system, here. Graphics for plain TTD also acceptable here.

Moderator: Graphics Moderators

Post Reply
User avatar
cornelius
Director
Director
Posts: 519
Joined: 04 Jan 2004 22:11

Narrow gauge and electrified rails: some kind of conflict

Post by cornelius »

I've been working on graphics for narrow gauge rails, which are intended to either replace normal rails for complete ng sets, or act as an alternative third track type to have narrow gauge alongside standard.

I'm getting a bit of problem, though, when you use my tracks with MB's standard grf for electrified tracks. I'll list a few combinations of patch options and grf parameters below. Currently the ngrails.grf takes a parameter for the track type you want to replace: 1 for first type, 2 for second type, 4 for third type.

Code: Select all

electrifiedrailway on
unifiedmaglev 2

ngrails.grf 2
Here the second rail type is called narrow gauge but builds normal electric tracks.

Code: Select all

electrified railway on
unified maglev 1

ngrails.grf 2
The second type is called narrow gauge but builds normal electric. The third type is called monorail but builds ng.

Code: Select all

electrified railway on
unified maglev 1

ngrails.grf 1
Now the second track type is called electrified but builds narrow gauge electric. This isn't really a huge problem though because I don't think there would be space to fully describe it.

If anyone could shed any light on how to make these two grfs play nice together I would really appreciate it, since it's the only thing holding me back from finishing my project and making it available.

Please note that the attached file is NOT a release of narrow gauge tracks because the graphics are not finalised and doesn't work in all climates.

EDIT: grf removed. See release thread.
Last edited by cornelius on 28 Jul 2005 10:12, edited 1 time in total.
Image
Cornelius Foundry ~ Bespoke Isometric Narrow Gauge Engineering ~ Est. 1921
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: Narrow gauge and electrified rails: some kind of conflic

Post by DaleStan »

There are three rail types: Rail, monorail, maglev. If you want to replace the third rail type, regardless of unifiedmaglev, you need to check the setting of unifiedmaglev (action 7 variable 85, bits 32&33) and then replace the appropriate graphics. You also have to replace the appropriate string. It might be easier to just replace both strings, but please don't do that with the sprites.

If electrifiedrail on, you can't replace just the standard graphics, nor just the electrified graphics; they use the same track peices, and so you're stuck replacing both. The electrified rail menu item is in ttdpttxt, and is hence difficult to change with a GRF file.
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
User avatar
cornelius
Director
Director
Posts: 519
Joined: 04 Jan 2004 22:11

Re: Narrow gauge and electrified rails: some kind of conflic

Post by cornelius »

DaleStan wrote:There are three rail types: Rail, monorail, maglev. If you want to replace the third rail type, regardless of unifiedmaglev, you need to check the setting of unifiedmaglev (action 7 variable 85, bits 32&33) and then replace the appropriate graphics. You also have to replace the appropriate string. It might be easier to just replace both strings, but please don't do that with the sprites.
Okay. I think the graphics are always correct in the current verson, so I'll concentrate on sorting out the labels.
If electrifiedrail on, you can't replace just the standard graphics, nor just the electrified graphics; they use the same track peices, and so you're stuck replacing both. The electrified rail menu item is in ttdpttxt, and is hence difficult to change with a GRF file.
I don't want to change either/or out of those two if NG is the main track type, so I'll just leave this part alone. Thanks for your suggestions, now to see if I can actually work out how to do it ;)
Image
Cornelius Foundry ~ Bespoke Isometric Narrow Gauge Engineering ~ Est. 1921
User avatar
Wile E. Coyote
Tycoon
Tycoon
Posts: 8515
Joined: 08 Jul 2004 22:14
Skype: wile.e.coyote2
Location: Belgrade, Serbia
Contact:

Post by Wile E. Coyote »

And don't forget to change reports in: purchase list, question from vehicle manufacturer, and announcement of new vehicle (see attach). Besides, I hope you'll finish great NG depot and stations shown in British NG topic soon:
http://www.tt-forums.net/viewtopic.php?t=6123&start=0
Will be tracks available under tropic climate?
Also, with Monorail-->Maglev, ngrails.grf 4 and electrifiedrail on you have electrified rail altough you have not electrified locos to purchase. Maybe I have wrong settings?
Attachments
errors.png
errors.png (50.75 KiB) Viewed 1312 times
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!
Post Reply

Return to “Graphics Development”

Who is online

Users browsing this forum: No registered users and 23 guests