
PluginHeader{
	RailSimVersion = 2.00;
	PluginType = Train;
	PluginName = "神戸新交通8000型 先頭車";
	PluginAuthor = "n";
	IconTexture = "..//..//Icon/n/n_knt0.png";
	Description = "ポートライナー";
}

TrainInfo{
	FrontLimit = 4.2;
	TailLimit = -4.2;
	MaxVelocity = 80.0;
	MaxAcceleration = 4.2;
	MaxDeceleration = 4.2;
	DoorClosingTime = 3.0;
}
DefineSwitch "車両"{
	Entry = "8100";
	Entry = "8600(反転)";
}
DefineSwitch "編成"{
GroupCommon = "KNT8000編成";
	Entry = "8101";
	Entry = "8102";
	Entry = "8103";
	Entry = "8104";
	Entry = "8105";
	Entry = "8106";
	Entry = "8107";
	Entry = "8108";
	Entry = "8109";
	Entry = "8110";
	Entry = "8111";
	Entry = "8112";
	Entry = "1101";
}
DefineSwitch "ライト"{
	Entry = "入";
	Entry = "切";
}

DefineSwitch "室内灯"{
GroupCommon = "KNT8000室内灯";
	Entry = "入";
	Entry = "切";
}
DefineSwitch "車体汚れ"{
GroupCommon = "KNT8000車体汚れ";
	Entry = "無";
	Entry = "有";
}
DefineSwitch "混雑度"{
GroupCommon = "KNT8000混雑度";
	Entry = "低";
	Entry = "高";
}
DefineSwitch "集電器"{
GroupCommon = "KNT8000集電器";
	Entry = "1";
	Entry = "2";
}
PrimaryAssembly{
	Axle "FrontDummyWheel"{
		ModelFileName = "";
		ModelScale = 1.0;
		Diameter = 1.0;
		Symmetric = 12;
		Coord = (2.45, 0.45);
	}
	Axle "TailDummyWheel"{
		ModelFileName = "";
		ModelScale = 1.0;
		Diameter = 1.0;
		Symmetric = 12;
		Coord = (-2.45, 0.45);
	}
	Body "Dummy"{
		ModelFileName = "";
		ModelScale = 1.0;
		JointZY "FrontDummyWheel"{
			AttachCoord = (0.0, 0.0);
			LocalCoord = (2.45, 0.45);
		}
		JointZY "TailDummyWheel"{
			AttachCoord = (0.0, 0.0);
			LocalCoord = (-2.45, 0.45);
		}
	}
	Object3D "FrontRightWheel"{
		ModelFileName = "Wheel.x";
		ModelScale = 1.0;
		Joint3D "Dummy"{
			AttachCoord = (0.8, 0.45, 2.45);
			DirLink = "FrontDummyWheel";
			AttachDir = (5.0, 0.0, 0.0);
			UpLink = "FrontDummyWheel";
			AttachUp = (0.0, 0.0, 1.0);
		}
	}
	Object3D "FrontLeftWheel"{
		ModelFileName = "Wheel.x";
		ModelScale = 1.0;
		Joint3D "Dummy"{
			AttachCoord = (-0.8, 0.45, 2.45);
			DirLink = "FrontDummyWheel";
			AttachDir = (-1.0, 0.0, 0.0);
			UpLink = "FrontDummyWheel";
			AttachUp = (0.0, 0.0, 1.0);
		}
	}
	Object3D "TailRightWheel"{
		ModelFileName = "Wheel.x";
		ModelScale = 1.0;
		Joint3D "Dummy"{
			AttachCoord = (0.8, 0.45, -2.45);
			DirLink = "Dummy";
			AttachDir = (1.0, 0.0, 0.0);
			UpLink = "FrontDummyWheel";
			AttachUp = (0.0, 0.0, 1.0);
		}
	}
	Object3D "TailLeftWheel"{
		ModelFileName = "Wheel.x";
		ModelScale = 1.0;
		Joint3D "Dummy"{
			AttachCoord = (-0.8, 0.45, -2.45);
			DirLink = "Dummy";
			AttachDir = (-1.0, 0.0, 0.0);
			UpLink = "FrontDummyWheel";
			AttachUp = (0.0, 0.0, 1.0);
		}
	}
	Object3D "Doorll"{
		ModelFileName = "Doorll.x";
		ModelScale = 1.0;
		Transparent = 0;
		ApplySwitch "室内灯"{
		Case 0:
		ChangeMaterial{
		MaterialID = 3;
		Emissive = 0.5, 0.5, 0.5; 
		}
　　　　　　　　}
		If "_DOOR1"{
				StaticMove{
				Displacement = (0.0, 0.0, 0.67);
				PreAnimationDelay = 0.6;
				AnimationTime = 3;
			}
		}
		Joint3D "Dummy"{
			AttachCoord = (0.0, 0.0, 0.0);
		}
	}

	Object3D "Doorlr"{
		ModelFileName = "Doorlr.x";
		ModelScale = 1.0;
		Transparent = 0;
		ApplySwitch "室内灯"{
		Case 0:
		ChangeMaterial{
		MaterialID = 3;
		Emissive = 0.5, 0.5, 0.5; 
		}
　　　　　　　　}
		If "_DOOR1"{
				StaticMove{
				Displacement = (0.0, 0.0, -0.67);
				PreAnimationDelay = 0.6;
				AnimationTime = 3;
			}
		}
		Joint3D "Dummy"{
			AttachCoord = (0.0, 0.0, 0.0);
		}
	}
	Object3D "Doorrl"{
		ModelFileName = "Doorrl.x";
		ModelScale = 1.0;
		Transparent = 0;
		ApplySwitch "室内灯"{
		Case 0:
		ChangeMaterial{
		MaterialID = 3;
		Emissive = 0.5, 0.5, 0.5; 
		}
　　　　　　　　}
		If "_DOOR2"{
				StaticMove{
				Displacement = (0.0, 0.0, 0.67);
				PreAnimationDelay = 0.6;
				AnimationTime = 3;
			}
		}
		Joint3D "Dummy"{
			AttachCoord = (0.0, 0.0, 0.0);
		}
	}

	Object3D "Doorrr"{
		ModelFileName = "Doorrr.x";
		ModelScale = 1.0;
		Transparent = 0;
		ApplySwitch "室内灯"{
		Case 0:
		ChangeMaterial{
		MaterialID = 3;
		Emissive = 0.5, 0.5, 0.5; 
		}
　　　　　　　　}
		If "_DOOR2"{
				StaticMove{
				Displacement = (0.0, 0.0, -0.67);
				PreAnimationDelay = 0.6;
				AnimationTime = 3;
			}
		}
		Joint3D "Dummy"{
			AttachCoord = (0.0, 0.0, 0.0);
		}
	}

	Object3D "Mainbody"{
		ModelFileName = "Body.x";
		ModelScale = 1.0;
		AlphaZeroTest = 0;
		NoCastShadow = 14,24;
		//Transparent = 13;
		EnvMap = 13;
		ApplySwitch "車両"{
		Case 0:
		ApplySwitch "編成"{
		Case 0:ChangeTexture = 14, "tex/車番/8101.png";
		Case 1:ChangeTexture = 14, "tex/車番/8102.png";
		Case 2:ChangeTexture = 14, "tex/車番/8103.png";
		Case 3:ChangeTexture = 14, "tex/車番/8104.png";
		Case 4:ChangeTexture = 14, "tex/車番/8105.png";
		Case 5:ChangeTexture = 14, "tex/車番/8106.png";
		Case 6:ChangeTexture = 14, "tex/車番/8107.png";
		Case 7:ChangeTexture = 14, "tex/車番/8108.png";
		Case 8:ChangeTexture = 14, "tex/車番/8109.png";
		Case 9:ChangeTexture = 14, "tex/車番/8110.png";
		Case 10:ChangeTexture = 14, "tex/車番/8111.png";
		Case 11:ChangeTexture = 14, "tex/車番/8112.png";
		Case 12:ChangeTexture = 14, "tex/車番/1101.png";
		}
		Case 1:
		ApplySwitch "編成"{
		Case 0:ChangeTexture = 14, "tex/車番/8601.png";
		Case 1:ChangeTexture = 14, "tex/車番/8602.png";
		Case 2:ChangeTexture = 14, "tex/車番/8603.png";
		Case 3:ChangeTexture = 14, "tex/車番/8604.png";
		Case 4:ChangeTexture = 14, "tex/車番/8605.png";
		Case 5:ChangeTexture = 14, "tex/車番/8606.png";
		Case 6:ChangeTexture = 14, "tex/車番/8607.png";
		Case 7:ChangeTexture = 14, "tex/車番/8608.png";
		Case 8:ChangeTexture = 14, "tex/車番/8609.png";
		Case 9:ChangeTexture = 14, "tex/車番/8610.png";
		Case 10:ChangeTexture = 14, "tex/車番/8611.png";
		Case 11:ChangeTexture = 14, "tex/車番/8612.png";
		}
		}
		ApplySwitch "混雑度"{
		Case 0:
		ApplySwitch "車体汚れ"{
		Case 0:ChangeTexture = 9, "tex/顔0.png";ChangeTexture = 10, "tex/横00.png";
		Case 1:ChangeTexture = 9, "tex/顔1.png";ChangeTexture = 10, "tex/横0.png";
		}
		ChangeTexture = 13, "tex/窓.png";
		Case 1:
		ApplySwitch "車体汚れ"{
		Case 0:ChangeTexture = 9, "tex/顔0_混.png";ChangeTexture = 10, "tex/横00.png";
		Case 1:ChangeTexture = 9, "tex/顔1_混.png";ChangeTexture = 10, "tex/横0.png";
		}
		ChangeTexture = 13, "tex/窓_混.png";
		}
		ApplySwitch "編成"{
		Case 12:ChangeTexture = 9, "tex/顔2.png";
		}
		ApplySwitch "室内灯"{
		Case 0:
		ChangeMaterial{
		MaterialID = 6,7,8;
		Emissive = 0.5, 0.5, 0.5; 
		}
　　　　　　　　}
If "ライト"==0 &&(!"_FRONT")&&(!"_CONNECT1"){
		ChangeAlpha = 3, 1.0;
		ChangeAlpha = 4, 0.0;
}
If "ライト" ==0 && ("_FRONT")&&(!"_CONNECT1"){	
		ChangeAlpha = 3, 0.0;
		ChangeAlpha = 4, 1.0;
}
If "ライト" ==1 {	
		ChangeAlpha = 3, 0.0;
		ChangeAlpha = 4, 0.0;
}
		Joint3D "Dummy"{
			AttachCoord = (0.0, 0.0, 0.0);
		}
	}
	Object3D "horo"{
		ModelFileName = "";
		ModelScale = 1.0;
		ApplySwitch "車両"{
		Case 0:ChangeModel = "horo.x", 1.0;
		}
		Joint3D "Dummy"{
			AttachCoord = (0.0, 0.0, 0.0);
		}
	}
	Object3D "panta"{
		ModelFileName = "panta0.x";
		ModelScale = 1.0;
		ApplySwitch "集電器"{
		Case 1:ChangeModel = "panta1.x", 1.0;
		}
		Joint3D "Dummy"{
			AttachCoord = (0.0, 0.0, 0.0);
		}
	}
	Object3D "skirt"{
		ModelFileName = "skirt.x";
		ModelScale = 1.0;
		ApplySwitch "編成"{
		Case 12:ChangeModel = "", 1.0;
		}
		Joint3D "Dummy"{
			AttachCoord = (0.0, 0.0, 0.0);
		}
	}

	FrontCabin{
		Joint3D "Dummy"{
			AttachCoord = (0.0, 0.0, 0.0);
		}
	}
}
