module Base
{
checkprop:	BaseDoor
	model VVA_Vehicles_[LABEL]_DoorRearRight
	{
checkprop: LabelModels
		mesh = vehicles/[FILENAME]|Door_RearRight_[LABEL]_obj,
else
		mesh = vehicles/[FILENAME]|Door_RearRight_obj,
end
		shader = vehicle_multiuv_noreflect,
		static = FALSE,
		scale = [SCALE],
 checkprop: DoorBone
  repeatprop: DoorBone
		boneWeight = [DoorBone] 1.0,
  end
 else
  checkprop:	Bones 
  	repeatprop: Bones 
		boneWeight = [Bones] 1.0,
	end
  else
		boneWeight = RearDoor.R 1.0,
  end
 end
	}
	model VVA_Vehicles_[LABEL]_DoorRearRight_nr
	{
checkprop: LabelModels
		mesh = vehicles/[FILENAME]|Door_RearRight_[LABEL]_obj,
else
		mesh = vehicles/[FILENAME]|Door_RearRight_obj,
end
		shader = vehicle_norandom_multiuv_noreflect,
		static = FALSE,
		scale = [SCALE],
 checkprop: DoorBone
  repeatprop: DoorBone
		boneWeight = [DoorBone] 1.0,
  end
 else
  checkprop:	Bones 
  	repeatprop: Bones 
		boneWeight = [Bones] 1.0,
	end
  else
		boneWeight = RearDoor.R 1.0,
  end
 end
	}
end	
checkprop: BaseWindow
	model VVA_Vehicles_[LABEL]_WindowRearRight
	{
 checkprop: LabelModels
		mesh = vehicles/[FILENAME]|Window_RearRight_[LABEL]_obj,
 else
		mesh = vehicles/[FILENAME]|Window_RearRight_obj,
 end
		shader = vehicle_multiuv_vva,
		static = [STATIC],
		scale = [SCALE],
 checkprop: WindowOpen
  checkprop: WindowBone 
   repeatprop: WindowBone
		boneWeight = [WindowBone] 1.0,
   end
  else
   checkprop:	Bones 
  	 repeatprop: Bones 
		boneWeight = [Bones] 1.0,
	 end
   else
		boneWeight = RearWindow.R 1.0,
   end
  end
 end		
	}
end
checkprop: BaseWindowS
	model VVA_Vehicles_[LABEL]_WindowRearRight_static
	{
checkprop: LabelModels
		mesh = vehicles/[FILENAME]|Window_RearRight_[LABEL]_sobj,
else
		mesh = vehicles/[FILENAME]|Window_RearRight_sobj,
end
		shader = vehicle_multiuv_vva,
		static = TRUE,
		scale = [SCALE],
	}
end	

	repeat
checkprop: Door
	model VVA_Vehicles_[LABEL][Postfix]_DoorRearRight
	{
checkprop: LabelModels
		mesh = vehicles/[FILENAME]|Door_RearRight_[LABEL][Postfix]_obj,
else
		mesh = vehicles/[FILENAME]|Door_RearRight[Postfix]_obj,
end
		shader = vehicle_multiuv_noreflect,
		static = FALSE,
		scale = [SCALE],
 checkprop: DoorBone
  repeatprop: DoorBone
		boneWeight = [DoorBone] 1.0,
  end
 else
  checkprop:	Bones 
  	repeatprop: Bones 
		boneWeight = [Bones] 1.0,
	end
  else
		boneWeight = RearDoor.R 1.0,
  end
 end
	}
	model VVA_Vehicles_[LABEL][Postfix]_DoorRearRight_nr
	{
checkprop: LabelModels
		mesh = vehicles/[FILENAME]|Door_RearRight_[LABEL][Postfix]_obj,
else
		mesh = vehicles/[FILENAME]|Door_RearRight[Postfix]_obj,
end
		shader = vehicle_norandom_multiuv_noreflect,
		static = FALSE,
		scale = [SCALE],
 checkprop: DoorBone
  repeatprop: DoorBone
		boneWeight = [DoorBone] 1.0,
  end
 else
  checkprop:	Bones 
  	repeatprop: Bones 
		boneWeight = [Bones] 1.0,
	end
  else
		boneWeight = RearDoor.R 1.0,
  end
 end
	}
end: checkprop: Door
checkprop: Window
	model VVA_Vehicles_[LABEL][Postfix]_WindowRearRight
	{
 checkprop: LabelModels
		mesh = vehicles/[FILENAME]|Window_RearRight_[LABEL][Postfix]_obj,
 else
		mesh = vehicles/[FILENAME]|Window_RearRight[Postfix]_obj,
 end
		shader = vehicle_multiuv_vva,
		static = [STATIC],
		scale = [SCALE],
 checkprop: WindowOpen
  checkprop: WindowBone 
   repeatprop: WindowBone
		boneWeight = [WindowBone] 1.0,
   end
  else
   checkprop:	Bones 
  	repeatprop: Bones 
		boneWeight = [Bones] 1.0,
	end
   else
		boneWeight = RearWindow.R 1.0,
   end
  end
 end		
	}
end: checkprop: Window
checkprop: WindowS
	model VVA_Vehicles_[LABEL][Postfix]_WindowRearRight_static
	{
 checkprop: LabelModels
		mesh = vehicles/[FILENAME]|Window_RearRight_[LABEL][Postfix]_sobj,
 else
		mesh = vehicles/[FILENAME]|Window_RearRight[Postfix]_sobj,
 end
		shader = vehicle_multiuv_vva,
		static = TRUE,
		scale = [SCALE],
	}
end

checkprop: Middle
	template vehicle VVA_[LABEL][Postfix]_MiddleRightShared {
checkprop: Window,BaseWindow
		part WindowMiddleRight
        {
checkprop: BaseWindow
			model Default
            {
            	file = VVA_Vehicles_[LABEL]_WindowRearRight,
            }
checkprop: BaseWindowS
			model Static
            {
            	file = VVA_Vehicles_[LABEL]_WindowRearRight_static,
            }
end
checkprop: WindowS
			model Static
            {
            	file = VVA_Vehicles_[LABEL][Postfix]_WindowRearRight_static,
            }
end
end
checkprop: Window
			model Default
            {
            	file = VVA_Vehicles_[LABEL][Postfix]_WindowRearRight,
            }
checkprop: BaseWindowS
			model Static
            {
            	file = VVA_Vehicles_[LABEL]_WindowRearRight_static,
            }
end
checkprop: WindowS
			model Static
            {
            	file = VVA_Vehicles_[LABEL][Postfix]_WindowRearRight_static,
            }
end
end
		}
checkprop: WindowOpen
		template! = VVA_WindowMR,
end
end			
checkprop: Door,BaseDoor
		template! = VVA_DoorMR_Common,
end
checkprop: Includes
repeatprop: Includes
		template! = VVA_[Includes],
end 
end
	}

	template vehicle VVA_[LABEL][Postfix]_MiddleRight {
checkprop: Door,BaseDoor
		part DoorMiddleRight
		{
			model Default
			{
checkprop: BaseDoor
				file = VVA_Vehicles_[LABEL]_DoorRearRight,
else
				file = VVA_Vehicles_[LABEL][Postfix]_DoorRearRight,
end
			}
		}
end
		template! = VVA_[LABEL][Postfix]_MiddleRightShared,
	}
	setflag: MiddleRight
checkprop: Door,BaseDoor
	template vehicle VVA_[LABEL][Postfix]_MiddleRight_nr {
		part DoorMiddleRight
		{
			model Default
			{
checkprop: BaseDoor
				file = VVA_Vehicles_[LABEL]_DoorRearRight_nr,
else
				file = VVA_Vehicles_[LABEL][Postfix]_DoorRearRight_nr,
end
			}
		}
		template! = VVA_[LABEL][Postfix]_MiddleRightShared,
	}
	setflag: MiddleRight_nr
end
end: checkprop: Middle

checkprop: Rear, !Middle
	template vehicle VVA_[LABEL][Postfix]_RearRightShared {
checkprop: Window,BaseWindow
		part WindowRearRight
        {
checkprop: BaseWindow
			model Default
            {
            	file = VVA_Vehicles_[LABEL]_WindowRearRight,
            }
checkprop: BaseWindowS
			model Static
            {
            	file = VVA_Vehicles_[LABEL]_WindowRearRight_static,
            }
end
checkprop: WindowS
			model Static
            {
            	file = VVA_Vehicles_[LABEL][Postfix]_WindowRearRight_static,
            }
end
end
checkprop: Window
			model Default
            {
            	file = VVA_Vehicles_[LABEL][Postfix]_WindowRearRight,
            }
checkprop: BaseWindowS
			model Static
            {
            	file = VVA_Vehicles_[LABEL]_WindowRearRight_static,
            }
end
end
		}
checkprop: WindowOpen
		template! = VVA_WindowRR,
end
end			
checkprop: Door,BaseDoor
		template! = VVA_DoorRR_Common,
end
checkprop: Includes
repeatprop: Includes
		template! = VVA_[Includes],
end 
end
	}

	template vehicle VVA_[LABEL][Postfix]_RearRight {
checkprop: Door,BaseDoor
		part DoorRearRight
		{
			model Default
			{
checkprop: BaseDoor
				file = VVA_Vehicles_[LABEL]_DoorRearRight,
else
				file = VVA_Vehicles_[LABEL][Postfix]_DoorRearRight,
end
			}
		}
end
		template! = VVA_[LABEL][Postfix]_RearRightShared,
	}
	setflag: RearRight
checkprop: Door,BaseDoor
	template vehicle VVA_[LABEL][Postfix]_RearRight_nr {
		part DoorRearRight
		{
			model Default
			{
checkprop: BaseDoor
				file = VVA_Vehicles_[LABEL]_DoorRearRight_nr,
else
				file = VVA_Vehicles_[LABEL][Postfix]_DoorRearRight_nr,
end
			}
		}
		template! = VVA_[LABEL][Postfix]_RearRightShared,
	}
	setflag: RearRight_nr
end
end: checkprop: Rear, !Middle
	endrepeat
}