Serbian rail set - Open TTD feedback

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

User avatar
Wile E. Coyote
Tycoon
Tycoon
Posts: 8515
Joined: 08 Jul 2004 22:14
Skype: wile.e.coyote2
Location: Belgrade, Serbia
Contact:

Serbian rail set - Open TTD feedback

Post by Wile E. Coyote »

Serbian rail set is now compatible with OTTD. However, it might be some limitations, so, please, give us feedback here.
Thanx! :D

EDIT: Story about AI incompatibility is deleted now, because system is supported, not via generic callbacks, but with various AIs.
Last edited by Wile E. Coyote on 04 Jun 2015 07:42, edited 9 times in total.
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!
User avatar
Purno
Tycoon
Tycoon
Posts: 16659
Joined: 30 Mar 2004 12:30
Location: Almere, The Netherlands

Re: Serbian rail set - feedback

Post by Purno »

Wile E. Coyote wrote: - OTTD don't supports narrow gauge rails (or I didn't knew how to make them to replace Maglev tracks). I hope Cornelius could help here, or maybe somebody else. Anyway, you could play with at least standard gauge part of set.
Doesn't that require a simple action A? I'd be suprised if OTTD didn't support that TBH.
Contributor to the The 2cc Set and Dutch Trainset. Inventor of the Metro concept. Retired Graphics Artist.
Image Image
Download TT | Latest TTDPatch | OpenTTD | OpenTTDCoop | BaNaNaS: OpenTTD content system | 2048² OTTD scenario of the Netherlands
GRF Codec | GRF Crawler | GRF Maker | Usefull graphics & tools sites | NML Documentation Wiki | NFO Documentation Wiki
All my graphics are licensed under GPL. "Always remember you're unique, just like everyone else."
User avatar
mart3p
Tycoon
Tycoon
Posts: 1030
Joined: 31 Oct 2005 21:00
Location: UK

Post by mart3p »

Narrow gauge trains seem to work ok, unfortunately the narrow gauge rails don't replace the maglev rails. I'm testing in 0.5.0 RC2, I will investigate further.

Meanwhile, I've started a game using standard gauge only. I will report on any findings.

Happy New Year :D
Attachments
Serbian Set Narrow Gauge
Serbian Set Narrow Gauge
Videle Transport, 25th Jun 1930.png (54.39 KiB) Viewed 16269 times
Image
User avatar
Wile E. Coyote
Tycoon
Tycoon
Posts: 8515
Joined: 08 Jul 2004 22:14
Skype: wile.e.coyote2
Location: Belgrade, Serbia
Contact:

Re: Serbian rail set - feedback

Post by Wile E. Coyote »

Purno wrote:Doesn't that require a simple action A? I'd be suprised if OTTD didn't support that TBH.
I really haven't looked in NG rails code, but I suppose you're right. With Patch, you set parameter to determine which type of tracks NG rails are replacing (normal, monorail or maglev). But in OTTD you can replace only normal tracks (I don't know why :? ).
mart3p wrote:Meanwhile, I've started a game using standard gauge only. I will report on any findings.
Thanx in advance! :D
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!
User avatar
Purno
Tycoon
Tycoon
Posts: 16659
Joined: 30 Mar 2004 12:30
Location: Almere, The Netherlands

Re: Serbian rail set - feedback

Post by Purno »

Wile E. Coyote wrote:
Purno wrote:Doesn't that require a simple action A? I'd be suprised if OTTD didn't support that TBH.
I really haven't looked in NG rails code, but I suppose you're right. With Patch, you set parameter to determine which type of tracks NG rails are replacing (normal, monorail or maglev). But in OTTD you can replace only normal tracks (I don't know why :? ).
Strange, cause AFAIK (and I admit I do not know much about it) the monorail/maglev track is built up of ordinary tiles and rail sprites. Action A can be used to change the appearance of any stationary sprite, such as any tile, building, tree, etc. AFAICT, Action A is pretty old, and should've been supported a loooooong time ago. However, it could be parameters aren't supported.

I guess the coder of the grf and the ottd devs know more about this than me, anyways.
Contributor to the The 2cc Set and Dutch Trainset. Inventor of the Metro concept. Retired Graphics Artist.
Image Image
Download TT | Latest TTDPatch | OpenTTD | OpenTTDCoop | BaNaNaS: OpenTTD content system | 2048² OTTD scenario of the Netherlands
GRF Codec | GRF Crawler | GRF Maker | Usefull graphics & tools sites | NML Documentation Wiki | NFO Documentation Wiki
All my graphics are licensed under GPL. "Always remember you're unique, just like everyone else."
User avatar
mart3p
Tycoon
Tycoon
Posts: 1030
Joined: 31 Oct 2005 21:00
Location: UK

Re: Serbian rail set - feedback

Post by mart3p »

Purno wrote:Action A is pretty old, and should've been supported a loooooong time ago.
The problem is not the use of Action A , this works fine in OTTD. Grf parameters also, are fully supported by OpenTTD.

The problem is caused by the way ngrailsw.grf is using action 7 var 85. It is testing for unifiedmaglev and electrifiedrailway. For OpenTTD, electrifiedrailway is always on and unifiedmaglev is set to 3 (separate monorail and maglev).

For TTDPatch, a setting of unifiedmaglev to 3 with electrifiedrailway on is treated as unifiedmaglev = 1. So the grf presumes that maglev engines have been converted to monorail. In OpenTTD, with the grf parameter set to 4 (convert maglev track) it converts the monorail track instead.

I have messed around with the nfo and made a test grf which has fixed the problem (see screenshot). It still needs a lot more work, I must make sure I haven't broken the grf for TTDPatch and text strings do not work yet.

When I have finished I will check with cornelius to see if he wants to include OpenTTD support in his grf, in which case he will be welcome to use my changes. If for any reason he is not willing to do this, I will make a dedicated OpenTTD narrow gauge grf (assuming permission can be obtained to use the existing graphics).
Attachments
Pitesti Transport, 29th Sep 1935.png
Pitesti Transport, 29th Sep 1935.png (78.14 KiB) Viewed 16189 times
Image
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 »

Yes, I noticed that too. With NG rails grf parameter set to 4, NG rails replace monorail, but NG uses maglev slot (and I haven't made NG set to work in Patch if it uses monorail slot :? ). But NG rails GRF don't supports parameter 8 (which will be replacement for maglev), I suppose there is no that parameter in code. But, of course, you can't post edited GRF without Cornelius's permission. Before you get permission from Cornelius, I made temporary OTTD Remix, which uses monorail slot for narrow gauge. If you set NG rails parameter to 4, you'll obtain proper graphics. It's temporary because if Cornelius decides to add NG rails support for OTTD, then this remix can't be necessary.
Other way is GRF (or patch?) in OTTD to add possibility for unifiedmaglev.

:arrow: ***EDIT: Because mart3p did update for narrow gauge rails, attachment is deleted. You can use "normal" set version now.***
Last edited by Wile E. Coyote on 03 Feb 2007 08:15, edited 3 times in total.
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!
User avatar
mart3p
Tycoon
Tycoon
Posts: 1030
Joined: 31 Oct 2005 21:00
Location: UK

Post by mart3p »

Wile E. Coyote wrote:But NG rails GRF don't supports parameter 8 (which will be replacement for maglev), I suppose there is no that parameter in code.
The changes I have made keep the parameters the same:
1 - Changes normal rail and elrail to NG.
2 - Changes monorail to NG.
4 - Changes maglev to NG.
There is no need for a parameter value of 8. IMO it is best to change normal rail and elrail together . Existing sets that use parameter = 1 expect this. It would also not currently be possible to change normal rail and elrail separately in OpenTTD, as they both use the same rail sprites.
Wile E. Coyote wrote:But, of course, you can't post edited GRF without Cornelius's permission.
No, I won’t be posting an edited grf without permission. When I am happy with my changes to ngrailsw.grf I will talk to Cornelius. :wink:
Image
User avatar
mart3p
Tycoon
Tycoon
Posts: 1030
Joined: 31 Oct 2005 21:00
Location: UK

Post by mart3p »

Here are the problems I've noticed so far, using the Serbian set in the temperate climate with OpenTTD 0.5.0 RC2:

Narrow Gauge (srsngw.grf)
  • 1. There is no steam from narrow gauge steam engines. OpenTTD assumes that smoke effects aren't needed for engines on "maglev" or "monorail" rail types.
    From HandleLocomotiveSmokeCloud in train_cmd.c:

    Code: Select all

    // no smoke?
    if ((RailVehInfo(engtype)->flags & RVI_WAGON && effect_type == 0) ||
    		disable_effect ||
    		GetEngine(engtype)->railtype > RAILTYPE_ELECTRIC ||
    		v->vehstatus & VS_HIDDEN) {
    	continue;
    }
    2. Both the 4-axle Tank Wagon and Tanker R are refittable to valuables
    3. Boxcar G is refittable to livestock, goods, wood or valuables (it should be just livestock or goods).
    4. Flatbed Wagon is built carrying wood and is refittable to goods, steel or valuables (it should be built carrying goods and be refittable to goods, wood or steel).
    5. Self-unloading Wagon is built carrying livestock (it should be built carrying coal).
Standard Gauge (srssgw.grf)
  • 6. Tanker Z-z is refittable to valuables
    7. Freight Car Gkks is refittable to livestock, goods, wood or valuables (it should be only refittable to livestock or goods).
    8. The Gondola Kgs-z is refittable to valuables.
Problems 2 to 8 are almost certainly due to OpenTTD's lack of support for newcargos. I guess some cargos in the refit masks have been remapped by a cargo translation table.

Narrow Gauge Rails (ngrailsw.grf)
  • 9. Action 4 generic text (feature 48 ) is not supported by OpenTTD, so strings are not changed e.g. “Maglev” should change to “Narrow Gauge “.
Apart from these problems it is looking good. :)
Attachments
Miercurea Ciuc Transport, 5th Apr 1941.png
Miercurea Ciuc Transport, 5th Apr 1941.png (87.73 KiB) Viewed 15946 times
Image
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 »

Thanx for feedback! :D
mart3p wrote:1. There is no steam from narrow gauge steam engines. OpenTTD assumes that smoke effects aren't needed for engines on "maglev" or "monorail" rail types.
I haven't noticed that. :oops: Hope it'd be solved with Action 0 prop. 22.
EDIT: unfortunately not. And sound effect is for maglev too. :(
mart3p wrote:Self-unloading Wagon is built carrying livestock (it should be built carrying coal).
And to carry iron ore too.
mart3p wrote:Problems 2 to 8 are almost certainly due to OpenTTD's lack of support for newcargos. I guess some cargos in the refit masks have been remapped by a cargo translation table.
You're right. I've noticed that too, and working on removing cargo translation table and re-coding wagons for original cargos only. That should be easy to solve, and human players can refit wagons properly, but there is other thing which confuses me.
It seems OTTD don't support generic handler in var. Action 2, or at least don't supports callback 18 - vars 40 (that's expected, because it don't supports new cargos), 80, 81 and 86! Then AI use (it seems) original IDs for some cargos. Also AI allways use narrow gauge (as monorail), in any loading queue (does OTTD values priority?) and not SG if you load it after NG. :?
mart3p wrote:Action 4 generic text (feature 48 ) is not supported by OpenTTD, so strings are not changed e.g. “Maglev” should change to “Narrow Gauge “.
Unfortunately, there we can't do nothing, just to wait to appropriate support.
Last edited by Wile E. Coyote on 17 Jan 2007 10:21, edited 3 times in total.
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!
peter1138
OpenTTD Developer
OpenTTD Developer
Posts: 1732
Joined: 30 Mar 2005 09:43

Post by peter1138 »

I've already been working on support for cargo translation tables, so don't bother removing it. Unless you want it to work in 0.5.0, of course...
He's like, some kind of OpenTTD developer.
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 »

Glad to hear that. :D
And what about other errors (callback 18 support)? I suppose there is no appropriate support for them.
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!
User avatar
mart3p
Tycoon
Tycoon
Posts: 1030
Joined: 31 Oct 2005 21:00
Location: UK

Post by mart3p »

I haven't tried the AI yet, I've been playing with no competition in my current game. Looking at the OpenTTD code though, I see there is no support for callback 18. I might have a go at writing a patch. ;)
Image
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 »

It'd be great thing. :D
Don't forgot that set will work properly with both callback 18 and new cargo table support. :wink:
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!
User avatar
mart3p
Tycoon
Tycoon
Posts: 1030
Joined: 31 Oct 2005 21:00
Location: UK

Post by mart3p »

I have made some more changes to ngrailsw.grf. As well as the correct support for OpenTTD rail types, I have added some additional narrow gauge gui and cursor sprites for the autorail tool and the rail convert tool. Also, with PikkaBird’s permission, I have added compatibility for the viaduct bridge with NG rails (top right in screenshot).

I have just received permission from Cornelius to update his narrow gauge GRF. :D He has said I can release an update myself, as he is not really active on the forum any more. I will make a release after some further testing...
Attachments
Miercurea Ciuc Transport, 24th Sep 1959 #2.png
Miercurea Ciuc Transport, 24th Sep 1959 #2.png (96.29 KiB) Viewed 15210 times
Image
Aylomen
Engineer
Engineer
Posts: 20
Joined: 24 Sep 2006 18:12

Post by Aylomen »

A very nice set, but I haven't found any vehicle, wich transports food...Is there one?
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 »

Food should be transported with every boxcar, but due to total remaping of cargo bitmask (and lack of support for new cargos in OTTD), there is probably no wagons carrying food. We must wait for OTTD devs to add newcargos support. :wink:
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!
User avatar
mart3p
Tycoon
Tycoon
Posts: 1030
Joined: 31 Oct 2005 21:00
Location: UK

Post by mart3p »

I have released my update to cornelius's Narrow Gauge rails grf. Among other changes, this update makes narrow gauge rails compatible with OpenTTD.

The OpenTTD specific changes are:
  • 1. Maglev track is now replaced when parameter = 4 (as used by Serbian narrow gauge set).

    2. Narrow gauge button and cursor sprites for Autorail and Rail Replace tools.

    3. Narrow gauge depot button and cursor sprites.

    4. Replacement of (monorail or maglev) station sprites
For details of other changes look at this post where you can download the updated ngrailsw.grf.
Attachments
NG grf.png
NG grf.png (59.75 KiB) Viewed 14490 times
Image
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 with updated version of narrow gauge rails, you can now use original set version. So, replace OTTD Remix of NG set with normal NG set from Patch thread in presence of updated NG rails.

Thanx to mart3p who did great job! :D
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!
User avatar
mart3p
Tycoon
Tycoon
Posts: 1030
Joined: 31 Oct 2005 21:00
Location: UK

Post by mart3p »

Wile E. Coyote wrote:
mart3p wrote:1. There is no steam from narrow gauge steam engines. OpenTTD assumes that smoke effects aren't needed for engines on "maglev" or "monorail" rail types.
I haven't noticed that. :oops: Hope it'd be solved with Action 0 prop. 22.
EDIT: unfortunately not. And sound effect is for maglev too. :(
I’ve now released my Visual and Sound Effects for NewGRF NG Trainsets patch.

With this patch, Serbian Narrow gauge engines produce smoke and diesel fumes. They also have the correct sound effects. No more maglev sounds from narrow gauge steam trains. :)
Image
Post Reply

Return to “Graphics Development”

Who is online

Users browsing this forum: Ahrefs [Bot], Google Adsense [Bot] and 27 guests