Page 1 of 1

[NML] Maximum of 12 railtypes in a single game and being unable to disable stock tracks

Posted: 03 Jul 2017 22:21
by Erato
I decided to add the ability to disable tracks in the Maglev Track Set. It works. In a way. I can disable the tracks but one track will always remain visible even though, according to the NML-wiki, it should disappear:
Image
How do I disable the MGLV tracktype so it won't show up? It's hurting compatibility with other track sets.
For this track set I looked at what nutracks did, but with how they did things, ELRL did actually go away.

In a slightly related problem:
I have the Japan Set with the Maglev Track Set and for some reason it won't load more than 12 railtypes, even though the limit should be 16. The track set loaded last returns an invalid ID error.
Image

Code for 3rd rail:

Code: Select all

//Linimo Maglev Track
item(FEAT_RAILTYPES, T_LINIMO, 14) {
     property {
         label:                      "LBA3";
         name:                       string(STR_LBA3);
         menu_text:                  string(STR_LBA3);
         build_window_caption:       string(STR_LBA3_BUILD_CAPTION);
         autoreplace_text:           string(STR_LBA3_AUTOREPLACE);
         new_engine_text:            string(STR_LBA3_NEW_ENGINE);
		 toolbar_caption:			 string(STR_LBA3_TB_CAPTION);
         compatible_railtype_list:   LBA3_TABLE;
         powered_railtype_list:      LBA3_TABLE;
         railtype_flags:             bitmask(RAILTYPE_FLAG_NO_LEVEL_CROSSING);
		 introduction_date:			 date(1975,1,1);
         curve_speed_multiplier:     3;
         station_graphics:           RAILTYPE_STATION_MAGLEV;                  // It's a maglev innit
         construction_cost:          COSTPARAM(12,PARAM_MS_CONST);             // IDK I'll see
         speed_limit:                150 km/h;
         acceleration_model:         ACC_MODEL_MAGLEV;                         // It's a maglev innit
		 maintenance_cost:		     COSTPARAM(7,PARAM_MS_MAINT);			   // Maglev rail needs barely any maintenance
     }
     graphics {
         track_overlay:		LBA3_overlay;				// defines the sprites drawn as overlay for junctions and highlight
         underlay:			LBA3_underlay;				// defines the usual tracks and the underlay for junctions
         bridge_surfaces:	LBA3_bridge;				// defines the overlay drawn over bridges
		 tunnels:			LBA3_tunnel;				// defines the tracks drawn on a funnel tile
         depots:            switch_depot_LBA3;    				// defines the depot sprites
		 gui:				LBA3_gui;					// defines the gui sprites
		 
         //fences:          fences_set;                // defines the look of fences
		 
         //level_crossings: level_crossing_switch;     // No crossing maglev rail => no level crossing
     }
 }
Code for EDS rail:

Code: Select all

//Chuo Shinkansen Maglev Track
item(FEAT_RAILTYPES, T_CHUOSHINKANSEN, 15) {
     property {
         label:                      "LCAE";
         name:                       string(STR_LCAE);
         menu_text:                  string(STR_LCAE);
         build_window_caption:       string(STR_LCAE_BUILD_CAPTION);
         autoreplace_text:           string(STR_LCAE_AUTOREPLACE);
         new_engine_text:            string(STR_LCAE_NEW_ENGINE);
		 toolbar_caption:			 string(STR_LCAE_TB_CAPTION);
         compatible_railtype_list:   LCAE_TABLE;
         powered_railtype_list:      LCAE_TABLE;
         railtype_flags:             bitmask(RAILTYPE_FLAG_NO_LEVEL_CROSSING);
		 introduction_date:			 date(1972,1,1);
         curve_speed_multiplier:     3;
         station_graphics:           RAILTYPE_STATION_MAGLEV;                  // It's a maglev innit
         construction_cost:          COSTPARAM(28,PARAM_HS_CONST);             // IDK I'll see
         speed_limit:                610 km/h;
         acceleration_model:         ACC_MODEL_MAGLEV;                         // It's a maglev innit
		 maintenance_cost:		     COSTPARAM(12,PARAM_HS_MAINT);		  	   // Maglev rail needs barely any maintenance
     }
     graphics {
         track_overlay:		LCAE_overlay;				// defines the sprites drawn as overlay for junctions and highlight
         underlay:			LCAE_underlay;				// defines the usual tracks and the underlay for junctions
         bridge_surfaces:	LCAE_bridge;				// defines the overlay drawn over bridges
		 tunnels:			LCAE_tunnel;				// defines the tracks drawn on a funnel tile
         depots:            switch_depot_LCAE;    				// defines the depot sprites
		 gui:				LCAE_gui;					// defines the gui sprites
		 
         //fences:          fences_set;                // defines the look of fences
		 
         //level_crossings: level_crossing_switch;     // No crossing maglev rail => no level crossing
     }
 }

Re: [NML] Maximum of 12 railtypes in a single game and being unable to disable stock tracks

Posted: 30 Nov 2017 01:09
by Eddi
original railtypes cannot be disabled, you have to overwrite them.