diff --git a/Project.xml b/Project.xml
index 0c043c5..ac7e42f 100644
--- a/Project.xml
+++ b/Project.xml
@@ -3,7 +3,7 @@
-
+
diff --git a/assets/preload/data/FreeplaySettings.json b/assets/preload/data/FreeplaySettings.json
new file mode 100644
index 0000000..a67c18f
--- /dev/null
+++ b/assets/preload/data/FreeplaySettings.json
@@ -0,0 +1,13 @@
+{
+ "skipSelect": [
+ "five-nights",
+ "vs-dave-rap",
+ "vs-dave-rap-two"
+ ],
+ "noExtraKeys": [
+ "five-nights",
+ "vs-dave-rap",
+ "vs-dave-rap-two",
+ "overdrive"
+ ]
+}
\ No newline at end of file
diff --git a/assets/preload/data/characterSelect.json b/assets/preload/data/characterSelect.json
index 6421572..fed04af 100644
--- a/assets/preload/data/characterSelect.json
+++ b/assets/preload/data/characterSelect.json
@@ -3,128 +3,128 @@
{
"newCharacter": [
{
- "casename": "bf",
+ "playername": "bf",
"thecharactername": "Boyfriend",
- "thenotemsagain": [1, 1, 1, 1],
+ "thenotems": [1, 1, 1, 1],
"notestyle": ""
},
{
- "casename": "bf-pixel",
+ "playername": "bf-pixel",
"thecharactername": "Pixel Boyfriend",
- "thenotemsagain": [1, 1, 1, 1],
+ "thenotems": [1, 1, 1, 1],
"notestyle": ""
}
],
"mainName": "bf",
- "thehotemsithink": [1, 1, 1, 1]
+ "mainnotems": [1, 1, 1, 1]
},
{
"newCharacter": [
{
- "casename": "dave",
+ "playername": "dave",
"thecharactername": "Dave",
- "thenotemsagain": [0.25, 0.25, 2, 2],
+ "thenotems": [0.25, 0.25, 2, 2],
"notestyle": ""
}
],
"mainName": "dave",
- "thehotemsithink": [0.25, 0.25, 2, 2]
+ "mainnotems": [0.25, 0.25, 2, 2]
},
{
"newCharacter": [
{
- "casename": "bambi-new",
+ "playername": "bambi-new",
"thecharactername": "Bambi",
- "thenotemsagain": [0, 0, 3, 0]
+ "thenotems": [0, 0, 3, 0]
}
],
"mainName": "bambi",
- "thehotemsithink": [0, 0, 3, 0]
+ "mainnotems": [0, 0, 3, 0]
},
{
"newCharacter": [
{
- "casename": "tristan",
+ "playername": "tristan",
"thecharactername": "Tristan",
- "thenotemsagain": [2, 0.5, 0.5, 0.5],
+ "thenotems": [2, 0.5, 0.5, 0.5],
"notestyle": ""
}
],
"mainName": "tristan",
- "thehotemsithink": [2, 0.5, 0.5, 0.5]
+ "mainnotems": [2, 0.5, 0.5, 0.5]
},
{
"newCharacter": [
{
- "casename": "tristan-golden",
+ "playername": "tristan-golden",
"thecharactername": "Tristan Golden",
- "thenotemsagain": [0.25, 0.25, 0.25, 2],
+ "thenotems": [0.25, 0.25, 0.25, 2],
"notestyle": ""
}
],
"mainName": "tristan-golden",
- "thehotemsithink": [0.25, 0.25, 0.25, 2]
+ "mainnotems": [0.25, 0.25, 0.25, 2]
},
{
"newCharacter": [
{
- "casename": "dave-angey",
+ "playername": "dave-angey",
"thecharactername": "3D Dave",
- "thenotemsagain": [2, 2, 0.25, 0.25],
+ "thenotems": [2, 2, 0.25, 0.25],
"notestyle": "3D"
},
{
- "casename": "dave-festival-3d",
+ "playername": "dave-festival-3d",
"thecharactername": "3D Dave Festival",
- "thenotemsagain": [2, 2, 0.25, 0.25],
+ "thenotems": [2, 2, 0.25, 0.25],
"notestyle": "3D"
}
],
"mainName": "dave-angey",
- "thehotemsithink": [2, 2, 0.25, 0.25]
+ "mainnotems": [2, 2, 0.25, 0.25]
},
{
"newCharacter": [
{
- "casename": "bambi-3d",
+ "playername": "bambi-3d",
"thecharactername": "Expunged",
- "thenotemsagain": [0, 3, 0, 0],
+ "thenotems": [0, 3, 0, 0],
"notestyle": "3D"
}
],
"mainName": "bambi-3d",
- "thehotemsithink": [0, 3, 0, 0]
+ "mainnotems": [0, 3, 0, 0]
},
{
"newCharacter": [
{
- "casename": "shaggy",
+ "playername": "shaggy",
"thecharactername": "Shaggy",
- "thenotemsagain": [1, 1, 1, 1],
+ "thenotems": [1, 1, 1, 1],
"notestyle": ""
},
{
- "casename": "supershaggy",
+ "playername": "supershaggy",
"thecharactername": "Shaggy (0.001%)",
- "thenotemsagain": [1, 1, 1, 1],
+ "thenotems": [1, 1, 1, 1],
"notestyle": ""
},
{
- "casename": "godshaggy",
+ "playername": "godshaggy",
"thecharactername": "Shaggy (0.002%)",
- "thenotemsagain": [1, 1, 1, 1],
+ "thenotems": [1, 1, 1, 1],
"notestyle": ""
},
{
- "casename": "redshaggy",
+ "playername": "redshaggy",
"thecharactername": "Red Shaggy",
- "thenotemsagain": [1, 1, 1, 1],
+ "thenotems": [1, 1, 1, 1],
"notestyle": ""
}
],
"mainName": "shaggy",
- "thehotemsithink": [1, 1, 1, 1]
+ "mainnotems": [1, 1, 1, 1]
}
]
}
\ No newline at end of file
diff --git a/assets/preload/sounds/nothing.ogg b/assets/preload/sounds/nothing.ogg
new file mode 100644
index 0000000..9c92313
Binary files /dev/null and b/assets/preload/sounds/nothing.ogg differ
diff --git a/mods/test/data/FreeplaySettings.json b/mods/test/data/FreeplaySettings.json
new file mode 100644
index 0000000..a3d54f8
--- /dev/null
+++ b/mods/test/data/FreeplaySettings.json
@@ -0,0 +1,6 @@
+{
+ "skipSelect": [],
+ "noExtraKeys": [
+ "test"
+ ]
+}
\ No newline at end of file
diff --git a/mods/test/data/characterSelect.json b/mods/test/data/characterSelect.json
index 43fdf8d..8124509 100644
--- a/mods/test/data/characterSelect.json
+++ b/mods/test/data/characterSelect.json
@@ -3,14 +3,14 @@
{
"newCharacter": [
{
- "casename": "bf-pixel",
+ "playername": "bf-pixel",
"thecharactername": "Test",
- "thenotemsagain": [1, 1, 1, 1],
+ "thenotems": [1, 1, 1, 1],
"notestyle": ""
}
],
"mainName": "testtwo",
- "thehotemsithink": [1, 1, 1, 1]
+ "mainnotems": [1, 1, 1, 1]
}
]
}
\ No newline at end of file
diff --git a/skins/characterSelect.json b/skins/characterSelect.json
index 57f5b54..962db3d 100644
--- a/skins/characterSelect.json
+++ b/skins/characterSelect.json
@@ -1,16 +1,16 @@
{
- "characters": [
+ "characters": [
+ {
+ "newCharacter": [
{
- "newCharacter": [
- {
- "casename": "bf-pixel",
- "thecharactername": "Test",
- "thenotemsagain": [1, 1, 1, 1],
- "notestyle": ""
- }
- ],
- "mainName": "test",
- "thehotemsithink": [1, 1, 1, 1]
+ "playername": "bf-pixel",
+ "thecharactername": "Test",
+ "thenotems": [1, 1, 1, 1],
+ "notestyle": ""
}
- ]
- }
\ No newline at end of file
+ ],
+ "mainName": "test",
+ "mainnotems": [1, 1, 1, 1]
+ }
+ ]
+}
\ No newline at end of file
diff --git a/source/CharacterSelectState.hx b/source/CharacterSelectState.hx
index b17fa81..6789f77 100644
--- a/source/CharacterSelectState.hx
+++ b/source/CharacterSelectState.hx
@@ -42,15 +42,15 @@ typedef CharSelectStuff =
{
var newCharacter:Array;
var mainName:String;
- var thehotemsithink:Array;
+ var mainnotems:Array;
}
typedef TheActualChar =
{
-var casename:String;
+var playername:String;
var thecharactername:String;
-var thenotemsagain:Array;
+var thenotems:Array;
var notestyle:String;
}
class CharacterInSelect
@@ -185,35 +185,36 @@ class CharacterSelectState extends MusicBeatState
for (character in json.characters) { // Normal
var mainName:String = character.mainName;
- var thehotemsithink:Array = character.thehotemsithink;
+ var thehotemsithink:Array = character.mainnotems;
var newCharacterForms:Array = [];
for (newChar in character.newCharacter) {
- newCharacterForms.push(new CharacterForm(newChar.casename, newChar.thecharactername, newChar.thenotemsagain, newChar.notestyle));
+ newCharacterForms.push(new CharacterForm(newChar.playername, newChar.thecharactername, newChar.thenotems, newChar.notestyle));
}
characters.push(new CharacterInSelect(mainName, thehotemsithink, newCharacterForms));
}
-
+ if (FileSystem.exists(TitleState.modFolder + 'Skins/characterSelect.json')) {
for (character in jsonCustom.characters) { // For Globle Characters
var mainName:String = character.mainName;
- var thehotemsithink:Array = character.thehotemsithink;
+ var thehotemsithink:Array = character.mainnotems;
var newCharacterForms:Array = [];
for (newChar in character.newCharacter) {
- newCharacterForms.push(new CharacterForm(newChar.casename, newChar.thecharactername, newChar.thenotemsagain, newChar.notestyle));
+ newCharacterForms.push(new CharacterForm(newChar.playername, newChar.thecharactername, newChar.thenotems, newChar.notestyle));
}
characters.push(new CharacterInSelect(mainName, thehotemsithink, newCharacterForms));
}
+ }
if (FileSystem.exists(TitleState.modFolder + '/data/characterSelect.json')) {
for (character in jsonCustom2.characters) { // For Characters in Mod Packs
var mainName:String = character.mainName;
- var thehotemsithink:Array = character.thehotemsithink;
+ var thehotemsithink:Array = character.mainnotems;
var newCharacterForms:Array = [];
for (newChar in character.newCharacter) {
- newCharacterForms.push(new CharacterForm(newChar.casename, newChar.thecharactername, newChar.thenotemsagain, newChar.notestyle));
+ newCharacterForms.push(new CharacterForm(newChar.playername, newChar.thecharactername, newChar.thenotems, newChar.notestyle));
}
characters.push(new CharacterInSelect(mainName, thehotemsithink, newCharacterForms));
diff --git a/source/FreeplayState.hx b/source/FreeplayState.hx
index 9f2040e..a344ce4 100644
--- a/source/FreeplayState.hx
+++ b/source/FreeplayState.hx
@@ -24,10 +24,19 @@ import flixel.addons.util.FlxAsyncLoop;
import flixel.graphics.FlxGraphic;
import openfl.display.BitmapData;
import openfl.utils.Assets as OpenFlAssets;
-
+import haxe.Json;
+import haxe.format.JsonParser;
+import sys.FileSystem;
+import sys.io.File;
using StringTools;
+typedef FreeplaySettings =
+{
+ var skipSelect:Array;
+ var noExtraKeys:Array;
+}
+
class FreeplayState extends MusicBeatState
{
var songs:Array = [];
@@ -57,10 +66,14 @@ class FreeplayState extends MusicBeatState
private var CurrentPack:Int = 0;
private var NameAlpha:Alphabet;
+ public var rawJsonF:String;
+ public var jsonF:FreeplaySettings;
+ public var rawJsonFM:String;
+ public var jsonFM:FreeplaySettings;
var loadingPack:Bool = false;
- var songColors:Array =
+ var songColors:Array = // Couldn't get this to work in the json I'll get you one day
[
0xFF00137F, // GF but its actually dave!
0xFF4965FF, // DAVE
@@ -78,21 +91,21 @@ class FreeplayState extends MusicBeatState
0xFF0162F5, // OVERDRIVE
0xFF119A2B, // CHEATING
0xFFFF0000, // UNFAIRNESS
- 0xFF810000, // EXPLOITATION
+ 0xFF810000, // EXPLOITATION
];
public static var skipSelect:Array =
[
- 'five-nights',
+ /*'five-nights',
'vs-dave-rap',
- 'vs-dave-rap-two'
+ 'vs-dave-rap-two' */
];
public static var noExtraKeys:Array =
[
- 'five-nights',
+ /*'five-nights',
'vs-dave-rap',
'vs-dave-rap-two',
- 'overdrive'
+ 'overdrive'*/
];
private var camFollow:FlxObject;
@@ -130,7 +143,33 @@ class FreeplayState extends MusicBeatState
#if desktop DiscordClient.changePresence("In the Freeplay Menu", null); #end
isaCustomSong = false;
-
+ rawJsonF = File.getContent(Paths.json('FreeplaySettings'));
+ jsonF = cast Json.parse(rawJsonF);
+
+ if (FileSystem.exists(TitleState.modFolder + '/data/FreeplaySettings.json')) {
+ rawJsonFM = File.getContent(TitleState.modFolder + '/data/FreeplaySettings.json');
+ jsonFM = cast Json.parse(rawJsonFM);
+
+ for (i in jsonFM.skipSelect) {
+ skipSelect.push(i);
+ }
+
+ for (i in jsonFM.noExtraKeys) {
+ noExtraKeys.push(i);
+ }
+ }
+
+ trace(songColors);
+
+ for (i in jsonF.skipSelect) {
+ skipSelect.push(i);
+ }
+
+ for (i in jsonF.noExtraKeys) {
+ noExtraKeys.push(i);
+ }
+
+
awaitingExploitation = (FlxG.save.data.exploitationState == 'awaiting');
showCharText = FlxG.save.data.wasInCharSelect;
@@ -666,7 +705,15 @@ class FreeplayState extends MusicBeatState
default:
FlxG.sound.music.fadeOut(1, 0);
if (isaCustomSong) {
+ if (FileSystem.exists(TitleState.modFolder + '/data/charts/' + (songs[curSelected].songName.toLowerCase() + '.json'))) {
PlayState.SONG = Song.loadFromCustomJson(songs[curSelected].songName.toLowerCase()/*, curDifficulty*/);
+ } else {
+ var deathSound:FlxSound = new FlxSound();
+ deathSound.loadEmbedded(Paths.soundRandom('missnote', 1, 3));
+ deathSound.volume = FlxG.random.float(0.6, 1);
+ deathSound.play();
+ FlxG.camera.shake(0.05, 0.1);
+ }
} else {
PlayState.SONG = Song.loadFromJson(Highscore.formatSong(songs[curSelected].songName.toLowerCase(), curDifficulty));
}
@@ -824,7 +871,9 @@ class FreeplayState extends MusicBeatState
#end
#if PRELOAD_ALL
+ //if (FileSystem.exists('assets/songs' + songs[curSelected].songName)) {
FlxG.sound.playMusic(Paths.inst(songs[curSelected].songName), 0);
+ //}
#end
curChar = Highscore.getChar(songs[curSelected].songName, curDifficulty);
@@ -868,6 +917,7 @@ class FreeplayState extends MusicBeatState
pressSpeeds = new Array();
pressUnlockNumber = new FlxRandom().int(20, 40);
}
+
function recursedUnlock()
{
canInteract = false;
diff --git a/source/Main.hx b/source/Main.hx
index 25cccbb..62457d3 100644
--- a/source/Main.hx
+++ b/source/Main.hx
@@ -25,7 +25,7 @@ class Main extends Sprite
public static var fps:FpsDisplay;
- public static var applicationName:String = "Friday Night Funkin' | VS. Dave and Bambi 3.0b | Extra Keys Addon 2.0.2";
+ public static var applicationName:String = "Friday Night Funkin' | VS. Dave and Bambi 3.0b | Moddable ?.?.?";
// You can pretty much ignore everything from here on - your code should go in your states.