Narrow Gauge Locos for Tram Ways

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
NekoMaster
Tycoon
Tycoon
Posts: 4001
Joined: 16 Aug 2008 22:26
Skype: neko-master
Location: Oshawa, Ontario, CANADA

Re: Narrow Gauge Locos for Tram Ways

Post by NekoMaster »

FooBar wrote:You must have misunderstood me then... I'm not coding, I'm only providing advice if you need any.
If you want me to oode something, you'll have to subscribe at the end of the list :wink:
Aw.... you cant even code two little trains? T_T
Anyways I looked at the code for something, and it made no sense at all.

Plus i can't figure out how you compile the nfo with the pcx into a grf with grf codec and the tools I got (renum.exe and qt.exe)
Image Proud Canadian Image
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!
User avatar
NekoMaster
Tycoon
Tycoon
Posts: 4001
Joined: 16 Aug 2008 22:26
Skype: neko-master
Location: Oshawa, Ontario, CANADA

Re: Narrow Gauge Locos for Tram Ways

Post by NekoMaster »

Ok heres the sprites I have, I fixed the other two with buy window graphics.
EMD G16
EMD G16
emd_g16.PNG (4.96 KiB) Viewed 1312 times
EMD GT22CUM-1
EMD GT22CUM-1
gt22cum.PNG (5.35 KiB) Viewed 1312 times
Krauss Maffei ML4000
Krauss Maffei ML4000
kmml4k.PNG (5.03 KiB) Viewed 1313 times
Could someone teach me how to code trams? I would like to see how these work in openTTD

Edit : Yes I borrowed the flags for Brazil from the 2cc set, I dont know who did up the flags, but if you want me to remove the flag then please tell me.

The Serbian flag I made my self
Image Proud Canadian Image
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!
Eddi
Tycoon
Tycoon
Posts: 8272
Joined: 17 Jan 2007 00:14

Re: Narrow Gauge Locos for Tram Ways

Post by Eddi »

just to clarify: the 2cc set is released under the terms of the GPL, if you are using parts of the 2cc set, you must release your set under the GPL also.
User avatar
NekoMaster
Tycoon
Tycoon
Posts: 4001
Joined: 16 Aug 2008 22:26
Skype: neko-master
Location: Oshawa, Ontario, CANADA

Re: Narrow Gauge Locos for Tram Ways

Post by NekoMaster »

Eddi wrote:just to clarify: the 2cc set is released under the terms of the GPL, if you are using parts of the 2cc set, you must release your set under the GPL also.
Sure...well I don't plan on selling this nor anything else that would breach the terms in a GPL license.
Image Proud Canadian Image
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!
User avatar
DJ Nekkid
Tycoon
Tycoon
Posts: 2141
Joined: 30 Nov 2006 20:33

Re: Narrow Gauge Locos for Tram Ways

Post by DJ Nekkid »

the code is gpl, the gfx is CC ... NA
Member of the
ImageImage
User avatar
NekoMaster
Tycoon
Tycoon
Posts: 4001
Joined: 16 Aug 2008 22:26
Skype: neko-master
Location: Oshawa, Ontario, CANADA

Re: Narrow Gauge Locos for Tram Ways

Post by NekoMaster »

DJ Nekkid wrote:the code is gpl, the gfx is CC ... NA
Hmm? So Im not allowed? Anyways think you could code those 3 engines for me so i can test them?
Image Proud Canadian Image
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!
User avatar
DJ Nekkid
Tycoon
Tycoon
Posts: 2141
Joined: 30 Nov 2006 20:33

Re: Narrow Gauge Locos for Tram Ways

Post by DJ Nekkid »

i did one, now you do the rest :)
Attachments
narrotrams.grf
(1.87 KiB) Downloaded 77 times
ml4k.pcx
(8.21 KiB) Downloaded 59 times
narrotrams.nfo
(2.06 KiB) Downloaded 56 times
Member of the
ImageImage
User avatar
NekoMaster
Tycoon
Tycoon
Posts: 4001
Joined: 16 Aug 2008 22:26
Skype: neko-master
Location: Oshawa, Ontario, CANADA

Re: Narrow Gauge Locos for Tram Ways

Post by NekoMaster »

DJ Nekkid wrote:i did one, now you do the rest :)
Well could you at least tell me how to code it and how to use the tools to compile the nfo and pcx into a grf?
Image Proud Canadian Image
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!
User avatar
DJ Nekkid
Tycoon
Tycoon
Posts: 2141
Joined: 30 Nov 2006 20:33

Re: Narrow Gauge Locos for Tram Ways

Post by DJ Nekkid »

I did send you the tools yesterday in a pm, and now you have one VERY VERY basic nfo, and one quite advanced one, both are rather well documented... Also have a look at the grfspec wikipages. I know they are written in a quite heavy lanaguage.

Im also on irc in the channel stated in my sig ... ask there if you have any further questions...
Member of the
ImageImage
User avatar
NekoMaster
Tycoon
Tycoon
Posts: 4001
Joined: 16 Aug 2008 22:26
Skype: neko-master
Location: Oshawa, Ontario, CANADA

Re: Narrow Gauge Locos for Tram Ways

Post by NekoMaster »

DJ Nekkid wrote:I did send you the tools yesterday in a pm, and now you have one VERY VERY basic nfo, and one quite advanced one, both are rather well documented... Also have a look at the grfspec wikipages. I know they are written in a quite heavy lanaguage.

Im also on irc in the channel stated in my sig ... ask there if you have any further questions...
I tried looking at the pages and also what you gave me, the pages are hard for me to understand and the nfo makes no sense, or at least the values.

If I wanted to have multiple trains in on grf, how would I do that?

Also, went to the IRC chat thing here, I didnt find you.
Image Proud Canadian Image
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!
User avatar
FooBar
Tycoon
Tycoon
Posts: 6553
Joined: 21 May 2007 11:47
Location: The Netherlands
Contact:

Re: Narrow Gauge Locos for Tram Ways

Post by FooBar »

NekoMaster wrote:If I wanted to have multiple trains in on grf, how would I do that?
Just copy/paste multiple vehicle code sections below one another. Don't forget to change the vehicle ID though (amongst others ofcourse).
NekoMaster wrote:Also, went to the IRC chat thing here, I didnt find you.
Don't go here, go there --> irc://irc.oftc.net/openttdcoop.devzone ;)

I can give you the Dutch Tram Set code, but that'd probably scare you at this point in time... As only the most difficult example is badly documented, while others are not documented at all...
I'd recommend to try and understand the code in DJNekkid's last example using the newgrf specification wiki. Read there first what "little endian" is, and what bytes, words and dwords are. Then try to understand what's in the nfo file.
User avatar
NekoMaster
Tycoon
Tycoon
Posts: 4001
Joined: 16 Aug 2008 22:26
Skype: neko-master
Location: Oshawa, Ontario, CANADA

Re: Narrow Gauge Locos for Tram Ways

Post by NekoMaster »

FooBar wrote: I'd recommend to try and understand the code in DJNekkid's last example using the newgrf specification wiki. Read there first what "little endian" is, and what bytes, words and dwords are. Then try to understand what's in the nfo file.
I looked in the NFO, the values for the stuff makes no sense. Are the values Blank? Also, the ones with /bXXXX is the b a part of hex or of the code?

Another thing, how do I make tram consists and make it refittable to other stuff with differnt graphics for the wagons/cars?
Image Proud Canadian Image
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!
User avatar
FooBar
Tycoon
Tycoon
Posts: 6553
Joined: 21 May 2007 11:47
Location: The Netherlands
Contact:

Re: Narrow Gauge Locos for Tram Ways

Post by FooBar »

Some values indeed are blank, like capacity for instance.

The \b in \bXXX is an escape sequence. You can use that so that you don't have to convert everything to hex yourself. \b10 for instance converts the decimal 10 to hex 0A for you. Note the difference between backslashes and forward slashes. Escapes are always backslashes.
NekoMaster wrote:Another thing, how do I make tram consists and make it refittable to other stuff with differnt graphics for the wagons/cars?
Try to understand this one first, before attempting more difficult things. ;)
If this rather simple example doesn't make sense to you, more advanced articulated vehicle code certainly won't make sense to you.
Also, Zephyris has written a fine tutorial on vehicle coding. Unfortunately I never can seem to find that :?

EDIT: ah, here it is: http://www.tt-forums.net/viewtopic.php?f=36&t=37465
User avatar
andythenorth
Tycoon
Tycoon
Posts: 5658
Joined: 31 Mar 2007 14:23
Location: Lost in Music

Re: Narrow Gauge Locos for Tram Ways

Post by andythenorth »

NekoMaster wrote:Another thing, how do I make tram consists and make it refittable to other stuff with differnt graphics for the wagons/cars?
Not the answer to your question, but these might help you:

1. the nfo for HEQS, this is almost completely commented throughout. Trams are road vehicles with one property set to 'require tram tracks', so the code will be similar to HEQS. I don't remember which property is used to make a vehicle a tram though.
http://dev.openttdcoop.org/projects/heq ... eader.pnfo

2. I found Pikka Wiki the best place to understand the basics of nfo:
http://users.tt-forums.net/pikka/wiki/i ... GRF_coding

3. If you don't have one, a text editor that can show syntax highlighting is useful. Then you can see what is code, and what is comments. I only know about Mac text editors so I can't recommend one. Here's what mine looks like (I prefer a black background, but it's not compulsory)
Attachments
Snapshot 2009-06-17 12-23-35.png
Snapshot 2009-06-17 12-23-35.png (25.98 KiB) Viewed 1213 times
User avatar
NekoMaster
Tycoon
Tycoon
Posts: 4001
Joined: 16 Aug 2008 22:26
Skype: neko-master
Location: Oshawa, Ontario, CANADA

Re: Narrow Gauge Locos for Tram Ways

Post by NekoMaster »

andythenorth wrote:
NekoMaster wrote:Another thing, how do I make tram consists and make it refittable to other stuff with differnt graphics for the wagons/cars?
Not the answer to your question, but these might help you:

1. the nfo for HEQS, this is almost completely commented throughout. Trams are road vehicles with one property set to 'require tram tracks', so the code will be similar to HEQS. I don't remember which property is used to make a vehicle a tram though.
http://dev.openttdcoop.org/projects/heq ... eader.pnfo

2. I found Pikka Wiki the best place to understand the basics of nfo:
http://users.tt-forums.net/pikka/wiki/i ... GRF_coding

3. If you don't have one, a text editor that can show syntax highlighting is useful. Then you can see what is code, and what is comments. I only know about Mac text editors so I can't recommend one. Here's what mine looks like (I prefer a black background, but it's not compulsory)
OMFG! there was soooo much code! Theres no way I could ever do that! My best bet is just to keep drawing graphics and have someone else code. I suck at programing, mainly cause I suck at learning it just like math TT_TT
Image Proud Canadian Image
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!
User avatar
DJ Nekkid
Tycoon
Tycoon
Posts: 2141
Joined: 30 Nov 2006 20:33

Re: Narrow Gauge Locos for Tram Ways

Post by DJ Nekkid »

now remember NM, we have all been nfo rookies, and we have all started somewhere... My first attemt didnt work out either, now i did write the QR highspeed thingy streight out of my head, all in one go, no testing up front, and everything worked out as inteded the first time.

Study the two examples i've given you. The 2nd one is an ABSOLUTE basic vehicle... Study the newgrf wikipages, pikkawiki and zyph's nfo programming guide posted a couple of posts up.
"demanding" people to code your stuff is most likely not gonna succeed... I started nfo codeing a good year ago, and andy even less ... less then 1 year ago i think. August 2008 or something...(??), and his stuff work out well.
The reason i did the code for you is because i hoped that you would actually try to understand, and look up how it works...

And as i saied, a few of us are on the mention irc-net/channel, and we are most likely quite happy to explain stuff there if we are online and have the time for it. Just ask quite specific questions :)
Member of the
ImageImage
User avatar
NekoMaster
Tycoon
Tycoon
Posts: 4001
Joined: 16 Aug 2008 22:26
Skype: neko-master
Location: Oshawa, Ontario, CANADA

Re: Narrow Gauge Locos for Tram Ways

Post by NekoMaster »

DJ Nekkid wrote:now remember NM, we have all been nfo rookies, and we have all started somewhere... My first attemt didnt work out either, now i did write the QR highspeed thingy streight out of my head, all in one go, no testing up front, and everything worked out as inteded the first time.

Study the two examples i've given you. The 2nd one is an ABSOLUTE basic vehicle... Study the newgrf wikipages, pikkawiki and zyph's nfo programming guide posted a couple of posts up.
"demanding" people to code your stuff is most likely not gonna succeed... I started nfo codeing a good year ago, and andy even less ... less then 1 year ago i think. August 2008 or something...(??), and his stuff work out well.
The reason i did the code for you is because i hoped that you would actually try to understand, and look up how it works...

And as i saied, a few of us are on the mention irc-net/channel, and we are most likely quite happy to explain stuff there if we are online and have the time for it. Just ask quite specific questions :)
yeah, but after looking after all that stuff for about 2 hours (no really, i kept looking and fooling around with it for 2 hours) all I got was confusion and a hurting head (yes, my head hurts when i think hard T_T )
Image Proud Canadian Image
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!
User avatar
andythenorth
Tycoon
Tycoon
Posts: 5658
Joined: 31 Mar 2007 14:23
Location: Lost in Music

Re: Narrow Gauge Locos for Tram Ways

Post by andythenorth »

NekoMaster wrote:yeah, but after looking after all that stuff for about 2 hours (no really, i kept looking and fooling around with it for 2 hours) all I got was confusion and a hurting head (yes, my head hurts when i think hard T_T )
You might be able to use grfmaker to make your vehicles. It'll give you a visual editor (menus, buttons) etc so you don't have to write nfo. I have never used it, so I can't help you with it. Try a search in the TTDPatch graphics forum if you want to find it.
User avatar
DJ Nekkid
Tycoon
Tycoon
Posts: 2141
Joined: 30 Nov 2006 20:33

Re: Narrow Gauge Locos for Tram Ways

Post by DJ Nekkid »

yes, grfmaker might be a good alternative for you... More or less click-and-play, but it cant do the most advanced stuff, if any advanced stuff... Like articulation?
Member of the
ImageImage
User avatar
NekoMaster
Tycoon
Tycoon
Posts: 4001
Joined: 16 Aug 2008 22:26
Skype: neko-master
Location: Oshawa, Ontario, CANADA

Re: Narrow Gauge Locos for Tram Ways

Post by NekoMaster »

DJ Nekkid wrote:yes, grfmaker might be a good alternative for you... More or less click-and-play, but it cant do the most advanced stuff, if any advanced stuff... Like articulation?
Aw, that sucks. Well, since I can't code, if I tried it would never get anywhere, would you mind trying when you have spare time? Ill draw the graphics, but I was wondering if it would be possible to use some wagon graphics from your 2cc set like the small hoper and the small oil tanker.
Image Proud Canadian Image
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!
Post Reply

Return to “Graphics Development”

Who is online

Users browsing this forum: No registered users and 28 guests