Articulated vehicles

Discussions about the technical aspects of graphics development, including NewGRF tools and utilities.

Moderator: Graphics Moderators

Post Reply
sky81
Engineer
Engineer
Posts: 45
Joined: 29 Oct 2019 05:49

Articulated vehicles

Post by sky81 »

I'm trying to figure out how to add an articulated vehicle but with no success. As starting point I've try to understand eGRVTS2
So I've deleted the last part, and remain to nfo code until "1 Horse Small Passenger Carriage". This vehicle contain the horse and the carriage. But there are several carriages with ids from FF 00 to FF 0B (starting from no2170 from nfo)
I saw that "1 Horse Small Passenger Carriage" is articulated with carriage with id FF 00 (because the actual passenger capacity is 4(from horse - no10795 in nfo) + 16 from carriage ID FF 00 (no2180 in nfo).
Can you tell me how to articulate the vehicle to another carriage? (example to carriage FF 02)?
I cannot figure out how to change the carriage
Thanks
Attachments
geo.nfo
(752.22 KiB) Downloaded 35 times
temporal8
Director
Director
Posts: 515
Joined: 17 May 2019 14:15

Re: Articulated vehicles

Post by temporal8 »

Hi, I suggest you leave NFO aside and use NML, it will be much easier to understand and much faster.

First you can understand how to make a simple vehicle, and then you can try the articulated one. It's not much different. The easiest way to do it is to create two vehicles and assign the second one as an articulated part of the first.

Here's an NML tutorial for a vehicle; it's several pages long:

https://www.tt-wiki.net/wiki/NMLTutorial/Road_vehicle
Real Projects 32bpp releases:

Real Semi Trucks 32bpp: viewtopic.php?t=90996
Real Houses Eyecandy Objects 32bp: viewtopic.php?t=90767
Real Ships 32bpp: viewtopic.php?t=90733
Real Industries 32bpp: viewtopic.php?t=90183
Real Houses Townset 32bp: viewtopic.php?p=1254605
Real Stations 32bpp: viewtopic.php?p=1255635
Real Cars 32bpp: viewtopic.php?p=1249244
Real Vehicles 32bpp: viewtopic.php?p=1253581
Real Bus 32bpp: viewtopic.php?p=1249245
Real Trucks 32bpp: viewtopic.php?p=1254468
Real Parks 32bpp: viewtopic.php?p=1250255
Argentina World Cup 2022 Champions Bus 32bpp viewtopic.php?p=1257026
sky81
Engineer
Engineer
Posts: 45
Joined: 29 Oct 2019 05:49

Re: Articulated vehicles

Post by sky81 »

Yes. I saw that nml is much easier. Still, I'm curios on the attached nfo how is the vehicle attached to the carriage. I spend a lot of time and could not figure out.
Thanks
User avatar
PikkaBird
Graphics Moderator
Graphics Moderator
Posts: 5631
Joined: 13 Sep 2004 13:21
Location: The Moon

Re: Articulated vehicles

Post by PikkaBird »

Decompiling nfo is not a great way to understand newgrf coding, as you lose any formatting and comments.

In any case, articulated vehicles in nfo are constructed using callback 16.
Post Reply

Return to “NewGRF Technical Discussions”

Who is online

Users browsing this forum: No registered users and 0 guests