
Heck, the same and the same and the same again.....

"nmlc: error: Error: only a single nml file can be read per run"

That's what the (Heck!) Command Prompt always says.

(Sorry too for always asking about this, I just want to learn....

Moderator: Graphics Moderators
Code: Select all
"gfx/BB series sprite"
Code: Select all
/* Define grf */
grf {
grfid: "NML\00";
/* GRF name and description strings are defined in the lang files */
name: string(STR_GRF_NAME);
desc: string(STR_GRF_DESC);
/* This is the first version, start numbering at 0. */
version: 0;
min_compatible_version: 0;
}
/* Define a rail type table,
* this allows referring to railtypes
* irrespective of the grfs loaded.
*/
railtypetable {
RAIL, ELRL, MONO, MGLV,
}
/* Basic template for 4 vehicle views, help me on correcting this */
template tmpl_vehicle_basic(x, y) {
// arguments x, y: coordinates of top-left corner of first sprite
[x, y, 10, 26, -3, -12] //xpos ypos xsize ysize xrel yrel
[x + 9, y, 22, 20, -14, -12]
[x + 32, y, 32, 16, -16, -12]
[x + 65, y, 22, 20, -6, -12]
}
/* Template for a vehicle with only 4 views (symmetric) */
template tmpl_vehicle_4_views(num) {
// argument num: Index in the graphics file, assuming vertical ordering of vehicles
tmpl_vehicle_basic(1, 1 + 32 * num)
}
/* Template for a vehicle with 8 views (non-symmetric) */
template tmpl_vehicle_8_views(num, reversed) {
// argument num: Index in the graphics file, assuming vertical ordering of vehicles
// argument reversed: Reverse visible orientation of vehicle, if set to 1
tmpl_vehicle_basic(reversed ? 89 : 1, 1 + 32 * num)
tmpl_vehicle_basic(reversed ? 1 : 89, 1 + 32 * num)
}
/* Template for a single vehicle sprite */
template tmpl_vehicle_single(num, xsize, ysize, xoff, yoff) {
[1, 1 + 32 * num, xsize, ysize, xoff, yoff]
}
/* Define the spritesets, these allow referring to these sprites later on */
spriteset (set_icm_front_lighted, "BB series sprite.png") { tmpl_vehicle_8_views(0, 0) }
spriteset (set_icm_rear_lighted, "BB series sprite.png") { tmpl_vehicle_8_views(1, 1) }
spriteset (set_icm_front, "BB series sprite.png") { tmpl_vehicle_8_views(2, 0) }
spriteset (set_icm_rear, "BB series sprite.png") { tmpl_vehicle_8_views(3, 1) }
spriteset (set_icm_middle, "BB series sprite.png") { tmpl_vehicle_4_views(4) }
spriteset (set_icm_purchase, "BB series sprite.png") { tmpl_vehicle_single(5, 53, 14, -25, -10) }
spriteset (set_icm_invisible, "BB series sprite.png") { tmpl_vehicle_single(6, 1, 1, 0, 0) }
/* Define the actual train */
item(FEAT_TRAINS, item_icm) {
/* Define properties first, make sure to set all of them */
property {
name: string(STR_ICM_NAME);
// not available in toyland:
climates_available: bitmask(CLIMATE_TEMPERATE, CLIMATE_ARCTIC, CLIMATE_TROPICAL);
introduction_date: date(19, 1, 1);
model_life: VEHICLE_NEVER_EXPIRES;
vehicle_life: 30;
reliability_decay: 20;
refittable_cargo_classes: bitmask();
non_refittable_cargo_classes: bitmask();
// refitting is done via cargo classes only, no cargoes need explicit enabling/disabling:
cargo_disallow_refit: [];
// It's an intercity train, loading is relatively slow:
loading_speed: 6;
cost_factor: 45;
running_cost_factor: 100; // Changed by callback
sprite_id: SPRITE_ID_NEW_TRAIN;
speed: 110 km/h; // actually 140, but there are rounding errors
misc_flags: bitmask(TRAIN_FLAG_2CC, TRAIN_FLAG_MU);
refit_cost: 0; //refit costs don't apply to subcargo display
// callback flags are not set manually
track_type: RAIL; // from rail type table
ai_special_flag: AI_FLAG_PASSENGER;
power: 1260 kW; // Changed by CB
running_cost_base: RUNNING_COST_DIESEL;
dual_headed: 0;
cargo_capacity: 0; // per part, changed by callback
weight: 75 ton; // Total, changed by callback
ai_engine_rank: 0; // not intended to be used by the ai
engine_class: ENGINE_CLASS_DIESEL;
extra_power_per_wagon: 0 kW;
// 4/12 of weight on driving wheels, with a default friction coefficient of 0.3:
tractive_effort_coefficient: 0.3 / 3; // changed by callback
air_drag_coefficient: 0.1;
length: VEHICLE_LENGTH;
// Overridden by callback to disable for non-powered wagons
visual_effect_and_powered: visual_effect_and_powered(VISUAL_EFFECT_DIESEL, 2, DISABLE_WAGON_POWER);
extra_weight_per_wagon: 0 ton;
bitmask_vehicle_info: 0;
}
/* Define graphics and callbacks
* Setting all callbacks is not needed, only define what is used */
graphics {
default: set_icm_front_lighted;
}
}
Code: Select all
D:\New folder>nmlc -c --grf ITP_try.grf ITP_try.nml
Oh that. Well, that means that NML will determine the palette for the grf for you. It'll use the Windows palette if all your graphics files are in the Windows palette, or the DOS one in all other cases. Your graphics files still need to be in one of those two palettes though.Yoursnotmine wrote:The ANY palette was described in nmlc option -p or --palette=
Paint doesn't understand palettes, so noYoursnotmine wrote:Well, for the paletted images itself, does anyone have a palette for MS Paint ?
I would avoid spaces in any folder or file name. But apart from that the command is fine.Yoursnotmine wrote:the command I usually use to run it
Make sure to uncheck Remove unused colors from colormap.
Code: Select all
Error: "The _imaging c module is not installed".
Users browsing this forum: No registered users and 7 guests