finally made stamp events work

This commit is contained in:
vvo
2023-04-21 15:37:43 +08:00
parent c6c9e9682a
commit 2aa86afaa8
14 changed files with 1343 additions and 996 deletions
+150 -105
View File
@@ -1,84 +1,101 @@
import Profile from "../models/profile";
import { Score } from "../models/score";
import Profile from '../models/profile';
import { Score } from '../models/score';
export const getProfile = async (info: EamuseInfo, data: any, send: EamuseSend) => {
console.log("gametop.regist");
let refId = $(data).str("data.player.refid");
const name = $(data).str("data.player.name");
export const getProfile = async (
info: EamuseInfo,
data: any,
send: EamuseSend
) => {
console.log('gametop.regist');
let refId = $(data).str('data.player.refid');
const name = $(data).str('data.player.name');
console.log(data, {depth:null});
if (!refId) return send.deny();
console.log(data, { depth: null });
if (!refId) return send.deny();
let profile = await DB.FindOne<Profile>(refId, { collection: "profile" });
if (!profile && name) {
const newProfile: Profile = {
collection: "profile",
jubeatId: Math.round(Math.random() * 99999999),
eventFlag: 0,
name: name,
isFirstplay: true,
emo: [],
lastShopname: "",
lastAreaname: ""
};
await DB.Upsert<Profile>(refId, { collection: "profile" }, newProfile);
profile = newProfile;
}else if (!profile && !name) {
return send.deny();
}
let profile = await DB.FindOne<Profile>(refId, { collection: 'profile' });
return send.object({
data: {
...require("../templates/gameInfos.ts")(),
if (!profile && name) {
const newProfile: Profile = {
collection: 'profile',
jubeatId: Math.round(Math.random() * 99999999),
eventFlag: 0,
name: name,
isFirstplay: true,
emo: [],
lastShopname: '',
lastAreaname: '',
};
player: {
jid: K.ITEM("s32", profile.jubeatId),
session_id: K.ITEM("s32", 1),
name: K.ITEM("str", profile.name),
event_flag: K.ITEM("u64", BigInt(profile.eventFlag || 0)),
await DB.Upsert<Profile>(refId, { collection: 'profile' }, newProfile);
...await require("../templates/profiles.ts")(profile),
profile = newProfile;
} else if (!profile && !name) {
return send.deny();
}
}
}
}, {compress: true}
);
return send.object(
{
data: {
...require('../templates/gameInfos.ts')(),
player: {
jid: K.ITEM('s32', profile.jubeatId),
session_id: K.ITEM('s32', 1),
name: K.ITEM('str', profile.name),
event_flag: K.ITEM('u64', BigInt(profile.eventFlag || 0)),
...(await require('../templates/profiles.ts')(profile)),
},
},
},
{ compress: true }
);
};
export const Getinfo = (info: EamuseInfo, data: any, send: EamuseSend) =>{
console.log(data, {depth:null});
return send.object({ data: require("../templates/gameInfos")() }, { compress: true });
}
export const Getinfo = (info: EamuseInfo, data: any, send: EamuseSend) => {
console.log(data, { depth: null });
return send.object(
{ data: require('../templates/gameInfos')() },
{ compress: true }
);
};
export const loadScore = async (info, data, send) => {
console.log("gametop.get_mdata");
console.log(data,{depth:null});
const mdata_ver = $(data).number("data.player.mdata_ver");
const jubeatId = $(data).number("data.player.jid");
console.log('gametop.get_mdata');
console.log(data, { depth: null });
const mdata_ver = $(data).number('data.player.mdata_ver');
const jubeatId = $(data).number('data.player.jid');
if (!jubeatId) return send.deny();
const profile = await DB.FindOne<Profile>(null, { collection: "profile", jubeatId });
const profile = await DB.FindOne<Profile>(null, {
collection: 'profile',
jubeatId,
});
if (!profile) return send.deny();
const scores = await DB.Find<Score>(profile.__refid, { collection: "score" });
const scoreData: {
const scores = await DB.Find<Score>(profile.__refid, { collection: 'score' });
const scoreData: {
[musicId: number]: {
[isHardMode: number]: {
musicRate: number[], score: number[], clear: number[], playCnt: number[], clearCnt: number[], fcCnt: number[], exCnt: number[], bar: number[][]
}
}
musicRate: number[];
score: number[];
clear: number[];
playCnt: number[];
clearCnt: number[];
fcCnt: number[];
exCnt: number[];
bar: number[][];
};
};
} = {};
for (const score of scores) {
if (!scoreData[score.musicId]) {
scoreData[score.musicId] = {};
}
if(!scoreData[score.musicId][score.isHardMode & 1]) {
scoreData[score.musicId][score.isHardMode & 1] = {
if (!scoreData[score.musicId][score.isHardMode ? 1 : 0]) {
scoreData[score.musicId][score.isHardMode ? 1 : 0] = {
musicRate: [0, 0, 0],
playCnt: [0, 0, 0],
clearCnt: [0, 0, 0],
@@ -89,9 +106,8 @@ export const loadScore = async (info, data, send) => {
bar: [Array(30).fill(0), Array(30).fill(0), Array(30).fill(0)],
};
}
const data = scoreData[score.musicId][score.isHardMode & 1];
const data = scoreData[score.musicId][score.isHardMode ? 1 : 0];
data.musicRate[score.seq] = score.musicRate;
data.playCnt[score.seq] = score.playCount;
data.clearCnt[score.seq] = score.clearCount;
@@ -105,62 +121,91 @@ export const loadScore = async (info, data, send) => {
var sendobj = {
data: {
player: {
jid: K.ITEM("s32", jubeatId),
jid: K.ITEM('s32', jubeatId),
mdata_list: {
music: (() => {
var musicArray = [];
Object.keys(scoreData).forEach(musicId =>
Object.keys(scoreData).forEach(musicId =>
Object.keys(scoreData[musicId]).forEach(isHardMode => {
musicArray.push(
K.ATTR({ music_id: String(musicId) }, {
[isHardMode === "1" ? "hard" : "normal"]:
K.ATTR(
{ music_id: String(musicId) },
{
score: K.ARRAY("s32", scoreData[musicId][isHardMode].score),
clear: K.ARRAY("s8", scoreData[musicId][isHardMode].clear),
music_rate: K.ARRAY("s32", scoreData[musicId][isHardMode].musicRate),
play_cnt: K.ARRAY("s32", scoreData[musicId][isHardMode].playCnt),
clear_cnt: K.ARRAY("s32", scoreData[musicId][isHardMode].clearCnt),
fc_cnt: K.ARRAY("s32", scoreData[musicId][isHardMode].fcCnt),
ex_cnt: K.ARRAY("s32", scoreData[musicId][isHardMode].exCnt),
bar: scoreData[musicId][isHardMode].bar.map((bar, seq) => K.ARRAY("u8", bar, { seq: String(seq) }))
[isHardMode === '1' ? 'hard' : 'normal']: {
score: K.ARRAY(
's32',
scoreData[musicId][isHardMode].score
),
clear: K.ARRAY(
's8',
scoreData[musicId][isHardMode].clear
),
music_rate: K.ARRAY(
's32',
scoreData[musicId][isHardMode].musicRate
),
play_cnt: K.ARRAY(
's32',
scoreData[musicId][isHardMode].playCnt
),
clear_cnt: K.ARRAY(
's32',
scoreData[musicId][isHardMode].clearCnt
),
fc_cnt: K.ARRAY(
's32',
scoreData[musicId][isHardMode].fcCnt
),
ex_cnt: K.ARRAY(
's32',
scoreData[musicId][isHardMode].exCnt
),
bar: scoreData[musicId][isHardMode].bar.map(
(bar, seq) => K.ARRAY('u8', bar, { seq: String(seq) })
),
},
}
})
)
);
})
)
);
return musicArray;
})()
}
}
}
};
if(mdata_ver!=1){
sendobj = {
data:{
player:{
jid: K.ITEM("s32", jubeatId),
mdata_list: []
}
}
}
};
console.log(sendobj, {depth:null});
return send.object(sendobj, {compress:true});
}
export const Meeting = (req: EamuseInfo, data: any, send: EamuseSend) => {
return send.object({
data: {
meeting: {
single: K.ATTR({ count: "0" }),
},
reward: {
total: K.ITEM("s32", 0),
point: K.ITEM("s32", 0),
})(),
},
},
},
}, {compress:true});
};
if (mdata_ver != 1) {
sendobj = {
data: {
player: {
jid: K.ITEM('s32', jubeatId),
mdata_list: {
music: [],
},
},
},
};
}
console.log(sendobj, { depth: null });
return send.object(sendobj, { compress: true });
};
export const Meeting = (req: EamuseInfo, data: any, send: EamuseSend) => {
return send.object(
{
data: {
meeting: {
single: K.ATTR({ count: '0' }),
},
reward: {
total: K.ITEM('s32', 0),
point: K.ITEM('s32', 0),
},
},
},
{ compress: true }
);
};
+42 -15
View File
@@ -1,15 +1,13 @@
Message from repo fork:
- This plugin update is for annoying people like me who doesn't want to use the unlock all feature lmao
- This fork enables a few of the features that are added in the later updates of Exceed Gear. However, I still highly recommend using the official stable version of the plugin.
- Most importantly, run the [WebUI Resource Update](/plugin/sdvx@asphyxia/WebUI%20resource%20update) for everything to properly work.
- Don't expect stability, there might be some bugs. Please back up your data to prevent unwanted issues (just in case)
----------------------------
# SOUND VOLTEX
Plugin Version: **v6.0.0**
Message from repo fork:
- This fork enables a few of the features that are added in the later updates of Exceed Gear. However, I still highly recommend using the official stable version of the plugin.
- Most importantly, run the [WebUI Asset Update](/plugin/sdvx@asphyxia/update%20webui%20assets) for everything to properly work.
- Don't expect stability, there might be some bugs. Please back up your data to prevent unwanted issues (just in case)
Supported Versions:
- BOOTH
@@ -27,20 +25,49 @@ The plugin now mainly maintained versions:
- VIVIDWAVE
- EXCEED GEAR
Change Log
Fork Changelog
===========
### Latest supported game version
- 2022122001
## 6.0.0-fork
## fork-6.0.0.2
1. Arena Station
2. Valkyrie Generator support -- requires Valkyrie mode
3. WebUI features:
- [WebUI asset update](/plugin/sdvx@asphyxia/WebUI%20resource%20update) -- retrieves assets from sdvx data to update various webui assets such as the music_db, bgm, submonitor_bg, nemsys, crew, etc. Useful for updating webui assets when new game updates happen.
- [Events page (wip)](/plugin/sdvx@asphyxia/events%20and%20presents) -- a page to toggle unlocking of songs and other items unlocked by previous events (in-game or otherwise)
### New:
1. Enabled stamp events. Check the Stamp Events dropdown at the [Unlocking Events](/plugin/sdvx@asphyxia/unlocking%20events) page to see which stamp events are available to toggle for now.
### Fixes:
1. Various event-related fixes
- Re-did the Unlocking Events functionalities (categorized events by type, etc.)
- Rewrote handling of these events in common.ts and profiles.ts
## fork-6.0.0.1
### New:
1. Support for 221220
2. Arena Station
3. Valkyrie Generator support -- requires Valkyrie mode
4. WebUI features:
- [WebUI asset update](/plugin/sdvx@asphyxia/update%20webui%20assets) -- retrieves assets from sdvx data to update various webui assets such as the music db, bgm, submonitor bg, nemsys, crew, etc. Necessary to run for this plugin to properly work, and after updating arcade data.
- [Unlocking Events page](/plugin/sdvx@asphyxia/unlocking%20events) -- a page to toggle unlocking of songs and other items unlocked by previous events (stamp events, etc.)
- [Profile pages](/plugin/sdvx@asphyxia/profiles):
- Valkyrie Generator item list -- displays a profile's valkyrie/premium generator items that they've already unlocked
- Gacha feature for Premium Generator
- [Songs List](/plugin/sdvx@asphyxia/songs%20list)
5. Handler for showing unlocked items on card entry.
### Fixes:
1. Various generator issues:
- Incorrect valkyrie/premium generator volume data fixed
- Generator code bug fixes.
2. April fools event trigger:
- Code checks if date has "4/1" in it anywhere, which means it will trigger on dates like 4/10, and 4/15. This has been fixed.
Change Log
===========
## 6.0.0
+242 -116
View File
@@ -61,148 +61,274 @@ export const MISSINGSONGS6 = [
'1903', '1904', '1911', '1916', '1917'
]
export const STAMP_EVENTS6 = {
'sdvx10thstamp': {
'type': 'select',
'info': {
'id': 1,
'stmpSlHd': '[sz:22][c:FFA6AA]SOUND VOLTEX 10th Anniversary',
'stmpSlFt': '[sz:23]期間 2022/01/18~2022/03/21',
'stmpHd': '[sz:22][c:DAC491]SPECIAL STAMP BONUS',
'stmpFt': '[sz:22]YOU CAN GET A STAMP AND BONUS! :)[br:5]TERM: 1/18~3/21',
'stmpBg': 'bg_stamp_anniversary_10th',
'data': [
{
'stmpid': 1,
'bnr': 'sheet_track_1',
'stps': 5,
'stprwrd': [
['5', 'track', '1838', '23']
]
},
{
'stmpid': 2,
'bnr': 'sheet_track_2',
'stps': 5,
'stprwrd': [
['5', 'track', '1839', '23']
]
},
{
'stmpid': 3,
'bnr': 'sheet_track_3',
'stps': 5,
'stprwrd': [
['5', 'track', '1840', '23']
]
},
{
'stmpid': 4,
'bnr': 'sheet_track_4',
'stps': 5,
'stprwrd': [
['5', 'track', '1841', '23']
]
},
{
'stmpid': 5,
'bnr': 'sheet_track_5',
'stps': 5,
'stprwrd': [
['5', 'track', '1842', '23']
]
},
{
'stmpid': 6,
'bnr': 'sheet_track_6',
'stps': 5,
'stprwrd': [
['5', 'track', '1843', '23']
]
},
{
'stmpid': 7,
'bnr': 'sheet_track_7',
'stps': 5,
'stprwrd': [
['5', 'track', '1844', '23']
]
}
]
}
},
'reflecstamp': {
'type': 'main',
'info': {
'id': 0,
'stmpSlHd': '',
'stmpSlFt': '',
'stmpHd': '[sz:22][c:DAC491]SPECIAL STAMP BONUS',
'stmpFt': '[sz:22]YOU CAN GET A STAMP AND BONUS! :)[br:5]TERM: 3/30 ~ 5/8',
'stmpBg': '',
'data': [
{
'stmpid': 8,
'bnr': '',
'stps': 15,
'stprwrd': [
['1', 'track', '1853', '23'],
['3', 'track', '1851', '23'],
['6', 'track', '1852', '23'],
['10', 'track', '1850', '23'],
['15', 'track', '1854', '23'],
]
}
]
}
},
'pcbevent': {
'type': 'main',
'info': {
'id': 0,
'stmpSlHd': '',
'stmpSlFt': '',
'stmpHd': '[sz:22][c:DAC491]SPECIAL STAMP BONUS',
'stmpFt': '[sz:22]YOU CAN GET A STAMP AND BONUS! :)[br:5]TERM: 12/8 ~ 1/15',
'stmpBg': '',
'data': [
{
'stmpid': 9,
'bnr': '',
'stps': 5,
'stprwrd': [
['1', 'pcb', '500', ''],
['2', 'pcb', '500', ''],
['3', 'pcb', '1000', ''],
['4', 'pcb', '1000', ''],
['5', 'pcb', '2000', ''],
]
}
]
}
},
'2023stamp': {
'type': 'main',
'info': {
'id': 0,
'stmpSlHd': '',
'stmpSlFt': '',
'stmpHd': '[sz:22]SPECIAL STAMP BONUS',
'stmpFt': '[sz:22]YOU CAN GET A STAMP AND BONUS! :)[br:5]TERM: 1/1 ~ 1/9',
'stmpBg': '',
'data': [
{
'stmpid': 10,
'bnr': '',
'stps': 1,
'stprwrd': [
['1', 'appeal', '5522', '']
]
}
]
}
},
'himehina': {
'type': 'select',
'info': {
'id': 2,
'stmpSlHd': '[sz:22][c:FFA6AA]HIMEHINAコラボ開催中!',
'stmpSlFt': '[sz:23]期間 2022/04/07~2022/05/08',
'stmpHd': '[sz:22][c:DAC491]SPECIAL STAMP BONUS',
'stmpFt': '[sz:22]YOU CAN GET A STAMP AND BONUS! :)[br:5]TERM: 4/7 ~ 5/8',
'stmpBg': 'bg_stamp_himehina',
'data': [
{
'stmpid': 11,
'bnr': 'sheet_crew_1',
'stps': 15,
'stprwrd': [
['1', 'pcb', '100', ''],
['2', 'pcb', '100', ''],
['3', 'pcb', '100', ''],
['4', 'pcb', '100', ''],
['5', 'pcb', '1000', ''],
['6', 'pcb', '200', ''],
['7', 'pcb', '200', ''],
['8', 'pcb', '200', ''],
['9', 'pcb', '200', ''],
['10', 'pcb', '2000', ''],
['11', 'pcb', '500', ''],
['12', 'pcb', '500', ''],
['13', 'pcb', '500', ''],
['14', 'pcb', '500', ''],
['15', 'crew', '122', 'ネメシスクルー田中ヒメ']
]
},
{
'stmpid': 12,
'bnr': 'sheet_crew_2',
'stps': 15,
'stprwrd': [
['1', 'pcb', '100', ''],
['2', 'pcb', '100', ''],
['3', 'pcb', '100', ''],
['4', 'pcb', '100', ''],
['5', 'pcb', '1000', ''],
['6', 'pcb', '200', ''],
['7', 'pcb', '200', ''],
['8', 'pcb', '200', ''],
['9', 'pcb', '200', ''],
['10', 'pcb', '2000', ''],
['11', 'pcb', '500', ''],
['12', 'pcb', '500', ''],
['13', 'pcb', '500', ''],
['14', 'pcb', '500', ''],
['15', 'crew', '123', 'ネメシスクルー鈴木ヒナ']
]
}
]
}
}
}
export const EVENT_SONGS6 = {
// X-Record songs
'xrecord_1': [
// 1st edition
'1736', // discordia_penorerihumer
'1737', // chewingood_toriena
'1738', // verflucht_tirfing
],
'xrecord_2': [
// 2nd edition
'1848', // fegrix
'1847', // 2 beasts unchained
'1849', // piano kyousoukyoku
],
'xrecord_1': ['1736', '1737', '1738'],
'xrecord_2': ['1848', '1847', '1849'],
// Konaste songs
'konasute_1': [
'1762'
],
'konasute_2': [
'1763'
],
'konasute_3': [
'1764'
],
'konasute_4': [
'1765'
],
'konasute_5': [
'1811'
],
'konasute_1': ['1762'],
'konasute_2': ['1763'],
'konasute_3': ['1764'],
'konasute_4': ['1765'],
'konasute_5': ['1811'],
// BPL2021 songs
'bpl2021': [
'1808', '1809'
],
'bpl2021': ['1808', '1809'],
// BSB2021 songs
'bsb2021': [
'1802', '1803', '1804', '1805', '1806', '1807'
],
'bsb2021': ['1802', '1803', '1804', '1805', '1806', '1807'],
// SDVX 10th anniversary stamp event songs
'sdvx10thstamp': [
'1838', '1839', '1840', '1841', '1842', '1843', '1844'
],
'sdvx10thstamp': ['1838', '1839', '1840', '1841', '1842', '1843', '1844'],
// REFLECT BEAT stamp event songs
'reflecstamp': [
'1850', '1851', '1852', '1853', '1854'
],
'reflecstamp': ['1850', '1851', '1852', '1853', '1854'],
// BEMANI ichika 2022 event songs
'gmz2022': [
'1906', '1907', '1908', '1909', '1910'
],
'gmz2022': ['1906', '1907', '1908', '1909', '1910'],
// BPL2022 songs
"bpl2022_1": [
'1952', '1943'
],
"bpl2022_2": [
'1948', '1951'
],
"bpl2022_3": [
'1956', '1949'
],
"bpl2022_4": [
'1946', '1958'
],
"bpl2022_5": [
'1957', '1955'
]
"bpl2022_1": ['1952', '1943'],
"bpl2022_2": ['1948', '1951'],
"bpl2022_3": ['1956', '1949'],
"bpl2022_4": ['1946', '1958'],
"bpl2022_5": ['1957', '1955'],
"bpl2022_6": ['1947', '1953']
}
export const RESTRICTED_SONGS6 = {
// X-Record songs
'xrecord_1': [
// 1st edition
'1736', // discordia_penorerihumer
'1737', // chewingood_toriena
'1738', // verflucht_tirfing
],
'xrecord_2': [
// 2nd edition
'1848', // fegrix
'1847', // 2 beasts unchained
'1849', // piano kyousoukyoku
],
'xrecord_1': ['1736', '1737', '1738'],
'xrecord_2': ['1848', '1847', '1849'],
// Konaste songs
'konasute_1': ['1762'],
'konasute_2': ['1763'],
'konasute_3': ['1764'],
'konasute_4': ['1765'],
'konasute_5': ['1811'],
// BPL2021 songs
// 'bpl2021': [
// '1808', '1809'
// ],
'bpl2021': ['1808', '1809'],
// BSB2021 songs
'bsb2021': [
'1802', '1803', '1804', '1805', '1806', '1807'
],
'bsb2021': ['1802', '1803', '1804', '1805', '1806', '1807'],
// SDVX 10th anniversary stamp event songs
'sdvx10thstamp': [
'1838', '1839', '1840', '1841', '1842', '1843', '1844'
],
'sdvx10thstamp': ['1838', '1839', '1840', '1841', '1842', '1843', '1844'],
// REFLECT BEAT stamp event songs
'reflecstamp': [
'1850', '1851', '1852', '1853', '1854'
],
'reflecstamp': ['1850', '1851', '1852', '1853', '1854'],
// BEMANI ichika 2022 event songs
'gmz2022': [
'1906', '1907', '1908', '1909', '1910'
],
'gmz2022': ['1906', '1907', '1908', '1909', '1910'],
// BPL2022 songs
"bpl2022_1": [
'1952', '1943'
],
"bpl2022_2": [
'1948', '1951'
],
"bpl2022_3": [
'1956', '1949'
],
"bpl2022_4": [
'1946', '1958'
],
"bpl2022_5": [
'1957', '1955'
]
"bpl2022_1": ['1952', '1943'],
"bpl2022_2": ['1948', '1951'],
"bpl2022_3": ['1956', '1949'],
"bpl2022_4": ['1946', '1958'],
"bpl2022_5": ['1957', '1955'],
"bpl2022_6": ['1947', '1953']
}
export const APRILFOOLSSONGS = [
'840', '1219', '1751'
]
export const VALKYRIEEXCLUSIVESONGS = [
'1672', '1744', '1855', '1742', '1743',
export const VALKYRIE_SONGS = [
'1744', '1672', // Valk exclusives
'1855', '1742', '1743', '1745', // Arena station songs
'1736', '1737', '1738', '1848', '1847', '1849' // X-record
]
// arena station crew with name cheatsheet
// 29 nearnoah xmas
// 82 kanade halloween
// 95 rasis v
// 101 right v
// 103 nearnoah v
// 104 nana v
// 106 natsuhi
// 107 cocona
// 122 hime?
// 123 hina?
// ARENA data
export const ARENA = {
'Set 1 (04/25/22)': {
details: {
@@ -942,7 +1068,7 @@ export const VALGENE = {
export const PREGENE = [
{
id: 0,
id: 1,
items: {
'crew': [131],
'stamp': [69, 70, 71, 72, 73, 74, 75, 76, 77, 78],
@@ -951,7 +1077,7 @@ export const PREGENE = [
probability: [0.01, 0.39, 0.6]
},
{
id: 1,
id: 2,
items: {
'crew': [134],
'stamp': [110, 111, 112, 113, 114, 115, 116, 117, 118, 119],
+518 -440
View File
@@ -1,440 +1,518 @@
import { EVENT4, COURSES4, EXTENDS4 } from '../data/hvn';
import { EVENT5, COURSES5, EXTENDS5 } from '../data/vvw';
import { EVENT6, COURSES6, EXTENDS6, APRILFOOLSSONGS, VALKYRIEEXCLUSIVESONGS,
MISSINGSONGS6, ARENA, VALGENE, INFORMATION6, RESTRICTED_SONGS6, EVENT_SONGS6
} from '../data/exg';
import { COURSE2 } from '../data/inf';
import {getVersion, getRandomIntInclusive} from '../utils';
export const common: EPR = async (info, data, send) => {
try {
let music_db = await IO.ReadFile('webui/asset/json/music_db.json')
let events = [];
let courses = [];
let extend = [];
let date = new Date();
let currentYMDDate = parseInt([date.getFullYear(), ((date.getMonth() + 1) > 9 ? '' : '0') + (date.getMonth() + 1), (date.getDate() > 9 ? '' : '0') + date.getDate()].join(''));
let currentDate = date.toLocaleDateString()
console.log('-----------------------------------------------')
console.log("Calling common function");
const version = parseInt(info.model.split(":")[4]);
if (version <= 2013052900) {
console.log('Game: Booth')
return send.pugFile('templates/booth/common.pug');
}
if (version <= 2014112000) {
console.log('Game: Infinite Infection')
courses = COURSE2;
return send.pugFile('templates/infiniteinfection/common.pug',{
courses,
});
}
switch (info.method) {
case 'sv4_common': {
console.log('Game: Heavenly Haven')
events = EVENT4;
courses = COURSES4;
//extend = EXTENDS4;
EXTENDS4.forEach(val => extend.push(Object.assign({}, val)));
break;
}
case 'sv5_common': {
console.log('Game: Vivid Wave')
events = EVENT5;
courses = COURSES5;
//extend = EXTENDS5;
EXTENDS5.forEach(val => extend.push(Object.assign({}, val)));
break;
}
case 'sv6_common': {
console.log('Game: Exceed Gear')
//events = EVENT6;
EVENT6.forEach(val => events.push(val));
courses = COURSES6;
// IO.ReadFile('webui\\asset\\json\\course_data.json').then(
// function(yesData){
// console.log('yes')
// let courseData = JSON.parse(yesData)
// courses = courseData.courseData.find(data => data.version == 6).info;
// },
// function(noData){
// console.log(noData)
// })
EXTENDS6.forEach(val => extend.push(Object.assign({}, val)));
break;
}
}
let songs = [];
const gameVersion = getVersion(info);
let songNum = 2000;
if(gameVersion === 2) songNum = 554;
if(gameVersion === 3) songNum = 954;
if(gameVersion === 4) songNum = 1368;
if(U.GetConfig('unlock_all_songs')) {
console.log("Unlocking songs");
for (let i = 1; i < songNum; ++i) {
for (let j = 0; j < 5; ++j) {
songs.push({
music_id: K.ITEM('s32', i),
music_type: K.ITEM('u8', j),
limited: K.ITEM('u8', 3),
});
}
}
} else {
let RESTRICT_SONGS = [] //KONASTESONGS.concat(BEMANI2021EVENTSONGS, BPLSTAMPRALLYSONGS, SDVX10THSTAMPSONGS, REFLECBEATSTAMPSONGS);
let EVENT_SONGS = []
for(const keyIter in Object.keys(RESTRICTED_SONGS6)) {
RESTRICT_SONGS = RESTRICT_SONGS.concat(RESTRICTED_SONGS6[Object.keys(RESTRICTED_SONGS6)[keyIter]])
}
for(const keyIter in Object.keys(EVENT_SONGS6)) {
EVENT_SONGS = EVENT_SONGS.concat(EVENT_SONGS6[Object.keys(EVENT_SONGS6)[keyIter]])
}
let mdb = JSON.parse(music_db);
let limitedNo = 2;
for (let i = 0; i < songNum; i++) {
var foundSongIndex = mdb.mdb.music.map(function(x) {return x['@id']; }).indexOf(i.toString());
if(foundSongIndex != -1) {
var songData = mdb.mdb.music[foundSongIndex];
if(gameVersion === 6 || gameVersion === -6) {
if((!RESTRICT_SONGS.includes(i.toString()) || EVENT_SONGS.includes(i.toString())) && parseInt(songData['info']['distribution_date']['#text']) <= currentYMDDate) {
limitedNo = 2;
if(songData.info.version['#text'] === '6') { // if song is released during exceed gear
if(MISSINGSONGS6.includes(i.toString())) {
limitedNo += 1;
}
else if(VALKYRIEEXCLUSIVESONGS.includes(i.toString()) && (!U.GetConfig('enable_valk_songs') && info.model.split(":")[2].match(/^(G|H)$/g) == null)){
limitedNo -= 1;
}
for(let j = 0; j < 5; j++) {
songs.push({
music_id: K.ITEM('s32', i),
music_type: K.ITEM('u8', j),
limited: K.ITEM('u8', limitedNo),
});
}
} else if (songData.info.inf_ver['#text'] === '6') { // if song from previous sdvx iteration but with new XCD track; wouldn't work without updated webui asset
songs.push({
music_id: K.ITEM('s32', i),
music_type: K.ITEM('u8', 3),
limited: K.ITEM('u8', limitedNo),
});
}
} else {
console.log("Restricted song: " + songData.info.title_name)
}
}
}
}
}
if(U.GetConfig('use_information')){
console.log("Sending server information");
let time = new Date();
let tempDate = time.getDate();
const currentTime = parseInt((time.getTime()/100000) as unknown as string)*100;
extend.push({
id: 1,
type: 1,
params: [
1,
currentTime,
1,
1,
31,
'[f:0]SERVER INFORMATION',
'[sz:120] [olc:555555][ol:4][c:ff3333,3333ff,77ff77]Asphyxia\n'+
'[sz:75] CORE\n[sz:30]'+
'[sz:30][c:ffffff,888888] \n \n'+
' [c:00d5ff,888888]ASPHYXIA CORE'+CORE_VERSION+'\n'+
' [c:e5f3ff,a3d5ff]SDVX Plugin ver 6.0.0\n \n \n'+
'\n\n [f:0][c:ff3333,ffffff]FREE SOFTWARE. BEWARE OF SCAMMERS.\n'+
'[c:ffffff,888888] If you bought this software, request refund immediately.\n \n \n[/ol]'+
'[br:10][c:00FFFF][sz:50]メリー。。。クリスマス、です。。。'+
'\n \n \n \n[sz:32][c:560000,FC0000]DO NOT STREAM OR DISTRIBUTE THIS GAME IN PUBLIC',
//'[img:test]',
'',
'',
'',
],
});
} else if(INFORMATION6[version.toString()] != undefined) {
console.log("Sending server information");
let time = new Date();
let tempDate = time.getDate();
const currentTime = parseInt((time.getTime()/100000) as unknown as string)*100;
for(const keyIter in INFORMATION6[version.toString()]) {
extend.push({
id: parseInt(keyIter) + 1,
type: 1,
params: [
1,
currentTime,
0,
0,
31,
'[f:0]SERVER INFORMATION',
INFORMATION6[version.toString()][keyIter],
'',
'',
'',
],
});
}
}
if(U.GetConfig('use_asphyxia_gameover')){
let time = new Date();
let tempDate = time.getDate();
const currentTime = parseInt((time.getTime()/100000) as unknown as string)*100;
let rightCharater = [
"go_bansui","go_bof","go_cannon","go_chinema","go_chocopla",
"go_dd","go_ekusa","go_esp","go_flowry","go_fukuryu",
"go_gorilla","go_grace","go_grace_rori","go_grace_ver06","go_haelequin",
"go_haruka","go_joyeuse","go_kino","go_kisa","go_mai",
"go_makina","go_makishima","go_left","go_makishima_ver06","go_mitsuru","go_miyako",
"go_nana","go_natsuhi","go_noisia","go_left_ver06","go_ondine","go_pannakotta",
"go_psychoholic","go_rain","go_rain02","go_ribbon","go_right",
"go_riot","go_rishna","go_rouge","go_sakurako","go_satan",
"go_tama","go_torako","go_vela","go_vertex","go_wabutan",
"go_wanlove","go_yusya",
];
let leftCharater = [
"go_akane","go_apex4sis","go_candy","go_capsaicin","go_chikage",
"go_evileye","go_fluorine","go_gangara","go_gin","go_hero",
"go_hiryubiren","go_hiyuki","go_hotaru","go_inoten","go_kamito",
"go_kanade","go_kemuri","go_kokona","go_konoha","go_kouki",
"go_kureha","go_left_bag","go_madholic",
"go_mimiko","go_mion","go_mitsuruco","go_nathanael","go_nishinippori",
"go_ortlinde","go_pico","go_pilica","go_profession","go_rasis",
"go_rasis_ver06","go_right_ver06","go_rimuru","go_rowa","go_saigawara",
"go_setu","go_shelly","go_soul","go_tamaneko","go_toraipuru",
"go_tsubaki","go_tsumabuki","go_tsumabuki_ver06","go_yuki","go_yukito",
];
let middleCharater = ["go_cat","go_cawoashi","go_iruyoru","go_neno",];
// Pattern 1 Left Right Left
// Pattern 2 Right Left Right
// Pattern 3 Right Middle Left
// Pattern 4 Left Middle Right
// switch(getVersion(info)){
// case 5:{
// break;
// }
// case 6:{
// rightCharater.push();
// leftCharater.push();
// break;
// }
// }
var charaString = "characters: ";
let pattern = getRandomIntInclusive(1,4);
switch(pattern){
case 1:{
var chara1 = leftCharater[getRandomIntInclusive(0,leftCharater.length-1)];
var chara2 = rightCharater[getRandomIntInclusive(0,rightCharater.length-1)];
var chara3 = leftCharater[getRandomIntInclusive(0,leftCharater.length-1)];
charaString += "chara01/"+chara1+" chara02/"+chara2+" chara01/"+chara3;
break;
}
case 2:{
var chara1 = rightCharater[getRandomIntInclusive(0,rightCharater.length-1)];
var chara2 = leftCharater[getRandomIntInclusive(0,leftCharater.length-1)];
var chara3 = rightCharater[getRandomIntInclusive(0,rightCharater.length-1)];
charaString += "chara02/"+chara1+" chara01/"+chara2+" chara02/"+chara3;
break;
}
case 3:{
var chara1 = rightCharater[getRandomIntInclusive(0,rightCharater.length-1)];
var chara2 = middleCharater[getRandomIntInclusive(0,middleCharater.length-1)]
var chara3 = leftCharater[getRandomIntInclusive(0,leftCharater.length-1)];
charaString += "chara02/"+chara1+" chara03/"+chara2+" chara01/"+chara3;
break;
}
case 4:{
var chara1 = leftCharater[getRandomIntInclusive(0,leftCharater.length-1)];
var chara2 = middleCharater[getRandomIntInclusive(0,middleCharater.length-1)];
var chara3 = rightCharater[getRandomIntInclusive(0,rightCharater.length-1)];
charaString += "chara01/"+chara1+" chara03/"+chara2+" chara02/"+chara3;
break;
}
}
if(Math.abs(getVersion(info)) == 6){//Due to older version misses newer characters, not supported on older versions
extend.push({
id: 3,
type: 1,
params: [
3,
currentTime,
0,
60,
0,
'[GAMEOVER]',
'[ol:6][olc:FFFFFF][ds:4][dsc:000000][sz:32][c:99FF00A8]Thank You For Using Asphyxia CORE!!!',
'[ol:6][olc:FFFFFF][ds:4][dsc:000000][sz:32][c:990D46F2]For more information please visit our Discord!',
'[ol:6][olc:FFFFFF][ds:4][dsc:000000][sz:32][c:99ED4F39]Nice Play!!!',
//'characters: chara01/go_rasis_ver06 chara02/go_left_ver06 chara01/go_right_ver06',
charaString,
],
});
}
}
console.log("Sending common objects");
let arena_catalog_items = []
let catalog = []
let campaign = []
// if(U.GetConfig('arena_szn') == 'debug') {
// for(let xxx = 1; xxx<=150; xxx++){
// arena_catalog_items.push({
// catalog_id: K.ITEM('s32', 1),
// catalog_type: K.ITEM('s32', 1),
// price: K.ITEM('s32', 1000),
// item_type: K.ITEM('s32', 11),
// item_id: K.ITEM('s32', xxx),
// param: K.ITEM('s32', 1),
// })
// }
// }
// else{
for (let catalog_item in ARENA[U.GetConfig('arena_szn')].arena_items) {
arena_catalog_items.push({
catalog_id: K.ITEM('s32', ARENA[U.GetConfig('arena_szn')].arena_items[catalog_item].catalog_id),
catalog_type: K.ITEM('s32', ARENA[U.GetConfig('arena_szn')].arena_items[catalog_item].catalog_type),
price: K.ITEM('s32', ARENA[U.GetConfig('arena_szn')].arena_items[catalog_item].price),
item_type: K.ITEM('s32', ARENA[U.GetConfig('arena_szn')].arena_items[catalog_item].item_type),
item_id: K.ITEM('s32', ARENA[U.GetConfig('arena_szn')].arena_items[catalog_item].item_id),
param: K.ITEM('s32', ARENA[U.GetConfig('arena_szn')].arena_items[catalog_item].param),
})
}
// }
let valgene_info = []
let valgene_items = []
VALGENE.info.forEach(val => valgene_info.push({
valgene_name: K.ITEM('str', val.valgene_name),
valgene_name_english: K.ITEM('str', val.valgene_name_english),
valgene_id: K.ITEM('s32', val.valgene_id)
}))
VALGENE.catalog.forEach((val) => {
val.items.forEach((itemVal) => {
itemVal.item_ids.forEach((item_id) => {
valgene_items.push({
valgene_id: K.ITEM('s32', val.volume),
rarity: K.ITEM('s32', VALGENE.rarity[itemVal.type.toString()]),
item_type: K.ITEM('s32', itemVal.type),
item_id: K.ITEM('s32', item_id)
})
})
})
})
if(currentDate.substring(0,3) === '4/1') {
console.log('Using April Fools Event')
events.push('APRIL_GRACE');
events.push('EVENTDATE_APRILFOOL');
for (const afsong in APRILFOOLSSONGS) {
for (let j = 0; j < 5; ++j) {
songs.push({
music_id: K.ITEM('s32', parseInt(APRILFOOLSSONGS[afsong])),
music_type: K.ITEM('u8', j),
limited: K.ITEM('u8', 3),
});
}
}
}
send.object(
{
valgene: {
info: valgene_info,
catalog: valgene_items
},
arena: {
// season: K.ITEM('s32', ARENA[U.GetConfig('arena_szn')].details.season),
time_start: K.ITEM('u64', ARENA[U.GetConfig('arena_szn')].details.time_start),
time_end: K.ITEM('u64', ARENA[U.GetConfig('arena_szn')].details.time_end),
shop_start: K.ITEM('u64', ARENA[U.GetConfig('arena_szn')].details.shop_start),
shop_end: K.ITEM('u64', ARENA[U.GetConfig('arena_szn')].details.shop_end),
is_open: K.ITEM('bool', ARENA[U.GetConfig('arena_szn')].details.is_open),
is_shop: K.ITEM('bool', ARENA[U.GetConfig('arena_szn')].details.is_shop),
catalog: arena_catalog_items
},
event: {
info: events.map(e => ({
event_id: K.ITEM('str', e),
})),
},
extend: {
info: extend.map(e => ({
extend_id: K.ITEM('u32', e.id),
extend_type: K.ITEM('u32', e.type),
param_num_1: K.ITEM('s32', e.params[0]),
param_num_2: K.ITEM('s32', e.params[1]),
param_num_3: K.ITEM('s32', e.params[2]),
param_num_4: K.ITEM('s32', e.params[3]),
param_num_5: K.ITEM('s32', e.params[4]),
param_str_1: K.ITEM('str', e.params[5]),
param_str_2: K.ITEM('str', e.params[6]),
param_str_3: K.ITEM('str', e.params[7]),
param_str_4: K.ITEM('str', e.params[8]),
param_str_5: K.ITEM('str', e.params[9]),
})),
},
music_limited: { info: songs },
skill_course: {
info: courses.reduce(
(acc, s) =>
acc.concat(
s.courses.map(c => ({
season_id: K.ITEM('s32', s.id),
season_name: K.ITEM('str', s.name),
season_new_flg: K.ITEM('bool', s.isNew),
course_type: K.ITEM('s16', 0),
course_id: K.ITEM('s16', c.id),
course_name: K.ITEM('str', c.name),
skill_level: K.ITEM('s16', c.level),
skill_name_id: K.ITEM('s16', c.nameID),
matching_assist: K.ITEM('bool', c.assist),
clear_rate: K.ITEM('s32', 5000),
avg_score: K.ITEM('u32', 15000000),
track: c.tracks.map(t => ({
track_no: K.ITEM('s16', t.no),
music_id: K.ITEM('s32', t.mid),
music_type: K.ITEM('s8', t.mty),
})),
}))
),
[]
),
},
},
{ encoding: 'utf8' }
);
} catch (error) {
console.log(error)
}
};
export const log: EPR = async (info, data, send) => {
send.success();
}
export const unhandledt: EPR = async (info, data, send) => {
console.log("")
console.log("Unhandled: " + info.method + " | " + info.model + " | " + info.module)
console.log(JSON.stringify(info))
console.log(JSON.stringify(data))
console.log("")
return send.success()
}
import { EVENT4, COURSES4, EXTENDS4 } from '../data/hvn';
import { EVENT5, COURSES5, EXTENDS5 } from '../data/vvw';
import { EVENT6, COURSES6, EXTENDS6, APRILFOOLSSONGS, VALKYRIE_SONGS,
MISSINGSONGS6, ARENA, VALGENE, INFORMATION6, RESTRICTED_SONGS6, EVENT_SONGS6,
STAMP_EVENTS6
} from '../data/exg';
import { COURSE2 } from '../data/inf';
import {getVersion, getRandomIntInclusive} from '../utils';
export const common: EPR = async (info, data, send) => {
try {
let music_db = await IO.ReadFile('webui/asset/json/music_db.json')
let events = [];
let courses = [];
let extend = [];
let date = new Date();
let currentYMDDate = parseInt([date.getFullYear(), ((date.getMonth() + 1) > 9 ? '' : '0') + (date.getMonth() + 1), (date.getDate() > 9 ? '' : '0') + date.getDate()].join(''));
let currentDate = date.toLocaleDateString()
console.log('-----------------------------------------------')
console.log("Calling common function");
const version = parseInt(info.model.split(":")[4]);
if (version <= 2013052900) {
console.log('Game: Booth')
return send.pugFile('templates/booth/common.pug');
}
if (version <= 2014112000) {
console.log('Game: Infinite Infection')
courses = COURSE2;
return send.pugFile('templates/infiniteinfection/common.pug',{
courses,
});
}
switch (info.method) {
case 'sv4_common': {
console.log('Game: Heavenly Haven')
events = EVENT4;
courses = COURSES4;
//extend = EXTENDS4;
EXTENDS4.forEach(val => extend.push(Object.assign({}, val)));
break;
}
case 'sv5_common': {
console.log('Game: Vivid Wave')
events = EVENT5;
courses = COURSES5;
//extend = EXTENDS5;
EXTENDS5.forEach(val => extend.push(Object.assign({}, val)));
break;
}
case 'sv6_common': {
console.log('Game: Exceed Gear')
//events = EVENT6;
EVENT6.forEach(val => events.push(val));
courses = COURSES6;
// IO.ReadFile('webui\\asset\\json\\course_data.json').then(
// function(yesData){
// console.log('yes')
// let courseData = JSON.parse(yesData)
// courses = courseData.courseData.find(data => data.version == 6).info;
// },
// function(noData){
// console.log(noData)
// })
EXTENDS6.forEach(val => extend.push(Object.assign({}, val)));
break;
}
}
let songs = [];
const gameVersion = getVersion(info);
let songNum = 2000;
if(gameVersion === 2) songNum = 554;
if(gameVersion === 3) songNum = 954;
if(gameVersion === 4) songNum = 1368;
if(U.GetConfig('unlock_all_songs')) {
console.log("Unlocking songs");
for (let i = 1; i < songNum; ++i) {
for (let j = 0; j < 5; ++j) {
songs.push({
music_id: K.ITEM('s32', i),
music_type: K.ITEM('u8', j),
limited: K.ITEM('u8', 3),
});
}
}
} else {
let RESTRICT_SONGS = [] //KONASTESONGS.concat(BEMANI2021EVENTSONGS, BPLSTAMPRALLYSONGS, SDVX10THSTAMPSONGS, REFLECBEATSTAMPSONGS);
let EVENT_SONGS = []
for(const keyIter in Object.keys(RESTRICTED_SONGS6)) {
RESTRICT_SONGS = RESTRICT_SONGS.concat(RESTRICTED_SONGS6[Object.keys(RESTRICTED_SONGS6)[keyIter]])
}
for(const keyIter in Object.keys(EVENT_SONGS6)) {
EVENT_SONGS = EVENT_SONGS.concat(EVENT_SONGS6[Object.keys(EVENT_SONGS6)[keyIter]])
}
let mdb = JSON.parse(music_db);
let limitedNo = 2;
for (let i = 0; i < songNum; i++) {
var foundSongIndex = mdb.mdb.music.map(function(x) {return x['@id']; }).indexOf(i.toString());
if(foundSongIndex != -1) {
var songData = mdb.mdb.music[foundSongIndex];
if(gameVersion === 6 || gameVersion === -6) {
if((!RESTRICT_SONGS.includes(i.toString()) || EVENT_SONGS.includes(i.toString())) && parseInt(songData['info']['distribution_date']['#text']) <= currentYMDDate) {
limitedNo = 2;
if(songData.info.version['#text'] === '6') { // if song is released during exceed gear
if(MISSINGSONGS6.includes(i.toString())) {
limitedNo += 1;
}
else if(VALKYRIE_SONGS.includes(i.toString()) && (!U.GetConfig('enable_valk_songs') && info.model.split(":")[2].match(/^(G|H)$/g) == null)){
limitedNo -= 1;
}
for(let j = 0; j < 5; j++) {
songs.push({
music_id: K.ITEM('s32', i),
music_type: K.ITEM('u8', j),
limited: K.ITEM('u8', limitedNo),
});
}
} else if (songData.info.inf_ver['#text'] === '6') { // if song has new XCD track; wouldn't work without updated webui asset
songs.push({
music_id: K.ITEM('s32', i),
music_type: K.ITEM('u8', 3),
limited: K.ITEM('u8', limitedNo),
});
}
} else {
console.log("Restricted song: " + songData.info.title_name)
}
}
}
}
}
if(U.GetConfig('use_information')){
console.log("Sending server information");
let time = new Date();
let tempDate = time.getDate();
const currentTime = parseInt((time.getTime()/100000) as unknown as string)*100;
extend.push({
id: 1,
type: 1,
params: [
1,
currentTime,
1,
1,
31,
'[f:0]SERVER INFORMATION',
'[sz:120] [olc:555555][ol:4][c:ff3333,3333ff,77ff77]Asphyxia\n'+
'[sz:75] CORE\n[sz:30]'+
'[sz:30][c:ffffff,888888] \n \n'+
' [c:00d5ff,888888]ASPHYXIA CORE'+CORE_VERSION+'\n'+
' [c:e5f3ff,a3d5ff]SDVX Plugin ver 6.0.0\n \n \n'+
'\n\n [f:0][c:ff3333,ffffff]FREE SOFTWARE. BEWARE OF SCAMMERS.\n'+
'[c:ffffff,888888] If you bought this software, request refund immediately.\n \n \n[/ol]'+
'[br:10][c:00FFFF][sz:50]メリー。。。クリスマス、です。。。'+
'\n \n \n \n[sz:32][c:560000,FC0000]DO NOT STREAM OR DISTRIBUTE THIS GAME IN PUBLIC',
//'[img:test]',
'',
'',
'',
],
});
}
else if(INFORMATION6[version.toString()] != undefined) {
console.log("Sending server information");
let time = new Date();
let tempDate = time.getDate();
const currentTime = parseInt((time.getTime()/100000) as unknown as string)*100;
for(const keyIter in INFORMATION6[version.toString()]) {
extend.push({
id: parseInt(keyIter) + 1,
type: 1,
params: [
1,
currentTime,
0,
0,
31,
'[f:0]SERVER INFORMATION',
INFORMATION6[version.toString()][keyIter],
'',
'',
'',
],
});
}
}
if(IO.Exists('handlers/test.json')) {
let testExtend = JSON.parse(await IO.ReadFile('handlers/test.json'))
if(testExtend.length > 0) {
testExtend.forEach(td => {
console.log("testExtend: " + JSON.stringify(td))
extend.push({
id: td['id'],
type: td['type'],
params: td['params']
});
})
}
}
if(IO.Exists('webui/asset/config/events.json')) {
const itemTypeList = {"track": 'e', "appeal": 'a', "crew": 'c', "pcb": 'b'}
let eventData = JSON.parse(await IO.ReadFile('webui/asset/json/events.json'))
let eventConfig = JSON.parse(await IO.ReadFile('webui/asset/config/events.json'))
for(const eventIter in eventData['events']) {
if(eventData['events'][eventIter]['type'] === 'stamp' && eventConfig[eventData['events'][eventIter]['id']]['toggle']) {
let stmpEvntInfo = STAMP_EVENTS6[eventData['events'][eventIter]['id']]
let prmStr1Sel = ''
for(const stmpDataIter in stmpEvntInfo['info']['data']) {
let stmpRwrd = stmpEvntInfo['info']['data'][stmpDataIter]['stprwrd']
let prmStr5 = ''
let sSheetName = (stmpRwrd[stmpRwrd.length - 1][1] === 'crew') ? stmpRwrd[stmpRwrd.length - 1][3] : stmpRwrd[stmpRwrd.length - 1][2]
prmStr1Sel += stmpEvntInfo['info']['data'][stmpDataIter]['stmpid'] + '#' + stmpEvntInfo['info']['data'][stmpDataIter]['bnr'] + '#' + itemTypeList[stmpRwrd[stmpRwrd.length - 1][1]] + '#' + sSheetName + (stmpEvntInfo['info']['data'].length - 1 === parseInt(stmpDataIter) ? '' : ',')
for(const stmpRwrdIter in stmpRwrd) {
let iID = stmpRwrd[stmpRwrdIter][2]
if (stmpRwrd[stmpRwrdIter][1] === 'track') iID += stmpRwrd[stmpRwrdIter][3]
prmStr5 += stmpRwrd[stmpRwrdIter][0] + ':' + itemTypeList[stmpRwrd[stmpRwrdIter][1]] + ':' + iID + (stmpRwrd.length - 1 === parseInt(stmpRwrdIter) ? '' : ' ')
}
let prmStep = [
5,
stmpEvntInfo['info']['data'][stmpDataIter]['stps'],
0,
stmpEvntInfo['info']['data'][stmpDataIter]['stps'],
0,
'',
stmpEvntInfo['info']['stmpHd'],
'',
stmpEvntInfo['info']['stmpFt'],
prmStr5
]
let newSelMainExtend = {
'type': 3,
'id': stmpEvntInfo['info']['data'][stmpDataIter]['stmpid'],
'params': prmStep
}
extend.push(newSelMainExtend)
}
if(stmpEvntInfo['type'] === 'select') {
let newSelExtend = {
'type': 3,
'id': stmpEvntInfo['info']['id'],
'params': [
9,
0,
0,
0,
0,
prmStr1Sel,
'',
stmpEvntInfo['info']['stmpSlHd'],
stmpEvntInfo['info']['stmpSlFt'],
stmpEvntInfo['info']['stmpBg']
]
}
extend.push(newSelExtend)
}
}
}
}
if(U.GetConfig('use_asphyxia_gameover')){
let time = new Date();
let tempDate = time.getDate();
const currentTime = parseInt((time.getTime()/100000) as unknown as string)*100;
let rightCharater = [
"go_bansui","go_bof","go_cannon","go_chinema","go_chocopla",
"go_dd","go_ekusa","go_esp","go_flowry","go_fukuryu",
"go_gorilla","go_grace","go_grace_rori","go_grace_ver06","go_haelequin",
"go_haruka","go_joyeuse","go_kino","go_kisa","go_mai",
"go_makina","go_makishima","go_left","go_makishima_ver06","go_mitsuru","go_miyako",
"go_nana","go_natsuhi","go_noisia","go_left_ver06","go_ondine","go_pannakotta",
"go_psychoholic","go_rain","go_rain02","go_ribbon","go_right",
"go_riot","go_rishna","go_rouge","go_sakurako","go_satan",
"go_tama","go_torako","go_vela","go_vertex","go_wabutan",
"go_wanlove","go_yusya",
];
let leftCharater = [
"go_akane","go_apex4sis","go_candy","go_capsaicin","go_chikage",
"go_evileye","go_fluorine","go_gangara","go_gin","go_hero",
"go_hiryubiren","go_hiyuki","go_hotaru","go_inoten","go_kamito",
"go_kanade","go_kemuri","go_kokona","go_konoha","go_kouki",
"go_kureha","go_left_bag","go_madholic",
"go_mimiko","go_mion","go_mitsuruco","go_nathanael","go_nishinippori",
"go_ortlinde","go_pico","go_pilica","go_profession","go_rasis",
"go_rasis_ver06","go_right_ver06","go_rimuru","go_rowa","go_saigawara",
"go_setu","go_shelly","go_soul","go_tamaneko","go_toraipuru",
"go_tsubaki","go_tsumabuki","go_tsumabuki_ver06","go_yuki","go_yukito",
];
let middleCharater = ["go_cat","go_cawoashi","go_iruyoru","go_neno",];
// Pattern 1 Left Right Left
// Pattern 2 Right Left Right
// Pattern 3 Right Middle Left
// Pattern 4 Left Middle Right
// switch(getVersion(info)){
// case 5:{
// break;
// }
// case 6:{
// rightCharater.push();
// leftCharater.push();
// break;
// }
// }
var charaString = "characters: ";
let pattern = getRandomIntInclusive(1,4);
switch(pattern){
case 1:{
var chara1 = leftCharater[getRandomIntInclusive(0,leftCharater.length-1)];
var chara2 = rightCharater[getRandomIntInclusive(0,rightCharater.length-1)];
var chara3 = leftCharater[getRandomIntInclusive(0,leftCharater.length-1)];
charaString += "chara01/"+chara1+" chara02/"+chara2+" chara01/"+chara3;
break;
}
case 2:{
var chara1 = rightCharater[getRandomIntInclusive(0,rightCharater.length-1)];
var chara2 = leftCharater[getRandomIntInclusive(0,leftCharater.length-1)];
var chara3 = rightCharater[getRandomIntInclusive(0,rightCharater.length-1)];
charaString += "chara02/"+chara1+" chara01/"+chara2+" chara02/"+chara3;
break;
}
case 3:{
var chara1 = rightCharater[getRandomIntInclusive(0,rightCharater.length-1)];
var chara2 = middleCharater[getRandomIntInclusive(0,middleCharater.length-1)]
var chara3 = leftCharater[getRandomIntInclusive(0,leftCharater.length-1)];
charaString += "chara02/"+chara1+" chara03/"+chara2+" chara01/"+chara3;
break;
}
case 4:{
var chara1 = leftCharater[getRandomIntInclusive(0,leftCharater.length-1)];
var chara2 = middleCharater[getRandomIntInclusive(0,middleCharater.length-1)];
var chara3 = rightCharater[getRandomIntInclusive(0,rightCharater.length-1)];
charaString += "chara01/"+chara1+" chara03/"+chara2+" chara02/"+chara3;
break;
}
}
if(Math.abs(getVersion(info)) == 6){//Due to older version misses newer characters, not supported on older versions
extend.push({
id: 3,
type: 1,
params: [
3,
currentTime,
0,
60,
0,
'[GAMEOVER]',
'[ol:6][olc:FFFFFF][ds:4][dsc:000000][sz:32][c:99FF00A8]Thank You For Using Asphyxia CORE!!!',
'[ol:6][olc:FFFFFF][ds:4][dsc:000000][sz:32][c:990D46F2]For more information please visit our Discord!',
'[ol:6][olc:FFFFFF][ds:4][dsc:000000][sz:32][c:99ED4F39]Nice Play!!!',
//'characters: chara01/go_rasis_ver06 chara02/go_left_ver06 chara01/go_right_ver06',
charaString,
],
});
}
}
console.log("Sending common objects");
let arena_catalog_items = []
let catalog = []
let campaign = []
// if(U.GetConfig('arena_szn') == 'debug') {
// for(let xxx = 1; xxx<=150; xxx++){
// arena_catalog_items.push({
// catalog_id: K.ITEM('s32', 1),
// catalog_type: K.ITEM('s32', 1),
// price: K.ITEM('s32', 1000),
// item_type: K.ITEM('s32', 11),
// item_id: K.ITEM('s32', xxx),
// param: K.ITEM('s32', 1),
// })
// }
// }
// else{
for (let catalog_item in ARENA[U.GetConfig('arena_szn')].arena_items) {
arena_catalog_items.push({
catalog_id: K.ITEM('s32', ARENA[U.GetConfig('arena_szn')].arena_items[catalog_item].catalog_id),
catalog_type: K.ITEM('s32', ARENA[U.GetConfig('arena_szn')].arena_items[catalog_item].catalog_type),
price: K.ITEM('s32', ARENA[U.GetConfig('arena_szn')].arena_items[catalog_item].price),
item_type: K.ITEM('s32', ARENA[U.GetConfig('arena_szn')].arena_items[catalog_item].item_type),
item_id: K.ITEM('s32', ARENA[U.GetConfig('arena_szn')].arena_items[catalog_item].item_id),
param: K.ITEM('s32', ARENA[U.GetConfig('arena_szn')].arena_items[catalog_item].param),
})
}
// }
let valgene_info = []
let valgene_items = []
VALGENE.info.forEach(val => valgene_info.push({
valgene_name: K.ITEM('str', val.valgene_name),
valgene_name_english: K.ITEM('str', val.valgene_name_english),
valgene_id: K.ITEM('s32', val.valgene_id)
}))
VALGENE.catalog.forEach((val) => {
val.items.forEach((itemVal) => {
itemVal.item_ids.forEach((item_id) => {
valgene_items.push({
valgene_id: K.ITEM('s32', val.volume),
rarity: K.ITEM('s32', VALGENE.rarity[itemVal.type.toString()]),
item_type: K.ITEM('s32', itemVal.type),
item_id: K.ITEM('s32', item_id)
})
})
})
})
if(currentDate.substring(0,4) === '4/1/') {
console.log('Using April Fools Event')
events.push('APRIL_GRACE');
events.push('EVENTDATE_APRILFOOL');
for (const afsong in APRILFOOLSSONGS) {
for (let j = 0; j < 5; ++j) {
songs.push({
music_id: K.ITEM('s32', parseInt(APRILFOOLSSONGS[afsong])),
music_type: K.ITEM('u8', j),
limited: K.ITEM('u8', 3),
});
}
}
}
send.object(
{
valgene: {
info: valgene_info,
catalog: valgene_items
},
arena: {
// season: K.ITEM('s32', ARENA[U.GetConfig('arena_szn')].details.season),
time_start: K.ITEM('u64', ARENA[U.GetConfig('arena_szn')].details.time_start),
time_end: K.ITEM('u64', ARENA[U.GetConfig('arena_szn')].details.time_end),
shop_start: K.ITEM('u64', ARENA[U.GetConfig('arena_szn')].details.shop_start),
shop_end: K.ITEM('u64', ARENA[U.GetConfig('arena_szn')].details.shop_end),
is_open: K.ITEM('bool', ARENA[U.GetConfig('arena_szn')].details.is_open),
is_shop: K.ITEM('bool', ARENA[U.GetConfig('arena_szn')].details.is_shop),
catalog: arena_catalog_items
},
event: {
info: events.map(e => ({
event_id: K.ITEM('str', e),
})),
},
extend: {
info: extend.map(e => ({
extend_id: K.ITEM('u32', e.id),
extend_type: K.ITEM('u32', e.type),
param_num_1: K.ITEM('s32', e.params[0]),
param_num_2: K.ITEM('s32', e.params[1]),
param_num_3: K.ITEM('s32', e.params[2]),
param_num_4: K.ITEM('s32', e.params[3]),
param_num_5: K.ITEM('s32', e.params[4]),
param_str_1: K.ITEM('str', e.params[5]),
param_str_2: K.ITEM('str', e.params[6]),
param_str_3: K.ITEM('str', e.params[7]),
param_str_4: K.ITEM('str', e.params[8]),
param_str_5: K.ITEM('str', e.params[9]),
})),
},
music_limited: { info: songs },
skill_course: {
info: courses.reduce(
(acc, s) =>
acc.concat(
s.courses.map(c => ({
season_id: K.ITEM('s32', s.id),
season_name: K.ITEM('str', s.name),
season_new_flg: K.ITEM('bool', s.isNew),
course_type: K.ITEM('s16', 0),
course_id: K.ITEM('s16', c.id),
course_name: K.ITEM('str', c.name),
skill_level: K.ITEM('s16', c.level),
skill_name_id: K.ITEM('s16', c.nameID),
matching_assist: K.ITEM('bool', c.assist),
clear_rate: K.ITEM('s32', 5000),
avg_score: K.ITEM('u32', 15000000),
track: c.tracks.map(t => ({
track_no: K.ITEM('s16', t.no),
music_id: K.ITEM('s32', t.mid),
music_type: K.ITEM('s8', t.mty),
})),
}))
),
[]
),
},
},
{ encoding: 'utf8' }
);
} catch (error) {
console.log(error)
}
};
export const log: EPR = async (info, data, send) => {
send.success();
}
export const unhandledt: EPR = async (info, data, send) => {
console.log("")
console.log("Unhandled: " + info.method + " | " + info.model + " | " + info.module)
console.log(JSON.stringify(info))
console.log(JSON.stringify(data))
console.log("")
return send.success()
}
+53 -56
View File
@@ -641,6 +641,59 @@ export const load: EPR = async (info, data, send) => {
version,
})) || { base: 0, name: 0, level: 0 };
let presents = []
if(version === 6) {
if(IO.Exists('webui/asset/config/events.json')) {
let eventData = JSON.parse(await IO.ReadFile('webui/asset/json/events.json'))
let eventConfig = JSON.parse(await IO.ReadFile('webui/asset/config/events.json'))
for(const eventIter in eventData['events']) {
if(eventData['events'][eventIter]['type'] === 'gift') {
if(typeof eventConfig[eventData['events'][eventIter]['id']]['toggle'] === "boolean") {
if(eventConfig[eventData['events'][eventIter]['id']]['toggle']) {
for(const itemIter in EVENT_SONGS6[eventData['events'][eventIter]['id']]) {
let itemId = parseInt(EVENT_SONGS6[eventData['events'][eventIter]['id']][itemIter])
if(await DB.Count(refid, {collection:'item', id: itemId}) === 0) {
await DB.Upsert(
refid,
{collection: 'item', type: 0, id: itemId},
{$set: { param: 23 }}
)
presents.push({
id: itemId,
type: 0,
param: 23
})
}
}
}
} else{
for(const toggleKeys in Object.keys(eventConfig[eventData['events'][eventIter]['id']]['toggle'])) {
if(eventConfig[eventData['events'][eventIter]['id']]['toggle'][Object.keys(eventConfig[eventData['events'][eventIter]['id']]['toggle'])[toggleKeys]]) {
for(const itemIter in EVENT_SONGS6[Object.keys(eventConfig[eventData['events'][eventIter]['id']]['toggle'])[toggleKeys]]) {
let itemId = parseInt(EVENT_SONGS6[Object.keys(eventConfig[eventData['events'][eventIter]['id']]['toggle'])[toggleKeys]][itemIter])
if(await DB.Count(refid, {collection:'item', id: itemId}) === 0) {
await DB.Upsert(
refid,
{collection: 'item', type: 0, id: itemId},
{$set: { param: 23 }}
)
presents.push({
id: itemId,
type: 0,
param: 23
})
}
}
}
}
}
}
}
}
}
const items = await DB.Find<Item>(refid, { collection: 'item' });
const courses = await DB.Find<CourseRecord>(refid, { collection: 'course', version });
const params = await DB.Find<Param>(refid, { collection: 'param' });
@@ -704,62 +757,6 @@ export const load: EPR = async (info, data, send) => {
tempItem = U.GetConfig('unlock_all_appeal_cards') ? unlockAppealCards(items) : items;
tempItem = removeStampItems(tempItem)
let presents = []
if(IO.Exists('webui/asset/config/events.json')) {
let eventData = JSON.parse(await IO.ReadFile('webui/asset/json/events.json'))
let eventConfig = JSON.parse(await IO.ReadFile('webui/asset/config/events.json'))
for(const eventIter in eventData['events']) {
if(!eventData['events'][eventIter]['in_game_event']) {
if(typeof eventConfig[eventData['events'][eventIter]['id']]['toggle'] === "boolean") {
if(eventConfig[eventData['events'][eventIter]['id']]['toggle']) {
for(const itemIter in EVENT_SONGS6[eventData['events'][eventIter]['id']]) {
let itemId = parseInt(EVENT_SONGS6[eventData['events'][eventIter]['id']][itemIter])
if(await DB.Count(refid, {collection:'item', id: itemId}) === 0) {
await DB.Upsert(
refid,
{collection: 'item', type: 0, id: itemId},
{$set: { param: 23 }}
)
presents.push({
id: itemId,
type: 0,
param: 23
})
tempItem.push({ collection: 'item', type: 0, id: itemId, param: 23 })
}
}
}
} else{
// eventConfig[eventData['events'][eventIter]['id']]['toggle']
for(const toggleKeys in Object.keys(eventConfig[eventData['events'][eventIter]['id']]['toggle'])) {
if(eventConfig[eventData['events'][eventIter]['id']]['toggle'][Object.keys(eventConfig[eventData['events'][eventIter]['id']]['toggle'])[toggleKeys]]) {
for(const itemIter in EVENT_SONGS6[Object.keys(eventConfig[eventData['events'][eventIter]['id']]['toggle'])[toggleKeys]]) {
let itemId = parseInt(EVENT_SONGS6[Object.keys(eventConfig[eventData['events'][eventIter]['id']]['toggle'])[toggleKeys]][itemIter])
if(await DB.Count(refid, {collection:'item', id: itemId}) === 0) {
await DB.Upsert(
refid,
{collection: 'item', type: 0, id: itemId},
{$set: { param: 23 }}
)
presents.push({
id: itemId,
type: 0,
param: 23
})
tempItem.push({ collection: 'item', type: 0, id: itemId, param: 23 })
}
}
}
}
}
}
}
}
// Make generator power always 100%,
for (let i = 0; i < 50; i++) {
const tempGene: Item = { collection: 'item', type: 7, id: i, param: 10 };
+57 -46
View File
@@ -177,9 +177,19 @@ export const copyResourcesFromGame = async (data: {}) => {
// Get new music data from music_db.xml
console.log('Getting new music_db info')
if(IO.Exists(U.GetConfig('sdvx_eg_root_dir') + "/data/others/music_db.xml")) {
let ea3Config = []
let version = ''
let mdb = U.parseXML(U.DecodeString(await IO.ReadFile(U.GetConfig('sdvx_eg_root_dir') + "/data/others/music_db.xml"), "shift_jis"), false)
let ea3Config = U.parseXML(U.DecodeString(await IO.ReadFile(U.GetConfig('sdvx_eg_root_dir') + "/prop/ea3-config.xml"), "shift_jis"), false)
let version = ea3Config['ea3']['soft']['ext']['@content'];
if(IO.Exists(U.GetConfig('sdvx_eg_root_dir') + "/prop/ea3-config.xml")) {
console.log("Reading ea3-config.xml")
ea3Config = U.parseXML(U.DecodeString(await IO.ReadFile(U.GetConfig('sdvx_eg_root_dir') + "/prop/ea3-config.xml"), "shift_jis"), false)
version = ea3Config['ea3']['soft']['ext']['@content'];
} else if(IO.Exists(U.GetConfig('sdvx_eg_root_dir') + "/prop/ea3-ident.xml")) {
console.log("Reading ea3-ident.xml")
ea3Config = U.parseXML(U.DecodeString(await IO.ReadFile(U.GetConfig('sdvx_eg_root_dir') + "/prop/ea3-ident.xml"), "shift_jis"), false)
version = ea3Config['ea3_conf']['soft']['ext']['@content'];
}
let prevAssetMdb = []
if(IO.Exists('webui/asset/json/music_db.json')) {
prevAssetMdb = JSON.parse(U.DecodeString(await IO.ReadFile('webui/asset/json/music_db.json'), 'utf8'))
@@ -187,18 +197,25 @@ export const copyResourcesFromGame = async (data: {}) => {
mdb.mdb.music.forEach(musicValue => {
if(Object.keys(prevAssetMdb).length > 0) {
if(prevAssetMdb['mdb']['music'].find(item => parseInt(item['@id']) == parseInt(musicValue.info.label['@content'])) == undefined) {
if(prevAssetMdb['mdb']['music'].find(item => parseInt(item['@id']) == parseInt(musicValue['@attr'].id)) == undefined) {
console.log("New song added to json: " + musicValue.info.title_name['@content'] + " (" + musicValue.info.distribution_date['@content'] + ")")
newJsonSongs.push([ musicValue['@attr'].id, '[' + musicValue.info.distribution_date['@content'] + ' | ' + musicValue['@attr'].id + '] ' + musicValue.info.title_name['@content']])
}
if(prevAssetMdb['mdb']['music'].find(item => (parseInt(item['@id']) == parseInt(musicValue['@attr'].id) && parseInt(item['info']['inf_ver']['#text']) === 0)) != undefined) {
if(musicValue.info.inf_ver['@content'] == '6') {
console.log("New XCD difficulty song: " + musicValue.info.title_name['@content'] + " (" + musicValue.info.distribution_date['@content'] + ")")
newXCDSongs.push([ musicValue['@attr'].id, '[' + musicValue.info.distribution_date['@content'] + ' | ' + musicValue['@attr'].id + '] ' + musicValue.info.title_name['@content']])
}
}
} else {
console.log("New song added to json: " + musicValue.info.title_name['@content'] + " (" + musicValue.info.distribution_date['@content'] + ")")
newJsonSongs.push([ musicValue['@attr'].id, '[' + musicValue.info.distribution_date['@content'] + ' | ' + musicValue['@attr'].id + '] ' + musicValue.info.title_name['@content']])
}
if(musicValue.info.inf_ver['@content'] == '6') {
console.log("New XCD difficulty song: " + musicValue.info.title_name['@content'] + " (" + musicValue.info.distribution_date['@content'] + ")")
newXCDSongs.push([ musicValue['@attr'].id, '[' + musicValue.info.distribution_date['@content'] + ' | ' + musicValue['@attr'].id + '] ' + musicValue.info.title_name['@content']])
if(musicValue.info.inf_ver['@content'] == '6') {
console.log("New XCD difficulty song: " + musicValue.info.title_name['@content'] + " (" + musicValue.info.distribution_date['@content'] + ")")
newXCDSongs.push([ musicValue['@attr'].id, '[' + musicValue.info.distribution_date['@content'] + ' | ' + musicValue['@attr'].id + '] ' + musicValue.info.title_name['@content']])
}
}
if(parseInt(musicValue.info.distribution_date['@content'][0]) >= parseInt(version.substring(0,8))) {
@@ -280,21 +297,19 @@ export const copyResourcesFromGame = async (data: {}) => {
for await (const nemsys of nemsysFiles) {
let fileToWrite = await IO.ReadFile(U.GetConfig('sdvx_eg_root_dir') + "/data/graphics/game_nemsys/" + nemsys.name)
if(!IO.Exists('webui/asset/nemsys/' + nemsys.name.substring(0, (nemsys.name.length - 4)) + ".png") && !IO.Exists('webui/asset/nemsys/' + nemsys.name.substring(0, (nemsys.name.length - 4)) + ".jpg")) {
console.log("[nemsys] copying " + nemsys.name)
IO.WriteFile('webui/asset/nemsys/' + nemsys.name, fileToWrite)
newNemsysData.push(nemsys.name)
} else {
console.log(nemsys.name + " exists")
}
}
newNemsysData.forEach(fileName => {
if(fileName.match(/([0-9]+)/g) != undefined) {
let nemsysId = parseInt(fileName.match(/([0-9]+)/g)[0])
if(nemsys.name.match(/([0-9]+)/g) != undefined) {
let nemsysId = parseInt(nemsys.name.match(/([0-9]+)/g)[0])
if(nemsysId && resourceJsonData.nemsys.find(nem => nem.value == nemsysId) == undefined) {
resourceJsonData.nemsys.push({"value": nemsysId, "name": fileName + " (please rename)"})
console.log("[nemsys] adding to json: " + nemsys.name)
resourceJsonData.nemsys.push({"value": nemsysId, "name": nemsys.name + " (please rename)"})
}
}
})
}
} else {
console.log('Error reading nemsys directory. Check your "Exceed Gear Data Directory" config.')
runErrors.push('[nemsys] Error reading nemsys directory. Check your "Exceed Gear Data Directory" config.')
@@ -308,24 +323,23 @@ export const copyResourcesFromGame = async (data: {}) => {
if (subbg.name.match(/(\.png|\.jpg)/g)) {
let fileToWrite = await IO.ReadFile(U.GetConfig('sdvx_eg_root_dir') + "/data/graphics/submonitor_bg/" + subbg.name)
if(!IO.Exists('webui/asset/submonitor_bg/' + subbg.name.substring(0, (subbg.name.length - 4)) + ".png") && !IO.Exists('webui/asset/submonitor_bg/' + subbg.name.substring(0, (subbg.name.length - 4)) + ".jpg")) {
console.log("[subbg] copying " + subbg.name)
IO.WriteFile('webui/asset/submonitor_bg/' + subbg.name, fileToWrite)
newSubBGData.push(subbg.name)
} else {
console.log(subbg.name + " exists")
}
let subbgId = parseInt(subbg.name.match(/([0-9]+)/g)[0])
if(subbgId) {
let subbgName = subbg.name
let foundSubbg = resourceJsonData.subbg.find(subbg => subbg.value === subbgId)
if(foundSubbg == undefined) {
if(subbg.name.match(/(subbg_[0-9]+_[0-9]+)/g)) subbgName = subbg.name.match(/(subbg_[0-9]+)/g)[0]
console.log("[subbg] adding to json: " + subbgId + " - " + subbgName)
resourceJsonData.subbg.push({"value": subbgId, "name": subbgName + " (please rename)"})
}
}
}
}
newSubBGData.forEach(fileName => {
let subbgId = parseInt(fileName.match(/([0-9]+)/g)[0])
if(subbgId) {
let foundSubbg = resourceJsonData.subbg.find(subbg => subbg.value === subbgId)
if(foundSubbg == undefined) {
if(fileName.match(/(subbg_[0-9]+_[0-9]+)/g)) fileName = fileName.match(/(subbg_[0-9]+)/g)
resourceJsonData.subbg.push({"value": subbgId, "name": fileName + " (please rename)"})
}
}
})
} else {
console.log('Error reading submonitor_bg directory. Check your "Exceed Gear Data Directory" config.')
runErrors.push('[submonitor_bg] Error reading submonitor_bg directory. Check your "Exceed Gear Data Directory" config.')
@@ -341,21 +355,19 @@ export const copyResourcesFromGame = async (data: {}) => {
if(folderName != '') {
let fileToWrite = await IO.ReadFile(U.GetConfig('sdvx_eg_root_dir') + "/data/sound/custom/" + bgm.name)
if(!IO.Exists('webui/asset/audio/' + folderName)) {
console.log("[bgm] copying " + bgm.name)
IO.WriteFile('webui/asset/audio/' + folderName + '/' + bgm.name, fileToWrite)
newBGMData.push(bgm.name)
} else {
console.log(bgm.name + " exists")
}
let bgmId = parseInt(bgm.name.match(/(?<=(custom|special)_)([0-9]*)/g)[0])
if(bgmId && resourceJsonData.bgm.find(bgm => bgm.value == bgmId) == undefined) {
console.log("[bgm] adding to json: " + bgmId + " - " + bgm.name)
resourceJsonData.bgm.push({"value": bgmId, "name": bgm.name + " (please rename)"})
}
}
}
}
newBGMData.forEach(fileName => {
let bgmId = parseInt(fileName.match(/(?<=(custom|special)_)([0-9]*)/g)[0])
if(bgmId && resourceJsonData.bgm.find(bgm => bgm.value == bgmId) == undefined) {
resourceJsonData.bgm.push({"value": bgmId, "name": fileName + " (please rename)"})
}
})
} else {
console.log('Error reading BGM directory. Check your "Exceed Gear Data Directory" config.')
runErrors.push('[BGM] Error reading BGM directory. Check your "Exceed Gear Data Directory" config.')
@@ -369,11 +381,10 @@ export const copyResourcesFromGame = async (data: {}) => {
if (valgeneItem.name.substring(valgeneItem.name.length-4, valgeneItem.name.length).match(/(\.png|\.jpg)/g)) {
let fileToWrite = await IO.ReadFile(U.GetConfig('sdvx_eg_root_dir') + "/data/graphics/valgene_item/" + valgeneItem.name)
if(!IO.Exists('webui/asset/valgene_item/' + valgeneItem.name.substring(0, (valgeneItem.name.length - 4)) + ".png") && !IO.Exists('webui/asset/valgene_item/' + valgeneItem.name.substring(0, (valgeneItem.name.length - 4)) + ".jpg")) {
console.log("[valgene_item] copying " + valgeneItem.name)
IO.WriteFile('webui/asset/valgene_item/' + valgeneItem.name, fileToWrite)
newValgeneItemFiles.push(valgeneItem.name)
} else {
console.log(valgeneItem.name + " exists")
}
}
}
}
} else {
@@ -387,6 +398,7 @@ export const copyResourcesFromGame = async (data: {}) => {
let akanameData = U.parseXML(U.DecodeString(await IO.ReadFile(U.GetConfig('sdvx_eg_root_dir') + "/data/others/akaname_parts.xml"), "shift_jis"), false)
for(const akaname of akanameData.akaname_parts.part) {
if(resourceJsonData.akaname.find(aka => aka.value === akaname['@attr'].id) == undefined) {
console.log("[akaname] adding " + akaname['@attr'].id + " - " + akaname.word['@content'] != undefined ? akaname.word['@content'] : '')
resourceJsonData.akaname.push({"value": akaname['@attr'].id, "name": akaname.word['@content'] != undefined ? akaname.word['@content'] : '' })
newAkanames.push(akaname['@attr'].id + ": " + akaname.word['@content'])
}
@@ -403,10 +415,12 @@ export const copyResourcesFromGame = async (data: {}) => {
let apCardData = U.parseXML(U.DecodeString(await IO.ReadFile(U.GetConfig('sdvx_eg_root_dir') + "/data/others/appeal_card.xml"), "shift_jis"), false)
for(const apCard of apCardData.appeal_card_data.card) {
if(apCardJsonData.appeal_card_data.card.find(ap => ap['@id'] === apCard['@attr'].id) == undefined) {
console.log("[ap_card] adding to json: " + apCard['@attr'].id + " - " + apCard.info['title']['@content'])
apCardJsonData.appeal_card_data.card.push({"@id": apCard['@attr'].id, "info": {"texture": apCard.info['texture']['@content'], "title": apCard.info['title']['@content']}})
newAPCardData.push(apCard['@attr'].id + ": " + apCard.info['texture']['@content'] + "(" + apCard.info['title']['@content'] + ")")
}
if(!IO.Exists('webui/asset/ap_card/' + apCard.info['texture']['@content'] + '.png') && !IO.Exists('webui/asset/ap_card/' + apCard.info['texture']['@content'] + '.jpg')) {
console.log("[ap_card] copying " + apCard.info['texture']['@content'] + '.png')
let fileToWrite = await IO.ReadFile(U.GetConfig('sdvx_eg_root_dir') + "/data/graphics/ap_card/" + apCard.info['texture']['@content'] + ".png")
IO.WriteFile('webui/asset/ap_card/' + apCard.info['texture']['@content'] + '.png', fileToWrite)
}
@@ -424,10 +438,12 @@ export const copyResourcesFromGame = async (data: {}) => {
// console.log(JSON.stringify(chatStampData.chat_stamp_data))
for(const chatStamp of chatStampData.chat_stamp_data.info) {
if(resourceJsonData.stamp.find(stamp => stamp['value'] === chatStamp.id['@content'][0]) == undefined) {
console.log("[chat_stamp] adding to json: " + chatStamp.id['@content'][0] + " - " + chatStamp.filename['@content'])
resourceJsonData.stamp.push({"value": chatStamp.id['@content'][0], "name": chatStamp.filename['@content']})
newChatStampData.push(chatStamp.id['@content'][0] + ": " + chatStamp.filename['@content'])
}
if(!IO.Exists('webui/asset/chat_stamp/' + chatStamp.filename['@content'] + '.png') && !IO.Exists('webui/asset/chat_stamp/' + chatStamp.filename['@content'] + '.png')) {
console.log("[chat_stamp] copying " + chatStamp.filename['@content'] + '.png')
let fileToWrite = await IO.ReadFile(U.GetConfig('sdvx_eg_root_dir') + "/data/graphics/chat_stamp/" + chatStamp.filename['@content'] + ".png")
IO.WriteFile('webui/asset/chat_stamp/' + chatStamp.filename['@content'] + '.png', fileToWrite)
}
@@ -460,11 +476,6 @@ export const preGeneRoll = async (data: {
refid: string,
items: []
}) => {
// prem_items_crew: DB.Find(refid, {collection:"item",type:11})
// prem_items_stamp: DB.Find(refid, { collection:"item",type:17 })
// prem_items_subbg: DB.Find(refid, { collection:"item",type:18 })
// prem_items_bgm: DB.Find(refid, { collection:"item",type:19 })
// prem_items_nemsys: DB.Find(refid, { collection:"item",type:20 })
let itemId = {
'crew': 11,
+63 -41
View File
@@ -1,6 +1,6 @@
function generateEventToggles(eventInfo, eventConfig) {
function generateEventToggles(eventInfo, eventConfig, eventEnabled) {
let cardContent = $('<div class="card-content">')
if(!['bpl2022', 'konasute', 'xrecord'].includes(eventInfo['id'])) {
if(typeof eventInfo['info'] === 'string') {
cardContent.append(
$('<div class="field is-horizontal">').append(
$('<div class="field-label is-normal"><label class="label" for="' + eventInfo['id'] + '">Enable</label></div>')
@@ -22,13 +22,34 @@ function generateEventToggles(eventInfo, eventConfig) {
return cardContent
}
async function readEventsConfigFile() {
async function generateNewEventsConfigFile(eventData) {
let eventConfig = {}
for(const eventIter in eventData['events']) {
eventConfig[eventData['events'][eventIter]['id']] = await insertNewEventConfig(eventData, eventIter, eventData['events'][eventIter]['id'])
}
return eventConfig
}
async function insertNewEventConfig(eventData, eventIter, eventID) {
let toggle = false
if(typeof eventData['events'][eventIter]['info'] !== 'string') {
toggle = {}
for(const toggleIter in eventData['events'][eventIter]['info']) {
toggle[eventData['events'][eventIter]['id'] + '_' + (parseInt(toggleIter) + 1)] = false
}
}
return {
'toggle': toggle
}
}
async function readEventsConfigFile(eventData) {
try {
return await $.getJSON("static/asset/config/events.json", function(data) {
return data
})
} catch {
return await generateNewEventsConfigFile()
return await generateNewEventsConfigFile(eventData)
}
}
@@ -38,47 +59,30 @@ async function readEventsJsonFile() {
})
}
async function generateNewEventsConfigFile() {
let hiddenEvents = ['bpl2021', 'bsb2021', 'gmz2022', 'pcbevent']
let eventConfig = {}
let eventData = await readEventsJsonFile()
for(const eventIter in eventData['events']) {
let hidden = false
let toggle = false
if(['bpl2022', 'konasute', 'xrecord'].includes(eventData['events'][eventIter]['id'])) {
toggle = {}
for(const toggleIter in eventData['events'][eventIter]['info']) {
toggle[eventData['events'][eventIter]['id'] + '_' + (parseInt(toggleIter) + 1)] = false
}
}
if(hiddenEvents.includes(eventData['events'][eventIter]['id'])) {
hidden = true
}
eventConfig[eventData['events'][eventIter]['id']] = {
'hidden': hidden,
'toggle': toggle
}
}
console.log(eventConfig)
return eventConfig
}
$(document).ready(async function() {
let eventData = await readEventsJsonFile()
let eventConfig = await readEventsConfigFile()
let eventConfig = await readEventsConfigFile(eventData)
for(const eventIter in eventData['events']) {
if(!eventConfig[eventData['events'][eventIter]['id']]['hidden']) {
$('div.main').append(
$('<header class="card-header"><p class="card-header-title"><span class="icon"><i class="mdi mdi-calendar-clock"></i></span>' + eventData['events'][eventIter]['name'] + '</p></header>')
).append(
generateEventToggles(eventData['events'][eventIter], eventConfig[eventData['events'][eventIter]['id']])
)
if(eventConfig[eventData['events'][eventIter]['id']] === undefined) {
eventConfig[eventData['events'][eventIter]['id']] = await insertNewEventConfig(eventData, eventIter, eventData['events'][eventIter]['id'])
}
if(eventData['events'][eventIter]['enabled']) {
if(eventData['events'][eventIter]['type'] === 'stamp') {
$('#stampevent_select').append(
'<option value=' + eventData['events'][eventIter]['id'] + '>' + eventData['events'][eventIter]['name'] + '</option>'
)
} else if(eventData['events'][eventIter]['type'] === 'gift') {
$('#giftevent_select').append(
'<option value=' + eventData['events'][eventIter]['id'] + '>' + eventData['events'][eventIter]['name'] + '</option>'
)
} else if(eventData['events'][eventIter]['type'] === 'cross_online') {
$('#crossevent_select').append(
'<option value=' + eventData['events'][eventIter]['id'] + '>' + eventData['events'][eventIter]['name'] + '</option>'
)
}
}
}
$('div.main').append(
$('<div class="field is-grouped"><div class="control is-expanded"></div><div class="control"><button class="button is-link" id="event-submit">Apply</button></div></div>')
)
$('#event-submit').on('click', async function() {
$.each($('span.check'), function(index, value) {
@@ -98,11 +102,29 @@ $(document).ready(async function() {
await emit("manageEvents", {eventConfig: eventConfig}).then(
function(response) {
alert('saved')
alert('Saved.')
},
function(error) {
console.log(error)
}
)
})
$('select').change(async function(event) {
let selectClass = '#' + $(this).attr('id')
let listClasses = {'#stampevent_select': 'stamp', '#giftevent_select': 'gift', '#crossevent_select': 'cross'}
$('.' + listClasses[selectClass] + '.list').empty()
for(const eventIter in eventData['events']) {
if(eventData['events'][eventIter]['id'] === $(selectClass).val()) {
$('.' + listClasses[selectClass] + '.list').append(
generateEventToggles(eventData['events'][eventIter], eventConfig[eventData['events'][eventIter]['id']], eventData['events'][eventIter]['enabled'])
)
$('div.main').append(
$('<div class="field is-grouped"><div class="control is-expanded"></div><div class="control"><button class="button is-link" id="event-submit">Apply</button></div></div>')
)
}
}
})
})
+33 -8
View File
@@ -6,22 +6,19 @@ function zeroPad(num, places) {
}
function getSongName(musicid) {
//console.log(music_db["mdb"]["music"])
//console.log(musicid+" "+type);
var result = music_db["mdb"]["music"].filter(object => object["@id"] == musicid);
if (result.length == 0) {
return "Custom Song";
}
return result[0]["info"]["title_name"]
//console.log(result);
}
function getReleaseDate(musicid) {
//console.log(music_db["mdb"]["music"])
//console.log(musicid+" "+type);
var result = music_db["mdb"]["music"].filter(object => object["@id"] == musicid);
if (result.length == 0 || !('distribution_date' in result[0]['info'])) {
return "Unknown"
}
return result[0]["info"]["distribution_date"]["#text"]
//console.log(result);
}
@@ -31,7 +28,6 @@ function getDifficulty(musicid, type) {
return "NOV";
}
var inf_ver = result[0]["info"]["inf_ver"]["#text"] ? result[0]["info"]["inf_ver"]["#text"] : 5;
//console.log([type,inf_ver]);
switch (type) {
case 0:
return "NOV";
@@ -227,6 +223,34 @@ $(document).ready(function() {
//$('#music_score').DataTable();
$.getJSON("static/asset/json/music_db.json", function(json) {
const translate_table = {
'龕': '€',
'釁': '🍄',
'驩': 'Ø',
'曦': 'à',
'齷': 'é',
'骭': 'ü',
'齶': '♡',
'彜': 'ū',
'罇': 'ê',
'雋': 'Ǜ',
'鬻': '♃',
'鬥': 'Ã',
'鬆': 'Ý',
'曩': 'è',
'驫': 'ā',
'齲': '♥',
'騫': 'á',
'趁': 'Ǣ',
'鬮': '¡',
'盥': '⚙︎',
'隍': '︎Ü',
'頽': 'ä',
'餮': 'Ƶ',
'黻': '*',
'蔕': 'ũ',
'闃': 'Ā'
}
music_db = json;
var music_data = [];
@@ -235,6 +259,7 @@ $(document).ready(function() {
var temp_data = {};
temp_data.mid = profile_data[i].mid;
temp_data.songname = getSongName(profile_data[i].mid);
temp_data.songname = temp_data.songname.replace(/[龕釁驩曦齷骭齶彜罇雋鬻鬥鬆曩驫齲騫趁鬮盥隍頽餮黻蔕闃]/g, m => translate_table[m]);
temp_data.diff = getDifficulty(profile_data[i].mid, profile_data[i].type);
temp_data.releasedate = getReleaseDate(profile_data[i].mid);
temp_data.score = profile_data[i].score;
@@ -286,4 +311,4 @@ $(document).ready(function() {
});
})
})
+30 -1
View File
@@ -14,16 +14,45 @@ function getInfDifficulty(inf_ver) {
}
$(document).ready(function() {
$.getJSON("static/asset/json/music_db.json", function(json) {
const translate_table = {
'龕': '€',
'釁': '🍄',
'驩': 'Ø',
'曦': 'à',
'齷': 'é',
'骭': 'ü',
'齶': '♡',
'彜': 'ū',
'罇': 'ê',
'雋': 'Ǜ',
'鬻': '♃',
'鬥': 'Ã',
'鬆': 'Ý',
'曩': 'è',
'驫': 'ā',
'齲': '♥',
'騫': 'á',
'趁': 'Ǣ',
'鬮': '¡',
'盥': '⚙︎',
'隍': '︎Ü',
'頽': 'ä',
'餮': 'Ƶ',
'黻': '*',
'蔕': 'ũ',
'闃': 'Ā'
}
music_db = json;
var music_data = [];
for (let mdata in music_db.mdb.music) {
var temp_data = {};
temp_data.mid = music_db.mdb.music[mdata]['@id'];
temp_data.songname = music_db.mdb.music[mdata]['info']['title_name'];
temp_data.songname = temp_data.songname.replace(/[龕釁驩曦齷骭齶彜罇雋鬻鬥鬆曩驫齲騫趁鬮盥隍頽餮黻蔕闃]/g, m => translate_table[m]);
if('distribution_date' in music_db.mdb.music[mdata]['info']) {
temp_data.releasedate = music_db.mdb.music[mdata]['info']['distribution_date']['#text'];
} else {
temp_data.releasedate = ''
temp_data.releasedate = 'Unknown'
}
temp_data.nov = "";
temp_data.adv = "";
+43 -19
View File
@@ -2,7 +2,8 @@
"events": [
{
"id": "xrecord",
"in_game_event": false,
"type": "cross_online",
"enabled": false,
"name": "X-record",
"info": [
"1st set of songs from X-record; originally unlocked by playing either SOUND VOLTEX on the Valkyrie model, or beatmaniaIIDX on the Lightning model.<br>Enable this option to have them automatically unlocked and saved to your account.",
@@ -11,7 +12,8 @@
},
{
"id": "konasute",
"in_game_event": false,
"type": "gift",
"enabled": true,
"name": "グレイスからの挑戦状!! (GRACE kara no chousenjou!!)",
"info": [
"Enables unlock for the song 'ドゥサンコオデッセイ!!' by cosMo@暴走P upon logging in.<br>This song is originally unlocked by having played it first on the コナステ (Konasute) version of Sound Voltex.",
@@ -23,51 +25,73 @@
},
{
"id": "bpl2021",
"in_game_event": false,
"type": "cross_online",
"enabled": false,
"name": "BPL応援 楽曲解禁スタンプラリー (BPL ouen gakkyoku kaikin stamp rally)",
"info": "Songs in this event are originally unlocked by accessing the official BEMANI PRO LEAGUE 2021 website and obtaining the stamp by watching VODs of the BPL competition.<br>Enable this option to have them unlocked and saved to your account."
},
{
"id": "bsb2021",
"in_game_event": false,
"type": "cross_online",
"enabled": false,
"name": "BEMANI 2021真夏の歌合戦5番勝負 (BEMANI 2021 manatsu no utagassen 5 ban shoubu)",
"info": "This is a cross-BEMANI event. Songs are originally unlocked by playing participating BEMANI games and earn 'Yell' points.<br>Enable this option to have the songs unlocked and saved to your account."
},
{
"id": "sdvx10thstamp",
"in_game_event": true,
"type": "stamp",
"enabled": true,
"name": "SOUND VOLTEX 10th Anniversary",
"info": "Stamp event to unlock 7 songs.<br>Enable this option to enable this stamp event."
"info": "Stamp event to unlock 7 songs.<br>Toggle this on to enable this stamp event."
},
{
"id": "reflecstamp",
"in_game_event": true,
"type": "stamp",
"enabled": true,
"name": "REFLEC BEAT Song Stamp Event",
"info": "Stamp event to unlock 5 songs originally from the REFLEC BEAT game.<br>Enable this option to enable this stamp event."
"info": "Stamp event to unlock 5 songs originally from the REFLEC BEAT game series.<br>Toggle this on to enable this stamp event."
},
{
"id": "gmz2022",
"in_game_event": false,
"type": "cross_online",
"enabled": false,
"name": "いちかのごちゃまぜMix UP! (Ichika no gochamaze Mix UP! )",
"info": "This is a cross-BEMANI event. Songs include some that are shared from other BEMANI games and some that are mashup/remixes of the shared songs. These are originally unlocked by playing participating BEMANI games and earning points to fill different gauges.<br><br>Enable this option to have the songs unlocked and saved to your account."
},
{
"id": "bpl2022",
"in_game_event": false,
"type": "gift",
"enabled": true,
"name": "BEMANI PRO LEAGUE -SEASON 2-! Original Song",
"info": [
"Enable this option to have songs from the 1st week unlocked on the next login.<br>Otherwise, the songs are still unlockable through BLASTER GATE.",
"Enable this option to have songs from the 2nd week unlocked on the next login.<br>Otherwise, the songs are still unlockable through BLASTER GATE.",
"Enable this option to have songs from the 3rd week unlocked on the next login.<br>Otherwise, the songs are still unlockable through BLASTER GATE.",
"Enable this option to have songs from the 4th week unlocked on the next login.<br>Otherwise, the songs are still unlockable through BLASTER GATE.",
"Enable this option to have songs from the 5th week unlocked on the next login.<br>Otherwise, the songs are still unlockable through BLASTER GATE."
"Toggle to have songs from the 1st week unlocked on the next login.<br>Otherwise, the songs are still unlockable through BLASTER GATE.<br>Songs: 'Chat perché' and 'WINNING ROAD'",
"Toggle to have songs from the 2nd week unlocked on the next login.<br>Otherwise, the songs are still unlockable through BLASTER GATE.<br>Songs: 'ENDGAME' and 'ИADIR'",
"Toggle to have songs from the 3rd week unlocked on the next login.<br>Otherwise, the songs are still unlockable through BLASTER GATE.<br>Songs: 'Ice Fortress' and 'MURASAME'",
"Toggle to have songs from the 4th week unlocked on the next login.<br>Otherwise, the songs are still unlockable through BLASTER GATE.<br>Songs: 'Initiating League' and 'Scat Jazz Dance'",
"Toggle to have songs from the 5th week unlocked on the next login.<br>Otherwise, the songs are still unlockable through BLASTER GATE.<br>Songs: '最果ての勇者にラブソングを' and '灼ナル刃、破カヰ譜'",
"Toggle to have songs from the 6th week unlocked on the next login.<br>Otherwise, the songs are still unlockable through BLASTER GATE.<br>Songs: 'Fl0ating:' and 'Petit espoir'"
]
},
{
"id": "pcbevent",
"in_game_event": true,
"name": "PCB Stamp Event",
"info": "Stamp event to earn PCB.<br>Enable this option to enable this stamp event."
"type": "stamp",
"enabled": false,
"name": "PCBおかわりスタンプイベント | PCB Refill Stamp Event",
"info": "Stamp event to earn PCB. Once the stamp goal is complete, it will start over and you can earn more PCB.<br>Toggle this on to enable this stamp event."
},
{
"id": "2023stamp",
"type": "stamp",
"enabled": true,
"name": "んだんだぺったん☆二〇二三 | New Year 2023 Stamp Event",
"info": "Stamp event to unlock the んだんだぺったん☆二〇二三 appeal card.<br>Toggle this on to enable this stamp event."
},
{
"id": "himehina",
"type": "stamp",
"enabled": true,
"name": "HIMEHINAコラボイベント | HIMEHINA Collab Stamp Event",
"info": "Stamp event to unlock the HIMEHINA crew.<br>Toggle this on to enable this stamp event."
}
]
}
}
@@ -1,5 +0,0 @@
-
link(rel="stylesheet" href="static/asset/css/datatables.css")
div.main
script(src="static/asset/js/events.js")
@@ -1,80 +0,0 @@
-
link(rel="stylesheet" href="static/asset/css/datatables.css")
div
.card
.card-header
p.card-header-title
span.icon
i.mdi.mdi-account-edit
| Skill Analyzer Settings (WIP)
.card-content
div
div
p(style="display:inline") Select Game:
|
|
select(id='sdvx-version')
option() -- Select --
option(value='4') IV - Heavenly Haven
option(value='5') V - Vivid Wave
option(value='6') VI - Exceed Gear
// input(id='add-skill-level-input')
// button(id='add-skill-level-btn') +
div
p(style="display:inline") Skill course:
|
|
select(id='skill-course')
option() -- Select --
|
|
select(id='skill-course-level')
option() -- Select --
div
each val in [1, 2, 3]
br
p(style="display:inline") Track ##{val}:
|
|
|
input(class='track-id' maxlength="4" size="4" onkeyup="this.value = this.value.replace(/[^0-9]+/, '')")
|
|
|
input(class='track-name')
|
|
|
select(class='track-difficulty')
option() -- Select --
br
br
button(id='savebutton') Save
br
br
div
.card
.card-header
p.card-header-title
span.icon
i.mdi.mdi-account-edit
| Songs List
.card-content
table.table(id="songslist" style="width:100%")
thead
tr
th ID
th Song Name
th Release Date
th Novice
th Advanced
th Exhaust
th Maximum
th Other
tbody
script(src="static/asset/js/skillanalyzer.js")
script(src="static/asset/js/datatables.js")
script(src="static/asset/js/songslist.js")
+48
View File
@@ -0,0 +1,48 @@
-
link(rel="stylesheet" href="static/asset/css/datatables.css")
div
.card
.card-header
p.card-header-title
span.icon
i.mdi.mdi-star
| Stamp Events
.card-content
.field
.control
.select
select(name="stampevent_select" id="stampevent_select")
option(name="none" id="none") Select Stamp Event
.stamp.list
.card
.card-header
p.card-header-title
span.icon
i.mdi.mdi-star
| Gift Events
.card-content
.field
.control
.select
select(name="giftevent_select" id="giftevent_select")
option(name="none" id="none") Select Gift Event
.gift.list
.card
.card-header
p.card-header-title
span.icon
i.mdi.mdi-star
| Cross Events
.card-content
.field
.control
.select
select(name="crossevent_select" id="crossevent_select")
option(name="none" id="none") Select Cross Event
.cross.list
div.field.is-grouped
div.control.is-expanded
div.control
button.button.is-link(id="event-submit") Apply
script(src="static/asset/js/events.js")
@@ -1,65 +1,65 @@
div
.card
button.collapse() Notes
.card-info.collapsible-card
p.card-header-info
h5() Notes:
ul
li() For use with Exceed Gear arcade data.
li() Use this if you have arcade data that can be used. It wouldn't work otherwise.
li() Make sure you have your 'Exceed Gear Data Directory' in the plugin settings properly configured.
li() Update your datacode in the ea3-config.xml file.
br
p.card-header-bgm-guide
h5() BGM asset guide
p() This feature pulls BGM files from the data, however they are in unplayable s3p format. For BGM preview to work, we need to extract the audio files from the s3p, and convert it to mp3.
p() For Windows, there is a bgm_convert.bat script in the SDVX plugin root directory but it requires 2 things:
ul
li() <a href="https://github.com/mon/s3p_extract/releases/latest">s3p_extract</a> - download the .exe file from the latest release and put in the same directory as the bat script
li() <a href="https://www.gyan.dev/ffmpeg/builds/">ffmpeg</a> - download and extract ffmpeg.exe and put it in the same directory as the bat script (or put ffmpeg.exe in PATH environment variable)
.card
.card-header
p.card-header-title
span.icon
i.mdi.mdi-account-edit
| Update WebUI Resources (pull from game files)
.card-content
.field
button.button.is-primary(type="update" id="updateResources")
span.icon
i.mdi.mdi-check
span Update
.field
textarea.log-field(rows="50" id="logtextarea" name="logtextarea" disabled)
script(src="https://requirejs.org/docs/release/2.3.5/minified/require.js")
script(type="text/javascript" src="static/asset/js/updateResources.js")
style(type='text/css').
.collapse {
background-color: #4a4a4a;
color: white;
padding: 18px;
width: 100%;
border: none;
text-align: left;
outline: none;
font-size: 20px;
}
.collapse:hover {
background-color: #777;
}
.collapsible-card {
padding:15px;
}
.log-field {
width: 100%;
height: 100%;
background: #4a4a4a;
color: #ffffff;
border-radius: 6px;
padding: 5px;
font-size: 15px;
div
.card
button.collapse() Notes
.card-info.collapsible-card
p.card-header-info
h5() Notes:
ul
li() For use with Exceed Gear arcade data.
li() Use this if you have arcade data that can be used. It wouldn't work otherwise.
li() Make sure you have your 'Exceed Gear Data Directory' in the plugin settings properly configured.
li() Update your datacode in the ea3-config.xml file.
br
p.card-header-bgm-guide
h5() BGM asset guide
p() This feature pulls BGM files from the data, however they are in unplayable s3p format. For BGM preview to work, we need to extract the audio files from the s3p, and convert it to mp3.
p() For Windows, there is a bgm_convert.bat script in the SDVX plugin root directory but it requires 2 things:
ul
li() <a href="https://github.com/mon/s3p_extract/releases/latest">s3p_extract</a> - download the .exe file from the latest release and put in the same directory as the bat script
li() <a href="https://www.gyan.dev/ffmpeg/builds/">ffmpeg</a> - download and extract ffmpeg.exe and put it in the same directory as the bat script (or put ffmpeg.exe in PATH environment variable)
.card
.card-header
p.card-header-title
span.icon
i.mdi.mdi-account-edit
| Update WebUI Assets (pull from game files)
.card-content
.field
button.button.is-primary(type="update" id="updateResources")
span.icon
i.mdi.mdi-check
span Update
.field
textarea.log-field(rows="50" id="logtextarea" name="logtextarea" disabled)
script(src="https://requirejs.org/docs/release/2.3.5/minified/require.js")
script(type="text/javascript" src="static/asset/js/updateResources.js")
style(type='text/css').
.collapse {
background-color: #4a4a4a;
color: white;
padding: 18px;
width: 100%;
border: none;
text-align: left;
outline: none;
font-size: 20px;
}
.collapse:hover {
background-color: #777;
}
.collapsible-card {
padding:15px;
}
.log-field {
width: 100%;
height: 100%;
background: #4a4a4a;
color: #ffffff;
border-radius: 6px;
padding: 5px;
font-size: 15px;
}