DSK file
A .dsk
(Demo Scene Key) file is used by Pikmin to make moving cameras and other key-framed movements present during cutscenes. The file is plaintext, but has a lot of floats and other values. .dsk
files can be found in root/dataDir/cinemas/demo[x]
. Sometimes there will be multiple of them. In cutscenes that have text show up, the first is usually the main cutscene and the second is for the frozen camera while text is up. Any other .dsk
files you see are likely unused. You can use Dolphin's file monitor log to see what files are loaded by what cutscenes.
Example of .dsk File
This is the cutscene for waking up at Impact Site on Day 1 (demo03):
Configuration Contents
<SCENE_KEY_ANM_INFO>
{
version 1.00
filename d:/data/デモシーン/demo03/demo03_1
toolname soft3D
source 'SOFTIMAGE3D_SDKv1.93.0 / 3Dv3.93.0'
date 2001/09/06
time 15:17:32
host MAKITAS-ZPRO
magnify 1.000000
numframes 460
numcameras 1
numAmbLights 0
numDifLights 2
numfogs 0
numLayerFogs 0
playmode loop
si_key nouse
}
<KEY_CAMERA_ANM>
{
size 252
float 0.000000 87.567604 -0.019684 50.000000 83.686050 -5.796547 181.000000 69.293304
float 0.000000 237.000000 69.293304 0.000000 238.000000 69.293304 -977.039124 239.000000
float 4.157364 -977.039124 240.000000 4.157364 0.000000 389.000000 4.157364 0.000000
float 391.000000 3.547012 -35.213814 407.000000 -63.687897 -35.213928 409.000000 -64.298271
float 0.000000 459.000000 -64.298271 0.000000 460.000000 87.567604 0.000000 0.000000
float 164.088867 -0.210571 51.000000 148.932449 -15.726013 179.000000 96.254196 -0.083199
float 237.000000 96.254196 0.000000 238.000000 96.254196 -231.319763 239.000000 80.832878
float -231.319763 240.000000 80.832878 0.000000 389.000000 80.832878 0.000000 391.000000
float 81.336586 29.060783 407.000000 136.823380 29.060898 410.000000 137.327087 0.000000
float 459.000000 137.327087 0.000000 460.000000 164.088867 0.000000 0.000000 1947.254150
float 0.007324 52.000000 1946.349365 -1.384277 183.000000 1947.495972 0.000000 237.000000
float 1947.495972 0.000000 238.000000 1947.495972 -189.228516 239.000000 1934.880737 -189.228516
float 240.000000 1934.880737 0.000000 389.000000 1934.880737 0.000000 392.000000 1935.755371
float 24.924316 407.000000 1960.156494 13.121338 410.000000 1960.384033 0.000000 459.000000
float 1960.384033 0.000000 460.000000 1947.254150 0.000000 0.000000 47.342243 0.040054
float 70.000000 51.076900 2.462883 182.000000 58.051655 0.000000 237.000000 58.051655
float 0.000000 238.000000 58.051655 292.489655 239.000000 77.550964 292.489655 240.000000
float 77.550964 0.000000 389.000000 77.550964 0.000000 391.000000 78.740662 68.638115
float 407.000000 209.793732 68.638000 409.000000 210.983414 0.000000 459.000000 210.983414
float 0.000000 460.000000 47.342243 0.000000 0.000000 22.798201 -0.005436 139.000000
float 20.997837 -0.248251 237.000000 20.825630 0.000000 238.000000 20.825630 43.545570
float 239.000000 23.728668 43.545570 240.000000 23.728668 0.000000 389.000000 23.728668
float 0.000000 400.000000 25.903618 9.173155 409.000000 27.459347 0.000000 459.000000
float 27.459347 0.000000 460.000000 22.798201 0.000000 0.000000 1909.964844 -0.018311
float 52.000000 1907.585083 -2.744751 208.000000 1903.818726 0.000000 237.000000 1903.818726
float 0.000000 238.000000 1903.818726 73.308105 239.000000 1908.705933 73.308105 240.000000
float 1908.705933 0.000000 389.000000 1908.705933 0.000000 391.000000 1908.202026 -29.073486
float 407.000000 1852.691040 -29.073486 410.000000 1852.187134 0.000000 459.000000 1852.187134
float 0.000000 460.000000 1909.964844 0.000000 0.000000 0.000000 74.433838 0.000000
float 238.000000 74.433838 -0.035609 239.000000 38.338299 0.000000 390.000000 38.338299
float 0.000000 408.000000 47.080536 0.000000 415.000000 47.080536 0.000000 475.000000
float 47.080536 0.000000 0.100000 32768.000000
}
<KEY_CAMERA_TABLE>
{
index 0
name cam_int1
cam_pos_x 13 0 0
cam_pos_y 13 39 0
cam_pos_z 13 78 0
cam_lat_x 13 117 0
cam_lat_y 11 156 0
cam_lat_z 13 189 0
cam_twist 1 228 0
cam_fovy 7 229 0
cam_near 1 250 0
cam_far 1 251 0
}
<KEY_DIFFUSE_LIGHT_ANM>
{
size 12
float -181.302521 101.465294 137.835602 150.184036 137.668640 1.000000 -296.745667 -20.224216
float 3378.791260 62.576744 84.478439 98.558266
}
<KEY_DIFFUSE_LIGHT_TABLE>
{
index 0
name light3_1_3_2_3
light_type point
light_pos_x 1 0 0
light_pos_y 1 1 0
light_pos_z 1 2 0
light_r_param 1 0 0
light_g_param 1 0 0
light_b_param 1 0 0
light_visible 1 0 0
}
<KEY_DIFFUSE_LIGHT_TABLE>
{
index 1
name light4_1_3_2_3
light_type point
light_pos_x 1 6 0
light_pos_y 1 7 0
light_pos_z 1 8 0
light_r_param 1 9 0
light_g_param 1 10 0
light_b_param 1 11 0
light_visible 1 5 0
}
<EX_SI_KEY_CAMERA_ANM>
{
size 0
}
<EX_SI_KEY_CAMERA_TABLE>
{
index 0
name cam_int1
si_cam_aspect_ratio 1.180000
si_cam_auto_fovy false
si_cam_dof_type off
}
<EX_SI_KEY_DIFFUSE_LIGHT_ANM>
{
size 1
float 10000.000000
}
<EX_SI_KEY_DIFFUSE_LIGHT_TABLE>
{
index 0
name light3_1_3_2_3
light_type point
si_light_ShadowType none
si_light_AreaType none
si_light_start 1 0 0
si_light_end 1 0 0
}
<EX_SI_KEY_DIFFUSE_LIGHT_TABLE>
{
index 1
name light4_1_3_2_3
light_type point
si_light_ShadowType none
si_light_AreaType none
si_light_start 1 0 0
si_light_end 1 0 0
}
|
---|
Explanation
The first part of any .dsk file is <SCENE_KEY_ANIM_INFO>
. The majority of this segment is development creation data, like the time and directory, that don't do anything. So far, the only thing here that I've found does anything is "numcameras" which crashes the game at 0. (It is possible "playmode" has an effect too.)
After this is <KEY_CAMERA_ANIM>
. This segment is nothing more than a bunch of floating point numbers. At the start is the number of floats present after it. Don't think anything of the number of floats per line, it doesn't mean anything. Changing these floats will change how the camera behaves during cutscenes.
After that is what actually assigns all those floats in the previous segment, <KEY_CAMERA_TABLE>
. This segment is made of 12 lines.
index: the index of this camera table. This should always be 0.
name | description |
---|---|
index | Index of this camera, used when there are multiple cameras in a cutscene. |
name | Name of the camera, which is seemingly used by other segments of the file. |
cam_pos_x | x value of cameras location. |
cam_pos_y | y value of cameras location. |
cam_pos_z | z value of cameras location. |
cam_lat_x | x value of where the camera is focused on. |
cam_lat_y | y value of where the camera is focused on. |
cam_lat_z | z value of where the camera is focused on. |
cam_twist | Camera Roll Axis? (usually left at 0.000000). |
cam_fovy | The field of view of the camera. |
cam_near | Near culling distance of camera (doesn't work?) (always 0.100000) |
cam_far | Far culling distance of camera (doesn't work?) (always 32768.000000) |
After all of these parameters is a set of 3 values, these control how many floats from the float table above are for each of parameters. The right value is always 0. At first I thought this matched the value with the index of this camera, but it seems that even when there are multiple tables it stays at 0. Changing it can break the cutscene, so it clearly does something... The middle value is the highest index float this parameter uses. Keep in mind they can technically be anywhere in the file, and multiple parameters can use the same floats. The left value is the number of floats used for this parameter, counting backwards from the middle value.
Other
After this are many other minor segments, such as <EX_SI_KEY_CAMERA_ANM>
and <EX_SI_KEY_CAMERA_TABLE>
. These two are seemingly always present, although the former is always empty. the latter uses the camera name to connect to the main camera, as described before, but it is unknown what it actually does.
KEY_DIFFUSE_LIGHT_ANM
and <KEY_DIFFUSE_LIGHT_TABLE>
work in a similar way to the camera movement values, but control lighting. It has different parameters in the table though, so I will put them here too.
name | description |
---|---|
index | Index of this spotlight, used when there are multiple cameras in a cutscene. |
name | Name of the spotlight, which is seemingly used by other segments of the file. |
light_type | unique to lighting, not quite sure on this one yet. |
light_pos_x | x value of spotlight location. |
light_pos_y | y value of spotlight location. |
light_pos_z | z value of spotlight location. |
light_r_param | amount of red in spotlight. |
light_g_param | amount of green in spotlight. |
light_b_param | amount of blue in spotlight. |
light_visible | amount of alpha in light. (always 255.000000) |
The three values after each parameter work the same here as with the camera, although they are usually much simpler, if even present at all.
Lighting also has its own <EX_SI_KEY_CAMERA_ANM>
and <EX_SI_KEY_CAMERA_TABLE>
, which seem equally strange and unknown.