diff --git a/docs/changelog.txt b/docs/changelog.txt index f00fb4f..7e97025 100644 --- a/docs/changelog.txt +++ b/docs/changelog.txt @@ -8,7 +8,6 @@ - GWR Great Bear and Hall class rework - Class 56 - Class 69 -- Made eyecandy, debug, and departmental vehicles unattractive to AI - GWR Dean 25ft 4 Compartment Second Class (SY), Diagram S1/LA9N, Built 1871, seats 32 - BRT Whisky CovHop (PAV) - Only variant code needed - Metropolitan Class G @@ -34,7 +33,7 @@ - Added BRT PAA Covered Hopper - Added LNER Coronation Train Set, and individual articulated coaches - Added SR Bulleid Q1 -- Adjusted EyeCandy engine to hopefully discourage AI use +- Made eyecandy, debug, and departmental vehicles unattractive to AI (hopefully) - Reworked Southern Region CC Class (OG BR Class 70) - Added a pile of liveries for Class 66 - Added some LNER Black 5 and Jubilee liveries diff --git a/src/trains/_spriteset/Eyecandy_Switches.pnml b/src/trains/_spriteset/Eyecandy_Switches.pnml new file mode 100644 index 0000000..c1eeb37 --- /dev/null +++ b/src/trains/_spriteset/Eyecandy_Switches.pnml @@ -0,0 +1,64 @@ +// These switches should be used for eye candy, debug, developmental etc unit +// They make vehicles less attractive to the AI while keeping them useful for the player +// The most common callbacks are: + + +/* + start_stop: sw_EyeCandy_AllowMove; + cost_factor: sw_EyeCandy_PurchaseCost; + running_cost_factor: sw_EyeCandy_RunningCost; + purchase_running_cost_factor: sw_EyeCandy_RunningCost; + power: sw_EyeCandy_Power; + speed: sw_EyeCandy_Speed; + weight: sw_EyeCandy_Weight; + tractive_effort_coefficient: sw_EyeCandy_TE; +*/ + +switch(FEAT_TRAINS, SELF, sw_EyeCandy_AllowMove, company_type) +{ + PLAYERTYPE_AI: return(string(STR_EyeCandy_AI)); + CB_RESULT_NO_TEXT; +} + +switch(FEAT_TRAINS, SELF, sw_EyeCandy_RunningCost_Movement, vehicle_is_stopped) +{ + 0: 255; + 1: 0; +} + +switch(FEAT_TRAINS, SELF, sw_EyeCandy_RunningCost, company_type) +{ + PLAYERTYPE_AI: 255; + sw_EyeCandy_RunningCost_Movement; +} + +switch(FEAT_TRAINS, SELF, sw_EyeCandy_PurchaseCost, company_type) +{ + PLAYERTYPE_AI: 255; + PLAYERTYPE_HUMAN: 0; +} + +switch(FEAT_TRAINS, SELF, sw_EyeCandy_Power, company_type) +{ + PLAYERTYPE_AI: 0; + PLAYERTYPE_HUMAN: 10000; +} + +// km/h +switch(FEAT_TRAINS, SELF, sw_EyeCandy_Speed, company_type) +{ + PLAYERTYPE_AI: 1; + PLAYERTYPE_HUMAN: 80; +} + +switch(FEAT_TRAINS, SELF, sw_EyeCandy_Weight, company_type) +{ + PLAYERTYPE_AI: 10000; + PLAYERTYPE_HUMAN: 30; +} + +switch(FEAT_TRAINS, SELF, sw_EyeCandy_TE, company_type) +{ + PLAYERTYPE_AI: 0; + PLAYERTYPE_HUMAN: 255; +} \ No newline at end of file diff --git a/src/trains/departmental/BRMPV_DualFreight.pnml b/src/trains/departmental/BRMPV_DualFreight.pnml index 96e73e2..ff8174e 100644 --- a/src/trains/departmental/BRMPV_DualFreight.pnml +++ b/src/trains/departmental/BRMPV_DualFreight.pnml @@ -44,5 +44,14 @@ item (FEAT_TRAINS, item_MPV_DualFreight, 136) { colour_mapping: return PALETTE_CC_FIRST; create_effect: sw_MPV_DualFreight_effect; sound_effect: sw_dmu_sound; + // AI Poison Pill below + start_stop: sw_EyeCandy_AllowMove; + cost_factor: sw_EyeCandy_PurchaseCost; + running_cost_factor: sw_EyeCandy_RunningCost; + purchase_running_cost_factor: sw_EyeCandy_RunningCost; + power: sw_EyeCandy_Power; + speed: sw_EyeCandy_Speed; + weight: sw_EyeCandy_Weight; + tractive_effort_coefficient: sw_EyeCandy_TE; } } diff --git a/src/trains/departmental/BRMPV_DualTrack.pnml b/src/trains/departmental/BRMPV_DualTrack.pnml index 1f98b7f..b7e9cdf 100644 --- a/src/trains/departmental/BRMPV_DualTrack.pnml +++ b/src/trains/departmental/BRMPV_DualTrack.pnml @@ -42,5 +42,14 @@ item (FEAT_TRAINS, item_MPV_DualTrack, 234) { colour_mapping: return PALETTE_CC_FIRST; create_effect: sw_MPV_DualTrack_effect; sound_effect: sw_dmu_sound; + // AI Poison Pill below + start_stop: sw_EyeCandy_AllowMove; + cost_factor: sw_EyeCandy_PurchaseCost; + running_cost_factor: sw_EyeCandy_RunningCost; + purchase_running_cost_factor: sw_EyeCandy_RunningCost; + power: sw_EyeCandy_Power; + speed: sw_EyeCandy_Speed; + weight: sw_EyeCandy_Weight; + tractive_effort_coefficient: sw_EyeCandy_TE; } } diff --git a/src/trains/departmental/BRMPV_Single.pnml b/src/trains/departmental/BRMPV_Single.pnml index af21c2d..2532481 100644 --- a/src/trains/departmental/BRMPV_Single.pnml +++ b/src/trains/departmental/BRMPV_Single.pnml @@ -41,5 +41,14 @@ item (FEAT_TRAINS, item_MPV_Single, 235) { colour_mapping: return PALETTE_CC_FIRST; create_effect: sw_MPV_Single_effect; sound_effect: sw_dmu_sound; + // AI Poison Pill below + start_stop: sw_EyeCandy_AllowMove; + cost_factor: sw_EyeCandy_PurchaseCost; + running_cost_factor: sw_EyeCandy_RunningCost; + purchase_running_cost_factor: sw_EyeCandy_RunningCost; + power: sw_EyeCandy_Power; + speed: sw_EyeCandy_Speed; + weight: sw_EyeCandy_Weight; + tractive_effort_coefficient: sw_EyeCandy_TE; } } diff --git a/src/trains/departmental/FlyingBanana.pnml b/src/trains/departmental/FlyingBanana.pnml index eef7794..8b76c2d 100644 --- a/src/trains/departmental/FlyingBanana.pnml +++ b/src/trains/departmental/FlyingBanana.pnml @@ -84,8 +84,14 @@ item (FEAT_TRAINS, item_FlyingBanana, 687) { colour_mapping: return PALETTE_CC_FIRST; create_effect: diesel_create_visual_effect; sound_effect: sw_voyager_sound; - cargo_capacity: return(0); - cost_factor: return(GetAdjustedCost(1)); - running_cost_factor: return(GetAdjustedCost(1)); + // AI Poison Pill below + start_stop: sw_EyeCandy_AllowMove; + cost_factor: sw_EyeCandy_PurchaseCost; + running_cost_factor: sw_EyeCandy_RunningCost; + purchase_running_cost_factor: sw_EyeCandy_RunningCost; + power: sw_EyeCandy_Power; + speed: sw_EyeCandy_Speed; + weight: sw_EyeCandy_Weight; + tractive_effort_coefficient: sw_EyeCandy_TE; } } \ No newline at end of file diff --git a/src/trains/utility_development_and_debug/EyeCandyLocomotive.pnml b/src/trains/utility_development_and_debug/EyeCandyLocomotive.pnml index edfaed0..5b52521 100644 --- a/src/trains/utility_development_and_debug/EyeCandyLocomotive.pnml +++ b/src/trains/utility_development_and_debug/EyeCandyLocomotive.pnml @@ -12,13 +12,7 @@ spriteset(spriteset_EyeCandy_Depot, "gfx/EyeCandy.png") { switch(FEAT_TRAINS, SELF, sw_EyeCandy_AllowMove_Length, num_vehs_in_consist) { 1: return(string(STR_EyeCandy_NoAttachedUnit)); - CB_RESULT_NO_TEXT; -} - -switch(FEAT_TRAINS, SELF, sw_EyeCandy_AllowMove, company_type) -{ - PLAYERTYPE_AI: return(string(STR_EyeCandy_AI)); - sw_EyeCandy_AllowMove_Length; + sw_EyeCandy_AllowMove; } switch(FEAT_TRAINS,SELF,sw_EyeCandy_Sprites, vehicle_is_in_depot) @@ -27,49 +21,6 @@ switch(FEAT_TRAINS,SELF,sw_EyeCandy_Sprites, vehicle_is_in_depot) 1: spriteset_EyeCandy_Depot; } -switch(FEAT_TRAINS, SELF, sw_EyeCandy_RunningCost_Movement, vehicle_is_stopped) -{ - 0: 255; - 1: 0; -} - -switch(FEAT_TRAINS, SELF, sw_EyeCandy_RunningCost, company_type) -{ - PLAYERTYPE_AI: 255; - sw_EyeCandy_RunningCost_Movement; -} - -switch(FEAT_TRAINS, SELF, sw_EyeCandy_PurchaseCost, company_type) -{ - PLAYERTYPE_AI: 255; - PLAYERTYPE_HUMAN: 0; -} - -switch(FEAT_TRAINS, SELF, sw_EyeCandy_Power, company_type) -{ - PLAYERTYPE_AI: 0; - PLAYERTYPE_HUMAN: 10000; -} - -// km/h -switch(FEAT_TRAINS, SELF, sw_EyeCandy_Speed, company_type) -{ - PLAYERTYPE_AI: 1; - PLAYERTYPE_HUMAN: 80; -} - -switch(FEAT_TRAINS, SELF, sw_EyeCandy_Weight, company_type) -{ - PLAYERTYPE_AI: 10000; - PLAYERTYPE_HUMAN: 30; -} - -switch(FEAT_TRAINS, SELF, sw_EyeCandy_TE, company_type) -{ - PLAYERTYPE_AI: 0; - PLAYERTYPE_HUMAN: 255; -} - item (FEAT_TRAINS, item_EyeCandy, 578) { property { name: string(STR_NAME_EyeCandy); @@ -112,7 +63,8 @@ item (FEAT_TRAINS, item_EyeCandy, 578) { default: sw_EyeCandy_Sprites; purchase: spriteset_EyeCandy_Purchase; colour_mapping: return PALETTE_CC_FIRST; - start_stop: sw_EyeCandy_AllowMove; + // AI Poison Pill below + start_stop: sw_EyeCandy_AllowMove_Length; cost_factor: sw_EyeCandy_PurchaseCost; running_cost_factor: sw_EyeCandy_RunningCost; purchase_running_cost_factor: sw_EyeCandy_RunningCost; diff --git a/src/trains/utility_development_and_debug/TemplateTrains.pnml b/src/trains/utility_development_and_debug/TemplateTrains.pnml index 101f9fb..dc8ddf1 100644 --- a/src/trains/utility_development_and_debug/TemplateTrains.pnml +++ b/src/trains/utility_development_and_debug/TemplateTrains.pnml @@ -109,6 +109,15 @@ item (FEAT_TRAINS, item_UtilityTrain12px, 601) { additional_text: return(string(STR_DESC_Utility)); default: spriteset_Utility12; purchase: spriteset_Utility12_Purchase; + // AI Poison Pill below + start_stop: sw_EyeCandy_AllowMove; + cost_factor: sw_EyeCandy_PurchaseCost; + running_cost_factor: sw_EyeCandy_RunningCost; + purchase_running_cost_factor: sw_EyeCandy_RunningCost; + power: sw_EyeCandy_Power; + speed: sw_EyeCandy_Speed; + weight: sw_EyeCandy_Weight; + tractive_effort_coefficient: sw_EyeCandy_TE; } } @@ -148,7 +157,16 @@ item (FEAT_TRAINS, item_UtilityTrain4px, 609) { cargo_capacity: return 0; additional_text: return(string(STR_DESC_Utility)); default: spriteset_Utility4; - purchase: spriteset_Utility4_Purchase; + purchase: spriteset_Utility4_Purchase; + // AI Poison Pill below + start_stop: sw_EyeCandy_AllowMove; + cost_factor: sw_EyeCandy_PurchaseCost; + running_cost_factor: sw_EyeCandy_RunningCost; + purchase_running_cost_factor: sw_EyeCandy_RunningCost; + power: sw_EyeCandy_Power; + speed: sw_EyeCandy_Speed; + weight: sw_EyeCandy_Weight; + tractive_effort_coefficient: sw_EyeCandy_TE; } } @@ -187,7 +205,16 @@ item (FEAT_TRAINS, item_UtilityTrain8px, 610) { can_attach_wagon: CB_RESULT_ATTACH_ALLOW; cargo_capacity: return 0; default: spriteset_Utility8; - purchase: spriteset_Utility8_Purchase; + purchase: spriteset_Utility8_Purchase; + // AI Poison Pill below + start_stop: sw_EyeCandy_AllowMove; + cost_factor: sw_EyeCandy_PurchaseCost; + running_cost_factor: sw_EyeCandy_RunningCost; + purchase_running_cost_factor: sw_EyeCandy_RunningCost; + power: sw_EyeCandy_Power; + speed: sw_EyeCandy_Speed; + weight: sw_EyeCandy_Weight; + tractive_effort_coefficient: sw_EyeCandy_TE; } } @@ -228,7 +255,16 @@ item (FEAT_TRAINS, item_UtilityTrain16px, 602) { cargo_capacity: return 0; additional_text: return(string(STR_DESC_Utility)); default: spriteset_Utility16; - purchase: spriteset_Utility16_Purchase; + purchase: spriteset_Utility16_Purchase; + // AI Poison Pill below + start_stop: sw_EyeCandy_AllowMove; + cost_factor: sw_EyeCandy_PurchaseCost; + running_cost_factor: sw_EyeCandy_RunningCost; + purchase_running_cost_factor: sw_EyeCandy_RunningCost; + power: sw_EyeCandy_Power; + speed: sw_EyeCandy_Speed; + weight: sw_EyeCandy_Weight; + tractive_effort_coefficient: sw_EyeCandy_TE; } } @@ -269,7 +305,16 @@ item (FEAT_TRAINS, item_UtilityTrain20px, 603) { cargo_capacity: return 0; additional_text: return(string(STR_DESC_Utility)); default: spriteset_Utility20; - purchase: spriteset_Utility20_Purchase; + purchase: spriteset_Utility20_Purchase; + // AI Poison Pill below + start_stop: sw_EyeCandy_AllowMove; + cost_factor: sw_EyeCandy_PurchaseCost; + running_cost_factor: sw_EyeCandy_RunningCost; + purchase_running_cost_factor: sw_EyeCandy_RunningCost; + power: sw_EyeCandy_Power; + speed: sw_EyeCandy_Speed; + weight: sw_EyeCandy_Weight; + tractive_effort_coefficient: sw_EyeCandy_TE; } } @@ -309,7 +354,16 @@ item (FEAT_TRAINS, item_UtilityTrain24px, 604) { cargo_capacity: return 0; additional_text: return(string(STR_DESC_Utility)); default: spriteset_Utility24; - purchase: spriteset_Utility24_Purchase; + purchase: spriteset_Utility24_Purchase; + // AI Poison Pill below + start_stop: sw_EyeCandy_AllowMove; + cost_factor: sw_EyeCandy_PurchaseCost; + running_cost_factor: sw_EyeCandy_RunningCost; + purchase_running_cost_factor: sw_EyeCandy_RunningCost; + power: sw_EyeCandy_Power; + speed: sw_EyeCandy_Speed; + weight: sw_EyeCandy_Weight; + tractive_effort_coefficient: sw_EyeCandy_TE; } } @@ -349,7 +403,16 @@ item (FEAT_TRAINS, item_UtilityTrain28px, 605) { cargo_capacity: return 0; additional_text: return(string(STR_DESC_Utility)); default: spriteset_Utility28; - purchase: spriteset_Utility28_Purchase; + purchase: spriteset_Utility28_Purchase; + // AI Poison Pill below + start_stop: sw_EyeCandy_AllowMove; + cost_factor: sw_EyeCandy_PurchaseCost; + running_cost_factor: sw_EyeCandy_RunningCost; + purchase_running_cost_factor: sw_EyeCandy_RunningCost; + power: sw_EyeCandy_Power; + speed: sw_EyeCandy_Speed; + weight: sw_EyeCandy_Weight; + tractive_effort_coefficient: sw_EyeCandy_TE; } } @@ -389,7 +452,16 @@ item (FEAT_TRAINS, item_UtilityTrain32px, 606) { cargo_capacity: return 0; additional_text: return(string(STR_DESC_Utility)); default: spriteset_Utility32; - purchase: spriteset_Utility32_Purchase; + purchase: spriteset_Utility32_Purchase; + // AI Poison Pill below + start_stop: sw_EyeCandy_AllowMove; + cost_factor: sw_EyeCandy_PurchaseCost; + running_cost_factor: sw_EyeCandy_RunningCost; + purchase_running_cost_factor: sw_EyeCandy_RunningCost; + power: sw_EyeCandy_Power; + speed: sw_EyeCandy_Speed; + weight: sw_EyeCandy_Weight; + tractive_effort_coefficient: sw_EyeCandy_TE; } } @@ -429,7 +501,16 @@ item (FEAT_TRAINS, item_UtilityTrain28pxOLD, 607) { cargo_capacity: return 0; additional_text: return(string(STR_DESC_Utility)); default: spriteset_Utility28OLD; - purchase: spriteset_Utility28OLD_Purchase; + purchase: spriteset_Utility28OLD_Purchase; + // AI Poison Pill below + start_stop: sw_EyeCandy_AllowMove; + cost_factor: sw_EyeCandy_PurchaseCost; + running_cost_factor: sw_EyeCandy_RunningCost; + purchase_running_cost_factor: sw_EyeCandy_RunningCost; + power: sw_EyeCandy_Power; + speed: sw_EyeCandy_Speed; + weight: sw_EyeCandy_Weight; + tractive_effort_coefficient: sw_EyeCandy_TE; } } @@ -469,6 +550,15 @@ item (FEAT_TRAINS, item_UtilityTrain32pxOLD, 608) { cargo_capacity: return 0; additional_text: return(string(STR_DESC_Utility)); default: spriteset_Utility32OLD; - purchase: spriteset_Utility32OLD_Purchase; + purchase: spriteset_Utility32OLD_Purchase; + // AI Poison Pill below + start_stop: sw_EyeCandy_AllowMove; + cost_factor: sw_EyeCandy_PurchaseCost; + running_cost_factor: sw_EyeCandy_RunningCost; + purchase_running_cost_factor: sw_EyeCandy_RunningCost; + power: sw_EyeCandy_Power; + speed: sw_EyeCandy_Speed; + weight: sw_EyeCandy_Weight; + tractive_effort_coefficient: sw_EyeCandy_TE; } } \ No newline at end of file