Rizline:Chart file: Difference between revisions
No edit summary |
|||
(10 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
''[[Rizline:Rizline|Rizline]]'' chart files use the [[JSON]] file format. A chart file contains information about colors, lines, notes, challenge time, BPM and other information. | ''[[Rizline:Rizline|Rizline]]'' chart files use the [[Wikipedia:JSON|JSON]] file format. A chart file contains information about colors, lines, notes, challenge time, BPM and other information. | ||
== JSON structure == | == JSON structure == | ||
{{DataStructure| | {{DataStructure| | ||
{{DataStructureField|fileVersion|int|File format version. This is usually 0, but in some charts like <code> | {{DataStructureField|fileVersion|int|File format version. This is usually 0, but in some charts like [[Rizline:Tempest|Tempest]] (on <code>IN</code> difficulty), this is set to 1. {{verify|Are there more charts/more file format numbers? What is the difference between different file format versions?}}}} | ||
{{DataStructureField|songsName|string|Title of the song; often it is an empty string. This seems to be a leftover value from charting software, it is unused in-game.}} | {{DataStructureField|songsName|string|Title of the song; often it is an empty string. This seems to be a leftover value from charting software, it is unused in-game.}} | ||
{{DataStructureField|themes|array|List of themes; there is always two {{verify|This was written before Rizline 1.1 - is this still correct?}} themes:| | {{DataStructureField|themes|array|List of themes; there is always two {{verify|This was written before Rizline 1.1 - is this still correct?}} themes:| | ||
Line 12: | Line 12: | ||
{{DataStructureField|challengeTimes|array|Challenge times of the chart; currently there is always exactly one challenge time, but there could be more in the future. {{verify|This was written before Rizline 1.1 - this is outdated}}| | {{DataStructureField|challengeTimes|array|Challenge times of the chart; currently there is always exactly one challenge time, but there could be more in the future. {{verify|This was written before Rizline 1.1 - this is outdated}}| | ||
{{DataStructureField||object|A challenge time.| | {{DataStructureField||object|A challenge time.| | ||
{{DataStructureField|checkPoint|float|Purpose currently unknown.}} | {{DataStructureField|checkPoint|float|Purpose currently unknown. {{verify}}}} | ||
{{DataStructureField|start|float|Start of challenge time (in beats).}} | {{DataStructureField|start|float|Start of challenge time (in beats).}} | ||
{{DataStructureField|end|float|End of challenge time (in beats).}} | {{DataStructureField|end|float|End of challenge time (in beats).}} | ||
{{DataStructureField|transTime|float|Transition time (in beats).}} | {{DataStructureField|transTime|float|Transition time (in beats). {{verify|The transitions seem instant in game, what is this actually?}}}} | ||
}} | }} | ||
}} | }} | ||
Line 22: | Line 22: | ||
{{DataStructureField||key point object|The value of the key point is a multiplier of the initial song BPM. If the initial BPM is 120, then a key point with a value of 1.5 means a new BPM of 180. A value of 0.5 would mean the new BPM is 60. These key points, unlike other key points, are not interpolated in any way. The changes of BPM are always instant. The <code>easeType</code> property of the key point has no effect. See [[#Key point object structure]] for details.}} | {{DataStructureField||key point object|The value of the key point is a multiplier of the initial song BPM. If the initial BPM is 120, then a key point with a value of 1.5 means a new BPM of 180. A value of 0.5 would mean the new BPM is 60. These key points, unlike other key points, are not interpolated in any way. The changes of BPM are always instant. The <code>easeType</code> property of the key point has no effect. See [[#Key point object structure]] for details.}} | ||
}} | }} | ||
{{DataStructureField|offset|float|Audio or chart offset. It is currently unknown if this value shifts the audio or the chart forwards, nor is it known if this value is in milliseconds or seconds ( | {{DataStructureField|offset|float|Audio or chart offset. It is currently unknown if this value shifts the audio or the chart forwards, nor is it known if this value is in milliseconds or seconds (or beats!). Always <code>0.0</code>. {{verify|Is this still true?}}}} | ||
{{DataStructureField|lines|array|List of all lines in the chart. This part usually takes up most of the chart file.| | {{DataStructureField|lines|array|List of all lines in the chart. This part usually takes up most of the chart file.| | ||
{{DataStructureField||object|A line.| | {{DataStructureField||object|A line.| | ||
Line 40: | Line 40: | ||
{{DataStructureField|time|float|Time of the note (in beats).}} | {{DataStructureField|time|float|Time of the note (in beats).}} | ||
{{DataStructureField|floorPosition|float|Pre-calculated time of the note (in seconds). This value should not be trusted, as it is not always accurate or present.}} | {{DataStructureField|floorPosition|float|Pre-calculated time of the note (in seconds). This value should not be trusted, as it is not always accurate or present.}} | ||
{{DataStructureField|otherInformations|array|This array is empty for most notes, but it contains 3 entries for | {{DataStructureField|otherInformations|array|This array is empty for most notes, but it contains 3 entries for {{IconLink|Rizline|Hold Note|Hold Notes}}:| | ||
{{DataStructureField|0|float|End time of the note (in beats).}} | {{DataStructureField|0|float|End time of the note (in beats).}} | ||
{{DataStructureField|1|float|Duration of the note (in beats).}} | {{DataStructureField|1|float|Duration of the note (in beats).}} | ||
Line 50: | Line 50: | ||
{{DataStructureField||color key point object|A color change. See [[#Color key point object structure]] for details.}} | {{DataStructureField||color key point object|A color change. See [[#Color key point object structure]] for details.}} | ||
}} | }} | ||
{{DataStructureField|lineColor|array| | {{DataStructureField|lineColor|array|Gradient line color changes, based on time.| | ||
{{DataStructureField||color key point object|A color change. See [[#Color key point object structure]] for details.}} | {{DataStructureField||color key point object|A color change. See [[#Color key point object structure]] for details.}} | ||
}} | }} | ||
}} | }} | ||
}} | }} | ||
{{DataStructureField|canvasMoves|array|Changes of canvas | {{DataStructureField|canvasMoves|array|Changes of canvas' positions.| | ||
{{DataStructureField||object|A move pattern for one canvas. The index of the element in the array is the canvas index. {{ | {{DataStructureField||object|A move pattern for one canvas. The index of the element in the array is the canvas index.| | ||
{{DataStructureField|index|int|Index of the canvas; should always the same as the index of the item in the parent array.}} | |||
{{DataStructureField|xPositionKeyPoints|array|Position changes of the canvas in the song.| | |||
{{DataStructureField||key point object|A position change. The value of the key point is the absolute X position of the center of the canvas. As with all other X coordinates: -0.5 is the left edge of the screen, 0.0 is the center of the screen, 0.5 is the right edge of the screen. See [[#Key point object structure]] for details.}} | |||
}} | |||
{{DataStructureField|speedKeyPoints|array|Speed changes of the canvas in the song.| | |||
{{DataStructureField||key point object|A speed change. The value of the key point indicates a scroll speed multiplier, that is applied to a base scroll speed based on the user's preference. See [[#Key point object structure]] for details.}} | |||
}} | |||
}} | |||
}} | }} | ||
{{DataStructureField|cameraMove|object|Changes of camera position. {{ | {{DataStructureField|cameraMove|object|Changes of camera position.| | ||
{{DataStructureField|scaleKeyPoints|array|Scale/zoom changes of the camera in the song.| | |||
{{DataStructureField||key point object|A scale change. {{Unfinished|Which values correspond to zooming-in vs. zooming out?}} See [[#Key point object structure]] for details.}} | |||
}} | |||
{{DataStructureField|xPositionKeyPoints|array|Position changes of the camera in the song.| | |||
{{DataStructureField||key point object|A position change. The value of the key point is the absolute X position of the center of the canvas. As with all other X coordinates: -0.5 is the left edge of the screen, 0.0 is the center of the screen, 0.5 is the right edge of the screen. See [[#Key point object structure]] for details.}} | |||
}} | |||
}} | }} | ||
}} | }} | ||
Line 92: | Line 106: | ||
=== Ease type enum === | === Ease type enum === | ||
{{ | {{Unfinished|This enum is currently unknown - to fill it, we have to find ease types in official charts and compare them to curves on https://easings.net/ .}} | ||
<ul> | <ul> | ||
Line 110: | Line 124: | ||
<li><code>13</code> - unknown</li> | <li><code>13</code> - unknown</li> | ||
</ul> | </ul> | ||
=== Note type enum === | |||
<ul> | |||
<li><code>0</code> - {{IconLink|Rizline|Tap Note}}</li> | |||
<li><code>1</code> - {{IconLink|Rizline|Catch Note}}</li> | |||
<li><code>2</code> - {{IconLink|Rizline|Hold Note}}</li> | |||
</ul> | |||
=== Color key point object structure === | |||
Color key points change the color of the entire line (or judge ring) over time, as opposed to line point colors, which change the color of the line in a gradient fashion, locally. Color key points always interpolate linearly. The current color can be calculated with the following formula: | |||
<pre> | |||
// prev = key point that's the closest to `currentTime`, but not after it | |||
// next = next key point, one that's right after `prev` | |||
t = (currentTime - prev.time) / (next.time - prev.time) | |||
color = ((1.0 - t) * prev.startColor) + (t * prev.endColor)) | |||
</pre> | |||
{{DataStructure| | |||
{{DataStructureField|startColor|color object|Starting color. See [[#Color object structure]] for details.}} | |||
{{DataStructureField|endColor|color object|Ending color. See [[#Color object structure]] for details.}} | |||
{{DataStructureField|time|float|Time of the start of the key point (in beats).}} | |||
}} | |||
== Navigation == | |||
{{RizlineGameNavBox}} |