diff --git a/README.md b/README.md index 54dc60a..fb1aa01 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # DanceDanceRevolution -**Plugin Version:** fork-mdx-3.0.3b +**Plugin Version:** fork-mdx-3.0.3c **Supported game versions:** WORLD (2024101500) @@ -26,7 +26,7 @@ musicdb.xml Usage Guide Changelog =========== -### fork-mdx-3.0.3b +### fork-mdx-3.0.3c - Fixed WebUI flare skill calculation mistake. - Fixed getLastGhostId function. @@ -37,6 +37,15 @@ Changelog - You can use patches to force the game to imitate gold cab. - Added "Step This Way" Challenge difficulties - Added "MVP" to SONGS_WORLD. +- Added "Time to HYPERDRIVE" to SONGS_WORLD. + - Song should appear if you're Silver rank in WORLD LEAGUE. +- Added new charts to advanced play + - "1116" + - "Sahara" + - "High & Low" (CHA) + - "ONYX" (CHA) +- Added new player customization options in Profile Settings. + - BPL Team Supporter Appeal Board ### fork-mdx-3.0.2 diff --git a/data/world.ts b/data/world.ts index 30cd72d..a5738e3 100644 --- a/data/world.ts +++ b/data/world.ts @@ -54,13 +54,13 @@ export const SONGS_WORLD = [ { mcode: 38756, limited_ary: [2, 2, 2, 2, -1, -1, 2, 2, 2, -1], diffLv: [3, 8, 15, 18, 0, 0, 8, 14, 18, 0] }, { mcode: 38758, limited_ary: [2, 2, 2, 2, -1, -1, 2, 2, 2, -1], diffLv: [5, 10, 13, 17, 0, 0, 10, 13, 17, 0] }, { mcode: 38759, limited_ary: [2, 2, 2, 2, -1, -1, 2, 2, 2, -1], diffLv: [3, 6, 13, 15, 0, 0, 7, 13, 15, 0] }, - { mcode: 38757, limited_ary: [0, 0, 0, 0, -1, -1, 0, 0, 0, -1], diffLv: [2, 5, 8, 13, 0, 0, 5, 8, 13, 0] } + { mcode: 38757, limited_ary: [0, 0, 0, 0, -1, -1, 0, 0, 0, -1], diffLv: [2, 5, 8, 13, 0, 0, 5, 8, 13, 0] }, + { mcode: 38622, limited_ary: [12, 12, 12, 12, -1, -1, 12, 12, 12, -1], diffLv: [2, 7, 12, 15, 0, 0, 7, 12, 15, 0] }, + { mcode: 38760, limited_ary: [2, 2, 2, 2, 2, -1, 2, 2, 2, 2], diffLv: [4, 8, 13, 16, 18, 0, 8, 13, 16, 18] }, + { mcode: 38761, limited_ary: [2, 2, 2, 2, -1, -1, 2, 2, 2, -1], diffLv: [4, 8, 12, 15, 0, 0, 8, 12, 15, 0] } // songs that have yet to release. unknown difficulty lvls. - // { mcode: 38622, limited_ary: [], diffLv: [] }, - // { mcode: 38629, limited_ary: [], diffLv: [] }, - // { mcode: 38760, limited_ary: [], diffLv: [] }, - // { mcode: 38761, limited_ary: [], diffLv: [] } + // { mcode: 38629, limited_ary: [], diffLv: [] }, hakken ] export const SONGS_OVERRIDE_WORLD = [ @@ -211,7 +211,6 @@ export const SONGS_OVERRIDE_WORLD = [ { mcode: 38269, limited_ary: [0, 0, 0, 0, -1, -1, 0, 0, 0, -1], diffLv: [2, 5, 7, 10, 0, 0, 5, 7, 10, 0] }, { mcode: 38652, limited_ary: [0, 0, 0, 0, 0, -1, 0, 0, 0, 0], diffLv: [2, 6, 10, 15, 17, 0, 6, 10, 15, 17] }, { mcode: 37251, limited_ary: [0, 0, 0, 0, 0, -1, 0, 0, 0, 0], diffLv: [6, 10, 12, 15, 18, 0, 10, 11, 16, 17] }, - { mcode: 38212, limited_ary: [0, 0, 0, 0, 2, -1, 0, 0, 0, 2], diffLv: [3, 7, 10, 15, 16, 0, 8, 11, 15, 16] }, { mcode: 38295, limited_ary: [0, 0, 0, 0, 2, -1, 0, 0, 0, 2], diffLv: [3, 7, 11, 14, 17, 0, 7, 11, 14, 17] }, { mcode: 38258, limited_ary: [0, 0, 0, 0, 2, -1, 0, 0, 0, 2], diffLv: [2, 6, 10, 14, 16, 0, 6, 11, 14, 16] }, @@ -222,10 +221,11 @@ export const SONGS_OVERRIDE_WORLD = [ { mcode: 38442, limited_ary: [0, 0, 0, 0, 2, -1, 0, 0, 0, 2], diffLv: [3, 8, 13, 16, 18, 0, 8, 13, 16, 18] }, { mcode: 38436, limited_ary: [0, 0, 0, 0, 2, -1, 0, 0, 0, 2], diffLv: [4, 7, 11, 14, 17, 0, 7, 11, 14, 17] }, { mcode: 38407, limited_ary: [0, 0, 0, 0, 0, -1, 0, 0, 0, 0], diffLv: [4, 9, 12, 16, 17, 0, 9, 12, 16, 17] }, + { mcode: 38428, limited_ary: [0, 0, 0, 0, 0, -1, 0, 0, 0, 0], diffLv: [4, 8, 12, 16, 18, 0, 8, 12, 16, 18] }, + { mcode: 38424, limited_ary: [0, 0, 0, 0, 0, -1, 0, 0, 0, 0], diffLv: [4, 8, 11, 14, 17, 0, 8, 11, 14, 17] } - // { mcode: 38339, limited_ary: [0, 0, 0, 0, 0, -1, 0, 0, 0, 0], diffLv: [3, 7, 11, 14, ?, 0, 7, 11, 14, ?] }, - // { mcode: 38424, limited_ary: [0, 0, 0, 0, 0, -1, 0, 0, 0, 0], diffLv: [4, 8, 11, 14, ?, 0, 8, 11, 14, ?] }, - // { mcode: 38428, limited_ary: [0, 0, 0, 0, 0, -1, 0, 0, 0, 0], diffLv: [4, 8, 12, 16, ?, 0, 8, 12, 16, ?] }, + // new charts + // { mcode: 38339, limited_ary: [0, 0, 0, 0, 0, -1, 0, 0, 0, 0], diffLv: [3, 7, 11, 14, ?, 0, 7, 11, 14, ?] }, cbme ] export const EVENTS_WORLD = [ @@ -285,7 +285,13 @@ export const EVENTS_WORLD = [ { id: 109, no: 0, cond: 1, rwrd: 1197, type: 201, save: 1 }, { id: 110, no: 0, cond: 1, rwrd: 38759, type: 43, comp: 0, save: 1 }, { id: 111, no: 0, cond: 1, rwrd: 38758, type: 43, comp: 0, save: 1 }, - { id: 112, no: 0, cond: 1, rwrd: 38756, type: 43, comp: 0, save: 1 } + { id: 112, no: 0, cond: 1, rwrd: 38756, type: 43, comp: 0, save: 1 }, + { id: 113, no: 0, cond: 1, rwrd: 1201, type: 201, save: 1 }, + { id: 114, no: 0, cond: 1, rwrd: 38760, type: 50 }, + { id: 115, no: 0, cond: 1, rwrd: 38760, type: 52 }, + { id: 116, no: 0, cond: 1, rwrd: 38761, type: 50 }, + { id: 117, no: 0, cond: 1, rwrd: 38428, type: 52 }, + { id: 118, no: 0, cond: 1, rwrd: 38424, type: 52 } ] export const LEAGUE_WORLD = [ diff --git a/handlers/ddrworld.ts b/handlers/ddrworld.ts index 5b161a9..9339636 100644 --- a/handlers/ddrworld.ts +++ b/handlers/ddrworld.ts @@ -1,5 +1,5 @@ import { Profile } from "../models/profile"; -import { ProfileWorld, ScoreWorld, EventWorld, GhostWorld, RivalWorld, HiScoreWorld, LeagueWorld } from "../models/ddrworld"; +import { ProfileWorld, ScoreWorld, EventWorld, GhostWorld, RivalWorld, HiScoreWorld, LeagueWorld, CustomizeWorld } from "../models/ddrworld"; import { SONGS_WORLD, SONGS_OVERRIDE_WORLD, EVENTS_WORLD, LEAGUE_WORLD, LOCKED_SONGS } from "../data/world"; function getLastGhostId(ghost: any) { @@ -654,6 +654,16 @@ export const playerdataload: EPR = async (info, data, send) => { } } + let userCustomize = [] + let customize = await DB.Find(refid, {collection: 'customize3'}) + customize.forEach(cus => { + userCustomize.push({ + category: K.ITEM('s32', cus.category), + key: K.ITEM('s32', cus.key), + pattern: K.ITEM('s32', cus.pattern) + }) + }) + // test if(IO.Exists('data/test.json')) { let bufTest = await IO.ReadFile('data/test.json') @@ -745,7 +755,8 @@ export const playerdataload: EPR = async (info, data, send) => { rival: [], score: scoreFin, event: eventFin, - league: leagueData + league: leagueData, + customize: userCustomize }); } }; @@ -840,7 +851,6 @@ export const rivaldataload: EPR = async (info, data, send) => { const pcbid = $(data).str("data.pcbid"); // song id, style, difficulty, idk, dancername, idk, idk, scoredisp, score, ghost - let ssssss = '' let record = [] let hiscore: any if(ddrCode === 0) { diff --git a/index.ts b/index.ts index 09626a4..4d1c3e2 100644 --- a/index.ts +++ b/index.ts @@ -4,7 +4,7 @@ import { usergamedata_recv } from "./handlers/usergamedata_recv"; import { usergamedata_send } from "./handlers/usergamedata_send"; import { musicdataload, playerdatanew, playerdatasave, playerdataload, rivaldataload, ghostdataload, taboowordcheck, minidump } from "./handlers/ddrworld"; import { CommonOffset, OptionOffset, Profile } from "./models/profile"; -import { ProfileWorld } from "./models/ddrworld"; +import { ProfileWorld, CustomizeWorld } from "./models/ddrworld"; import { SONGS_WORLD, SONGS_OVERRIDE_WORLD, LEAGUE_WORLD } from "./data/world" export function register() { @@ -210,6 +210,17 @@ export function register() { }); }); + R.WebUIEvent("playerCustomize", async ({ customize, refid, selected }) => { + const catPat = {'appeal': [1, 1]} + if(selected === 0) await DB.Remove(refid, { collection: "customize3", category: catPat[customize][0], pattern: catPat[customize][1] }) + else await DB.Upsert(refid, { collection: "customize3", category: catPat[customize][0] }, { + $set: { + key: selected, + pattern: catPat[customize][1] + } + }); + }); + R.WebUIEvent("getMDB", async (data: {}, send: WebUISend) => { let mdbData = [] let mdbLimName = U.GetConfig('mdb_limited') diff --git a/models/ddrworld.ts b/models/ddrworld.ts index c39759d..c0cf163 100644 --- a/models/ddrworld.ts +++ b/models/ddrworld.ts @@ -69,6 +69,14 @@ export interface LeagueWorld { ended: boolean } +export interface CustomizeWorld { + collection: "customize3"; + + category: number; + key: number; + pattern: number; +} + export interface ProfileWorld { collection: "profile3"; diff --git a/webui/js/profile_settings.js b/webui/js/profile_settings.js index d134ad2..eda96c2 100644 --- a/webui/js/profile_settings.js +++ b/webui/js/profile_settings.js @@ -68,3 +68,10 @@ $('#change-display-calories3').on('click', () => { emit('updateDisplayCalories3', { refid, selected }).then(() => location.reload()); }); + +$('#change-bpl-appeal').on('click', () => { + const customize = "appeal" + const selected = parseInt($('#bpl-appeal option:selected').val()) + + emit('playerCustomize', { customize, refid, selected }).then(() => location.reload()); +}); diff --git a/webui/profile_settings.pug b/webui/profile_settings.pug index fd033d9..57aadb7 100644 --- a/webui/profile_settings.pug +++ b/webui/profile_settings.pug @@ -1,6 +1,7 @@ //DATA// profile: DB.FindOne(refid, { collection: "profile" }) profile3: DB.FindOne(refid, { collection: "profile3" }) + customizebpl: DB.FindOne(refid, { collection: "customize3", category: 1}) - const onOff = [ "Off", "On" ]; @@ -150,6 +151,7 @@ else if profile3 const name3 = profile3.dancerName; const weight3 = profile3.weight.toString().split('.'); if(weight3.length < 2) weight3.push("0"); + const bplAppeal = customizebpl ? customizebpl.key : 0 div .card @@ -195,5 +197,23 @@ else if profile3 p.control a.button.is-primary#change-display-calories3 Change + .field.is-horizontal.has-addons + .field-label.is-normal + label.label BPL Appeal Board + .field-body + p.control + .select + select#bpl-appeal + option(value=0, selected=bplAppeal===0) None + option(value=100001, selected=bplAppeal===100001) APINA VRAMeS + option(value=100002, selected=bplAppeal===100002) GiGO + option(value=100003, selected=bplAppeal===100003) GamePanic + option(value=100004, selected=bplAppeal===100004) Silk Hat + option(value=100005, selected=bplAppeal===100005) TAITO STATION Tradz + option(value=100006, selected=bplAppeal===100006) ROUND1 + option(value=100007, selected=bplAppeal===100007) Leisureland + p.control + a.button.is-primary#change-bpl-appeal Change + script(src="static/js/profile_settings.js")