Mail service disappears after installing Real Industries newgrf. (code)

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

Moderator: Graphics Moderators

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

Mail service disappears after installing Real Industries newgrf. (code)

Post by temporal8 »

Hello, yesterday a user reported to me that when installing Real Industries the mail service disappears and it is true, I checked it myself.

I have gone through my code and found nothing to make that happen, Do I need to add some line of code so that newgrf does not remove the mail production from the houses?

Before installing Real Industries newgrf:
before real industries.png
before real industries.png (58.55 KiB) Viewed 2157 times
After installing Real Industries newgrf:
after real industries.png
after real industries.png (57.69 KiB) Viewed 2157 times
These are the only Real Industries code lines where the Mail cargo appears:

Code: Select all

/********************************************
 * CARGO TABLES
*********************************************/
cargotable {
COAL,
GOOD,
GRAI,
IORE,
MAIL,
LVST,
OIL_,
PASS,
STEL,
VALU,
WOOD,
MAIZ,
WDPR,
WORK,	
STUD,
OTI2,
TRSH,
VEHI,
PRIS,
FOOD,
PLAY,
PETR,
RUBR,
PLAS,
TYRE,
HVEH,
}

Code: Select all

   spriteset(cargoicon_mail) { [10 + 20 * 2, 10 + 20 * 0, 10, 10, 0, 0, "gfx/other/cargoicons.png"] }

    item(FEAT_CARGOS, mail, 5) {
        property {
            number: 5;
            type_name: TTD_STR_CARGO_PLURAL_MAIL;
            unit_name: TTD_STR_CARGO_SINGULAR_MAIL;
            type_abbreviation: TTD_STR_ABBREV_MAIL;
            sprite: NEW_CARGO_SPRITE;
            weight: 0.25;
            station_list_colour: 15;
            cargo_payment_list_colour: 15;
            is_freight: 1;
            cargo_classes: bitmask(CC_MAIL);
            cargo_label: "MAIL";
            town_growth_effect: TOWNGROWTH_MAIL;
            town_growth_multiplier: 1.0;
            units_of_cargo: TTD_STR_BAGS;
            items_of_cargo: TTD_STR_QUANTITY_MAIL;
            penalty_lowerbound: 6;
            single_penalty_length: 24;
            price_factor: 156;
            capacity_multiplier: 2;
        }
        graphics {
            cargoicon_mail;
        }
    }
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
Brickblock1
Engineer
Engineer
Posts: 117
Joined: 04 Apr 2022 12:44
Location: The openttd discord server

Re: Mail service disappears after installing Real Industries newgrf. (code)

Post by Brickblock1 »

I believe your problem comes from mail having id and number 5. In order for it to work correctly you should use id and number 2. This is because houses don't use labels for mail but rather id/number. This same issue also breaks some old airplane sets.
Eddi
Tycoon
Tycoon
Posts: 8272
Joined: 17 Jan 2007 00:14

Re: Mail service disappears after installing Real Industries newgrf. (code)

Post by Eddi »

while here, you should probably also make sure that GOOD and FOOD are in the same places as the original cargos.

compare with the "Slot (ID)" column here
temporal8
Route Supervisor
Route Supervisor
Posts: 430
Joined: 17 May 2019 14:15

Re: Mail service disappears after installing Real Industries newgrf. (code)

Post by temporal8 »

Thanks A LOT guys! :bow:
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
Post Reply

Return to “NewGRF Technical Discussions”

Who is online

Users browsing this forum: No registered users and 9 guests