I'm trying to create an additional passenger type called VIP. It compiles, but I get some odd results. If I don't item stub to the PASS cargo (but don't make any mods), then my industry doesn't see the type and vehicles can be somewhat refitted. By putting the item stub in there, it seems to work, but when I go to refit an aircraft, it comes up as "7 tonnes of coal" despite no reference to coal being in my grf at all.
I've removed pretty much everything I was trying to muck with and boiled it down to just the one cargo and one industry so I can test. For my testing, the only other newgrf I'm loading is "Use-able Default Aircraft" in order to get the refit option. I even removed nearly all the inline comments, just in case.
vip.nml
Code: Select all
grf {
grfid: "KK\02\01";
name: string(STR_GRF_NAME);
desc: string(STR_GRF_DESCRIPTION);
version: 0;
min_compatible_version: 0;
}
/* declare the cargos that will be used in the GRF with their 4 letter labels
http://www.tt-wiki.net/wiki/NMLTutorial/Cargotable */
cargotable {
PASS, VIPS, OIL_, MAIL
}
/* create a new cargo
http://newgrf-specs.tt-wiki.net/wiki/NML:Cargos */
item (FEAT_CARGOS, cargo_pass, 0) {
property {
number: 00;
}
}
item (FEAT_CARGOS, cargo_vips) {
property {
number: 31;
type_name: string(STR_CARGO_VIPS);
unit_name: string(STR_CARGO_SINGLE_VIPS);
units_of_cargo: string(STR_CARGO_VIPS);
type_abbreviation: string(STR_CARGO_ABBR_VIPS);
sprite: 4297;
weight: 1;
penalty_lowerbound: 0;
single_penalty_length: 18;
price_factor: 10000;
station_list_colour: 97;
cargo_payment_list_colour: 97;
is_freight: 0;
cargo_classes: bitmask(CC_PASSENGERS);
cargo_label: "VIPS";
town_growth_effect: TOWNGROWTH_NONE;
capacity_multiplier: 0.5;
}
}
/* create or modify an industry
http://newgrf-specs.tt-wiki.net/wiki/NML:Industries */
item(FEAT_INDUSTRIES, industry_lngp) {
property {
substitute: INDUSTRYTYPE_OIL_RIG;
override: INDUSTRYTYPE_OIL_RIG;
prod_cargo_types: [VIPS,OIL_];
accept_cargo_types: [VIPS,MAIL];
prod_multiplier: [1,15];
min_cargo_distr: 2;
prob_random: 20;
prob_in_game: 20;
}
}
Code: Select all
##grflangid 0x00
# English US language file
# GRF info
STR_GRF_NAME : {TITLE} {VERSION}
STR_GRF_DESCRIPTION :First class travel isn't enough for these passengers...
# Cargo
STR_CARGO_VIPS :VIPs
STR_CARGO_SINGLE_VIPS :VIP
STR_CARGO_QUANTITY_VIPS :{COMMA} VIPs
STR_CARGO_ABBR_VIPS :{TINYFONT}VP
Code: Select all
VERSION :alpha-05
UPDATEDT :03 01 2013
TITLE :VIPs (Very Important Passengers)
AUTHOR :Kris Knowlton
COPYRIGHTDT :2013
LICENSE :GPL v2
I'm running Mac OS 10.6.8 and have the latest nightly NML build.
Thanks!
edit: cropped the description so it fit on the screen better.