Problem using var F2 in CB 2D

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

Moderator: Graphics Moderators

Post Reply
User avatar
George
Tycoon
Tycoon
Posts: 4362
Joined: 16 Apr 2003 16:09
Skype: george-vb
Location: Varna, Bulgaria
Contact:

Problem using var F2 in CB 2D

Post by George »

How can I use vehicle_cargo_subtype (var F2) at offset in colour_mapping CB?
I try to code the steamer in CC and I can't make the tender to be recoloured correctly
The steamer gets colour correctly (according var F2), while the tender stays in CC and does not want to change
https://dev.openttdcoop.org/projects/xu ... eam/s.pnml
lines 23-25
Image Image Image Image
frosch
OpenTTD Developer
OpenTTD Developer
Posts: 988
Joined: 20 Dec 2006 13:31
Location: Aschaffenburg

Re: Problem using var F2 in CB 2D

Post by frosch »

You are using livery overrides, so you are likely running into #5246.

Try adding

Code: Select all

colour_mapping: return CB_FAILED;
to

Code: Select all

item (FEAT_TRAINS, unitb)
⢇⡸⢸⠢⡇⡇⢎⡁⢎⡱⢸⡱⢸⣭⠀⢸⢜⢸⢸⣀⢸⣀⢸⣭⢸⡱⠀⢰⠭⡆⣫⠰⣉⢸⢸⠀⢰⠭⡆⡯⡆⢹⠁⠀⢐⠰⡁
User avatar
George
Tycoon
Tycoon
Posts: 4362
Joined: 16 Apr 2003 16:09
Skype: george-vb
Location: Varna, Bulgaria
Contact:

Re: Problem using var F2 in CB 2D

Post by George »

frosch wrote:You are using livery overrides, so you are likely running into #5246.
Try adding
Did not help :(
https://dev.openttdcoop.org/projects/xu ... 1a43ba138c
Image Image Image Image
User avatar
PikkaBird
Graphics Moderator
Graphics Moderator
Posts: 5601
Joined: 13 Sep 2004 13:21
Location: The Moon

Re: Problem using var F2 in CB 2D

Post by PikkaBird »

I don't know NML very well, but why is the offset -2 rather than -1?
User avatar
George
Tycoon
Tycoon
Posts: 4362
Joined: 16 Apr 2003 16:09
Skype: george-vb
Location: Varna, Bulgaria
Contact:

Re: Problem using var F2 in CB 2D

Post by George »

PikkaBird wrote:I don't know NML very well, but why is the offset -2 rather than -1?
Because the steamer (and tender) consists of 2 parts each. That happens because many of them are more than 32px long and I use the same template (4 part ARV) for every steamer with tender. For this one 6+1+4+1
Image Image Image Image
frosch
OpenTTD Developer
OpenTTD Developer
Posts: 988
Joined: 20 Dec 2006 13:31
Location: Aschaffenburg

Re: Problem using var F2 in CB 2D

Post by frosch »

Your GRF works for me.
The tender matches the colour of the engine for all 4 refits.
Attachments
xussr73655.png
xussr73655.png (17.64 KiB) Viewed 1843 times
⢇⡸⢸⠢⡇⡇⢎⡁⢎⡱⢸⡱⢸⣭⠀⢸⢜⢸⢸⣀⢸⣀⢸⣭⢸⡱⠀⢰⠭⡆⣫⠰⣉⢸⢸⠀⢰⠭⡆⡯⡆⢹⠁⠀⢐⠰⡁
User avatar
George
Tycoon
Tycoon
Posts: 4362
Joined: 16 Apr 2003 16:09
Skype: george-vb
Location: Varna, Bulgaria
Contact:

Re: Problem using var F2 in CB 2D

Post by George »

frosch wrote:Your GRF works for me.
The tender matches the colour of the engine for all 4 refits.
I had not the latest version of NMLC. I've updated it and now it works. Thank you!
Image Image Image Image
Post Reply

Return to “NewGRF Technical Discussions”

Who is online

Users browsing this forum: No registered users and 6 guests