how to make a tram set?

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
NightFang
Engineer
Engineer
Posts: 32
Joined: 02 Nov 2006 11:51

how to make a tram set?

Post by NightFang »

OK basicly what the title says, but a little more to it than that.

I have searched the forum and the wiki, but could not find the information I wanted.

What I want to do is make a tram set as the title suggests, but I want to do that without replacing other units... so a few questions:
1) is it even possible to make new units without replacing old ones (Make a new graphics but not have it replace a graphic already in game, Hope you understand what I mean)
2) how would I go about making articulated trams

Um.... I think that all i wanted to know, So if you could just point me either to where I need to go to find this out, or help me out right here, either way.
So now for what I do know/done:

I have already followed the tutorial in the wiki and replaced a few vehicals in game(even if the train I replaced has flashing yellow lights on it, just wish I knew how i did it so i could reproduce it and add it the the trams I hope to start working on), but have as yet to change thier speed/cargo. So, now you know what I know how to do, just need a bit of help in the other areas.

Also if you think im missing anything here relating to how to make new vehical without replacing the old ones please let me know.

Thanks in advance for any help.

Oh and if you want a copy of the .grf file that has the flashing yellow light on the trains (I personaly think that if I reproduce it onto trams in the right spot it would look really good) , let me know and I'll try and find somewhere to host it (might be easier if you told me somewhere tho)
Tom0004
Chairman
Chairman
Posts: 822
Joined: 01 Jul 2007 22:33
Location: Manchester, UK

Re: how to make a tram set?

Post by Tom0004 »

your in the wrong section ha not really, but the main graphics work for OTTD is based on 32bpp, not the orignal 8bpp.

you'd get more help posting inthe TTDP Graphics section, i do.

to answer you question about not overwritting orignal veches, yes it is possiable for exampile, Gerninc Tram Set dosn'ttake orignal vechiles from the game.

so i'd suggest emailing, PMin the author of that set and asking if you can edit the files for personal us, just to make sure your not braking ny copyright laws.

as far as i know, going about editing the speed and stuff, you need to edit the NFO file, from the GRF.

i'm currently testing my NFO skills also lol not having much luck tho lol, but its a learning process

to your flashing lights, its certain colours fron the TT Pallette, i also have done this, making a bus, with flashing logos lol

here's a link to the Graphics sticky in the TTDP Graphics forum, here but youproberly all ready know about this

everything can be read about on the TTDP Wiki page,
NightFang
Engineer
Engineer
Posts: 32
Joined: 02 Nov 2006 11:51

Re: how to make a tram set?

Post by NightFang »

ok, thanks for that tip, and im still learning how to use the .NCO files as well, sort of learning, just a lot of stuff to remeber, and ill try posting where you siad.
User avatar
Ben_K
Tycoon
Tycoon
Posts: 1166
Joined: 01 Jun 2006 15:15
Location: Sydney, AUS

Re: how to make a tram set?

Post by Ben_K »

Good Afternoon!
NightFang wrote:2) how would I go about making articulated trams)
In terms of drawing sprites, just draw each carriage individually, like you would a train. As for the coding procedure, the same answer as above. What Tom suggests about asking Zephyris is a good idea as he asked many questions about articulated vehicle coding. He can probably help you a lot.
NightFang wrote:...the train I replaced has flashing yellow lights on it, just wish I knew how i did it so i could reproduce it...
As Tom said, its due to the colours you used in the palette. if you know which colours do what, you can use them very creatively (I always admire the cinema sign on the TTRS set :) ). To resolve the current flashing train issue, just replace the problematic yellow with a non-action colour replacement.
0004tom wrote:your in the wrong section ha not really, but the main graphics work for OTTD is based on 32bpp, not the orignal 8bpp.
Nonsense!! OTTD uses the 8bpp the same as any other. What is correct though...
0004tom wrote:...you'd get more help posting inthe TTDP Graphics section
...is that you will get a lot more exposure if you post in the TTDP Graphics section as its viewed by more users. Next time, Id use that area for these kinds of questions.
the main graphics work for OTTD is based on 32bpp
Id just like to reiterate that I think this is nonsense. Its just that as only OTTD supports 32bpp, you only see those subjects in this area. Some of us are happy for OTTD to stay with 8bpp graphics :)
NightFang
Engineer
Engineer
Posts: 32
Joined: 02 Nov 2006 11:51

Re: how to make a tram set?

Post by NightFang »

Ok, thanks for all the help so far, I will try asking Zephyris for some help later....

Oh, and I seem to be getting more help here than on the TTDP forum.
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: how to make a tram set?

Post by DaleStan »

That would be because you're expected to have read the documentation before posting there.
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
NightFang
Engineer
Engineer
Posts: 32
Joined: 02 Nov 2006 11:51

Re: how to make a tram set?

Post by NightFang »

DaleStan wrote:That would be because you're expected to have read the documentation before posting there.
... I guess you did not read the second line of my post.... as I said I had already read that
User avatar
Zephyris
Tycoon
Tycoon
Posts: 2897
Joined: 16 May 2007 16:59

Re: how to make a tram set?

Post by Zephyris »

Feel free to deconstruct and play about with the generic tram set - with the .nfo documentation on the patch wiki it should be possible to understand. I would start here: http://wiki.ttdpatch.net/tiki-index.php ... rstVehicle , and once youve mastered the basics the following should help get into my style of coding. If you get stuck please do post code for bugfixing, I'm still quite new to coding but shoud be able to help!

Code: Select all

   90 * 26	 04 01 7F 01 3E "A2020 Passenger Tram" 00
// Action4 - Change name of Feature 01 (road vehicles) VehicleID 3E (A toyland vehicle) to A2020 Passenger Tram.
   91 * 41	 00 01 10 01 3E 00 62 94 03 13 04 16 06 07 08 C0 09 80 0F 32 10 00 11 E5 0E FF 1C 01 17 10 12 49 16 00 00 00 00 13 21 14 A0
// Action0 - Change vehicle statistics of Feature 01 (road vehicle) VehicleID 3E. Note:
// Property 1C (misc flags) is 01 - a so is a tram not a normal road vehicle.
// Property 17 (callbacks) is 10, so an articulated vehicle.
// Property 0E (graphics) is FF, so uses new graphics
   92 * 4	 01 01 03 08
// Action1 - Define sprites, 3 vehicles with 8 views each.
   93 c:\games\openttd\sprites/generictrams_v0.3.pcx 786 72 01 18 8 -3 -10
   94 c:\games\openttd\sprites/generictrams_v0.3.pcx 2 104 09 16 20 -14 -7
   95 c:\games\openttd\sprites/generictrams_v0.3.pcx 34 104 01 12 28 -14 -6
   96 c:\games\openttd\sprites/generictrams_v0.3.pcx 82 104 09 16 20 -6 -8
   97 c:\games\openttd\sprites/generictrams_v0.3.pcx 114 104 01 18 8 -3 -10
   98 c:\games\openttd\sprites/generictrams_v0.3.pcx 130 104 09 16 20 -14 -8
   99 c:\games\openttd\sprites/generictrams_v0.3.pcx 162 104 01 12 28 -14 -6
  100 c:\games\openttd\sprites/generictrams_v0.3.pcx 210 104 09 16 20 -6 -7
  101 c:\games\openttd\sprites/generictrams_v0.3.pcx 242 104 01 18 8 -3 -10
  102 c:\games\openttd\sprites/generictrams_v0.3.pcx 258 104 09 16 20 -14 -7
  103 c:\games\openttd\sprites/generictrams_v0.3.pcx 290 104 01 12 28 -14 -6
  104 c:\games\openttd\sprites/generictrams_v0.3.pcx 338 104 09 16 20 -6 -8
  105 c:\games\openttd\sprites/generictrams_v0.3.pcx 370 104 01 18 8 -3 -10
  106 c:\games\openttd\sprites/generictrams_v0.3.pcx 386 104 09 17 20 -14 -8
  107 c:\games\openttd\sprites/generictrams_v0.3.pcx 418 104 01 12 28 -14 -6
  108 c:\games\openttd\sprites/generictrams_v0.3.pcx 466 104 09 16 20 -6 -7
  109 c:\games\openttd\sprites/generictrams_v0.3.pcx 498 104 01 18 8 -3 -10
  110 c:\games\openttd\sprites/generictrams_v0.3.pcx 514 104 09 16 20 -14 -7
  111 c:\games\openttd\sprites/generictrams_v0.3.pcx 546 104 01 12 28 -14 -6
  112 c:\games\openttd\sprites/generictrams_v0.3.pcx 594 104 09 16 20 -6 -8
  113 c:\games\openttd\sprites/generictrams_v0.3.pcx 626 104 01 18 8 -3 -10
  114 c:\games\openttd\sprites/generictrams_v0.3.pcx 642 104 09 16 20 -14 -8
  115 c:\games\openttd\sprites/generictrams_v0.3.pcx 674 104 01 12 28 -14 -6
  116 c:\games\openttd\sprites/generictrams_v0.3.pcx 722 104 09 16 20 -6 -7
// The real sprites
  117 * 9	 02 01 AA 01 01 00 00 00 00
  118 * 9	 02 01 BB 01 01 01 00 01 00
  119 * 9	 02 01 CC 01 01 02 00 02 00
// Define 3 CargoIDs (AA, BB and CC) from vehicle sprite sets 00 00, 01 00 and 02 00 of the previous Action0. No loading animation graphics.

// These four lines need to be read in reverse order because the lines of code can only refer to CargoIDs which have previously been defined.
      120 * 18	 02 01 00 81 40 00 FF 02 AA 00 00 00 CC 00 02 02 BB 00
// 4: CargoID 00. Use graphics according to the position of the vehicle in the chain of 3 - use AA for the first, CC for the third, and BB otherwise.
      121 * 14	 02 01 01 81 10 00 FF 01 3E 80 01 02 FF 80
// 3: CargoID 01. Articulated vehicle callback - add two trailers of VehicleID 3E, i.e. the same as the first car.
      122 * 14	 02 01 02 81 0C 00 FF 01 01 00 16 16 00 00
// 2: CargoID 02. Check for callbacks (ie. articulated vehicleness) - go to CargoID 01 for callback otherwise go to CargoID 00.
  123 * 7	 03 01 01 3E 00 02 00
// 1: Use CargoID 02 for Feature 01 (road vehicle) VehicleID 3E.
NightFang
Engineer
Engineer
Posts: 32
Joined: 02 Nov 2006 11:51

Re: how to make a tram set?

Post by NightFang »

ok, thank you for that, I will try messing around with that a bit later, but not now, to tired now
NightFang
Engineer
Engineer
Posts: 32
Joined: 02 Nov 2006 11:51

Re: how to make a tram set?

Post by NightFang »

Ok, to be more specific I need help finding out what a few of the values are for as they do not seem to be in the wiki.

Here is a line of the code that I am having trouble with: (This is from Zephyris Generic Tram Set that he showd me in another topic)
6 * 41 00 01 10 01 3A 00 F9 13 03 13 04 16 06 07 08 50 09 70 0F 23 10 00 11 6E 0E FF 1C 03 17 00 12 49
16 00 00 00 00 13 05 14 20
Here is what ones I already understand:
6 is the sprite
41 is the length
00 is the action
01 is for road vehicals
10 is the number of props to change
01 is the ammount of vehicles to change
3A is the ID of the one to be change

Now this is where it looses me, I cannot find the value of 00 in the wiki (I do not know what 00 changes), But what I do know with the help of Zephyris is that:
Property 1C (misc flags) is 01 - a so is a tram not a normal road vehicle.
Property 17 (callbacks) is 10, so an articulated vehicle.
Property 0E (graphics) is FF, so uses new graphics

So basicly I just need a bit of help finding what properties there are changing what values. As I as said,I'v looking through the wiki but cant seem to find the answer, mabye I'm just looking right over it, I dont know. Any and all help is appreciated.
User avatar
FooBar
Tycoon
Tycoon
Posts: 6553
Joined: 21 May 2007 11:47
Location: The Netherlands
Contact:

Re: how to make a tram set?

Post by FooBar »

Please don't ask the same question more than once.

You can find the answer to your question here.
Post Reply

Return to “Graphics Development”

Who is online

Users browsing this forum: Bing [Bot] and 13 guests