Project Configuration

Some features require a configuration file for your project, which currently has to be created and edited by hand:

  1. Open the directory of your Prelewd project
  2. Create a "cfg" directory and open it
  3. Create an empty "config.cfg" and open it in a text editor

 

Virtual Reality

If you want your project to be usable in VR, you need to set up at least one pov camera. To do so, add the following block to the configuration file and adjust the attributes for your project:

"cameras"
{
	"pov_camera" // Identifier for the camera. If you define multiple cameras, make sure this is unique for each one.
	{
		$string name "Ciri Pov" // Display name of the camera
		$string cameraActor "ciri_pov" // The name of the camera in the SFM session. If no camera of this name exists in the SFM session, a new camera will be created. This field must not be empty!
		$float fov 75 // Optional FOV override for the camera
		"pov"
		{
			$string actor "ciri" // The name of the actor in the SFM session this pov camera is associated with
			$transform relativePose [[0,0,0][0,0,0]] // Pose offset
			$ang rotation [-10,-45,0] // Absolute camera rotation

			"vr"
			{
				// Vr override settings
				$transform relativePose [[0,3,8][0,0,0]]
			}
		}
	}
}
$string defaultVrCamera "pov_camera"

 

If you want the pov camera to be linked with one of the cameras from your SFM session, use its name for the "cameraActor" attribute. If you don't know the name, you can enter this command into the console (after you've loaded the project) to get a list of names of all available cameras:

lua_run_cl for ent in ents.iterator({ents.IteratorFilterComponent(ents.COMPONENT_PFM_CAMERA)}) do print(ent:GetName()) end

 

Vr Body

 

"actors"
{
	"actorName"
	{
		"vr_body"
		{
			$string headBone "ValveBiped.Bip01_Head1"
			$array upperBodyBoneChain [string]["ValveBiped.Bip01_Spine","ValveBiped.Bip01_Spine1","ValveBiped.Bip01_Spine2","ValveBiped.Bip01_Spine4","ValveBiped.Bip01_Neck1"] // ,"ValveBiped.Bip01_Head1"]
			$array leftArmBoneChain [string]["ValveBiped.Bip01_L_UpperArm","ValveBiped.Bip01_L_Forearm","ValveBiped.Bip01_L_Hand"]
			$array rightArmBoneChain [string]["ValveBiped.Bip01_R_UpperArm","ValveBiped.Bip01_R_Forearm","ValveBiped.Bip01_R_Hand"]
		}
	}
}