diff --git a/docs/SpriteIDs.xlsx b/docs/SpriteIDs.xlsx index 70e43f1..3151c74 100644 Binary files a/docs/SpriteIDs.xlsx and b/docs/SpriteIDs.xlsx differ diff --git a/docs/changelog.txt b/docs/changelog.txt index 08a45e3..749201c 100644 --- a/docs/changelog.txt +++ b/docs/changelog.txt @@ -7,6 +7,7 @@ # v2.13 - Added LNER J70 +- Added Class 68 + Mk3 rake # v2.12 (2024-08-08) - Added LMS Black 5 diff --git a/gfx/BR68_v2.png b/gfx/BR68_v2.png index 465676c..d08e1eb 100644 Binary files a/gfx/BR68_v2.png and b/gfx/BR68_v2.png differ diff --git a/gfx/Rolling Stock/Mk3/BRMk3_Standalone.png b/gfx/Rolling Stock/Mk3/BRMk3_Standalone.png new file mode 100644 index 0000000..aa36fa0 Binary files /dev/null and b/gfx/Rolling Stock/Mk3/BRMk3_Standalone.png differ diff --git a/lang/english.lng b/lang/english.lng index 08a70a4..f7f64d9 100644 --- a/lang/english.lng +++ b/lang/english.lng @@ -188,6 +188,7 @@ STR_NAME_SheffieldSupertram :Sheffield Supertram (3-car Single Unit) STR_NAME_SheffieldCitylink :Sheffield Class 399 Citylink (3-car Single Unit) STR_BR_68_5A :BR Class 68 + "Nova 2" Mark 5A set (5-Car + locomotive) +STR_BR_68_6Mk3 :BR Class 68 + Mk3 set (6-Car + DVT + locomotive) STR_BR_195_2CAR :BR Class 195/0 "Civity" (2-Car) STR_BR_195_3CAR :BR Class 195/1 "Civity" (3-Car) diff --git a/src/sortpurchase.pnml b/src/sortpurchase.pnml index 5137795..b709521 100644 --- a/src/sortpurchase.pnml +++ b/src/sortpurchase.pnml @@ -41,6 +41,7 @@ sort(FEAT_TRAINS, [ item_BR66, item_BR67, item_BR68, + item_br_68_6Mk3, item_br_68_5a, item_BR70OG, item_BR70, diff --git a/src/trains/diesel_loco/BR068.pnml b/src/trains/diesel_loco/BR068.pnml index 5ef3424..8892120 100644 --- a/src/trains/diesel_loco/BR068.pnml +++ b/src/trains/diesel_loco/BR068.pnml @@ -77,7 +77,7 @@ item (FEAT_TRAINS, item_BR68, 196) { dual_headed: 0; default_cargo_type: GOOD; cargo_capacity: 1; - weight: 85 ton; + weight: 327 ton; engine_class: ENGINE_CLASS_DIESEL; tractive_effort_coefficient: 0.31; air_drag_coefficient: 0.1; diff --git a/src/trains/diesel_loco/BR068_6Mk3.pnml b/src/trains/diesel_loco/BR068_6Mk3.pnml new file mode 100644 index 0000000..541769c --- /dev/null +++ b/src/trains/diesel_loco/BR068_6Mk3.pnml @@ -0,0 +1,104 @@ +spriteset (spriteset_br_68_6Mk3_purchase, "gfx/BR68_v2.png") { + template_purchase(181, 0) +} + +spriteset (spriteset_BRMk3standalone_Chiltern, "gfx/Rolling Stock/Mk3/BRMk3_Standalone.png") { + template_train32px(0, 13) +} + +switch(FEAT_TRAINS, PARENT, sw_br_68_6Mk3_rear, vehicle_is_reversed) { + 0: spriteset_BRMk3DVT_Chiltern_reversed; + 1: spriteset_BR68_Chiltern; +} + +switch(FEAT_TRAINS, PARENT, sw_br_68_6Mk3_front, vehicle_is_reversed) { + 0: spriteset_BR68_Chiltern; + 1: spriteset_BRMk3DVT_Chiltern; +} + +// Choose sprites depending on car position +switch(FEAT_TRAINS, SELF, switch_br_68_6Mk3_spriteset, position_in_articulated_veh % 8) { + 0: sw_br_68_6Mk3_front; + 7: sw_br_68_6Mk3_rear; + spriteset_BRMk3standalone_Chiltern; +} + +// Define articulations +switch(FEAT_TRAINS, SELF, switch_br_68_6Mk3_articulated, extra_callback_info1) { + // extra_callback_info1 returns the car number, so 1 is the second car, .. so on + // The callback runs this switch until it returns NO_MORE_ARTICULATED_PARTS, which ends the growth + 1..7: return item_br_68_6Mk3; + return CB_RESULT_NO_MORE_ARTICULATED_PARTS; // Stop adding more cars +} + +// Start/stop switch, used to limit maximum length +switch(FEAT_TRAINS, SELF, switch_br_68_6Mk3_start_stop, num_vehs_in_consist) { + return CB_RESULT_NO_TEXT; // Allow any length +} + +// Only allow the same train type to be added to itself +switch(FEAT_TRAINS, SELF, switch_br_68_6Mk3_can_attach_wagon, vehicle_type_id) { + item_br_68_6Mk3: return CB_RESULT_ATTACH_ALLOW; + return string(STR_CANNOT_ATTACH); +} + +// Only the driving engine has particles +switch(FEAT_TRAINS, SELF, switch_br_68_6Mk3_particles, position_in_articulated_veh % 6) { + 0: visual_effect_and_powered(VISUAL_EFFECT_DIESEL, 2, DISABLE_WAGON_POWER); + visual_effect_and_powered(VISUAL_EFFECT_DISABLE, 0, DISABLE_WAGON_POWER); +} + +// Class 195/0 (2car) +item(FEAT_TRAINS, item_br_68_6Mk3, 689) { + property { + name: string(STR_BR_68_6Mk3); + climates_available: ALL_CLIMATES; // available in all climates + introduction_date: date(2019, 08, 04); + model_life: VEHICLE_NEVER_EXPIRES; // keep available forever + vehicle_life: 30; // years after vehicle is deemed "old" and should be replaced + reliability_decay: 0; // dont reduce reliabilty, (will grow from 75% upwards over the years) + refittable_cargo_classes: bitmask(CC_PASSENGERS); + non_refittable_cargo_classes: bitmask(); + cost_factor: 65; + loading_speed: 5; + running_cost_factor: 100; + cargo_allow_refit: []; + cargo_disallow_refit: []; + + speed: 100 mph; + power: 3800 hp; + cargo_capacity: 1; + weight: 299 ton; + + sprite_id: SPRITE_ID_NEW_TRAIN; // required + refit_cost: 0; + track_type: RAIL; + ai_special_flag: AI_FLAG_PASSENGER; // tell ai that this is a passenger train + running_cost_base: RUNNING_COST_DIESEL; + dual_headed: 0; // set to 0 otherwise limited to 2 cars only + engine_class: ENGINE_CLASS_DIESEL; // even if ts 3rd rail, ELECTRIC would give overhead wire effects + extra_power_per_wagon: 0 kW; + tractive_effort_coefficient: 0.37; + air_drag_coefficient: 0.06; + length: 8; // full tile length vehicle + visual_effect_and_powered: visual_effect_and_powered(VISUAL_EFFECT_DIESEL, 2, DISABLE_WAGON_POWER); // visual fx + extra_weight_per_wagon: 0 ton; + bitmask_vehicle_info: 0; + } + + graphics { + default: switch_br_68_6Mk3_spriteset; + purchase: spriteset_br_68_6Mk3_purchase; + + articulated_part: switch_br_68_6Mk3_articulated; + start_stop: switch_br_68_6Mk3_start_stop; + can_attach_wagon: switch_br_68_6Mk3_can_attach_wagon; + visual_effect_and_powered: switch_br_68_6Mk3_particles; + + cargo_capacity: return (408/8 * param_pax); + additional_text: string(STR_DSC_BR_MK5A); + cost_factor: return(GetAdjustedCost(65)); + running_cost_factor: return(GetAdjustedCost(100)); + + } +} \ No newline at end of file