PluginHeader{
	RailSimVersion = 2.15;
	PluginType = Train;
	PluginName = "【Enth架空車】YERデニ５００形";
	PluginAuthor = "Enthiesia";
	IconTexture = "../Common_Enth/enthiesiaicon.png";
	Description = "定義ファイル更新:210116";
}
TrainInfo{
	FrontLimit = 10.0;
	TailLimit = -10.0;
	MaxVelocity = 120.0;
	MaxAcceleration = 3.0;
	MaxDeceleration = 3.0;
	DoorClosingTime = 7;
}
DefineSwitch"――電源――"{
	Entry = "　";
}
DefineSwitch"電源"{
	GroupCommon = "電源"; 
	Entry = "入";
	Entry = "（無効）";
	Entry = "切（ランプ・照明を全消灯）";
	Entry = "パンタも下げる";
}
DefineSwitch"――見た目（アニメーション）――"{
	Entry = "　";
}
DefineSwitch"方向幕１コマ下げ"{
	GroupCommon = "方向幕１コマ下げ";
	Entry = "デフォルト";
	Entry = "荷物";
	Entry = "→回送";
	Entry = "→試運転";
}
DefineSwitch"方向幕１コマ上げ"{
	GroupCommon = "方向幕１コマ上げ";
	Entry = "デフォルト";
	Entry = "→荷物";
	Entry = "→回送";
	Entry = "試運転";
}
DefineSwitch"↑動かない時は"{
	Entry = "片方を「デフォルト」にして下さい";
}
DefineSwitch"旅客ドア開閉"{
	GroupCommon = "旅客ドア開閉";
	Entry = "自動（ホーム停車時に開）";
	Entry = "常時閉";
	Entry = "常時進行方向左側開";
	Entry = "常時進行方向右側開";
	Entry = "常時両側開";
}
DefineSwitch"前面ドア（先頭車のみ有効）"{
	Entry = "閉";
	Entry = "45°開（連結面用）";
	Entry = "90°開";
}
DefineSwitch"――見た目（静的）――"{
	Entry = "　";
}
DefineSwitch"運番"{
	GroupCommon = "運番";
	Entry = "０１Ｙ";
	Entry = "０２Ｙ";
	Entry = "０３Ｙ";
	Entry = "０４Ｙ";
	Entry = "０５Ｋ";
	Entry = "０６Ｋ";
	Entry = "０７Ｋ";
	Entry = "０８Ｍ";
	Entry = "０９Ｍ";
	Entry = "１０Ｍ";
	Entry = "９９";
	Entry = "（黒幕）";
}
DefineSwitch"電連"{
	Entry = "あり";
	Entry = "なし";
}
DefineSwitch"パンタグラフ"{
	GroupCommon = "パンタグラフ";
	Entry = "上昇";
	Entry = "下降";
}
DefineSwitch"積荷"{
	Entry = "あり（その１）";
	Entry = "あり（その２）";
	Entry = "あり（その３）";
	Entry = "なし";
}
DefineSwitch"――基礎設定――"{
	Entry = "　";
}
DefineSwitch"簡易シャドウ"{
	GroupCommon = "簡易シャドウ";
	Entry = "あり";
	Entry = "なし";
}
DefineSwitch"軌間"{
	GroupCommon = "軌間";
	Entry = "狭軌1067mm";
	Entry = "標準軌1435mm";
}
DefineSwitch"号車"{
	Entry = "　　５００号車（Tc ）";
	Entry = "　　５０１号車（M）";
	Entry = "　　５０２号車（T）";
	Entry = "　　５０３号車（M(c)）";
	Entry = "　　５０４号車（Mc ）";
	Entry = "　　５０５号車（Mc）";
}
DefineSwitch"編成"{
	GroupCommon = "編成";
	Entry = "５０１Ｆ";
	Entry = "５０２Ｆ";
	Entry = "５０３Ｆ";
	Entry = "５０４Ｆ";
	Entry = "５０５Ｆ";
	Entry = "５０６Ｆ";
	Entry = "５０７Ｆ";
	Entry = "５０８Ｆ";
}
PrimaryAssembly{
	Axle"syarinn1"{
		ModelFileName = "model_syarin86_n.x";
		ModelScale = 1.0;
		Turn = no;
		CastShadow = yes;

		ApplySwitch"軌間"{
			Case 1: ChangeModel = "model_syarin86_w.x",1.0;
		}//順番に注意

		Diameter = 0.86;
		Symmetric = 12;
		Coord = (8.2,0.43);
		WheelSound = yes;
	}
	Axle"syarinn2"{
		ModelFileName = "model_syarin86_n.x";
		ModelScale = 1.0;
		Turn = no;
		CastShadow = yes;

		ApplySwitch"軌間"{
			Case 1: ChangeModel = "model_syarin86_w.x",1.0;
		}//順番に注意

		Diameter = 0.86;
		Symmetric = 12;
		Coord = (6.1,0.43);
		WheelSound = yes;
	}
	Axle"syarinn3"{
		ModelFileName = "model_syarin86_n.x";
		ModelScale = 1.0;
		Turn = no;
		CastShadow = yes;

		ApplySwitch"軌間"{
			Case 1: ChangeModel = "model_syarin86_w.x",1.0;
		}//順番に注意

		Diameter = 0.86;
		Symmetric = 12;
		Coord = (-6.1,0.43);
		WheelSound = yes;
	}
	Axle"syarinn4"{
		ModelFileName = "model_syarin86_n.x";
		ModelScale = 1.0;
		Turn = no;
		CastShadow = yes;

		ApplySwitch"軌間"{
			Case 1: ChangeModel = "model_syarin86_w.x",1.0;
		}//順番に注意

		Diameter = 0.86;
		Symmetric = 12;
		Coord = (-8.2,0.43);
		WheelSound = yes;
	}
	Body"daisya1"{
		ModelFileName = "model_daisya_n.x";
		ModelScale = 1.0;
		Turn = no;
		CastShadow = yes;

		ApplySwitch"軌間"{
			Case 1: ChangeModel = "model_daisya_w.x",1.0;
		}

		JointZY"syarinn1"{
			AttachCoord = (0.0,0.0);
			LocalCoord = (1.05,0.43);
		}
		JointZY"syarinn2"{
			AttachCoord = (0.0,0.0);
			LocalCoord = (-1.05,0.43);
		}
	}
	Body"daisya2"{
		ModelFileName = "model_daisya_n.x";
		ModelScale = 1.0;
		Turn = no;
		CastShadow = yes;

		ApplySwitch"軌間"{
			Case 1: ChangeModel = "model_daisya_w.x",1.0;
		}

		JointZY"syarinn3"{
			AttachCoord = (0.0,0.0);
			LocalCoord = (1.05,0.43);
		}
		JointZY"syarinn4"{
			AttachCoord = (0.0,0.0);
			LocalCoord = (-1.05,0.43);
		}
	}
	Body"syatai"{
		ModelFileName = "";
		ModelScale = 1.0;
		Turn = no;
		CastShadow = yes;

		NoCastShadow = 0,1,10,11,12,13,16;
		Transparent = 0,1,10,11,12,13,16;

		ApplySwitch"号車"{
			Case 0, 4, 5:
			ChangeModel = "model_body_s20_2.x", 1.0;
			Case 1, 2:
			ChangeModel = "model_body_t20_2.x", 1.0;
			Case 3:
			ChangeModel = "model_body_c20_2.x", 1.0;
		}
//せんとうのとき
		If!"_FRONT"{
		If!"_CONNECT1"{
			If("電源" < 2){
				ChangeTexture =17, "tex_exterior.png";
			}
		}
		}
//うしろのとき
		If"_FRONT"{
		If!"_CONNECT1"{
			If("電源" < 2){
				ChangeTexture =18, "tex_exterior.png";
			}
		}
		}
//戸閉灯
		If("電源" < 2){
			If ("_DOOR1" || "_DOOR2"){
				ChangeTexture = 19, "tex_exterior.png";
			}
			If("旅客ドア開閉" > 1){
				ChangeTexture = 19, "tex_exterior.png";
			}
		}
		ApplySwitch"編成"{
			Case 1:ShiftTexture = 10, 0.50, 0.00;
			Case 2:ShiftTexture = 10, 0.00, 0.25;
			Case 3:ShiftTexture = 10, 0.50, 0.25;
			Case 4:ShiftTexture = 10, 0.00, 0.50;
			Case 5:ShiftTexture = 10, 0.50, 0.50;
			Case 6:ShiftTexture = 10, 0.00, 0.75;
			Case 7:ShiftTexture = 10, 0.50, 0.75;
		}
		ApplySwitch"号車"{ //号車ステッカ、車番
			Case 1:ShiftTexture = 12, 0.05, 0.00; ChangeTexture = 10, "tex_numside_2.png";
			Case 2:ShiftTexture = 12, 0.00, 0.05; ChangeTexture = 10, "tex_numside_3.png";
			Case 3:ShiftTexture = 12, 0.05, 0.05; ChangeTexture = 10, "tex_numside_4.png";
			Case 4:ShiftTexture = 12, 0.00, 0.10; ChangeTexture = 10, "tex_numside_5.png";
			Case 5:ShiftTexture = 12, 0.05, 0.10; ChangeTexture = 10, "tex_numside_6.png";
		}
//屋根ひだパンタ部分
		ApplySwitch"号車"{ Case 1, 3, 5:
			ChangeTexture = 16, "../Common_Enth/tomei.png";
		}
		JointZY"daisya1"{
			AttachCoord = (0.0,-0.0);
			LocalCoord = (7.15,0.0);
		}
		JointZY"daisya2"{
			AttachCoord = (0.0,-0.0);
			LocalCoord = (-7.15,0.0);
		}
	}
	Object3D"bodyshadow"{
		ModelFileName = "";
		ModelScale = 1.0;
		CastShadow = no;
		NoShadow = 0;
		Transparent = 0;

		ApplySwitch"簡易シャドウ"{
			Case 0:ChangeModel = "model_shadow.x", 1.0;
			Case 1:ChangeModel = "", 1.0;
		}
		Joint3D"syatai"{
			AttachCoord = (0, 0, 0);
		}
	}
//DOORスイッチはZ正方向基準
//左左
	Object3D"doorRL"{
		ModelFileName = "model_door_LL20.x";
		ModelScale = 1.0;
		NoShadow = 0,1;
		Transparent = 0,1;

		If"_FRONT"{
			ApplySwitch"旅客ドア開閉"{
			Case 3:
				StaticMove{
					Displacement = (0,0,0.895);
					PreAnimationDelay = 0;
					AnimationTime = 3;
					PostAnimationDelay = 0;
				}
			}
		}
		If!"_FRONT"{
			ApplySwitch"旅客ドア開閉"{
			Case 2:
				StaticMove{
					Displacement = (0,0,0.895);
					PreAnimationDelay = 0;
					AnimationTime = 3;
					PostAnimationDelay = 0;
				}
			}
		}
		ApplySwitch"旅客ドア開閉"{
		Case 4:
			StaticMove{
				Displacement = (0,0,0.895);
				PreAnimationDelay = 0;
				AnimationTime = 3;
				PostAnimationDelay = 0;
			}
		}
		If"_DOOR1"{
			ApplySwitch"旅客ドア開閉"{
			Case 0:
				StaticMove{
					Displacement = (0,0,0.895);
					PreAnimationDelay = 1;
					AnimationTime = 3;
					PostAnimationDelay = 2;
				}
			}
		}
		Joint3D"syatai"{
			AttachCoord = (0,0,0);
		}
	}
//左右
	Object3D"doorRR"{
		ModelFileName = "model_door_LR20.x";
		ModelScale = 1.0;
		NoShadow = 0,1;
		Transparent = 0,1;

		If"_FRONT"{
			ApplySwitch"旅客ドア開閉"{
				Case 3:StaticMove{
					Displacement = (0,0,-0.895);
					PreAnimationDelay = 0;
					AnimationTime = 3;
					PostAnimationDelay = 0;
				}
			}
		}
		If!"_FRONT"{
			ApplySwitch"旅客ドア開閉"{
				Case 2:StaticMove{
					Displacement = (0,0,-0.895);
					PreAnimationDelay = 0;
					AnimationTime = 3;
					PostAnimationDelay = 0;
				}
			}
		}
		ApplySwitch"旅客ドア開閉"{
			Case 4:StaticMove{
					Displacement = (0,0,-0.895);
					PreAnimationDelay = 0;
					AnimationTime = 3;
					PostAnimationDelay = 0;
			}
		}
		If"_DOOR1"{
			ApplySwitch"旅客ドア開閉"{
				Case 0:StaticMove{
					Displacement = (0,0,-0.895);
					PreAnimationDelay = 1;
					AnimationTime = 3;
					PostAnimationDelay = 2;
				}
			}
		}
		Joint3D"syatai"{
			AttachCoord = (0,0,0);
		}
	}
//右左
	Object3D"doorLL"{
		ModelFileName = "model_door_RL20.x";
		ModelScale = 1.0;
		NoShadow = 0,1;
		Transparent = 0,1;

		If"_FRONT"{
			ApplySwitch"旅客ドア開閉"{
				Case 2:StaticMove{
					Displacement = (0,0,-0.895);
					PreAnimationDelay = 0;
					AnimationTime = 3;
					PostAnimationDelay = 0;
				}
			}
		}
		If!"_FRONT"{
			ApplySwitch"旅客ドア開閉"{
				Case 3:StaticMove{
					Displacement = (0,0,-0.895);
					PreAnimationDelay = 0;
					AnimationTime = 3;
					PostAnimationDelay = 0;
				}
			}
		}
		ApplySwitch"旅客ドア開閉"{
			Case 4:StaticMove{
					Displacement = (0,0,-0.895);
					PreAnimationDelay = 0;
					AnimationTime = 3;
					PostAnimationDelay = 0;
			}
		}
		If"_DOOR2"{
			ApplySwitch"旅客ドア開閉"{
				Case 0:StaticMove{
					Displacement = (0,0,-0.895);
					PreAnimationDelay = 1;
					AnimationTime = 3;
					PostAnimationDelay = 2;
				}
			}
		}
		Joint3D"syatai"{
			AttachCoord = (0,0,0);
		}
	}
//右右
	Object3D"doorLR"{
		ModelFileName = "model_door_RR20.x";
		ModelScale = 1.0;
		NoShadow = 0,1;
		Transparent = 0,1;

		If"_FRONT"{
			ApplySwitch"旅客ドア開閉"{
				Case 2:StaticMove{
					Displacement = (0,0,0.895);
					PreAnimationDelay = 0;
					AnimationTime = 3;
					PostAnimationDelay = 0;
				}
			}
		}
		If!"_FRONT"{
			ApplySwitch"旅客ドア開閉"{
				Case 3:StaticMove{
					Displacement = (0,0,0.895);
					PreAnimationDelay = 0;
					AnimationTime = 3;
					PostAnimationDelay = 0;
				}
			}
		}
		ApplySwitch"旅客ドア開閉"{
			Case 4:StaticMove{
					Displacement = (0,0,0.895);
					PreAnimationDelay = 0;
					AnimationTime = 3;
					PostAnimationDelay = 0;
			}
		}
		If"_DOOR2"{
			ApplySwitch"旅客ドア開閉"{
				Case 0:StaticMove{
					Displacement = (0,0,0.895);
					PreAnimationDelay = 1;
					AnimationTime = 3;
					PostAnimationDelay = 2;
				}
			}
		}
		Joint3D"syatai"{
			AttachCoord = (0,0,0);
		}
	}
	Object3D"daisyatan"{
		ModelFileName = "";
		ModelScale = 1.0;
		If!"軌間"{
			ApplySwitch"号車"{ Case 0, 3, 4, 5:ChangeModel = "model_daisyatan_n.x", 1.0; }
		} Else {
			ApplySwitch"号車"{ Case 0, 3, 4, 5:ChangeModel = "model_daisyatan_w.x", 1.0; }
		}
		Joint3D"daisya1"{
			AttachCoord = (0, 0, 0);
		}
	}
	Object3D"yukashita"{
		ModelFileName = "";
		ModelScale = 1.0;
		ApplySwitch"号車"{
			Case 0:ChangeModel = "model_yukashita_Tc20.x", 1.0;
			Case 2:ChangeModel = "model_yukashita_T20.x", 1.0;
			Case 3, 4, 5:ChangeModel = "model_yukashita_Mc20.x", 1.0;
			Case 1:ChangeModel = "model_yukashita_M20.x", 1.0;
		}
		Joint3D"syatai"{
			AttachCoord = (0, 0, 0);
		}
	}
	Object3D"airspring"{
		ModelFileName = "";
		ModelScale = 1.0;
		ApplySwitch"軌間"{
			Case 0:ChangeModel = "model_airspringbody_n20.x", 1.0;
			Case 1:ChangeModel = "model_airspringbody_w20.x", 1.0;
		}
		Joint3D"syatai"{
			AttachCoord = (0, 0, 0);
		}
	}
	Object3D"panta"{
		ModelFileName = "";
		ModelScale = 1.0;
		ApplySwitch"号車"{ Case 1, 3, 5:
			If("電源" < 3){
				If!"パンタグラフ"{
					ChangeModel = "model_panta_a.x", 1.0;
				} Else {
					ChangeModel = "model_panta_b.x", 1.0;
				}
			} Else {
				ChangeModel = "model_panta_b.x", 1.0;
			}
		}
		Joint3D"syatai"{
			AttachCoord = (0, 0, 0);
		}
	}
	Object3D"houkoumaku"{
		ModelFileName = "";
		ModelScale = 1.0;
		ApplySwitch"号車"{
			Case 0, 4, 5:ChangeModel = "model_houkou_s20.x", 1.0;
		}
		If("電源" < 2){
			ChangeTexture = 2, "tex_houkou.png";  ChangeTexture = 3, "tex_houkou.png"; 
		}
		If!"方向幕１コマ上げ"{
			ApplySwitch"方向幕１コマ下げ"{
				Case 2:ShiftTexture=0, 0, 0.00; ShiftTexture=1, 0, 0.3;
					ShiftTexture=2, 0, 0.00; ShiftTexture=3, 0, 0.3;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=0;}
					StaticMove{Displacement=(0, 0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 3:ShiftTexture=0, 0, 0.3; ShiftTexture=1, 0, 0.6;
					ShiftTexture=2, 0, 0.3; ShiftTexture=3, 0, 0.6;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=0;}
					StaticMove{Displacement=(0, 0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 4:ShiftTexture=0, 0, 0.6; ShiftTexture=1, 0, 0.9;
					ShiftTexture=2, 0, 0.6; ShiftTexture=3, 0, 0.9;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=0;}
					StaticMove{Displacement=(0, 0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 5:ShiftTexture=0, 0, 0.9; ShiftTexture=1, 0, 1.2;
					ShiftTexture=2, 0, 0.9; ShiftTexture=3, 0, 1.2;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=0;}
					StaticMove{Displacement=(0, 0.22, 0); AnimationTime=2; ReverseTime=0;}
			}
		}
		If!"方向幕１コマ下げ"{
			ApplySwitch"方向幕１コマ上げ"{
				Case 1:ShiftTexture=0, 0, 0.00; ShiftTexture=1, 0, 0.3;
					ShiftTexture=2, 0, 0.00; ShiftTexture=3, 0, 0.3;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 2:ShiftTexture=0, 0, 0.3; ShiftTexture=1, 0, 0.6;
					ShiftTexture=2, 0, 0.3; ShiftTexture=3, 0, 0.6;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 3:ShiftTexture=0, 0, 0.6; ShiftTexture=1, 0, 0.9;
					ShiftTexture=2, 0, 0.6; ShiftTexture=3, 0, 0.9;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 4:ShiftTexture=0, 0, 0.9; ShiftTexture=1, 0, 1.2;
					ShiftTexture=2, 0, 0.9; ShiftTexture=3, 0, 1.2;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=2; ReverseTime=0;}
			}
		}
		If("方向幕１コマ下げ"=="方向幕１コマ上げ"){
			ApplySwitch"方向幕１コマ下げ"{
				Case 2:ShiftTexture=1, 0, 0.3; ShiftTexture=3, 0, 0.3;
				Case 3:ShiftTexture=1, 0, 0.6; ShiftTexture=3, 0, 0.6;
				Case 4:ShiftTexture=1, 0, 0.9; ShiftTexture=3, 0, 0.9;
				Case 5:ShiftTexture=1, 0, 1.2; ShiftTexture=3, 0, 1.2;
			}
		}

		Joint3D"syatai"{
			AttachCoord = (0, 0, 0);
		}
	}
	Object3D"frontdoor"{
		ModelFileName = "";
		ModelScale = 1.0;
		NoShadow = 0;
		NoCastShadow = 7;
		Transparent = 0, 7;

		ApplySwitch"号車"{
			Case 0, 4, 5:
			ChangeModel = "model_frontdoor_s20_2.x", 1.0;
		}
//せんとうのとき
		If!"_FRONT"{
		If!"_CONNECT1"{
			If("電源" < 2){
				ChangeTexture =9, "tex_exterior.png";
			}
		}
		}
//うしろのとき
		If"_FRONT"{
		If!"_CONNECT1"{
			If("電源" < 2){
				ChangeTexture =10, "tex_exterior.png";
			}
		}
		}
//先頭車番
		ApplySwitch"編成"{
			Case 1:ShiftTexture = 7, 0.50, 0.00;
			Case 2:ShiftTexture = 7, 0.00, 0.25;
			Case 3:ShiftTexture = 7, 0.50, 0.25;
			Case 4:ShiftTexture = 7, 0.00, 0.50;
			Case 5:ShiftTexture = 7, 0.50, 0.50;
			Case 6:ShiftTexture = 7, 0.00, 0.75;
			Case 7:ShiftTexture = 7, 0.50, 0.75;
		}
		ApplySwitch"号車"{
			Case 4:ChangeTexture = 7, "tex_numfront_4.png";
			Case 5:ChangeTexture = 7, "tex_numfront_5.png";
		}
//運番
		If("電源" > 1){ //電源切のときに必ず黒幕にする
			ShiftTexture = 4, 0.50, 0.8333;
		} Else {
			ChangeTexture = 11, "tex_unban.png";
			ApplySwitch"運番"{
				Case 1:ShiftTexture = 11, 0.00, 0.1666;
				Case 2:ShiftTexture = 11, 0.00, 0.3333;
				Case 3:ShiftTexture = 11, 0.00, 0.50;
				Case 4:ShiftTexture = 11, 0.00, 0.6666;
				Case 5:ShiftTexture = 11, 0.00, 0.8333;
				Case 6:ShiftTexture = 11, 0.50, 0.00;
				Case 7:ShiftTexture = 11, 0.50, 0.1666;
				Case 8:ShiftTexture = 11, 0.50, 0.3333;
				Case 9:ShiftTexture = 11, 0.50, 0.50;
				Case 10:ShiftTexture = 11, 0.50, 0.6666;
				Case 11:ShiftTexture = 11, 0.50, 0.8333;
			}
		}
		ApplySwitch"前面ドア（先頭車のみ有効）"{
			Case 1:
				StaticRotation{
					RotationAxis = (0, 1, 0);
					RotationAngle= 45;
					PreAnimationDelay = 0;
					AnimationTime = 4.0;
					PostAnimationDelay = 0.0;
				}
			Case 2:
				StaticRotation{
					RotationAxis = (0, 1, 0);
					RotationAngle= 90;
					PreAnimationDelay = 0;
					AnimationTime = 4.0;
					PostAnimationDelay = 0.0;
				}
		}

		Joint3D"syatai"{
			AttachCoord = (1.27, 0, 9.65);
		}
	}
	Object3D"denren"{
		ModelFileName = "";
		ModelScale = 1.0;
		If!"電連"{
			ApplySwitch"号車"{
				Case 0, 3, 4, 5:ChangeModel = "model_denren_s20.x", 1.0;
			}
		}
		Joint3D"syatai"{
			AttachCoord = (0, 0, 0);
		}
	}
	Object3D"pallet"{
		ModelFileName = "";
		ModelScale = 1.0;
		NoCastShadow = 0, 1;
		Transparent = 0;

		ApplySwitch"積荷"{
			Case 0, 1:
				ApplySwitch"号車"{
					Case 0, 4, 5:
					ChangeModel = "model_pallet_hira_s.x", 1.0;
					Case 1, 2:
					ChangeModel = "model_pallet_hira_t.x", 1.0;
					Case 3:
					ChangeModel = "model_pallet_hira_c.x", 1.0;
				}
				If("積荷" < 1){
					ShiftTexture = 1, -0.21, 0.00;
				}
			Case 2:
				ApplySwitch"号車"{
					Case 0, 4, 5:
					ChangeModel = "model_pallet_roll_s.x", 1.0;
					Case 1, 2:
					ChangeModel = "model_pallet_roll_t.x", 1.0;
					Case 3:
					ChangeModel = "model_pallet_roll_c.x", 1.0;
			}
		}

		Joint3D"syatai"{
			AttachCoord = (0, 0, 0);
		}
	}

	Object3D"frontwindow"{
		ModelFileName = "";
		ModelScale = 1.0;
		NoShadow = 0;
		Transparent = 0;
		ApplySwitch"号車"{
			Case 0, 4, 5:ChangeModel = "model_frontwindow_s20.x", 1.0;
		}
		Joint3D"syatai"{
			AttachCoord = (0, 0, 0);
		}
	}

	If!"_FRONT"{
	If!"_CONNECT1"{
	If("電源" < 2){
	ApplySwitch"号車"{
		Case 0, 4, 5:
			Headlight{
				AttachObject = "syatai";
				SourceCoord = (-0.73, 1.25, 9.61);
				Direction = (0.0, 0.0, 15.0);
				MaxDistance = 100.0;
				LensFlare{
					StartAngle = 75.0;
					Circle{
						Distance = 0.0;
						Radius = 0.2;
						InnerColor = #f0ffffff;
						OuterColor = #00000000;
					}
				}
			}
			If!"前面ドア（先頭車のみ有効）"{
			Headlight{
				AttachObject = "syatai";
				SourceCoord = (0.73, 1.25, 9.61);
				Direction = (0.0, 0.0, 15.0);
				MaxDistance = 100.0;
				LensFlare{
					StartAngle = 75.0;
					Circle{
						Distance = 0.0;
						Radius = 0.2;
						InnerColor = #f0ffffff;
						OuterColor = #00000000;
					}
				}
			}
			}
		Case 3:
			Headlight{
				AttachObject = "syatai";
				SourceCoord = (-0.73, 1.50, 9.71);
				Direction = (0.0, 0.0, 15.0);
				MaxDistance = 100.0;
				LensFlare{
					StartAngle = 75.0;
					Circle{
						Distance = 0.0;
						Radius = 0.2;
						InnerColor = #f0ffffff;
						OuterColor = #00000000;
					}
				}
			}
			Headlight{
				AttachObject = "syatai";
				SourceCoord = (0.73, 1.50, 9.71);
				Direction = (0.0, 0.0, 15.0);
				MaxDistance = 100.0;
				LensFlare{
					StartAngle = 75.0;
					Circle{
						Distance = 0.0;
						Radius = 0.2;
						InnerColor = #f0ffffff;
						OuterColor = #00000000;
					}
				}
			}
	}
	}
	}
	}
	FrontCabin{
		Joint3D "syatai"{
			AttachCoord = (-0.7, 2.5, 8.4);
			DirLink = "syatai";
		}
	}
}