GRFMaker will not code refits

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

Moderator: Graphics Moderators

Post Reply
oberhümer
Tycoon
Tycoon
Posts: 1283
Joined: 23 Oct 2009 19:35
Location: Here and there, sometime or another

GRFMaker will not code refits

Post by oberhümer »

I am trying to code a van in GRFMaker that can transport passengers, mail, goods or valuables. It works just the way I want it to, except I can´t refit it ingame, no matter which cargo is the default.
Just for clarity: I have set the cargoes as ``refittable cargo types´´.
I´ve attached the NFO and PCX, I´ll see if I can figure it out myself.(I´ve fumbled around a bit already.)

Otherwise, any advice?
Attachments
meins.NFO
(1.35 KiB) Downloaded 106 times
meins1.PCX
(2.72 KiB) Downloaded 102 times
--- Licenses: GNU LGPL, version 2 or newer, code and graphics. CC-By-SA, graphics, alternatively. If you're using any, I'd like to hear about it --- Call them "track types" ---
--- Mostly inactive developer for: NuTracks - Central European Train Set --- Running/compiling for: Linux (x86) - Android - Windows (32/64 bit) ---

--- Need a file packer? 7-Zip --- BOINC - use your computing power to benefit science --- Block trackers, not ads --- Unix in dispersible pellets, the formula for the future. ---
User avatar
AndersI
Tycoon
Tycoon
Posts: 1732
Joined: 19 Apr 2004 20:09
Location: Sweden
Contact:

Re: GRFMaker will not code refits

Post by AndersI »

It might be helpful if you attached the GRFMaker project...

Perhaps we should continue in the GRFMaker thread
oberhümer
Tycoon
Tycoon
Posts: 1283
Joined: 23 Oct 2009 19:35
Location: Here and there, sometime or another

Re: GRFMaker will not code refits

Post by oberhümer »

I´d like to, but the forum refuses to upload .lst files.
edit: Here it is, zipped.
Attachments
meins.zip
(857 Bytes) Downloaded 95 times
--- Licenses: GNU LGPL, version 2 or newer, code and graphics. CC-By-SA, graphics, alternatively. If you're using any, I'd like to hear about it --- Call them "track types" ---
--- Mostly inactive developer for: NuTracks - Central European Train Set --- Running/compiling for: Linux (x86) - Android - Windows (32/64 bit) ---

--- Need a file packer? 7-Zip --- BOINC - use your computing power to benefit science --- Block trackers, not ads --- Unix in dispersible pellets, the formula for the future. ---
User avatar
AndersI
Tycoon
Tycoon
Posts: 1732
Joined: 19 Apr 2004 20:09
Location: Sweden
Contact:

Re: GRFMaker will not code refits

Post by AndersI »

Zero out and turn off the "Refittable cargo classes" and "Non refittable cargo classes", then it will work for the "Available cargo types for refitting".

Don't ask me what the other two means, maybe you need to implement some callback to have refit work through them...
User avatar
PikkaBird
Graphics Moderator
Graphics Moderator
Posts: 5602
Joined: 13 Sep 2004 13:21
Location: The Moon

Re: GRFMaker will not code refits

Post by PikkaBird »

AndersI wrote:Don't ask me what the other two means, maybe you need to implement some callback to have refit work through them...
No, you don't, and you can (and should) use all three properties together.

http://wiki.ttdpatch.net/tiki-index.php ... sses_28_29_
User avatar
AndersI
Tycoon
Tycoon
Posts: 1732
Joined: 19 Apr 2004 20:09
Location: Sweden
Contact:

Re: GRFMaker will not code refits

Post by AndersI »

Thanks, any chance you could look at the NFO from the first post, and tell what GRFMaker is doing wrong?

Edit: I think I see it - GRFMaker is not doing anything wrong, it's the user data that's wrong. Wiki says:

Code: Select all

Refit list = (cargos from prop. 28 AND NOT cargos from prop. 29) XOR cargos from prop. 1D
so it's counterproductive to list the same cargo both in the cargo list and the cargo class list.

Please correct me if I am wrong again!
User avatar
PikkaBird
Graphics Moderator
Graphics Moderator
Posts: 5602
Joined: 13 Sep 2004 13:21
Location: The Moon

Re: GRFMaker will not code refits

Post by PikkaBird »

AndersI wrote:Thanks, any chance you could look at the NFO from the first post, and tell what GRFMaker is doing wrong?
Property 16 XORs (toggles) the cargos allowed by the cargo class properties. So what in effect he's doing is;

Prop 1D set to 000F; allow refitting to any cargo in the passenger, mail, express and armoured categories.
Prop 16 set to 00000425; XOR passengers, mail, goods and valuables.

Prop 1D turns the refittability for those cargos on, then 16 turns them off again.

Edit: yep, you're exactly right. :)
oberhümer
Tycoon
Tycoon
Posts: 1283
Joined: 23 Oct 2009 19:35
Location: Here and there, sometime or another

Re: GRFMaker will not code refits

Post by oberhümer »

Thanks everyone! I'll try if it works now.

(It does.)
--- Licenses: GNU LGPL, version 2 or newer, code and graphics. CC-By-SA, graphics, alternatively. If you're using any, I'd like to hear about it --- Call them "track types" ---
--- Mostly inactive developer for: NuTracks - Central European Train Set --- Running/compiling for: Linux (x86) - Android - Windows (32/64 bit) ---

--- Need a file packer? 7-Zip --- BOINC - use your computing power to benefit science --- Block trackers, not ads --- Unix in dispersible pellets, the formula for the future. ---
Post Reply

Return to “NewGRF Technical Discussions”

Who is online

Users browsing this forum: No registered users and 9 guests