
PluginHeader{
	RailSimVersion = 2.00;
	PluginType = Train;
	PluginName = "大交新20更新車素材 先頭車";
	PluginAuthor = "n";
	IconTexture = "icon.png";
}
TrainInfo{
	FrontLimit = 9.55;
	TailLimit = -9.35;
	MaxVelocity = 70.0;
	MaxAcceleration = 3.0;
	MaxDeceleration = 3.5;
	DoorClosingTime = 5.0;
}
DefineSwitch "■基本設定"{
}
DefineSwitch "電源"{
GroupCommon = "nomtbn20電源";
	Entry = "入";
	Entry = "切";
}
DefineSwitch "■灯火類設定-"{
}
DefineSwitch "前照灯"{
GroupCommon = "nomtbn20前照灯";
	Entry = "自動";
	Entry = "入";
	Entry = "切";
}
DefineSwitch "尾灯"{
GroupCommon = "nomtbn20尾灯";
	Entry = "自動";
	Entry = "入(入替)";
	Entry = "切";
}
DefineSwitch "幕灯"{
GroupCommon = "nomtbn20幕灯";
	Entry = "入";
	Entry = "切";
}
DefineSwitch "運転室灯"{
GroupCommon = "nomtbn20運転室灯";
	Entry = "自動";
	Entry = "入";
	Entry = "切";
}
DefineSwitch "客室照明"{
GroupCommon = "nomtbn20客室灯";
	Entry = "入";
	Entry = "切";
}
DefineSwitch "レンズフレア"{
GroupCommon = "nomtbn20LF";
	Entry = "入";
	Entry = "切";
}
DefineSwitch "■列車設定"{
}
DefineSwitch "行先"{
GroupCommon = "nomtbn20行先";
	Entry = "===-===-===-===-===";
	Entry = "M16-T11-Y16-C18-S24";
	Entry = "M29-T36-Y19-C19-S11";
	Entry = "M30-T12-Y11-C11-S21";
	Entry = "M08-T29-Y21-C23-S20";
	Entry = "M27-T17-Y20-C27-S13";
	Entry = "M15-T33-===-C26-===";
	Entry = "M23-T35-===-C10-===";
	Entry = "M13-===-===-C30-===";
	Entry = "M11-===-===-C15-===";
	Entry = "";
	Entry = "";
	Entry = "回送";
	Entry = "試運転";
	Entry = "臨時";
}
DefineSwitch "先頭車仕様"{			
GroupCommon = "nomtbn20先頭車仕様";
	Entry = "ワイパー原型・ライト原型";	
	Entry = "ワイパー更新・ライト原型";
	Entry = "ワイパー原型・ライト更新";
	Entry = "ワイパー更新・ライト更新";
}
DefineSwitch "編成"{
GroupCommon = "nomtbn20編成";
	Entry = "01";	
	Entry = "02";
	Entry = "03";
	Entry = "04";
	Entry = "05";
	Entry = "06";
	Entry = "07";
	Entry = "08";
	Entry = "09";
	Entry = "10";
	Entry = "11";
	Entry = "12";
	Entry = "13";
	Entry = "14";
	Entry = "15";
	Entry = "16";
	Entry = "17";
	Entry = "18";
	Entry = "19";
	Entry = "20";
	Entry = "21";
	Entry = "22";
	Entry = "";	
	Entry = "";
	Entry = "";
	Entry = "";
	Entry = "";
	Entry = "56";
	Entry = "";	
	Entry = "";
	Entry = "";
	Entry = "";
	Entry = "";
	Entry = "";
	Entry = "";
}
DefineSwitch "前面車番サイズ"{
GroupCommon = "nomtbn20前面車番サイズ";
	Entry = "通常";
	Entry = "大(22: 01〜07F | 23: 01〜07,56F | 24: 56F)";
}
DefineSwitch "帯"{
GroupCommon = "nomtbn20帯";
	Entry = "M";
	Entry = "T";
	Entry = "Y";
	Entry = "C";
	Entry = "S";
}
DefineSwitch "連結位置"{
	Entry = "1両目(江坂/八尾南/西梅田/ｺｽﾓｽｸｴｱ/南巽方)";	//2600
	Entry = "4/5/6/9/10両目";				//2900
}
DefineSwitch "遮光幕"{
	Entry = "開";
	Entry = "閉";
}
DefineSwitch "転落防止幌"{
GroupCommon = "nomtbn20転落防止幌";
	Entry = "有(2000〜)";
	Entry = "無";
	Entry = "無(中間車間)";
}
DefineSwitch "ロゴ"{
GroupCommon = "nomtbn20ロゴ";
	Entry = "大阪市交通局";
	Entry = "Osaka Metro(2018.4.1〜)";
}
DefineSwitch "ベビーカーマーク"{
GroupCommon = "nomtbn20ベビーカーマーク";
	Entry = "有(2014.6.18〜)";
	Entry = "無";
}
DefineSwitch "簡易影"{
	GroupCommon = "nomtbn20簡易陰";
	Entry = "入";
	Entry = "切";
}

PrimaryAssembly{

/*---------------------------------------車輪定義ここから---------------------------------------*/

	Axle "wheel1"{
		ModelFileName = "../n_omtbn20_1/wheel.x";
		CastShadow = no;
		AlphaZeroTest = 0,1;
		Diameter = 0.86;
		Symmetric = 16;
		Coord = (7.3,0.43);
	}
	Axle "wheel2"{
		ModelFileName = "../n_omtbn20_1/wheel.x";
		CastShadow = no;
		AlphaZeroTest = 0,1;
		Diameter = 0.86;
		Symmetric = 16;
		Coord = (5.1,0.43);
	}
	Axle "wheel3"{
		ModelFileName = "../n_omtbn20_1/wheel.x";
		CastShadow = no;
		AlphaZeroTest = 0,1;
		Diameter = 0.86;
		Symmetric = 16;

		Coord = (-7.3,0.43);
	}
	Axle "wheel4"{
		ModelFileName = "../n_omtbn20_1/wheel.x";
		CastShadow = no;
		AlphaZeroTest = 0,1;
		Diameter = 0.86;
		Symmetric = 16;
		Coord = (-5.1,0.43);
	}
/*---------------------------------------車輪定義ここまで---------------------------------------*/

/*---------------------------------------台車定義ここから---------------------------------------*/
	Body "Bogie1"{
		ModelFileName = "../n_omtbn20_1/bogie_t.x";
		ApplySwitch "帯"{
			Case 1,2,3:
				ApplySwitch "連結位置"{
					Case 0:
						ChangeModel = "../n_omtbn20_1/bogie_m.x", 1.0;
				}
			Case 4:
				ChangeModel = "../n_omtbn20_1/bogie_m.x", 1.0;
		}
		JointZY "wheel1"{
			AttachCoord = (0,0);
			LocalCoord = (1.1, 0.0);
		}
		JointZY "wheel2"{
			AttachCoord = (0,0);
			LocalCoord = (-1.1, 0.0);
		}
	}
	Body "Bogie2"{
		ModelFileName = "../n_omtbn20_1/bogie_t.x";
		Turn = yes;
		ApplySwitch "帯"{
			Case 1,2,3:
				ApplySwitch "連結位置"{
					Case 0:
						ChangeModel = "../n_omtbn20_1/bogie_m.x", 1.0;
				}
			Case 4:
				ChangeModel = "../n_omtbn20_1/bogie_m.x", 1.0;
		}
		JointZY "wheel3"{
			AttachCoord = (0.0,0.0);
			LocalCoord = (1.1, 0.0);
		}
		JointZY "wheel4"{
			AttachCoord = (0,0);
			LocalCoord = (-1.1, 0.0);
		}
	}
/*---------------------------------------台車定義ここまで---------------------------------------*/

/*---------------------------------------ダミー車体定義ここから---------------------------------------*/
	Body "Dummy"{
		ModelFileName = "";
		JointZY "Bogie1"{
			AttachCoord = (0.0, 0.57);
			LocalCoord = (6.2, 1.0);
		}
		JointZY "Bogie2"{
			AttachCoord = (0.0, 0.57);
			LocalCoord = (-6.2, 1.0);
		}
	}
/*---------------------------------------ダミー車体定義ここまで---------------------------------------*/

/*---------------------------------------車体モデル定義ここから---------------------------------------*/
	Object3D "MainBody"{
		ModelFileName = "body_20900r.x";
		Transparent = 9,30;

		//先頭車車体仕様定義ここから

		ApplySwitch "先頭車仕様"{
			Case 1:
				ChangeModel = "body_20900r_1.x", 1.0;
			Case 2:
				ChangeTexture = 0, "tex/前面_n20.png";
				ChangeTexture = 1, "tex/前面_n20.png";
			Case 3:
				ChangeModel = "body_20900r_1.x", 1.0;
				ChangeTexture = 0, "tex/前面_n20.png";
				ChangeTexture = 1, "tex/前面_n20.png";
		}

		//先頭車車体仕様定義ここまで


		//灯具・照明定義ここから

		If "電源"==0{
			If ("前照灯"==0 && !"_FRONT"&&!"_CONNECT1")||"前照灯"==1{
				ChangeAlpha = 1,1.0;
				NoShadow = 0,1;
　　　　　	　　	}
			If ("尾灯"==0 && "_FRONT"&&!"_CONNECT1")||"尾灯"==1{
				ChangeMaterial{
					MaterialID = 4;
					Emissive = 1.0, 1.0, 1.0;
　　　　　	　　		}
				NoReceiveShadow = 4;
				ShiftTexture = 4, 0.0, -0.03125;
			}
			If "幕灯"==0{
					ChangeMaterial{
						MaterialID = 2,3;
						Emissive = 1.0, 1.0, 1.0;
　　　　　	　　		}
			}
			If "客室照明"==0{
					ChangeMaterial{
						MaterialID = 19,20,21,22,23,24,25,26,27,28;
						Emissive = 1.0, 1.0, 1.0;
　　　　　	　　		}
			}
			If "運転室灯"==1 || ("運転室灯"==0 && "_FRONT"){
					ChangeMaterial{
						MaterialID = 14,15,16,17,18;
						Emissive = 1.0, 1.0, 1.0;
　　　　　	　　		}
			}
		}

		//灯具・照明定義ここまで


		//遮光幕定義ここから

		ApplySwitch "遮光幕"{
			Case 1:
				ShiftTexture = 29, 0.25, 0.0;
		}

		//遮光幕定義ここまで


		//帯定義ここから

		ApplySwitch "帯"{
			Case 0:
				ApplySwitch "行先"{
					Case 1:
						ShiftTexture = 2, 0.0, 0.125;
						ShiftTexture = 3, 0.0, 0.125;
					Case 2:
						ShiftTexture = 2, 0.0, 0.25;
						ShiftTexture = 3, 0.0, 0.25;
					Case 3:
						ShiftTexture = 2, 0.0, 0.375;
						ShiftTexture = 3, 0.0, 0.375;
					Case 4:
						ShiftTexture = 2, 0.0, 0.5;
						ShiftTexture = 3, 0.0, 0.5;
					Case 5:
						ShiftTexture = 2, 0.0, 0.625;
						ShiftTexture = 3, 0.0, 0.625;
					Case 6:
						ShiftTexture = 2, 0.0, 0.75;
						ShiftTexture = 3, 0.0, 0.75;
					Case 7:
						ShiftTexture = 2, 0.0, 0.875;
						ShiftTexture = 3, 0.0, 0.875;
					Case 8:
						ShiftTexture = 2, 0.25, 0.0;
						ShiftTexture = 3, 0.25, 0.0;
					Case 9:
						ShiftTexture = 2, 0.25, 0.125;
						ShiftTexture = 3, 0.25, 0.125;
					Case 10:
						ShiftTexture = 2, 0.25, 0.25;
						ShiftTexture = 3, 0.25, 0.25;
					Case 11:
						ShiftTexture = 2, 0.25, 0.375;
						ShiftTexture = 3, 0.25, 0.375;
					Case 12:
						ShiftTexture = 2, 0.25, 0.5;
						ShiftTexture = 3, 0.25, 0.5;
					Case 13:
						ShiftTexture = 2, 0.25, 0.625;
						ShiftTexture = 3, 0.25, 0.625;
					Case 14:
						ShiftTexture = 2, 0.25, 0.75;
						ShiftTexture = 3, 0.25, 0.75;
				}
			Case 1:
				ApplySwitch "行先"{
					Case 1:
						ShiftTexture = 2, 0.5, 0.0;
						ShiftTexture = 3, 0.5, 0.0;
					Case 2:
						ShiftTexture = 2, 0.5, 0.125;
						ShiftTexture = 3, 0.5, 0.125;
					Case 3:
						ShiftTexture = 2, 0.5, 0.25;
						ShiftTexture = 3, 0.5, 0.25;
					Case 4:
						ShiftTexture = 2, 0.5, 0.375;
						ShiftTexture = 3, 0.5, 0.375;
					Case 5:
						ShiftTexture = 2, 0.5, 0.5;
						ShiftTexture = 3, 0.5, 0.5;
					Case 6:
						ShiftTexture = 2, 0.5, 0.625;
						ShiftTexture = 3, 0.5, 0.625;
					Case 7:
						ShiftTexture = 2, 0.5, 0.75;
						ShiftTexture = 3, 0.5, 0.75;
					Case 12:
						ShiftTexture = 2, 0.25, 0.5;
						ShiftTexture = 3, 0.25, 0.5;
					Case 13:
						ShiftTexture = 2, 0.25, 0.625;
						ShiftTexture = 3, 0.25, 0.625;
					Case 14:
						ShiftTexture = 2, 0.25, 0.75;
						ShiftTexture = 3, 0.25, 0.75;
				}
			ShiftTexture = 5, 0.0, 0.15625;
			ShiftTexture = 6, 0.0, 0.15625;
			ShiftTexture = 7, 0.15625, 0.0;
			Case 2:
				ApplySwitch "行先"{
					Case 1:
						ChangeTexture = 2, "tex/幕3.png";
						ChangeTexture = 3, "tex/幕3.png";
					Case 2:
						ChangeTexture = 2, "tex/幕3.png";
						ChangeTexture = 3, "tex/幕3.png";
						ShiftTexture = 2, 0.0, 0.125;
						ShiftTexture = 3, 0.0, 0.125;
					Case 3:
						ChangeTexture = 2, "tex/幕3.png";
						ChangeTexture = 3, "tex/幕3.png";
						ShiftTexture = 2, 0.0, 0.25;
						ShiftTexture = 3, 0.0, 0.25;
					Case 4:
						ChangeTexture = 2, "tex/幕3.png";
						ChangeTexture = 3, "tex/幕3.png";
						ShiftTexture = 2, 0.0, 0.375;
						ShiftTexture = 3, 0.0, 0.375;
					Case 5:
						ChangeTexture = 2, "tex/幕3.png";
						ChangeTexture = 3, "tex/幕3.png";
						ShiftTexture = 2, 0.0, 0.5;
						ShiftTexture = 3, 0.0, 0.5;
					Case 12:
						ShiftTexture = 2, 0.25, 0.5;
						ShiftTexture = 3, 0.25, 0.5;
					Case 13:
						ShiftTexture = 2, 0.25, 0.625;
						ShiftTexture = 3, 0.25, 0.625;
					Case 14:
						ShiftTexture = 2, 0.25, 0.75;
						ShiftTexture = 3, 0.25, 0.75;
				}
			ShiftTexture = 5, 0.0, 0.3125;
			ShiftTexture = 6, 0.0, 0.3125;
			ShiftTexture = 7, 0.3125, 0.0;
			Case 3:
				ApplySwitch "行先"{
					Case 1:
						ShiftTexture = 2, 0.75, 0.0;
						ShiftTexture = 3, 0.75, 0.0;
					Case 2:
						ShiftTexture = 2, 0.75, 0.125;
						ShiftTexture = 3, 0.75, 0.125;
					Case 3:
						ShiftTexture = 2, 0.75, 0.25;
						ShiftTexture = 3, 0.75, 0.25;
					Case 4:
						ShiftTexture = 2, 0.75, 0.375;
						ShiftTexture = 3, 0.75, 0.375;
					Case 5:
						ShiftTexture = 2, 0.75, 0.5;
						ShiftTexture = 3, 0.75, 0.5;
					Case 6:
						ShiftTexture = 2, 0.75, 0.625;
						ShiftTexture = 3, 0.75, 0.625;
					Case 7:
						ShiftTexture = 2, 0.75, 0.75;
						ShiftTexture = 3, 0.75, 0.75;
					Case 8:
						ShiftTexture = 2, 0.75, 0.875;
						ShiftTexture = 3, 0.75, 0.875;
					Case 9:
						ShiftTexture = 2, 0.5, 0.875;
						ShiftTexture = 3, 0.5, 0.875;
					Case 10:
						ShiftTexture = 2, 0.25, 0.875;
						ShiftTexture = 3, 0.25, 0.875;
					Case 12:
						ShiftTexture = 2, 0.25, 0.5;
						ShiftTexture = 3, 0.25, 0.5;
					Case 13:
						ShiftTexture = 2, 0.25, 0.625;
						ShiftTexture = 3, 0.25, 0.625;
					Case 14:
						ShiftTexture = 2, 0.25, 0.75;
						ShiftTexture = 3, 0.25, 0.75;
				}
			ShiftTexture = 5, 0.0, 0.46875;
			ShiftTexture = 6, 0.0, 0.46875;
			ShiftTexture = 7, 0.46875, 0.0;
			Case 4:
				ApplySwitch "行先"{
					Case 1:
						ChangeTexture = 2, "tex/幕3.png";
						ChangeTexture = 3, "tex/幕3.png";
						ShiftTexture = 2, 0.25, 0.0;
						ShiftTexture = 3, 0.25, 0.0;
					Case 2:
						ChangeTexture = 2, "tex/幕3.png";
						ChangeTexture = 3, "tex/幕3.png";
						ShiftTexture = 2, 0.25, 0.125;
						ShiftTexture = 3, 0.25, 0.125;
					Case 3:
						ChangeTexture = 2, "tex/幕3.png";
						ChangeTexture = 3, "tex/幕3.png";
						ShiftTexture = 2, 0.25, 0.25;
						ShiftTexture = 3, 0.25, 0.25;
					Case 4:
						ChangeTexture = 2, "tex/幕3.png";
						ChangeTexture = 3, "tex/幕3.png";
						ShiftTexture = 2, 0.25, 0.375;
						ShiftTexture = 3, 0.25, 0.375;
					Case 5:
						ChangeTexture = 2, "tex/幕3.png";
						ChangeTexture = 3, "tex/幕3.png";
						ShiftTexture = 2, 0.25, 0.5;
						ShiftTexture = 3, 0.25, 0.5;
					Case 12:
						ShiftTexture = 2, 0.25, 0.5;
						ShiftTexture = 3, 0.25, 0.5;
					Case 13:
						ShiftTexture = 2, 0.25, 0.625;
						ShiftTexture = 3, 0.25, 0.625;
					Case 14:
						ShiftTexture = 2, 0.25, 0.75;
						ShiftTexture = 3, 0.25, 0.75;
				}
			ShiftTexture = 5, 0.0, 0.625;
			ShiftTexture = 6, 0.0, 0.625;
			ShiftTexture = 7, 0.625, 0.0;
		}

		//帯定義ここまで


		//帯（側面号車表示）定義ここから

		ApplySwitch "帯"{
			Case 0:
				ApplySwitch "連結位置"{
					Case 0:
						ShiftTexture = 34, 0.5625, 0.0;
				}
			Case 1:
				ApplySwitch "連結位置"{
					Case 0:
						ShiftTexture = 34, 0.0, 0.15625;
					Case 1:
						ShiftTexture = 34, 0.3125, 0.15625;
				}
			Case 2:
				ApplySwitch "連結位置"{
					Case 0:
						ShiftTexture = 34, 0.3125, 0.3125;
					Case 1:
						ShiftTexture = 34, 0.0, 0.3125;
				}
			Case 3:
				ApplySwitch "連結位置"{
					Case 0:
						ShiftTexture = 34, 0.3125, 0.46875;
					Case 1:
						ShiftTexture = 34, 0.0, 0.46875;
				}
			Case 4:
				ApplySwitch "連結位置"{
					Case 0:
						ShiftTexture = 34, 0.0, 0.625;
					Case 1:
						ShiftTexture = 34, 0.1875, 0.625;
				}
		}

		//帯（側面号車表示）定義ここまで


		Joint3D "Dummy"{
			AttachCoord = (0.0, 0.0, 0.0);
		}
	}
/*---------------------------------------車体モデル定義ここまで---------------------------------------*/

/*---------------------------------------車番定義ここから---------------------------------------*/

	Object3D "number"{
		ModelFileName = "";
		CastShadow = no;

		//車番サイズ変更定義ここから

		If "前面車番サイズ"==1{
			ChangeModel = "../n_omtbn20n_1/number_22901r.x", 1.0;
		}Else{
			ChangeModel = "../n_omtbn20n_1/number_20900r.x", 1.0;
		}

		//車番サイズ変更定義ここまで


		//ロゴ・帯色定義ここから

		ApplySwitch "ロゴ"{
			Case 0:
				ApplySwitch "帯"{
					Case 1:
						ShiftTexture = 6, 0.0625, 0.0;
					Case 2:
						ShiftTexture = 6, 0.125, 0.0;
					Case 3:
						ShiftTexture = 6, 0.1875, 0.0;
					Case 4:
						ShiftTexture = 6, 0.25, 0.0;
				}
				ChangeAlpha = 7,0.0;
			Case 1:
				ChangeAlpha = 6,0.0;
				ChangeAlpha = 7,1.0;
		}

		//ロゴ・帯色定義ここまで


		//車番（号車）定義ここから

		ApplySwitch "帯"{
			Case 0:
				ApplySwitch "連結位置"{
					Case 0:
						ShiftTexture = 1, 0.0, 0.5625;
						ShiftTexture = 3, 0.0, 0.5625;
					Case 1:
				}
			Case 1:
				ApplySwitch "連結位置"{
					Case 0:
						ShiftTexture = 1, 0.0, 0.9375;
						ShiftTexture = 3, 0.0, 0.9375;
					Case 1:
						ShiftTexture = 1, 0.0, 0.625;
						ShiftTexture = 3, 0.0, 0.625;
				}
			Case 2:
				ApplySwitch "連結位置"{
					Case 0:
						ShiftTexture = 1, 0.25, 0.3125;
						ShiftTexture = 3, 0.25, 0.3125;
					Case 1:
						ShiftTexture = 1, 0.25, 0.0;
						ShiftTexture = 3, 0.25, 0.0;
				}
			Case 3:
				ApplySwitch "連結位置"{
					Case 0:
						ShiftTexture = 1, 0.25, 0.6875;
						ShiftTexture = 3, 0.25, 0.6875;
					Case 1:
						ShiftTexture = 1, 0.25, 0.375;
						ShiftTexture = 3, 0.25, 0.375;
				}
			Case 4:
				ApplySwitch "連結位置"{
					Case 0:
						ShiftTexture = 1, 0.25, 0.9375;
						ShiftTexture = 3, 0.25, 0.9375;
					Case 1:
						ShiftTexture = 1, 0.25, 0.75;
						ShiftTexture = 3, 0.25, 0.75;
				}
		}

		//車番（号車）定義ここまで


		//車番（編成）定義ここから

		ApplySwitch "編成"{
			Case 0:
				
			Case 1:
				ShiftTexture = 2, 0.0, 0.0625;
				ShiftTexture = 4, 0.0, 0.0625;
			Case 2:
				ShiftTexture = 2, 0.0, 0.125;
				ShiftTexture = 4, 0.0, 0.125;
			Case 3:
				ShiftTexture = 2, 0.0, 0.1875;
				ShiftTexture = 4, 0.0, 0.1875;
			Case 4:
				ShiftTexture = 2, 0.0, 0.25;
				ShiftTexture = 4, 0.0, 0.25;
			Case 5:
				ShiftTexture = 2, 0.0, 0.3125;
				ShiftTexture = 4, 0.0, 0.3125;
			Case 6:
				ShiftTexture = 2, 0.0, 0.375;
				ShiftTexture = 4, 0.0, 0.375;
			Case 7:
				ShiftTexture = 2, 0.0, 0.4375;
				ShiftTexture = 4, 0.0, 0.4375;
			Case 8:
				ShiftTexture = 2, 0.0, 0.5;
				ShiftTexture = 4, 0.0, 0.5;
			Case 9:
				ShiftTexture = 2, 0.0, 0.5625;
				ShiftTexture = 4, 0.0, 0.5625;
			Case 10:
				ShiftTexture = 2, 0.0, 0.625;
				ShiftTexture = 4, 0.0, 0.625;
			Case 11:
				ShiftTexture = 2, 0.0, 0.6875;
				ShiftTexture = 4, 0.0, 0.6875;
			Case 12:
				ShiftTexture = 2, 0.0, 0.75;
				ShiftTexture = 4, 0.0, 0.75;
			Case 13:
				ShiftTexture = 2, 0.0, 0.8125;
				ShiftTexture = 4, 0.0, 0.8125;
			Case 14:
				ShiftTexture = 2, 0.0, 0.875;
				ShiftTexture = 4, 0.0, 0.875;
			Case 15:
				ShiftTexture = 2, 0.0, 0.9375;
				ShiftTexture = 4, 0.0, 0.9375;
			Case 16:
				ShiftTexture = 2, 0.25, 0.0;
				ShiftTexture = 4, 0.25, 0.0;
			Case 17:
				ShiftTexture = 2, 0.25, 0.0625;
				ShiftTexture = 4, 0.25, 0.0625;
			Case 18:
				ShiftTexture = 2, 0.25, 0.125;
				ShiftTexture = 4, 0.25, 0.125;
			Case 19:
				ShiftTexture = 2, 0.25, 0.1875;
				ShiftTexture = 4, 0.25, 0.1875;
			Case 20:
				ShiftTexture = 2, 0.25, 0.25;
				ShiftTexture = 4, 0.25, 0.25;
			Case 21:
				ShiftTexture = 2, 0.25, 0.3125;
				ShiftTexture = 4, 0.25, 0.3125;
			Case 22:
				ShiftTexture = 2, 0.25, 0.375;
				ShiftTexture = 4, 0.25, 0.375;
			Case 23:
				ShiftTexture = 2, 0.25, 0.4375;
				ShiftTexture = 4, 0.25, 0.4375;
			Case 24:
				ShiftTexture = 2, 0.25, 0.5;
				ShiftTexture = 4, 0.25, 0.5;
			Case 25:
				ShiftTexture = 2, 0.25, 0.5625;
				ShiftTexture = 4, 0.25, 0.5625;
			Case 26:
				ShiftTexture = 2, 0.25, 0.625;
				ShiftTexture = 4, 0.25, 0.625;
			Case 27:
				ShiftTexture = 2, 0.25, 0.6875;
				ShiftTexture = 4, 0.25, 0.6875;
			Case 28:
				ShiftTexture = 2, 0.25, 0.75;
				ShiftTexture = 4, 0.25, 0.75;
			Case 29:
				ShiftTexture = 2, 0.25, 0.8125;
				ShiftTexture = 4, 0.25, 0.8125;
			Case 30:
				ShiftTexture = 2, 0.25, 0.875;
				ShiftTexture = 4, 0.25, 0.875;
			Case 31:
				ShiftTexture = 2, 0.25, 0.9375;
				ShiftTexture = 4, 0.25, 0.9375;
			Case 32:
				ShiftTexture = 2, 0.5, 0.0;
				ShiftTexture = 4, 0.5, 0.0;
			Case 33:
				ShiftTexture = 2, 0.5, 0.0625;
				ShiftTexture = 4, 0.5, 0.0625;
			Case 34:
				ShiftTexture = 2, 0.5, 0.125;
				ShiftTexture = 4, 0.5, 0.125;
		}

		//車番（編成）定義ここまで

		Joint3D "Dummy"{
			AttachCoord = (0.0, 0.0, 0.0);
		}
	}
/*---------------------------------------車番定義ここまで---------------------------------------*/

/*---------------------------------------ステッカー定義ここから---------------------------------------*/
	Object3D "sticker"{
		ModelFileName = "sticker_20900r.x";
		CastShadow = no;
		ChangeAlpha = 2,0.0;
		ApplySwitch "ベビーカーマーク"{
			Case 1:
				ChangeAlpha = 1,0.0;
		}
		Joint3D "Dummy"{
			AttachCoord = (0.0, 0.0, 0.0);
		}
	}
/*---------------------------------------ステッカー定義ここまで---------------------------------------*/

/*---------------------------------------前面窓定義ここから---------------------------------------*/

	Object3D "window"{
		ModelFileName = "../n_omtbn20_1/window_20900.x";
		CastShadow = no;
		Transparent = 0;

		Joint3D "Dummy"{
			AttachCoord = (0.0, 0.0, 0.0);
		}
	}
/*---------------------------------------前面窓定義ここまで---------------------------------------*/

/*---------------------------------------床下モデル定義ここから---------------------------------------*/
	Object3D "yuka"{
		ModelFileName = "../n_omtbn20_1/yuka_20600.x";
		ApplySwitch "連結位置"{
			Case 1:
				StaticRotation{
					RotationAxis = (0.0, 1.0, 0.0);
					RotationAngle = 180;
				}
		}
		Joint3D "Dummy"{
			AttachCoord = (0.0, 0.0, 0.0);
		}
	}
/*---------------------------------------床下モデル定義ここまで---------------------------------------*/

/*---------------------------------------連結器モデル定義ここから---------------------------------------*/
	Object3D "yuka_c"{
		ModelFileName = "../n_omtbn20_1/yuka_g.x";
		ApplySwitch "帯"{
			Case 1,3,4:
				ChangeModel = "../n_omtbn20_1/yuka_f.x", 1.0;
		}
		Joint3D "Dummy"{
			AttachCoord = (0.0, 0.0, 0.0);
		}
	}
/*---------------------------------------連結器モデル定義ここまで---------------------------------------*/

/*---------------------------------------転防モデル定義ここから---------------------------------------*/
	Object3D "Horo-z"{
		ModelFileName = "";
		ApplySwitch "転落防止幌"{
			Case 0,2:
				ChangeModel = "../n_omtbn20_1/horo.x", 1.0;
		}
		Joint3D "Dummy"{
			AttachCoord = (0.0, 0.0, 0.0);
		}
	}
/*---------------------------------------転防モデル定義ここまで---------------------------------------*/

/*---------------------------------------扉モデル定義ここから---------------------------------------*/
	Object3D "Doorll"{
		ModelFileName = "../n_omtbn20_1/Doorl.x";
		Transparent = 4;
		If "電源"==0 && "客室照明"==0{
			ChangeMaterial{
				MaterialID = 0,1;
				Emissive = 1.0, 1.0, 1.0;
			}
　　　　　　　　}

		//ドア動作定義ここから

		If "_DOOR1"{
			StaticMove{
				Displacement = (0.0, 0.0, 0.6);
				PreAnimationDelay = 1.0;
				AnimationTime = 1.5;
				 PreReverseDelay = 0.5;
				ReverseTime = 1.5;
			}
			StaticMove{
				Displacement = (0.0, 0.0, 0.05);
				PreAnimationDelay = 2.5;
				AnimationTime = 0.5;
				 PreReverseDelay = 2.0;
				ReverseTime = 0.5;
			}
		}

		//ドア動作定義ここまで


		//帯定義ここから

		ApplySwitch "帯"{
			Case 1:
				ShiftTexture = 2, 0.09375, 0.0;
			Case 2:
				ShiftTexture = 2, 0.1875, 0.0;
			Case 3:
				ShiftTexture = 2, 0.28125, 0.0;
			Case 4:
				ShiftTexture = 2, 0.375, 0.0;
		}

		//帯定義ここまで


		Joint3D "MainBody"{
			AttachCoord = (0.0, 0.0, 0.0);
		}
	}

	Object3D "Doorlr"{
		ModelFileName = "../n_omtbn20_1/Doorr.x";
		Transparent = 4;
		If "電源"==0 && "客室照明"==0{
			ChangeMaterial{
				MaterialID = 0,1;
				Emissive = 1.0, 1.0, 1.0;
			}
　　　　　　　　}

		//ドア動作定義ここから

		If "_DOOR1" {
			StaticMove{
				Displacement = (0.0, 0.0, -0.6);
				PreAnimationDelay = 1.0;
				AnimationTime = 1.5;
				 PreReverseDelay = 0.5;
				ReverseTime = 1.5;
			}
			StaticMove{
				Displacement = (0.0, 0.0, -0.05);
				PreAnimationDelay = 2.5;
				AnimationTime = 0.5;
				 PreReverseDelay = 2.0;
				ReverseTime = 0.5;
			}
		}

		//ドア動作定義ここまで

		//帯定義ここから

		ApplySwitch "帯"{
			Case 1:
				ShiftTexture = 2, 0.09375, 0.0;
			Case 2:
				ShiftTexture = 2, 0.1875, 0.0;
			Case 3:
				ShiftTexture = 2, 0.28125, 0.0;
			Case 4:
				ShiftTexture = 2, 0.375, 0.0;
		}

		//帯定義ここまで

		Joint3D "MainBody"{
			AttachCoord = (0.0, 0.0, 0.0);
		}
	}
	Object3D "Doorrl"{
		ModelFileName = "../n_omtbn20_1/Doorr.x";
		Transparent = 4;
		If "電源"==0 && "客室照明"==0{
			ChangeMaterial{
				MaterialID = 0,1;
				Emissive = 1.0, 1.0, 1.0;
			}
　　　　　　　　}

		//ドア動作定義ここから

		If "_DOOR2"{
			StaticMove{
				Displacement = (0.0, 0.0, -0.6);
				PreAnimationDelay = 1.0;
				AnimationTime = 1.5;
				 PreReverseDelay = 0.5;
				ReverseTime = 1.5;
			}
			StaticMove{
				Displacement = (0.0, 0.0, -0.05);
				PreAnimationDelay = 2.5;
				AnimationTime = 0.5;
				 PreReverseDelay = 2.0;
				ReverseTime = 0.5;
			}
		}

		//ドア動作定義ここまで


		//帯定義ここから

		ApplySwitch "帯"{
			Case 1:
				ShiftTexture = 2, 0.09375, 0.0;
			Case 2:
				ShiftTexture = 2, 0.1875, 0.0;
			Case 3:
				ShiftTexture = 2, 0.28125, 0.0;
			Case 4:
				ShiftTexture = 2, 0.375, 0.0;
		}

		//帯定義ここまで

		Joint3D "MainBody"{
			AttachCoord = (0.0, 0.0, 0.0);
			AttachDir = (0.0, 0.0, -1.0);
		}
	}

	Object3D "Doorrr"{
		ModelFileName = "../n_omtbn20_1/Doorl.x";
		Transparent = 4;
		If "電源"==0 && "客室照明"==0{
			ChangeMaterial{
				MaterialID = 0,1;
				Emissive = 1.0, 1.0, 1.0;
			}
　　　　　　　　}

		//ドア動作定義ここから

		If "_DOOR2" {
			StaticMove{
				Displacement = (0.0, 0.0, 0.6);
				PreAnimationDelay = 1.0;
				AnimationTime = 1.5;
				 PreReverseDelay = 0.5;
				ReverseTime = 1.5;
			}
			StaticMove{
				Displacement = (0.0, 0.0, 0.05);
				PreAnimationDelay = 2.5;
				AnimationTime = 0.5;
				 PreReverseDelay = 2.0;
				ReverseTime = 0.5;
			}
		}

		//ドア動作定義ここまで


		//帯定義ここから

		ApplySwitch "帯"{
			Case 1:
				ShiftTexture = 2, 0.09375, 0.0;
			Case 2:
				ShiftTexture = 2, 0.1875, 0.0;
			Case 3:
				ShiftTexture = 2, 0.28125, 0.0;
			Case 4:
				ShiftTexture = 2, 0.375, 0.0;
		}

		//帯定義ここまで

		Joint3D "MainBody"{
			AttachCoord = (0.0, 0.0, 0.0);
			AttachDir = (0.0, 0.0, -1.0);
		}
	}
/*---------------------------------------扉モデル定義ここまで---------------------------------------*/

/*---------------------------------------戸閉灯モデル定義ここから---------------------------------------*/
	Object3D "Doorl"{
		ModelFileName = "../n_omtbn20_1/tojime.x";
		StaticRotation{
			RotationAxis = (0.0, 1.0, 0.0);
			RotationAngle = 180;
		}
		If "_DOOR2"{
			StaticRotation{
				RotationAxis = (0.0, 1.0, 0.0);
				RotationAngle = 180;
				PreAnimationDelay = 1.0;
				AnimationTime = 0.0;
				 PreReverseDelay = 2.5;
				ReverseTime = 0.0;
			}
		}
		Joint3D "MainBody"{
			AttachCoord = (1.41, 3.14, -0.43);
		}
	}
	Object3D "Doorr"{
		ModelFileName = "../n_omtbn20_1/tojime.x";
		If "_DOOR1"{
			StaticRotation{
				RotationAxis = (0.0, 1.0, 0.0);
				RotationAngle = 180;
				PreAnimationDelay = 1.0;
				AnimationTime = 0.0;
				 PreReverseDelay = 2.5;
				ReverseTime = 0.0;
			}
		}
		Joint3D "MainBody"{
			AttachCoord = (-1.41, 3.14, 0.43);
		}
	}
/*---------------------------------------戸閉灯モデル定義ここまで---------------------------------------*/

/*---------------------------------------簡易影モデル定義ここから---------------------------------------*/
	Object3D "Shadow"{
		ModelFileName = "../n_omtbn20_1/Shadow.x";
		CastShadow = no;
		NoCastShadow = 0;
		ApplySwitch "簡易影"{
			Case 1:
				ChangeModel = "", 1.0;
		}
		Joint3D "MainBody"{
			AttachCoord = (0.0, 0.0, 0.0);
		}
	}
/*---------------------------------------簡易影モデル定義ここまで---------------------------------------*/

	If "電源"==0 && (("前照灯"==0 && !"_FRONT")|| "前照灯"==1) && "レンズフレア"==0 && !"_CONNECT1" {
			Headlight{
			    AttachObject = "Dummy";
			    SourceCoord = (0.13, 1.84, 9.14);
			    Direction = (0.0, 0.0, 1.0);
			    MaxDistance = 10.0;
				LensFlare{
				    StartAngle = 90.0;
				    Twinkle = 0.1;
					Texture{
					    Distance = 0.005;
					    Radius = 0.5;
					    TexFileName = "../n_omtbn20_1/tex/フレア.png";
					    Color = #FFe2d4b4;
					}
				}
			}
			Headlight{
			    AttachObject = "Dummy";
			    SourceCoord = (-0.13, 1.84, 9.14);
			    Direction = (0.0, 0.0, 1.0);
			    MaxDistance = 10.0;
			}
	}
	If "電源"==0 && (("尾灯"==0 && "_FRONT")|| "尾灯"==1) && "レンズフレア"==0 && !"_CONNECT1" {
		Headlight{
		    AttachObject = "Dummy";
		    SourceCoord = (1.375, 2.72, 9.13);
		    Direction = (0.0, 0.0, 1.0);
		    MaxDistance = 10.0;
			LensFlare{
			    StartAngle = 30.0;
			    Twinkle = 0.1;
				Texture{
				    Distance = 0.005;
				    Radius = 0.5;
				    TexFileName = "../n_omtbn20_1/tex/フレア1.png";
				    Color = #FFd20046;
				}
			}
		}
		Headlight{
		    AttachObject = "Dummy";
		    SourceCoord = (-1.375, 2.72, 9.13);
		    Direction = (0.0, 0.0, 1.0);
		    MaxDistance = 10.0;
		}
	}
	FrontCabin{
		Joint3D "MainBody"{
			AttachCoord = (0.0,0.0,0.0);
		}
	}
}

