grf {
grfid : "WIRE";
name : string(STR_GRF_NAME);
desc : string(STR_GRF_DESCRIPTION);
url : string(STR_GRF_WEBSITE);
version: 1;
min_compatible_version: 1;
param {
param_vehicle_graphics {
name: string(STR_VEHICLE_GRAPHICS_NAME);
desc: string(STR_VEHICLE_GRAPHICS_DESC);
//type: int;
min_value: 1;
max_value: 1;
def_value: 1;
names: {
1: string(STR_PARAM_SPARKS);
//2: string(STR_PARAM_ARROWS);
};
}
}
}
cargotable {
COAL, OIL_, ELTR
}
railtypetable {
RAIL, ELRL, MONO, MGLV, WIRE
}
spriteset(empty, "empty.png") {
[0, 0]
}
spriteset(level_crossing_set, "empty.png") {
[0, 0, "empty.png"]
[0, 0, "empty.png"]
[0, 0, "empty.png"]
[0, 0, "empty.png"]
[0, 0, "empty.png"]
[0, 0, "empty.png"]
}
spriteset(empty_fence_set, "empty.png") {
[0, 0, "empty.png"]
[0, 0, "empty.png"]
[0, 0, "empty.png"]
[0, 0, "empty.png"]
[0, 0, "empty.png"]
[0, 0, "empty.png"]
[0, 0, "empty.png"]
[0, 0, "empty.png"]
}
spriteset(empty_overlay_set, "empty.png") {
[0, 0, "empty.png"]
[0, 0, "empty.png"]
[0, 0, "empty.png"]
[0, 0, "empty.png"]
[0, 0, "empty.png"]
[0, 0, "empty.png"]
[0, 0, "empty.png"]
[0, 0, "empty.png"]
[0, 0, "empty.png"]
[0, 0, "empty.png"]
}
spriteset(empty_underlay_set, "empty.png") {
[0, 0, "empty.png"]
[0, 0, "empty.png"]
[0, 0, "empty.png"]
[0, 0, "empty.png"]
[0, 0, "empty.png"]
[0, 0, "empty.png"]
[0, 0, "empty.png"]
[0, 0, "empty.png"]
[0, 0, "empty.png"]
[0, 0, "empty.png"]
[0, 0, "empty.png"]
[0, 0, "empty.png"]
[0, 0, "empty.png"]
[0, 0, "empty.png"]
[0, 0, "empty.png"]
[0, 0, "empty.png"]
}
spriteset(nospark_set, "dark.png") {
[0, 0]
}
spriteset(arrow_set, "empty.png") {
[0, 0]
}
spriteset(spark_1_set, "N\1.png") {
[-2, -16, "N\1.png"]
[-8, -10, "NE\1.png"]
[1, -11, "E\1.png"]
[3, -11, "SE\1.png"]
[-2, -9, "S\1.png"]
[-9, -10, "SW\1.png"]
[-4, -11, "W\1.png"]
[4, -12, "NW\1.png"]
}
spriteset(spark_2_set, "N\2.png") {
[-2, -16, "N\2.png"]
[-8, -10, "NE\2.png"]
[1, -11, "E\2.png"]
[3, -11, "SE\2.png"]
[-2, -9, "S\2.png"]
[-9, -10, "SW\2.png"]
[-4, -11, "W\2.png"]
[4, -12, "NW\2.png"]
}
spriteset(spark_3_set, "N\3.png") {
[-2, -16, "N\3.png"]
[-8, -10, "NE\3.png"]
[1, -11, "E\3.png"]
[3, -11, "SE\3.png"]
[-2, -9, "S\3.png"]
[-9, -10, "SW\3.png"]
[-4, -11, "W\3.png"]
[4, -12, "NW\3.png"]
}
spriteset(spark_4_set, "N\4.png") {
[-2, -16, "N\4.png"]
[-8, -10, "NE\4.png"]
[1, -11, "E\4.png"]
[3, -11, "SE\4.png"]
[-2, -9, "S\4.png"]
[-9, -10, "SW\4.png"]
[-4, -11, "W\4.png"]
[4, -12, "NW\4.png"]
}
spriteset(spark_purchase_set, "W\1.png") {
[-4, -1]
}
spriteset(eltr_cargo_icon, "cargo icon.png") {
[3, -1]
}
switch (FEAT_TRAINS, SELF, spark_anim_switch, motion_counter % 8) {
0: spark_1_set;
1: spark_1_set;
2: spark_2_set;
3: spark_2_set;
4: spark_3_set;
5: spark_3_set;
6: spark_4_set;
7: spark_4_set;
CB_FAILED;
}
switch(FEAT_TRAINS, SELF, spark_viewport_switch, extra_callback_info1) {
/* Decide whether vehicle is drawn on map or in a special window */
0x00: spark_anim_switch;
0x10..0x12: spark_purchase_set;
return spark_purchase_set;
}
switch (FEAT_TRAINS, SELF, spark_gfx_switch, param_vehicle_graphics) {
1: spark_viewport_switch;
2: arrow_set;
3: nospark_set;
CB_FAILED;
}
switch (FEAT_TRAINS, SELF, spark_vfx_switch, param_vehicle_graphics) {
1: visual_effect_and_powered(VISUAL_EFFECT_ELECTRIC, 0, DISABLE_WAGON_POWER);
2: visual_effect_and_powered(VISUAL_EFFECT_DISABLE, 0, DISABLE_WAGON_POWER);
CB_FAILED;
}
switch (FEAT_TRAINS, SELF, spark_sfx_switch, extra_callback_info1) {
SOUND_EVENT_START: CB_RESULT_NO_SOUND;
SOUND_EVENT_TUNNEL: SOUND_ELECTRIC_SPARK;
CB_FAILED;
}
item (FEAT_CARGOS, electricity, 12) {
property {
number: 31;
type_name: string(STR_NAME_ELECTRICITY);
unit_name: string(STR_NAME_ELECTRICITY);
units_of_cargo: string(STR_SHORT_KWH);
items_of_cargo: string(STR_UNITS_ELECTRICITY);
type_abbreviation: string(STR_TINY_ELECTRICITY);
sprite: NEW_CARGO_SPRITE;
weight: 0.001;
is_freight: 1;
price_factor: 15;
station_list_colour: 161;
cargo_payment_list_colour: 161;
cargo_classes: bitmask(CC_SPECIAL);
cargo_label: "ELTR";
town_growth_effect: TOWNGROWTH_GOODS;
town_growth_multiplier: 1.0;
}
graphics {
default: eltr_cargo_icon;
}
}
produce(produce_eltr, 250, 0, 0, 500, 0);
produce(produce_eltr_256, 0, 0, 0, 50, 0);
item (FEAT_INDUSTRIES, pplant_override) {
property {
substitute: INDUSTRYTYPE_POWER_PLANT;
override: INDUSTRYTYPE_POWER_PLANT;
life_type: IND_LIFE_TYPE_PROCESSING;
prod_cargo_types: [ELTR];
prod_multiplier: [50, 0];
input_multiplier_1: [2, 0];
}
graphics {
produce_cargo_arrival: produce_eltr;
//produce_256_ticks: produce_eltr_256;
}
}
item(FEAT_INDUSTRYTILES, substation_tile_1) {
property {
substitute: 9;
override: 9;
accepted_cargos: [[ELTR, 8]];
}
}
item(FEAT_INDUSTRYTILES, substation_tile_2) {
property {
substitute: 10;
override: 10;
accepted_cargos: [[ELTR, 8]];
}
}
tilelayout tilelayout_substation_1 {
0, 0: substation_tile_2;
}
tilelayout tilelayout_substation_2 {
0, 0: substation_tile_2;
1, 0: substation_tile_1;
}
tilelayout tilelayout_substation_3 {
0, 0: substation_tile_1;
1, 0: substation_tile_2;
}
tilelayout tilelayout_substation_4 {
0, 0: substation_tile_1;
0, 1: substation_tile_2;
}
tilelayout tilelayout_substation_5 {
0, 0: substation_tile_2;
0, 1: substation_tile_1;
}
tilelayout tilelayout_substation_6 {
0, 0: substation_tile_2;
0, 1: substation_tile_2;
}
tilelayout tilelayout_substation_7 {
0, 0: substation_tile_2;
0, 1: substation_tile_2;
}
item (FEAT_INDUSTRIES, substation) {
property {
substitute: 0;
layouts: [tilelayout_substation_1, tilelayout_substation_2, tilelayout_substation_3, tilelayout_substation_4, tilelayout_substation_5, tilelayout_substation_6, tilelayout_substation_7];
life_type: IND_LIFE_TYPE_BLACK_HOLE;
name: string(STR_NAME_SUBSTATION);
nearby_station_name: string(STR_STATION, string(STR_TOWN), string(STR_NAME_SUBSTATION));
new_ind_msg: TTD_STR_NEWS_INDUSTRY_CONSTRUCTION;
prod_cargo_types: [];
accept_cargo_types: [ELTR];
prod_multiplier: [0, 0];
input_multiplier_1: [0, 0];
input_multiplier_2: [0, 0];
input_multiplier_3: [0, 0];
min_cargo_distr: 2;
conflicting_ind_types: [];
spec_flags: bitmask(IND_FLAG_BUILT_NEAR_TOWN);
prob_random: 14;
prob_in_game: 14;
prospect_chance: 0.75;
fund_cost_multiplier: 1;
random_sound_effects: [SOUND_ELECTRIC_SPARK];
remove_cost_multiplier: 0;
map_colour: 161;
}
}
item (FEAT_TRAINS, DC_transmitter) {
property {
name: string(STR_NAME_DC_TRANSMITTER);
climates_available: ALL_CLIMATES;
introduction_date: date(1882,1,1);
model_life: 30;
retire_early: 3;
vehicle_life: 7;
sprite_id: SPRITE_ID_NEW_TRAIN;
speed: 18000;
running_cost_base: RUNNING_COST_ELECTRIC;
track_type: WIRE;
power: 5000 hp;
weight: 0.0001;
air_drag_coefficient: 0.0001;
cargo_capacity: 10;
loading_speed: 10;
length: 2;
visual_effect_and_powered: visual_effect_and_powered(VISUAL_EFFECT_ELECTRIC, 0, DISABLE_WAGON_POWER);
cost_factor: 10;
running_cost_factor: 20;
cargo_allow_refit: [ELTR];
cargo_age_period: 1;
}
graphics {
default: spark_gfx_switch;
//purchase: DC_transmitter_purchase_set;
purchase: spark_purchase_set;
additional_text: string(STR_DC_TRANSMITTER_ADDITIONAL_TEXT);
sound_effect: spark_sfx_switch;
visual_effect_and_powered: spark_vfx_switch;
}
}
item (FEAT_TRAINS, AC_transmitter) {
property {
name: string(STR_NAME_AC_TRANSMITTER);
climates_available: ALL_CLIMATES;
introduction_date: date(1891,1,1);
model_life: 30;
retire_early: 3;
vehicle_life: 10;
sprite_id: SPRITE_ID_NEW_TRAIN;
speed: 18000;
running_cost_base: RUNNING_COST_ELECTRIC;
track_type: WIRE;
power: 10000 hp;
weight: 0.0001;
air_drag_coefficient: 0.0001;
cargo_capacity: 20;
loading_speed: 20;
length: 2;
visual_effect_and_powered: visual_effect_and_powered(VISUAL_EFFECT_ELECTRIC, 0, DISABLE_WAGON_POWER);
cost_factor: 20;
running_cost_factor: 15;
cargo_allow_refit: [ELTR];
cargo_age_period: 2;
}
graphics {
default: spark_gfx_switch;
//purchase: AC_transmitter_purchase_set;
purchase: spark_purchase_set;
additional_text: string(STR_AC_TRANSMITTER_ADDITIONAL_TEXT);
sound_effect: spark_sfx_switch;
visual_effect_and_powered: spark_vfx_switch;
}
}
item (FEAT_TRAINS, HVAC_transmitter) {
property {
name: string(STR_NAME_HVAC_TRANSMITTER);
climates_available: ALL_CLIMATES;
introduction_date: date(1907,1,1);
model_life: 40;
retire_early: 0;
vehicle_life: 20;
sprite_id: SPRITE_ID_NEW_TRAIN;
speed: 18000;
running_cost_base: RUNNING_COST_ELECTRIC;
track_type: WIRE;
power: 12500 hp;
weight: 0.0001;
air_drag_coefficient: 0.0001;
cargo_capacity: 40;
loading_speed: 40;
length: 2;
visual_effect_and_powered: visual_effect_and_powered(VISUAL_EFFECT_ELECTRIC, 0, DISABLE_WAGON_POWER);
cost_factor: 25;
running_cost_factor: 18;
cargo_allow_refit: [ELTR];
cargo_age_period: 3;
}
graphics {
default: spark_gfx_switch;
//purchase: HVAC_transmitter_purchase_set;
purchase: spark_purchase_set;
additional_text: string(STR_HVAC_TRANSMITTER_ADDITIONAL_TEXT);
sound_effect: spark_sfx_switch;
visual_effect_and_powered: spark_vfx_switch;
}
}
item (FEAT_TRAINS, VHVAC_transmitter) {
property {
name: string(STR_NAME_VHVAC_TRANSMITTER);
climates_available: ALL_CLIMATES;
introduction_date: date(1923,1,1);
model_life: 40;
retire_early: 0;
vehicle_life: 25;
sprite_id: SPRITE_ID_NEW_TRAIN;
speed: 18000;
running_cost_base: RUNNING_COST_ELECTRIC;
track_type: WIRE;
power: 15000 hp;
weight: 0.0001;
air_drag_coefficient: 0.0001;
cargo_capacity: 80;
loading_speed: 80;
length: 2;
visual_effect_and_powered: visual_effect_and_powered(VISUAL_EFFECT_ELECTRIC, 0, DISABLE_WAGON_POWER);
cost_factor: 32;
running_cost_factor: 20;
cargo_allow_refit: [ELTR];
cargo_age_period: 4;
}
graphics {
default: spark_gfx_switch;
//purchase: HVAC_transmitter_purchase_set;
purchase: spark_purchase_set;
additional_text: string(STR_VHVAC_TRANSMITTER_ADDITIONAL_TEXT);
sound_effect: spark_sfx_switch;
visual_effect_and_powered: spark_vfx_switch;
}
}
item (FEAT_TRAINS, EHVAC_transmitter) {
property {
name: string(STR_NAME_EHVAC_TRANSMITTER);
climates_available: ALL_CLIMATES;
introduction_date: date(1953,1,1);
model_life: 40;
retire_early: 0;
vehicle_life: 25;
sprite_id: SPRITE_ID_NEW_TRAIN;
speed: 18000;
running_cost_base: RUNNING_COST_ELECTRIC;
track_type: WIRE;
power: 17500 hp;
weight: 0.0001;
air_drag_coefficient: 0.0001;
cargo_capacity: 150;
loading_speed: 150;
length: 2;
visual_effect_and_powered: visual_effect_and_powered(VISUAL_EFFECT_ELECTRIC, 0, DISABLE_WAGON_POWER);
cost_factor: 42;
running_cost_factor: 22;
cargo_allow_refit: [ELTR];
cargo_age_period: 5;
}
graphics {
default: spark_gfx_switch;
//purchase: HVAC_transmitter_purchase_set;
purchase: spark_purchase_set;
additional_text: string(STR_EHVAC_TRANSMITTER_ADDITIONAL_TEXT);
sound_effect: spark_sfx_switch;
visual_effect_and_powered: spark_vfx_switch;
}
}
item (FEAT_TRAINS, UHVAC_transmitter) {
property {
name: string(STR_NAME_UHVAC_TRANSMITTER);
climates_available: ALL_CLIMATES;
introduction_date: date(1982,1,1);
model_life: VEHICLE_NEVER_EXPIRES;
retire_early: 0;
vehicle_life: 30;
sprite_id: SPRITE_ID_NEW_TRAIN;
speed: 18000;
running_cost_base: RUNNING_COST_ELECTRIC;
track_type: WIRE;
power: 20000 hp;
weight: 0.0001;
air_drag_coefficient: 0.0001;
cargo_capacity: 250;
loading_speed: 250;
length: 2;
visual_effect_and_powered: visual_effect_and_powered(VISUAL_EFFECT_ELECTRIC, 0, DISABLE_WAGON_POWER);
cost_factor: 50;
running_cost_factor: 25;
cargo_allow_refit: [ELTR];
cargo_age_period: 6;
}
graphics {
default: spark_gfx_switch;
//purchase: HVAC_transmitter_purchase_set;
purchase: spark_purchase_set;
additional_text: string(STR_UHVAC_TRANSMITTER_ADDITIONAL_TEXT);
sound_effect: spark_sfx_switch;
visual_effect_and_powered: spark_vfx_switch;
}
}
item (FEAT_RAILTYPES, power_lines) {
property {
label: "WIRE";
introduction_date: date(1882,1,1);
name: string(STR_NAME_POWER_LINES);
toolbar_caption: string(STR_POWER_LINES_TOOLBAR);
menu_text: string(STR_POWER_LINES_MENU);
build_window_caption: string(STR_POWER_LINES_BUILD_WINDOW);
autoreplace_text: string(STR_POWER_LINES_AUTOREPLACE);
new_engine_text: string(STR_POWER_LINES_NEW_ENGINE);
compatible_railtype_list: ["WIRE"];
powered_railtype_list: ["WIRE"];
railtype_flags: bitmask(RAILTYPE_FLAG_CATENARY);
curve_speed_multiplier: 255;
station_graphics: RAILTYPE_STATION_MAGLEV;
construction_cost: 1;
speed_limit: 0;
acceleration_model: ACC_MODEL_MAGLEV;
map_colour: 161;
sort_order: 249;
maintenance_cost: 1;
}
graphics {
//gui: gui_set;
track_overlay: empty_overlay_set;
underlay: empty_underlay_set;
//tunnels: empty;
//catenary_wire: TBD;
//catenary_pylons: TBD;
//bridge_surfaces: empty;
level_crossings: level_crossing_set;
//depots: depots_set;
fences: empty_fence_set;
//tunnel_overlay: dunno yet;
signals: empty_fence_set;
}
}