From ff35ebeab7b1967e4819763346200a900718a459 Mon Sep 17 00:00:00 2001 From: Cam the Kirby <92703353+CamtheKirby@users.noreply.github.com> Date: Sun, 2 Jun 2024 22:22:23 -0500 Subject: [PATCH] Fix and finished the wiki --- mods/readmeformodding.txt | 3 +- mods/test/guides/! How 2 Get Started.txt | 6 -- .../test/guides/How 2 Add Custom Dialogue.txt | 14 ---- mods/test/guides/How 2 Add Settings.txt | 19 ----- .../guides/How 2 Make Custom Characters.txt | 72 ------------------- .../How 2 Make Custom Dialogue Characters.txt | 32 --------- ...w 2 Put Characters in Character Select.txt | 39 ---------- .../guides/How 2 Set Up Freeplay Settings.txt | 5 -- mods/test/guides/How 2 add Custom Songs.txt | 72 ------------------- source/PlayState.hx | 24 ++++--- 10 files changed, 15 insertions(+), 271 deletions(-) delete mode 100644 mods/test/guides/! How 2 Get Started.txt delete mode 100644 mods/test/guides/How 2 Add Custom Dialogue.txt delete mode 100644 mods/test/guides/How 2 Add Settings.txt delete mode 100644 mods/test/guides/How 2 Make Custom Characters.txt delete mode 100644 mods/test/guides/How 2 Make Custom Dialogue Characters.txt delete mode 100644 mods/test/guides/How 2 Put Characters in Character Select.txt delete mode 100644 mods/test/guides/How 2 Set Up Freeplay Settings.txt delete mode 100644 mods/test/guides/How 2 add Custom Songs.txt diff --git a/mods/readmeformodding.txt b/mods/readmeformodding.txt index 8781f0c..8f2f663 100644 --- a/mods/readmeformodding.txt +++ b/mods/readmeformodding.txt @@ -1 +1,2 @@ -Before you go to the guides folder in the test folder make to copy the test folder and rename it. \ No newline at end of file +go to the wiki lol +https://github.com/CamtheKirby/VsDave-Modable/wiki \ No newline at end of file diff --git a/mods/test/guides/! How 2 Get Started.txt b/mods/test/guides/! How 2 Get Started.txt deleted file mode 100644 index 46d7134..0000000 --- a/mods/test/guides/! How 2 Get Started.txt +++ /dev/null @@ -1,6 +0,0 @@ - -First, if you haven't already, copy the test folder and rename it as you like. (It will appear as the Freeplay pack name.) - -You can change the icon and the description to your liking. - -Make sure to select the mod by pressing 'm' on the title screen. \ No newline at end of file diff --git a/mods/test/guides/How 2 Add Custom Dialogue.txt b/mods/test/guides/How 2 Add Custom Dialogue.txt deleted file mode 100644 index 3667c0e..0000000 --- a/mods/test/guides/How 2 Add Custom Dialogue.txt +++ /dev/null @@ -1,14 +0,0 @@ -First go to data\dialogue - -create a txt file and make it the same name of the song you want to add Dialogue to - -Example of dialogue: - -:bf:Hello I am BF -:bambi:I am bambi -:bambi,upset:I'm mad -:bambi,annoyed:I am every mad -:dave:I am dave! -:dave,scared:Nah what's happening -setfont_code:dave,3d-scared: Oh no I'm 3d and taking werid fisfjsdfodsfsod -setfont_normal:dave:Nvm I'm back diff --git a/mods/test/guides/How 2 Add Settings.txt b/mods/test/guides/How 2 Add Settings.txt deleted file mode 100644 index 9482b34..0000000 --- a/mods/test/guides/How 2 Add Settings.txt +++ /dev/null @@ -1,19 +0,0 @@ -First off in data folder go to the charts folder and copy the test-settings json file and name it yoursong-settings.json - -Example: - -{ - "songCreators": "The Song Creators", - "songHeadings": "theHeading", - "creditsTxt": "the txt" - } - - - -To make a image of the song creator(s) go to images\songCreators - -copy the example image and edit it with the song creator(s) icons make sure it's named like the credit pop up - -you can make a custom heading too by going to images\songHeadings - -Copy the example image and edit it make sure it's the same name as the heading you chosen or you can take a heading that is already in the asstes like bambiHeading diff --git a/mods/test/guides/How 2 Make Custom Characters.txt b/mods/test/guides/How 2 Make Custom Characters.txt deleted file mode 100644 index b6fd036..0000000 --- a/mods/test/guides/How 2 Make Custom Characters.txt +++ /dev/null @@ -1,72 +0,0 @@ -JSON: - -First, go to the data folder, then the characters folder. You should see an example character (Bandu). Copy it and rename it to your character's name, ensuring it does not contain any uppercase letters. open your xml file and rename the -anim like this: - - "animName": "singUP", - "anim": "xmlup", - "fps": 24, - "loop": false - }, - { - "animName": "singLEFT", - "anim": "xmlleft", - "fps": 24, - "loop": false - -and so on - -The global offset changes the character's X and Y positions. - -To make the character playable, you need an offset file named like this: charactername-playable (We will explain the offsets later). - -Skins are for things like the 3D segment (Polygonized) and in Recursed when you miss too many letter notes. This is what you should put in the skin array if you want skins: - - { - "type": "3d", - "replacement": "charnamehere" - }, - { - "type": "recursed", - "replacement": "charnamehere" - } - -bar color just changes the characters bar color - -nativelyPlayable flips the left and right sides of the character. - -Graphic Size has three options - -furiosityScale (For small 3d characters) - -daPixelZoom (For Pixel Characters) - -Or you can just type in a number - -for effect also has there options - -3dfloat (Gives the character 3d notes and makes them float) - -float (Just makes the character float) - -3d (Just gives them 3d notes) - -put your json name in customCharacterList txt file - -IMAGES AND OFFSETS: - -When you're done, go to the images folder and select the characters folder. Put your spritesheet and XML file in there (they both must be named the same as the JSON). - -Next, go to the icons folder and put your icons (make sure they are named the same as the JSON). - -Then, go to the offset folder, copy the example file, and rename it to the JSON name. - -If you selected isPlayable for the JSON, create another text file named jsonname-playable. - -now go in the game and select your character from the chart menu - -Now, go into the game and select your character from the chart menu. If the positions are off, edit the globalOffset and the text file. - -and you should be done! - - (For putting your character in the character select, go to the "How 2 put characters in character select" txt file.) diff --git a/mods/test/guides/How 2 Make Custom Dialogue Characters.txt b/mods/test/guides/How 2 Make Custom Dialogue Characters.txt deleted file mode 100644 index 922f4ad..0000000 --- a/mods/test/guides/How 2 Make Custom Dialogue Characters.txt +++ /dev/null @@ -1,32 +0,0 @@ -This System is kinda unstable right now so before I tell you how to add custom dialogue characters I will teach you how to do it in a alternative way - -so just do this - -:generic: Bambi OC: I am bambi oc lolololol -:generic: Dave OC: I am dave oc wait I don't exist - -(Make sure you don't put the name of the character near the : if your doing charactername:) - -But if you stil want to use custom dialogue characters then follow this: - -go to data\characters\dialogue - -copy the test json make rename it to anything you like - -the x and y don't do anything for something yet so just set right to true - -now go to images\dialogue - -copy the test folder and rename to your json name - -make sure to edit the image name like this - -jsonname_normal - -you can make more expressions just make sure it's formatted like this: - -jsonname_expression - -in dialogue to use your custom character do this: - -:jsonname,expression: I am custom character diff --git a/mods/test/guides/How 2 Put Characters in Character Select.txt b/mods/test/guides/How 2 Put Characters in Character Select.txt deleted file mode 100644 index a90b44c..0000000 --- a/mods/test/guides/How 2 Put Characters in Character Select.txt +++ /dev/null @@ -1,39 +0,0 @@ -First off go to data open the characterSelect json - -it should have a example of a character and a character with different forms - -you can replace it with this: -{ - "characters": [ - { - "newCharacter": [ - { - "playername": "nameofchar", - "thecharactername": "Name of Char in Character Select Menu", - "thenotems": [1, 1, 1, 1], - "notestyle": "3D or just put nothing" - } - ], - "mainName": "Will be the name if you get a highscore with the character", - "mainnotems": [1, 1, 1, 1] - } - ] - } - -you can add more characters by doing this replacing the last curly bracket (}): - - }, - { - "newCharacter": [ - { - "playername": "nameofchar", - "thecharactername": "Name of Char in Character Select Menu", - "thenotems": [1, 1, 1, 1], - "notestyle": "3D or just put nothing" - } - ], - "mainName": "Will be the name if you get a highscore with the character", - "mainnotems": [1, 1, 1, 1] - } - ] - } \ No newline at end of file diff --git a/mods/test/guides/How 2 Set Up Freeplay Settings.txt b/mods/test/guides/How 2 Set Up Freeplay Settings.txt deleted file mode 100644 index 0776bd2..0000000 --- a/mods/test/guides/How 2 Set Up Freeplay Settings.txt +++ /dev/null @@ -1,5 +0,0 @@ -In the data folder open up FreeplaySettings - -you should see two arrays one named skipSelect and one named noExtraKeys - -there are already examples in the json file \ No newline at end of file diff --git a/mods/test/guides/How 2 add Custom Songs.txt b/mods/test/guides/How 2 add Custom Songs.txt deleted file mode 100644 index eed83ef..0000000 --- a/mods/test/guides/How 2 add Custom Songs.txt +++ /dev/null @@ -1,72 +0,0 @@ -First go to charts and put your chart there (make sure to only have the song name) - -if your going to have a extra key difficulty as well do this: - -songname-extrakeys - -Now put your inst and voices into the songs folder (Make sure that files are oggs and they are in a folder that is your song name) - -For Freeplay: - -Go to data and select customSongs.txt - -delete the test song if you want to and replace it with this: - -yoursong:1:characternameforicon - -you can put multiple to by doing this: - -yoursong:1:characternameforicon -yoursong:1:characternameforicon -yoursong:1:characternameforicon - -The number is a array from 0 to 16: - -var songColors:Array = [ - 0xFF00137F, // GF but its actually dave! - 0xFF4965FF, // DAVE - 0xFF00B515, // MISTER BAMBI RETARD (thats kinda rude ngl) - 0xFF00FFFF, // SPLIT THE THONNNNN - 0xFF800080, // FESTIVAL - 0xFF116E1C, // MASTA BAMBI - 0xFFFF0000, // KABUNGA - 0xFF0EAE2C, // SECRET MOD LEAK - 0xFFFF0000, // TRISTAN - FlxColor.fromRGB(162, 150, 188), // PLAYROBOT - FlxColor.fromRGB(44, 44, 44), // RECURSED - 0xFF31323F, // MOLDY - 0xFF35396C, // FIVE NIGHT - 0xFF0162F5, // OVERDRIVE - 0xFF119A2B, // CHEATING - 0xFFFF0000, // UNFAIRNESS - 0xFF810000, // EXPLOITATION - ]; - -Now your song is playable (open up the chart editor to edit the characters and the stage) - -Story Mode: - -In the data folder open up weeks.json - -you put your songs into the songlist array - -the week name is what shows up as a desc of your custom week - -the weekBanner is the name of your .png banner in images\weekBanners - -in images\storymenu make sure your first custom week is named week6 and the other one week7 and so on - -to add more weeks replace the last curly bracket (}) with this: - -}, - { - "songList": ["Test", "Test"], - "weekName": "Test Week", - "bannerName": "testbanner" - } - ] - } - - - - diff --git a/source/PlayState.hx b/source/PlayState.hx index e644ce4..842d07d 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -497,6 +497,8 @@ class PlayState extends MusicBeatState var shy:Float; var sh_r:Float = 60; + var settingsExist:Bool; + public static var rssongScore:Int = 0; public static var rsmisses:Int = 0; public static var rsaccuracy:Float = 0.00; @@ -518,13 +520,13 @@ class PlayState extends MusicBeatState adminMode = FlxG.save.data.adminMode; + settingsExist = FileSystem.exists(TitleState.modFolder + '/data/charts/' + PlayState.SONG.song.toLowerCase() + '-settings.json'); + resetShader(); - if (FreeplayState.isaCustomSong) { - if (FileSystem.exists(TitleState.modFolder + '/data/charts/' + PlayState.SONG.song.toLowerCase() + '-settings.json')) { + if (FreeplayState.isaCustomSong && settingsExist) { rawJsonSettings = File.getContent(TitleState.modFolder + '/data/charts/' + PlayState.SONG.song.toLowerCase() + '-settings.json'); jsonSettings = cast Json.parse(rawJsonSettings); - } } @@ -567,7 +569,7 @@ class PlayState extends MusicBeatState case 'five-nights': inFiveNights = true; default: - if (FreeplayState.isaCustomSong) { + if (FreeplayState.isaCustomSong && settingsExist) { if (jsonSettings.exploitationEffect) { Main.toggleFuckedFPS(true); } @@ -842,7 +844,7 @@ class PlayState extends MusicBeatState } var gfVersion:String = 'gf'; var noGFSongs = ['memory', 'five-nights', 'bot-trot', 'escape-from-california', 'overdrive']; - if (FreeplayState.isaCustomSong) { + if (FreeplayState.isaCustomSong && settingsExist) { if (jsonSettings.hasNoGf) { noGFSongs.push(SONG.song.toLowerCase()); } @@ -2380,7 +2382,7 @@ class PlayState extends MusicBeatState var introAssets:Map> = new Map>(); var introSoundAssets:Map> = new Map>(); var soundAssetsAlt:Array = new Array(); - if (FreeplayState.isaCustomSong) { + if (FreeplayState.isaCustomSong && settingsExist) { if (SONG.song.toLowerCase() == "exploitation" || jsonSettings.intro == "ex") introAssets.set('default', ['ui/ready', "ui/set", "ui/go_glitch"]); else if (SONG.song.toLowerCase() == "overdrive" || jsonSettings.intro == "overdriving") @@ -2416,7 +2418,7 @@ class PlayState extends MusicBeatState case 'overdrive': soundAssetsAlt = introSoundAssets.get('overdriving'); default: - if (FreeplayState.isaCustomSong) { + if (FreeplayState.isaCustomSong && settingsExist) { if (jsonSettings.intro == '' || jsonSettings.intro == null) { soundAssetsAlt = introSoundAssets.get('default'); } else { @@ -2712,7 +2714,7 @@ class PlayState extends MusicBeatState add(vignette); FlxTween.tween(vignette, {alpha: 0.7}, 1); default: - if (FreeplayState.isaCustomSong) { + if (FreeplayState.isaCustomSong && settingsExist) { if (jsonSettings.windowName == "bambiWindowNames") { Application.current.window.title = banbiWindowNames[new FlxRandom().int(0, banbiWindowNames.length - 1)]; } else if (jsonSettings.windowName != "" && jsonSettings.windowName != null) { @@ -3786,7 +3788,7 @@ class PlayState extends MusicBeatState " | M1ss3s: " + (misses * (modchartoption ? FlxG.random.int(1,9) : 1)) + " | Accuracy: " + (truncateFloat(accuracy, 2) * (modchartoption ? FlxG.random.int(1,9) : 1)) + "% "; default: - if (FreeplayState.isaCustomSong) { + if (FreeplayState.isaCustomSong && settingsExist) { if (jsonSettings.exploitationEffect) { scoreTxt.text = "Scor3: " + (songScore * (modchartoption ? FlxG.random.int(1,9) : 1)) + @@ -4373,7 +4375,7 @@ class PlayState extends MusicBeatState health = 0.001; } default: - if (FreeplayState.isaCustomSong) { + if (FreeplayState.isaCustomSong && settingsExist) { if (jsonSettings.healthDrain == "cheating") { health -= healthtolower; } else if (jsonSettings.healthDrain == "unfairness") { @@ -7867,7 +7869,7 @@ class PlayState extends MusicBeatState makeInvisibleNotes(false); } } - if (FreeplayState.isaCustomSong) { + if (FreeplayState.isaCustomSong && settingsExist) { if (SONG.song.toLowerCase() == 'exploitation' || jsonSettings.exploitationEffect && curStep % 8 == 0) { var fonts = ['arial', 'chalktastic', 'openSans', 'pkmndp', 'barcode', 'vcr'];