-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathScript.js
74 lines (60 loc) · 2.09 KB
/
Script.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
const fs = require("fs");
const INPUT = "YourInputDifficulty.dat";
const OUTPUT = "YourOutputDifficulty.dat";
/*if you are using the run function in scuffed walls and the ScuffedWalls.exe is not in the map folder then you need
to put the full path to prevent errors. Example:
const INPUT = "D:/Steam/steamapps/common/Beat Saber/Beat Saber_Data/CustomWIPLevels/Reassurance/ExpertPlusStandard.dat";
const OUTPUT = "D:/Steam/steamapps/common/Beat Saber/Beat Saber_Data/CustomWIPLevels/Reassurance/ExpertPlusStandard.dat";*/
let difficulty = JSON.parse(fs.readFileSync(INPUT));
difficulty._customData = { _pointDefinitions: [], _customEvents: [], _environment: [] };
const _customData = difficulty._customData;
const _obstacles = difficulty._obstacles;
const _notes = difficulty._notes;
const _customEvents = _customData._customEvents;
const _pointDefinitions = _customData._pointDefinitions;
const _environment = _customData._environment;
/*your code here....
Template for Environment enhancement, Wall, Custom event:
wall:
_obstacles.push(
{
"_time": Beat,
"_lineIndex": 0,
"_type": 1,
"_duration": When animating in custom data,
"_width": 0,
"_customData": {
"_track": ["yourTrack1","yourTrack2"..... you can make one or more tracks],
"_scale": [x, y, z],
"_position": [x, y, z],
"_rotation":[x, y, z]
more customData here
}
}
);
Environment:
_environment.push(
{
"_id": "Find in Chroma logs",
"_lookupMethod": "Regex, Exact, Contains",
"_scale": [x, y, z],
"_position": [x, y, z],
"_rotation": [x, y, z]
"_track": "yourTrack1" when you want to animate the environment
more customData here
}
);
custom event:
_customEvents.push(
{
"_time" : Beat,
"_type" : "AnimateTrack",
"_data" : {
"_track" : "yourTrack",
"_duration" : in beats,
"_rotation" : [[x,y,z,t],[x,y,z,t]],
more customData here
}
}
);*/
fs.writeFileSync(OUTPUT, JSON.stringify(difficulty, null, 0));