Help with Vehicle coding, Liverys.

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

Moderator: Graphics Moderators

Post Reply
temporal8
Route Supervisor
Route Supervisor
Posts: 429
Joined: 17 May 2019 14:15

Help with Vehicle coding, Liverys.

Post by temporal8 »

Hello, I am learning a bit of nfo coding and I started to make a set of vehicles in 32bpp, I already understood how to put vehicles into the game and I have 3 of them working.

My question is the following: I want each vehicle to have several color options, for example: if I buy a car, I want it to be able to choose in white, black or red, that is liverys as I understand it.

Predefined colors not company colors, I have the graphics of each color ready but I need to understand how to make it work in the code.

I am going through the wiki but I did not find the part referring to Liverys or it is incomplete.

https://www.tt-wiki.net/wiki/NFOTutorial

Thanks in advance.
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
User avatar
Erato
Chief Executive
Chief Executive
Posts: 740
Joined: 25 May 2015 09:09
Location: The Netherlands

Re: Help with Vehicle coding, Liverys.

Post by Erato »

In NML you would use two switches based on cargo subtype.
https://newgrf-specs.tt-wiki.net/wiki/C ... y_.2819.29
This might have the info you need.
No pics no clicks. Seriously.
ImageImageImageImageImageImage
Post Reply

Return to “NewGRF Technical Discussions”

Who is online

Users browsing this forum: No registered users and 5 guests