PluginHeader{
	RailSimVersion = 2.00;
	PluginType = Train;
	PluginName = "京王電鉄8000系(2025年11月16日版) 中間付随車";
	PluginAuthor = "n";
	IconTexture = "icon.png";
	Description = "";
}
TrainInfo{
	FrontLimit = 10.00;
	TailLimit = -10.00;
	MaxVelocity = 120.0;
	MaxAcceleration = 2.5;
	MaxDeceleration = 4.0;
	DoorClosingTime = 5.0;
}
DefineSwitch "■基本設定"{
}
DefineSwitch "電源"{
GroupCommon = "nkeio8000電源";
	Entry = "入";
	Entry = "切";
}
DefineSwitch "パンタ高さ"{
	GroupCommon = "nkeio8000pt";
	Entry = "自動(基準：シンプルカテナリ)";
	Entry = "剛体架線";
}
DefineSwitch "■灯火類設定-"{
}
DefineSwitch "客室照明"{
GroupCommon = "nkeio8000客室灯";
	Entry = "入";
	Entry = "切";
}
DefineSwitch "■列車設定"{
}
DefineSwitch "種別"{
GroupCommon = "nkeio8000種別";
	Entry = "";
	Entry = "各駅停車";
	Entry = "快速";
	Entry = "";
	Entry = "区間急行";
	Entry = "急行";
	Entry = "準特急";
	Entry = "特急";
	Entry = "回送";
	Entry = "試運転";
	Entry = "臨時";
}
DefineSwitch "行先"{
GroupCommon = "nkeio8000行先";
	Entry = "";
	Entry = "新宿";
	Entry = "桜上水";
	Entry = "八幡山";
	Entry = "つつじが丘";
	Entry = "調布";
	Entry = "飛田給";
	Entry = "府中";
	Entry = "高幡不動";
	Entry = "北野";
	Entry = "京王八王子";
	Entry = "";
	Entry = "高尾";
	Entry = "高尾山口";
	Entry = "";
	Entry = "若葉台";
	Entry = "京王多摩センター";
	Entry = "";
	Entry = "橋本";
	Entry = "";
	Entry = "東府中";
	Entry = "府中競馬正門前";
	Entry = "";
	Entry = "多摩動物公園";
	Entry = "";
	Entry = "笹塚";
	Entry = "新線新宿";
	Entry = "";
	Entry = "";
	Entry = "岩本町";
	Entry = "";
	Entry = "大島";
	Entry = "";
	Entry = "";
	Entry = "瑞江";
	Entry = "";
	Entry = "本八幡";
	Entry = "";
	Entry = "京王八王子・高尾山口";
	Entry = "多摩動物公園・高尾山口";
}
DefineSwitch "■車両設定"{
}
DefineSwitch "形式"{
	Entry = "サハ8500(8700)";
	Entry = "サハ8550(8750)";
}
DefineSwitch "編成"{
GroupCommon = "nkeio8000編成";
	Entry = "8両編成";
	Entry = "10両貫通編成";
}
DefineSwitch "車番"{
GroupCommon = "nkeio8000車番";
	Entry = "01";
	Entry = "02";
	Entry = "03";
	Entry = "04";
	Entry = "05";
	Entry = "06";
	Entry = "07";
	Entry = "08";
	Entry = "09";
	Entry = "10";
	Entry = "11";
}
DefineSwitch "■仕様設定(細部)"{
}
DefineSwitch "全体-行先表示器仕様"{
GroupCommon = "nkeio8000行先表示器仕様";
	Entry = "FCLED(ROM再々更新・現行)";	
	Entry = "FCLED(ROM再更新)";	
}
DefineSwitch "車外ステッカー"{
GroupCommon = "nkeio8000車外ステッカー";
	Entry = "ステッカー移動(2025〜)";		
	Entry = "ベビーカーステッカー追加(2017〜)";						
}
DefineSwitch "■質感設定"{
}
DefineSwitch "床下汚し"{
GroupCommon = "nkeio8000床下汚し";
	Entry = "切";
	Entry = "入";
}
DefineSwitch "簡易影"{
	GroupCommon = "nkeio8000簡易陰";
	Entry = "入";
	Entry = "切";
}
DefineSwitch "PBR"{
	GroupCommon = "nkeio8000pbr";
	Entry = "入";
	Entry = "切";
}
PrimaryAssembly{
	Axle "wheel1"{
		ModelFileName = "../n_keio8000_251116_1/wheel.x";
		CastShadow = no;
		AlphaZeroTest = 0,1;

		Diameter = 0.86;
		Symmetric = 16;
		Coord = (7.95,0.43);
	}
	Axle "wheel2"{
		ModelFileName = "../n_keio8000_251116_1/wheel.x";
		CastShadow = no;
		AlphaZeroTest = 0,1;

		Diameter = 0.86;
		Symmetric = 16;
		Coord = (5.85,0.43);
	}
	Axle "wheel3"{
		ModelFileName = "../n_keio8000_251116_1/wheel.x";
		CastShadow = no;
		AlphaZeroTest = 0,1;

		Diameter = 0.86;
		Symmetric = 16;
		Coord = (-7.95,0.43);
	}
	Axle "wheel4"{
		ModelFileName = "../n_keio8000_251116_1/wheel.x";
		CastShadow = no;
		AlphaZeroTest = 0,1;

		Diameter = 0.86;
		Symmetric = 16;
		Coord = (-5.85,0.43);
	}
	Body "Bogie1"{
		ModelFileName = "../n_keio8000_251116_1/bogie_m.x";
		ApplySwitch "床下汚し"{
			Case 1:
				ShiftTexture = 0, 0.0, 0.5;
				ShiftTexture = 1, 0.0, 0.5;
				ShiftTexture = 2, 0.0, 0.5;
				ShiftTexture = 3, 0.0, 0.5;
		}
		JointZY "wheel1"{
			AttachCoord = (0,0);
			LocalCoord = (1.05,0);
		}
		JointZY "wheel2"{
			AttachCoord = (0,0);
			LocalCoord = (-1.05,0);
		}
	}
	Body "Bogie2"{
		ModelFileName = "../n_keio8000_251116_1/bogie_m.x";
		Turn = yes;
		ApplySwitch "床下汚し"{
			Case 1:
				ShiftTexture = 0, 0.0, 0.5;
				ShiftTexture = 1, 0.0, 0.5;
				ShiftTexture = 2, 0.0, 0.5;
				ShiftTexture = 3, 0.0, 0.5;
		}
		JointZY "wheel3"{
			AttachCoord = (0,0);
			LocalCoord = (1.05,0);
		}
		JointZY "wheel4"{
			AttachCoord = (0,0);
			LocalCoord = (-1.05,0);
		}
	}
	Body "Dummy"{
		ModelFileName = "";
		JointZY "Bogie1"{
			AttachCoord = (0.0, 0.57);
			LocalCoord = (6.9, 1.0);
		}
		JointZY "Bogie2"{
			AttachCoord = (0.0, 0.57);
			LocalCoord = (-6.9, 1.0);
		}
	}
	Object3D "led_s"{
		ModelFileName = "../n_keio8000_251116_1/ledfc_s.x";
		If !"電源"{
			ApplySwitch "種別"{
			Case 1:
				ShiftTexture = 1, 0.0, -0.1875;
			Case 2:
				ShiftTexture = 1, 0.0, -0.15625;
			Case 3:
				ShiftTexture = 1, 0.0, -0.125;
			Case 4:
				ApplySwitch "全体-行先表示器仕様"{
				Case 0:
					ShiftTexture = 1, 0.0, -0.09375;
				Case 1,2:
					ShiftTexture = 1, 0.0, 0.09375;
				}
			Case 5:
				ShiftTexture = 1, 0.0, -0.0625;
			Case 6:
				ShiftTexture = 1, 0.0, -0.03125;
			Case 7:
			Case 8:
				ShiftTexture = 1, -0.25, -0.15625;
			Case 9:
				ShiftTexture = 1, -0.25, -0.125;
			Case 10:
				ShiftTexture = 1, -0.25, -0.09375;
			Default:
				ChangeAlpha = 1, 0.0;
			}
			ApplySwitch "種別"{
			Case 8:
				ShiftTexture = 2, -0.25, -0.1875;
			Case 9:
				ShiftTexture = 2, -0.25, -0.15625;
			Case 10:
				ShiftTexture = 2, -0.25, -0.125;
			Default:
				ApplySwitch "行先"{
				Case 1:
					ShiftTexture = 2, 0.0, -0.21875;
				Case 2:
					ShiftTexture = 2, 0.0, -0.1875;
				Case 3:
					ApplySwitch "全体-行先表示器仕様"{
					Case 2:
						ShiftTexture = 2, 0.0, -0.125;
					Default:
						ShiftTexture = 2, 0.0, -0.15625;
					}
				Case 4:
					ShiftTexture = 2, 0.0, -0.09375;
				Case 5:
					ShiftTexture = 2, 0.0, -0.0625;
				Case 6:
					ShiftTexture = 2, 0.0, -0.03125;
				Case 7:
				Case 8:
					ShiftTexture = 2, 0.0, 0.03125;
				Case 9:
					ShiftTexture = 2, 0.0, 0.0625;
				Case 10:
					ShiftTexture = 2, 0.0, 0.09375;
				Case 12:
					ShiftTexture = 2, 0.0, 0.125;
				Case 13:
					ShiftTexture = 2, 0.0, 0.15625;
				Case 15:
					ShiftTexture = 2, 0.0, 0.1875;
				Case 16:
					ShiftTexture = 2, 0.0, 0.21875;
				Case 17:
					ShiftTexture = 2, 0.0, 0.25;
				Case 18:
					ShiftTexture = 2, 0.125, -0.21875;
				Case 20:
					ShiftTexture = 2, 0.125, -0.1875;
				Case 21:
					ApplySwitch "全体-行先表示器仕様"{
					Case 2:
						ShiftTexture = 2, 0.125, -0.125;
					Default:
						ShiftTexture = 2, 0.125, -0.15625;
					}
				Case 23:
					ShiftTexture = 2, 0.125, -0.09375;
				Case 25:
					ShiftTexture = 2, 0.125, -0.0625;
				Case 26:
					ApplySwitch "全体-行先表示器仕様"{
					Case 2:
						ShiftTexture = 2, 0.125, 0.0;
					Default:
						ShiftTexture = 2, 0.125, -0.03125;
					}
				Case 28:
					ShiftTexture = 2, 0.125, 0.03125;
				Case 29:
					ShiftTexture = 2, 0.125, 0.0625;
				Case 30:
					ShiftTexture = 2, 0.125, 0.09375;
				Case 31:
					ShiftTexture = 2, 0.125, 0.125;
				Case 32:
					ShiftTexture = 2, 0.125, 0.15625;
				Case 34:
					ShiftTexture = 2, 0.125, 0.1875;
				Case 35:
					ShiftTexture = 2, 0.125, 0.21875;
				Case 36:
					ShiftTexture = 2, 0.125, 0.25;
				Default:
					ChangeAlpha = 2, 0.0;
				}
			}
		}Else{
			ChangeAlpha = 1, 0.0;
			ChangeAlpha = 2, 0.0;
		}
	
		Joint3D "Dummy"{
			AttachCoord = (0.0, 0.0, 0.0);
		}
	}

	Object3D "MainBody"{
		ModelFileName = "../n_keio8000_251116_1/body_2.x";
		NoCastShadow = 31,32,33,34,35;
		Transparent = 2,3,4;
			ChangeMaterial{
				MaterialID = 2,3,4;
				Diffuse = 0.7, 0.7, 0.7, 1.0;
				Ambient = 0.7, 0.7, 0.7;
				Power = 5.0;
　　　　　		}
			ShiftTexture = 32, 0.0, 0.0625;
			ApplySwitch "形式"{
			Case 0:
				If"車番">8{
					ShiftTexture = 33, 0.0, -0.0625;
				}Else{
					ShiftTexture = 33, 0.0, -0.09375;
				}
			Case 1:
				If"車番">8{
					ShiftTexture = 33, 0.0, 0.09375;
				}Else{
					ShiftTexture = 33, 0.0, 0.0625;
				}
			}


		ApplySwitch "編成"{
		Case 1:
		ApplySwitch "形式"{
			Case 0:ChangeModel = "../n_keio8000_251116_1/body_3.x", 1.0;
			Case 1:ChangeModel = "../n_keio8000_251116_1/body_4.x", 1.0;
		}
		}




		ApplySwitch "車番"{
		Case 0,10:
			ShiftTexture = 34, 0.0, -0.125;
		Case 1:
			ShiftTexture = 34, 0.0, -0.09375;
		Case 2:
			ShiftTexture = 34, 0.0, -0.0625;
		Case 3:
			ShiftTexture = 34, 0.0, -0.03125;
		Case 5:
			ShiftTexture = 34, 0.0, 0.03125;
		Case 6:
			ShiftTexture = 34, 0.0, 0.0625;
		Case 7:
			ShiftTexture = 34, 0.0, 0.09375;
		Case 8:
			ShiftTexture = 34, 0.0, 0.125;
		Case 9:
			ShiftTexture = 34, 0.0, -0.15625;
		Case 11:
			If"編成"==1{
				ShiftTexture = 34, 0.0, -0.09375;
			}Else{
				ChangeAlpha = 34, 0.0;
			}
		Case 12:
			If"編成"==1{
				ShiftTexture = 34, 0.0, -0.0625;
			}Else{
				ChangeAlpha = 34, 0.0;
			}
		Case 13:
			If"編成"==1{
				ShiftTexture = 34, 0.0, -0.03125;
			}Else{
				ChangeAlpha = 34, 0.0;
			}
		}


		ApplySwitch "車番"{
		Case 0,10:
			ShiftTexture = 34, 0.0, -0.125;
		Case 1:
			ShiftTexture = 34, 0.0, -0.09375;
		Case 2:
			ShiftTexture = 34, 0.0, -0.0625;
		Case 3:
			ShiftTexture = 34, 0.0, -0.03125;
		Case 5:
			ShiftTexture = 34, 0.0, 0.03125;
		Case 6:
			ShiftTexture = 34, 0.0, 0.0625;
		Case 7:
			ShiftTexture = 34, 0.0, 0.09375;
		Case 8:
			ShiftTexture = 34, 0.0, 0.125;
		Case 9:
			ShiftTexture = 34, 0.0, -0.15625;
		}

		Joint3D "Dummy"{
			AttachCoord = (0.0, 0.0, 0.0);
		}
	}
	Object3D "Cooler"{
		ModelFileName = "../n_keio8000_251116_1/Cooler_1.x";

		Joint3D "MainBody"{
			AttachCoord = (0.0, 0.0, 0.0);
		}
	}
	Object3D "yuka"{
		ModelFileName = "";
		ApplySwitch "床下汚し"{
			Case 1:
				ChangeTexture = 0, "../n_keio8000_251116_1/tex/床下1.png";
		}
		ApplySwitch "形式"{
			Case 0:ChangeModel = "../n_keio8000_251116_1/yuka_8700.x", 1.0;
			Case 1:ChangeModel = "../n_keio8000_251116_1/yuka_8700.x", 1.0;
		}
		Joint3D "Dummy"{
			AttachCoord = (0.0, 0.0, 0.0);
		}
	}
	Object3D "Hood"{
		ModelFileName = "../n_keio8000_251116_1/hood.x";
		Transparent = 1;
		Joint3D "MainBody"{
			AttachCoord = (0.0, 0.0, 0.0);
		}
	}
	Object3D "yane"{
		ModelFileName = "../n_keio8000_251116_1/yane2.x";
		ApplySwitch "編成"{
			Case 1:ChangeModel = "", 1.0;
		}
		Joint3D "MainBody"{
			AttachCoord = (0.0, 0.0, 0.0);
		}
	}
	Object3D "Sticker_n"{

		ModelFileName = "../n_keio8000_251116_1/sticker_n.x";
	CastShadow = no;
			ApplySwitch "形式"{
			Case 0:
				ShiftTexture = 0, 0.0625, 0.125;
			Case 1:
				ShiftTexture = 0, 0.0, 0.125;
			}
		Joint3D "MainBody"{
			AttachCoord = (0.0, 0.0, 0.0);
		}
	}
	Object3D "Sticker_pz"{
		ModelFileName = "";
	CastShadow = no;
		If"編成"==1&&"形式"==1{
			ApplySwitch "車外ステッカー"{
			Case 1:
				ChangeModel = "../n_keio8000_251116_1/sticker_p_2.x", 1.0;
			}
		}Else{
			ApplySwitch "車外ステッカー"{
			Case 1:
				ChangeModel = "../n_keio8000_251116_1/sticker_p_3.x", 1.0;
			}
		}
		Joint3D "MainBody"{
			AttachCoord = (0.0, 0.0, 0.0);
		}
	}
	Object3D "Sticker_p-z"{
		ModelFileName = "";
	CastShadow = no;
		If"編成"==1&&"形式"==0{
			ApplySwitch "車外ステッカー"{
			Case 1:
				ChangeModel = "../n_keio8000_251116_1/sticker_p_2.x", 1.0;
			}
		}Else{
			ApplySwitch "車外ステッカー"{
			Case 1:
				ChangeModel = "../n_keio8000_251116_1/sticker_p_3.x", 1.0;
			}
		}
		Joint3D "MainBody"{
			AttachCoord = (0.0, 0.0, 0.0);
			AttachDir = (0.0, 0.0, -1.0);
		}
	}
	Object3D "Sticker_o"{
		ModelFileName = "";
	CastShadow = no;
		If "編成"==1&&"形式"==1{
				ApplySwitch "車外ステッカー"{
				Case 0:
					ChangeModel = "../n_keio8000_251116_1/sticker_o_5.x", 1.0;
				Case 1:
					ChangeModel = "../n_keio8000_251116_1/sticker_o_4.x", 1.0;
				}
		}Else{
				ApplySwitch "車外ステッカー"{
				Case 0:
					ChangeModel = "../n_keio8000_251116_1/sticker_o_3.x", 1.0;
				Case 1:
					ChangeModel = "../n_keio8000_251116_1/sticker_o_2.x", 1.0;
				}
		}
		Joint3D "MainBody"{
			AttachCoord = (0.0, 0.0, 0.0);
		}
	}
	Object3D "Doorill"{
		ModelFileName = "../n_keio8000_251116_1/Dooril1.x";
		If "_DOOR1"{
			StaticMove{
				Displacement = (0.0, 0.0, 0.6);
				PreAnimationDelay = 1.0;
				AnimationTime = 2.0;
				ReverseTime = 2.0;
			}
			StaticMove{
				Displacement = (0.0, 0.0, 0.05);
				PreAnimationDelay = 3.0;
				AnimationTime = 1.0;
				PreReverseDelay = 2.5;
				ReverseTime = 0.5;
				PostReverseDelay = 5.0;
			}
		}
		Joint3D "MainBody"{
			AttachCoord = (0.0, 0.0, 0.0);
		}
	}
	Object3D "Doorilr"{
		ModelFileName = "../n_keio8000_251116_1/Doorir1.x";
		If "_DOOR1" {
			StaticMove{
				Displacement = (0.0, 0.0, -0.6);
				PreAnimationDelay = 1.0;
				AnimationTime = 2.0;
				ReverseTime = 2.0;
			}
			StaticMove{
				Displacement = (0.0, 0.0, -0.05);
				PreAnimationDelay = 3.0;
				AnimationTime = 1.0;
				PreReverseDelay = 2.5;
				ReverseTime = 0.5;
				PostReverseDelay = 5.0;
			}
		}
		Joint3D "MainBody"{
			AttachCoord = (0.0, 0.0, 0.0);
		}
	}
	Object3D "Doorirl"{
		ModelFileName = "../n_keio8000_251116_1/Doorir1.x";
		If "_DOOR2"{
			StaticMove{
				Displacement = (0.0, 0.0, -0.6);
				PreAnimationDelay = 1.0;
				AnimationTime = 2.0;
				ReverseTime = 2.0;
			}
			StaticMove{
				Displacement = (0.0, 0.0, -0.05);
				PreAnimationDelay = 3.0;
				AnimationTime = 1.0;
				PreReverseDelay = 2.5;
				ReverseTime = 0.5;
				PostReverseDelay = 5.0;
			}
		}
		Joint3D "MainBody"{
			AttachCoord = (0.0, 0.0, 0.0);
			AttachDir = (0.0, 0.0, -1.0);
		}
	}
	Object3D "Doorirr"{
		ModelFileName = "../n_keio8000_251116_1/Dooril1.x";
		If "_DOOR2" {
			StaticMove{
				Displacement = (0.0, 0.0, 0.6);
				PreAnimationDelay = 1.0;
				AnimationTime = 2.0;
				ReverseTime = 2.0;
			}
			StaticMove{
				Displacement = (0.0, 0.0, 0.05);
				PreAnimationDelay = 3.0;
				AnimationTime = 1.0;
				PreReverseDelay = 2.5;
				ReverseTime = 0.5;
				PostReverseDelay = 5.0;
			}
		}
		Joint3D "MainBody"{
			AttachCoord = (0.0, 0.0, 0.0);
			AttachDir = (0.0, 0.0, -1.0);
		}
	}
	Object3D "Doorll"{
		ModelFileName = "../n_keio8000_251116_1/Doorl1.x";
			Transparent = 0;
			ChangeMaterial{
				MaterialID = 0;
				Diffuse = 0.7, 0.7, 0.7, 1.0;
				Ambient = 0.7, 0.7, 0.7;
				Power = 5.0;
　　　　　		}
		Joint3D "Doorill"{
			AttachCoord = (0.0, 0.0, 0.0);
		}
	}

	Object3D "Doorlr"{
		ModelFileName = "../n_keio8000_251116_1/Doorr1.x";
				Transparent = 0;
			ChangeMaterial{
				MaterialID = 0;
				Diffuse = 0.7, 0.7, 0.7, 1.0;
				Ambient = 0.7, 0.7, 0.7;
				Power = 5.0;
　　　　　		}
		Joint3D "Doorilr"{
			AttachCoord = (0.0, 0.0, 0.0);
		}
	}
	Object3D "Doorrl"{
		ModelFileName = "../n_keio8000_251116_1/Doorr1.x";
			Transparent = 0;
			ChangeMaterial{
				MaterialID = 0;
				Diffuse = 0.7, 0.7, 0.7, 1.0;
				Ambient = 0.7, 0.7, 0.7;
				Power = 5.0;
　　　　　		}
		
		Joint3D "Doorirl"{
			AttachCoord = (0.0, 0.0, 0.0);
		}
	}

	Object3D "Doorrr"{
		ModelFileName = "../n_keio8000_251116_1/Doorl1.x";
		Transparent = 0;
			ChangeMaterial{
				MaterialID = 0;
				Diffuse = 0.7, 0.7, 0.7, 1.0;
				Ambient = 0.7, 0.7, 0.7;
				Power = 5.0;
　　　　　		}
		Joint3D "Doorirr"{
			AttachCoord = (0.0, 0.0, 0.0);
		}
	}
	Object3D "Doorl"{
		ModelFileName = "../n_keio8000_251116_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.39, 3.145, 0.13);
		}
	}
	Object3D "Doorr"{
		ModelFileName = "../n_keio8000_251116_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.39, 3.145, -0.13);
		}
	}
	Object3D "Shadow"{
		ModelFileName = "";
		If!"簡易影"&&!"_SHADOW" { 
			ChangeModel = "../n_keio8000_251116_1/Shadow.x", 1.0;
		}
		Joint3D "MainBody"{
			AttachCoord = (0.0, 0.0, 0.0);
		}
	}
	FrontCabin{
		Joint3D "MainBody"{
			AttachCoord = (0.0,0.0,0.0);
		}
	}
}

