mirror of
https://github.com/asphyxia-core/plugins.git
synced 2026-03-21 17:34:46 -05:00
IIDX: Initial support added for EMPRESS
This commit is contained in:
parent
28cf5af5da
commit
8a9683589b
|
|
@ -7,6 +7,7 @@ Plugin Version: **v0.1.13**
|
|||
Supported Versions
|
||||
|
||||
- beatmaniaIIDX 15 DJ TROOPERS
|
||||
- beatmaniaIIDX 16 EMPRESS
|
||||
- beatmaniaIIDX 17 SIRIUS
|
||||
- beatmaniaIIDX 18 Resort Anthem
|
||||
- beatmaniaIIDX 19 Lincle
|
||||
|
|
@ -36,8 +37,8 @@ Features
|
|||
---
|
||||
|
||||
Known Issues
|
||||
|
||||
- Clear Lamps may display invalid lamps due to missing conversion code
|
||||
- DJ LEVEL folders are broken in ~ DJ TROOPERS due to missing rank_id
|
||||
- LEGGENDARIA play records before HEROIC VERSE may not display on higher version due to missing conversion code
|
||||
|
||||
---
|
||||
|
|
@ -119,3 +120,5 @@ Changelogs
|
|||
|
||||
**v0.1.13**
|
||||
- Added Initial support for DJ TROOPERS
|
||||
- Added Initial support for EMPRESS
|
||||
- Fixed where EXPERT result does not display total cleared users and ranking position
|
||||
|
|
|
|||
|
|
@ -81,7 +81,8 @@ export const musicgetrank: EPR = async (info, data, send) => {
|
|||
let mVersion = Math.floor(temp_mid / 100);
|
||||
if (mVersion > version) return;
|
||||
|
||||
score_data = [-1, temp_mid, ...indices.map(i => res.cArray[i]), ...indices.map(i => res.esArray[i]), ...indices.map(i => res.mArray[i])];
|
||||
if (version == 16) score_data = [-1, temp_mid, ...indices.map(i => res.cArray[i]), ...indices.map(i => res.esArray[i])];
|
||||
else score_data = [-1, temp_mid, ...indices.map(i => res.cArray[i]), ...indices.map(i => res.esArray[i]), ...indices.map(i => res.mArray[i])];
|
||||
|
||||
m.push(K.ARRAY("s16", score_data));
|
||||
if (res.cArray[0] != 0) b.push(K.ARRAY("u16", [temp_mid, res.cArray[0]]));
|
||||
|
|
@ -99,7 +100,8 @@ export const musicgetrank: EPR = async (info, data, send) => {
|
|||
let mVersion = Math.floor(temp_mid / 100);
|
||||
if (mVersion > version) return;
|
||||
|
||||
score_data = [i, temp_mid, ...indices.map(i => res.cArray[i]), ...indices.map(i => res.esArray[i]), ...indices.map(i => res.mArray[i])];
|
||||
if (version == 16) score_data = [i, temp_mid, ...indices.map(i => res.cArray[i]), ...indices.map(i => res.esArray[i])];
|
||||
else score_data = [i, temp_mid, ...indices.map(i => res.cArray[i]), ...indices.map(i => res.esArray[i]), ...indices.map(i => res.mArray[i])];
|
||||
|
||||
m.push(K.ARRAY("s16", score_data));
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { pcdata, KDZ_pcdata, IIDX27_pcdata, IIDX28_pcdata, IIDX29_pcdata, IIDX30_pcdata, JDZ_pcdata, LDJ_pcdata, IIDX21_pcdata, IIDX22_pcdata, IIDX23_pcdata, IIDX24_pcdata, IIDX25_pcdata, IIDX26_pcdata, JDJ_pcdata, HDD_pcdata } from "../models/pcdata";
|
||||
import { pcdata, KDZ_pcdata, IIDX27_pcdata, IIDX28_pcdata, IIDX29_pcdata, IIDX30_pcdata, JDZ_pcdata, LDJ_pcdata, IIDX21_pcdata, IIDX22_pcdata, IIDX23_pcdata, IIDX24_pcdata, IIDX25_pcdata, IIDX26_pcdata, JDJ_pcdata, HDD_pcdata, I00_pcdata } from "../models/pcdata";
|
||||
import { grade } from "../models/grade";
|
||||
import { custom, default_custom } from "../models/custom";
|
||||
import { IDtoCode, IDtoRef, Base64toBuffer, GetVersion, ReftoProfile, ReftoPcdata, ReftoQPRO, appendSettingConverter, NumArrayToString } from "../util";
|
||||
|
|
@ -24,6 +24,18 @@ export const pccommon: EPR = async (info, data, send) => {
|
|||
// exposing these to plugin setting or use static value //
|
||||
switch (version) {
|
||||
case 15:
|
||||
case 16:
|
||||
result = {
|
||||
...result,
|
||||
cmd: K.ATTR({
|
||||
gmbl: String(Number(U.GetConfig("cmd_gmbl"))),
|
||||
gmbla: String(Number(U.GetConfig("cmd_gmbla"))),
|
||||
regl: String(Number(U.GetConfig("cmd_regl"))),
|
||||
rndp: String(Number(U.GetConfig("cmd_rndp"))),
|
||||
hrnd: String(Number(U.GetConfig("cmd_hrnd"))),
|
||||
alls: String(Number(U.GetConfig("cmd_alls"))),
|
||||
}),
|
||||
}
|
||||
break;
|
||||
case 17:
|
||||
result = {
|
||||
|
|
@ -244,6 +256,9 @@ export const pcreg: EPR = async (info, data, send) => {
|
|||
case 15:
|
||||
pcdata = HDD_pcdata;
|
||||
break;
|
||||
case 16:
|
||||
pcdata = I00_pcdata;
|
||||
break;
|
||||
case 17:
|
||||
pcdata = JDJ_pcdata;
|
||||
break;
|
||||
|
|
@ -485,7 +500,25 @@ export const pcget: EPR = async (info, data, send) => {
|
|||
rArray,
|
||||
});
|
||||
}
|
||||
if (version == 17) {
|
||||
else if (version == 16) {
|
||||
expert.sort((a: expert, b: expert) => a.coid - b.coid);
|
||||
expert.forEach((res) => {
|
||||
for (let a = 0; a < 6; a++) {
|
||||
eArray.push([res.coid, a, res.cArray[a], res.pgArray[a], res.gArray[a]]);
|
||||
}
|
||||
});
|
||||
|
||||
return send.pugFile("pug/I00/pcget.pug", {
|
||||
profile,
|
||||
pcdata,
|
||||
dArray,
|
||||
eArray,
|
||||
appendsettings,
|
||||
custom,
|
||||
rArray,
|
||||
});
|
||||
}
|
||||
else if (version == 17) {
|
||||
expert.sort((a: expert, b: expert) => a.coid - b.coid);
|
||||
expert.forEach((res) => {
|
||||
for (let a = 0; a < 6; a++) {
|
||||
|
|
@ -803,6 +836,9 @@ export const pctakeover: EPR = async (info, data, send) => {
|
|||
case 15:
|
||||
pcdata = HDD_pcdata;
|
||||
break;
|
||||
case 16:
|
||||
pcdata = I00_pcdata;
|
||||
break;
|
||||
case 17:
|
||||
pcdata = JDJ_pcdata;
|
||||
break;
|
||||
|
|
@ -1004,6 +1040,49 @@ export const pcsave: EPR = async (info, data, send) => {
|
|||
);
|
||||
}
|
||||
}
|
||||
else if (version == 16) {
|
||||
if (cltype == 0) {
|
||||
pcdata.sach = parseInt($(data).attr().achi);
|
||||
pcdata.sp_opt = parseInt($(data).attr().opt);
|
||||
}
|
||||
else {
|
||||
pcdata.dach = parseInt($(data).attr().achi);
|
||||
pcdata.dp_opt = parseInt($(data).attr().opt);
|
||||
pcdata.dp_opt2 = parseInt($(data).attr().opt2);
|
||||
}
|
||||
|
||||
pcdata.gno = parseInt($(data).attr().gno);
|
||||
pcdata.sflg0 = parseInt($(data).attr().sflg0);
|
||||
pcdata.sflg1 = parseInt($(data).attr().sflg1);
|
||||
pcdata.sflg2 = parseInt($(data).attr().sflg2);
|
||||
pcdata.sdhd = parseInt($(data).attr().sdhd);
|
||||
pcdata.ncomb = parseInt($(data).attr().ncomb);
|
||||
pcdata.mcomb = parseInt($(data).attr().mcomb);
|
||||
pcdata.liflen = parseInt($(data).attr().lift);
|
||||
pcdata.fcombo[cltype] = parseInt($(data).attr().fcombo);
|
||||
|
||||
if (!_.isNil($(data).element("tutorial"))) {
|
||||
let clr = parseInt($(data).attr("tutorial").clr);
|
||||
await DB.Upsert<tutorial>(refid,
|
||||
{
|
||||
collection: "tutorial",
|
||||
version: version,
|
||||
tid: parseInt($(data).attr("tutorial").tid),
|
||||
},
|
||||
{
|
||||
$set: {
|
||||
clr
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
// bigint is returning convert error on sendPug so save as string //
|
||||
if (!_.isNil($(data).element("jewel"))) {
|
||||
pcdata.jewel_num = String($(data).element("jewel").bigint("jnum"));
|
||||
pcdata.jewel_bnum = $(data).element("jewel").numbers("bjnum");
|
||||
}
|
||||
}
|
||||
else if (version == 17) {
|
||||
if (cltype == 0) {
|
||||
pcdata.sach = parseInt($(data).attr().achi);
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ export const rankingentry: EPR = async (info, data, send) => {
|
|||
}
|
||||
);
|
||||
|
||||
let expertUser = await DB.Find<ranking>(null, {
|
||||
let expertUser = await DB.Find<ranking>({
|
||||
collection: "ranking",
|
||||
version: version,
|
||||
coid: coid,
|
||||
|
|
@ -143,7 +143,7 @@ export const rankingoentry: EPR = async (info, data, send) => {
|
|||
|
||||
export const rankinggetranker: EPR = async (info, data, send) => {
|
||||
const version = GetVersion(info);
|
||||
const ranking = await DB.Find<ranking>(null, {
|
||||
const ranking = await DB.Find<ranking>({
|
||||
collection: "ranking",
|
||||
version: version,
|
||||
coid: parseInt($(data).attr().coid),
|
||||
|
|
|
|||
|
|
@ -11,14 +11,14 @@ export const shopgetname: EPR = async (info, data, send) => {
|
|||
collection: "shop_data",
|
||||
|
||||
opname: "CORE",
|
||||
pid: 57,
|
||||
pid: 53,
|
||||
cls_opt: 0,
|
||||
});
|
||||
|
||||
return send.object(
|
||||
K.ATTR({
|
||||
opname: "CORE",
|
||||
pid: "57",
|
||||
pid: "53",
|
||||
cls_opt: "0",
|
||||
hr: "0",
|
||||
mi: "0",
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ export function register() {
|
|||
R.Contributor("duel0213");
|
||||
|
||||
R.GameCode("HDD");
|
||||
R.GameCode("I00");
|
||||
R.GameCode("JDJ");
|
||||
R.GameCode("JDZ");
|
||||
R.GameCode("KDZ");
|
||||
|
|
|
|||
|
|
@ -120,6 +120,8 @@ export interface pcdata {
|
|||
sgid: number; // grade //
|
||||
dgid: number;
|
||||
|
||||
jewel_num: string;
|
||||
jewel_bnum: number[];
|
||||
party: number[];
|
||||
|
||||
jpoint: number; // jpoint (lincle) //
|
||||
|
|
@ -239,6 +241,35 @@ export const HDD_pcdata = {
|
|||
dgid: -1,
|
||||
}
|
||||
|
||||
export const I00_pcdata = {
|
||||
version: 16,
|
||||
|
||||
spnum: 0,
|
||||
dpnum: 0,
|
||||
sach: 0,
|
||||
dach: 0,
|
||||
sflg0: 0,
|
||||
sflg1: 0,
|
||||
sflg2: 0,
|
||||
gno: 0,
|
||||
sdhd: 0,
|
||||
sp_opt: 0,
|
||||
dp_opt: 0,
|
||||
dp_opt2: 0,
|
||||
mcomb: 0,
|
||||
ncomb: 0,
|
||||
mode: 0,
|
||||
pmode: 0,
|
||||
liflen: 0,
|
||||
|
||||
jewel_num: "0",
|
||||
jewel_bnum: Array<number>(18).fill(0),
|
||||
fcombo: Array<number>(2).fill(0),
|
||||
|
||||
sgid: -1,
|
||||
dgid: -1,
|
||||
}
|
||||
|
||||
export const JDJ_pcdata = {
|
||||
version: 17,
|
||||
|
||||
|
|
|
|||
17
iidx@asphyxia/pug/I00/pcget.pug
Normal file
17
iidx@asphyxia/pug/I00/pcget.pug
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
pc(status="0")
|
||||
pcdata(id=profile.id idstr=profile.idstr name=profile.name pid=profile.pid spnum=pcdata.spnum dpnum=pcdata.dpnum sach=pcdata.sach dach=pcdata.dach sflg0=pcdata.sflg0 sflg1=pcdata.sflg1 sflg2=pcdata.sflg2 gno=pcdata.gno sdhd=pcdata.sdhd sp_opt=pcdata.sp_opt dp_opt=pcdata.dp_opt dp_opt2=pcdata.dp_opt2 mcomb=pcdata.mcomb ncomb=pcdata.ncomb mode=pcdata.mode pmode=pcdata.pmode lift_len=pcdata.liflen)
|
||||
grade(sgid=pcdata.sgid dgid=pcdata.dgid)
|
||||
- for (let d of dArray)
|
||||
g(__type="u8" __count="4") #{d[0]} #{d[1]} #{d[2]} #{d[3]}
|
||||
ex
|
||||
- for (let e of eArray)
|
||||
e(__type="u32" __count="5") #{e[0]} #{e[1]} #{e[2]} #{e[3]} #{e[4]}
|
||||
skin(__type="u16" __count="12") #{custom.frame} #{custom.turntable} #{custom.note_burst} #{custom.menu_music} #{appendsettings} #{custom.lane_cover} 0 #{custom.category_vox} 0 0 0
|
||||
rlist
|
||||
- for (let rd of rArray)
|
||||
rival(spdp=rd.play_style id=rd.profile[2] id_str=rd.profile[3] djname=rd.profile[0] pid=rd.profile[1] sg=rd.pcdata[0] dg=rd.pcdata[1] sa=rd.pcdata[2] da=rd.pcdata[3])
|
||||
visitor(anum="10" snum="10" pnum="10" vs_flg="1")
|
||||
fcombo(__type="s16" __count="2") #{pcdata.fcombo[0]} #{pcdata.fcombo[1]}
|
||||
jewel(rate="1")
|
||||
jnum(__type="s64") #{pcdata.jewel_num}
|
||||
bjnum(__type="s32" __count="18") #{pcdata.jewel_bnum[0]} #{pcdata.jewel_bnum[1]} #{pcdata.jewel_bnum[2]} #{pcdata.jewel_bnum[3]} #{pcdata.jewel_bnum[4]} #{pcdata.jewel_bnum[5]} #{pcdata.jewel_bnum[6]} #{pcdata.jewel_bnum[7]} #{pcdata.jewel_bnum[8]} #{pcdata.jewel_bnum[9]} #{pcdata.jewel_bnum[10]} #{pcdata.jewel_bnum[11]} #{pcdata.jewel_bnum[12]} #{pcdata.jewel_bnum[13]} #{pcdata.jewel_bnum[14]} #{pcdata.jewel_bnum[15]} #{pcdata.jewel_bnum[16]} #{pcdata.jewel_bnum[17]}
|
||||
|
|
@ -117,6 +117,7 @@ export function GetVersion(info: EamuseInfo) {
|
|||
let version = -1;
|
||||
switch (info.model.substring(0, 3)) {
|
||||
case "HDD": return 15;
|
||||
case "I00": return 16;
|
||||
case "JDJ": return 17;
|
||||
case "JDZ": return 18;
|
||||
case "KDZ": return 19;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user