import json def generate_beats(bpm): # Calculate time per beat time_per_beat = 60000 / bpm # Generate an array of beats for 30 seconds beats_array = [time_per_beat * i for i in range(int(30 * 1000 / time_per_beat))] # Multiply each beat by 48 final_array = [round(beat * 48) for beat in beats_array] return json.dumps(final_array, separators=(',', ':')) codename = input('Codename: ') songtitle = input('Song Title: ') songartist = input('Song Artist: ') mapLength = input('mapLength: ') coachcount = input('coachCount: ') difficulty = input('difficulty: ') originalJDVersion = input('originalJDVersion: ') lyricsScolor = input('lyricsScolor: ') customTypeName = input('customTypeName: ') bpm = int(input('BPM (for preview): ')) if int(coachcount) == 1: common = '''"map_bkgImageUrl": "", "banner_bkgImageUrl": "", "coach1ImageUrl": "", "phoneCoach1ImageUrl": "", "coverImageUrl": "", "cover_smallImageUrl": "", "expandCoachImageUrl": "", "phoneCoverImageUrl": ""''' if int(coachcount) == 2: common = '''"map_bkgImageUrl": "", "banner_bkgImageUrl": "", "coach1ImageUrl": "", "phoneCoach1ImageUrl": "", "coach2ImageUrl": "", "phoneCoach2ImageUrl": "", "coverImageUrl": "", "cover_smallImageUrl": "", "expandCoachImageUrl": "", "phoneCoverImageUrl": ""''' if int(coachcount) == 3: common = '''"map_bkgImageUrl": "", "banner_bkgImageUrl": "", "coach1ImageUrl": "", "phoneCoach1ImageUrl": "", "coach2ImageUrl": "", "phoneCoach2ImageUrl": "", "coach3ImageUrl": "", "phoneCoach3ImageUrl": "", "coverImageUrl": "", "cover_smallImageUrl": "", "expandCoachImageUrl": "", "phoneCoverImageUrl": ""''' if int(coachcount) == 4: common = '''"map_bkgImageUrl": "", "banner_bkgImageUrl": "", "coach1ImageUrl": "", "phoneCoach1ImageUrl": "", "coach2ImageUrl": "", "phoneCoach2ImageUrl": "", "coach3ImageUrl": "", "phoneCoach3ImageUrl": "", "coach4ImageUrl": "", "phoneCoach4ImageUrl": "", "coverImageUrl": "", "cover_smallImageUrl": "", "expandCoachImageUrl": "", "phoneCoverImageUrl": ""''' songdb = ''' "''' + codename + '''": { "artist": "''' + songartist + '''", "assets": { "nx": {}, "x1": {}, "common": {''' +common+'''} }, "audioPreviewData": "{\\"__class\\":\\"MusicTrackData\\",\\"structure\\":{\\"__class\\":\\"MusicTrackStructure\\",\\"markers\\":''' + generate_beats(bpm) +''',\\"signatures\\":[{\\"__class\\":\\"MusicSignature\\",\\"marker\\":0,\\"beats\\":4}],\\"startBeat\\":0,\\"endBeat\\":60,\\"fadeStartBeat\\":0,\\"useFadeStartBeat\\":false,\\"fadeEndBeat\\":0,\\"useFadeEndBeat\\":false,\\"videoStartTime\\":0,\\"previewEntry\\":0,\\"previewLoopStart\\":0,\\"previewLoopEnd\\":65,\\"volume\\":0,\\"fadeInDuration\\":0,\\"fadeInType\\":0,\\"fadeOutDuration\\":0,\\"fadeOutType\\":0},\\"path\\":\\"\\",\\"url\\":\\"jmcs://jd-contents/''' + codename + '''/''' + codename + '''_AudioPreview.ogg\\"}", "coachCount": ''' + coachcount + ''', "credits": "All Credits Goes to ''' + songartist +'''. Placeholder Credits, Generated By Automodder", "difficulty": ''' + difficulty +''', "doubleScoringType": -1, "jdmAttributes": {}, "lyricsColor": "'''+lyricsScolor+'''", "lyricsType": 0, "mainCoach": -1, "mapLength": ''' + mapLength + ''', "mapName": "''' + codename + '''", "mapPreviewMpd": { "videoEncoding": { "vp8": "\\r\\n\\r\\n\\t\\r\\n\\t\\t\\r\\n\\t\\t\\t\\r\\n\\t\\t\\t\\tjmcs://jd-contents/''' + codename + '''/''' + codename + '''_MapPreviewNoSoundCrop_LOW.vp8.webm\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\r\\n\\t\\t\\t\\r\\n\\t\\t\\t\\tjmcs://jd-contents/''' + codename + '''/''' + codename + '''_MapPreviewNoSoundCrop_MID.vp8.webm\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\r\\n\\t\\t\\t\\r\\n\\t\\t\\t\\tjmcs://jd-contents/''' + codename + '''/''' + codename + '''_MapPreviewNoSoundCrop_HIGH.vp8.webm\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\r\\n\\t\\t\\t\\r\\n\\t\\t\\t\\tjmcs://jd-contents/''' + codename + '''/''' + codename + '''_MapPreviewNoSoundCrop_ULTRA.vp8.webm\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\r\\n\\t\\t\\r\\n\\t\\r\\n\\r\\n", "vp9": "\\r\\n\\r\\n\\t\\r\\n\\t\\t\\r\\n\\t\\t\\t\\r\\n\\t\\t\\t\\tjmcs://jd-contents/''' + codename + '''/''' + codename + '''_MapPreviewNoSoundCrop_LOW.vp9.webm\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\r\\n\\t\\t\\t\\r\\n\\t\\t\\t\\tjmcs://jd-contents/''' + codename + '''/''' + codename + '''_MapPreviewNoSoundCrop_MID.vp9.webm\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\r\\n\\t\\t\\t\\r\\n\\t\\t\\t\\tjmcs://jd-contents/''' + codename + '''/''' + codename + '''_MapPreviewNoSoundCrop_HIGH.vp9.webm\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\r\\n\\t\\t\\t\\r\\n\\t\\t\\t\\tjmcs://jd-contents/''' + codename + '''/''' + codename + '''_MapPreviewNoSoundCrop_ULTRA.vp9.webm\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\r\\n\\t\\t\\r\\n\\t\\r\\n\\r\\n" } }, "mode": 6, "originalJDVersion": ''' + originalJDVersion + ''', "packages": { "mapContent": "''' + codename + '''_mapContent" }, "parentMapName": "''' + codename + '''", "skuIds": {}, "songColors": { "songColor_1A": "444444FF", "songColor_1B": "111111FF", "songColor_2A": "AAAAAAFF", "songColor_2B": "777777FF" }, "status": 3, "sweatDifficulty": 1, "tags": [ "Main", "subscribedSong" ], "title": "''' + songtitle + '''", "urls": { "jmcs://jd-contents/''' + codename + '''/''' + codename + '''_AudioPreview.ogg": "" }, "customTypeName": "''' + customTypeName + '''", "serverChangelist": 696566 } ''' print(songdb) input('\n\nPress enter: ')