plugin update for 1115 - 1220 (+ more updates)

added pregene vol 1 + webui fixes

added events page to unlock various limited time events

missing files from last commit

added missing file for previous commits

sv6_save_e experimentations

bpl w5 event

readme update

minor fix

cleanup
This commit is contained in:
vvo
2023-01-06 22:17:55 +08:00
parent 1b3dacbd32
commit a0bb657783
12 changed files with 1546 additions and 1177 deletions
+17 -4
View File
@@ -1,8 +1,9 @@
Message from repo fork:
- I highly recommend using the official stable version of the plugin.
- If possible, update the "Exceed Gear Data Directory" option and run the [WebUI Resource Update](/plugin/sdvx@asphyxia/WebUI%20resource%20update)
- This is very work-in-progress, so expect things to break. Please **BACK UP YOUR DATA** to prevent unwanted data loss (just in case)
- I won't update the text below lol
- 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
@@ -29,6 +30,18 @@ The plugin now mainly maintained versions:
Change Log
===========
## 6.0.0-fork
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)
- [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)
## 6.0.0
1. Plugin version now follows the pattern (MAX SDVX VER,Plugin VER of supporting the MAX version of SDVX,hotfix).
+206 -30
View File
@@ -47,6 +47,7 @@ export const INFORMATION6 = {
'2022081600': ['[img:ver06/info_psd.ifs:hexa_diver_220714]', '[img:ver06/info_psd.ifs:hexa_diver_220818]'],
'2022083000': ['[img:ver06/info_psd.ifs:hexa_diver_220714]', '[img:ver06/info_psd.ifs:hexa_diver_220818]', '[img:ver06/info_psd.ifs:paseli_present_220901]'],
'2022101800': ['[img:ver06/info_psd.ifs:hexa_diver_220714]', '[img:ver06/info_psd.ifs:hexa_diver_220818]', '[img:ver06/info_psd.ifs:paseli_present_220901]'],
'2022122001': ['[img:info/konosuba_221006.png]', '[img:info/bemaniautumn_221101.png]', '[img:info/paseli_festival_221220.png]', '[img:info/pregene_kureha_221222.png]', '[img:info/voltefactory_221201.png]']
}
export const MISSINGSONGS6 = [
@@ -60,36 +61,125 @@ export const MISSINGSONGS6 = [
'1903', '1904', '1911', '1916', '1917'
]
export const XRECORDSONGS = [
// 1st edition
'1736', // discordia_penorerihumer
'1737', // chewingood_toriena
'1738', // verflucht_tirfing
// 2nd edition
'1848', // fegrix
'1847', // 2 beasts unchained
'1849', // piano kyousoukyoku
]
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
],
// Konaste songs
'konasute_1': [
'1762'
],
'konasute_2': [
'1763'
],
'konasute_3': [
'1764'
],
'konasute_4': [
'1765'
],
'konasute_5': [
'1811'
],
// BPL2021 songs
'bpl2021': [
'1808', '1809'
],
// BSB2021 songs
'bsb2021': [
'1802', '1803', '1804', '1805', '1806', '1807'
],
// SDVX 10th anniversary stamp event songs
'sdvx10thstamp': [
'1838', '1839', '1840', '1841', '1842', '1843', '1844'
],
// REFLECT BEAT stamp event songs
'reflecstamp': [
'1850', '1851', '1852', '1853', '1854'
],
// BEMANI ichika 2022 event songs
'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'
]
}
export const KONASTESONGS = [
'1762', '1763', '1764', '1765', '1811'
]
export const BEMANI2021EVENTSONGS = [
'1802', '1803', '1804', '1805', '1806', '1807'
]
export const BPLSTAMPRALLYSONGS = [
'1808', '1809'
]
export const SDVX10THSTAMPSONGS = [
'1838', '1839', '1840', '1841', '1842', '1843', '1844'
]
export const REFLECBEATSTAMPSONGS = [
'1850', '1851', '1852', '1853', '1854'
]
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
],
// BPL2021 songs
// 'bpl2021': [
// '1808', '1809'
// ],
// BSB2021 songs
'bsb2021': [
'1802', '1803', '1804', '1805', '1806', '1807'
],
// SDVX 10th anniversary stamp event songs
'sdvx10thstamp': [
'1838', '1839', '1840', '1841', '1842', '1843', '1844'
],
// REFLECT BEAT stamp event songs
'reflecstamp': [
'1850', '1851', '1852', '1853', '1854'
],
// BEMANI ichika 2022 event songs
'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'
]
}
export const APRILFOOLSSONGS = [
'840', '1219', '1751'
@@ -461,6 +551,83 @@ export const ARENA = {
param: 8,
},
],
},
'Set 5 (12/22/22)': {
details: {
// season: 4,
time_start: BigInt(Date.parse('22 Dec 2022 00:00:00 GMT')),
time_end: BigInt(Date.parse('31 Dec 2099 23:59:59 GMT')),
shop_start: BigInt(Date.parse('22 Dec 2022 00:00:00 GMT')),
shop_end: BigInt(Date.parse('31 Dec 2099 23:59:59 GMT')),
is_open: 1,
is_shop: 1
},
arena_items: [
{
catalog_id: 1,
catalog_type: 1,
price: 15000,
item_type: 11,
item_id: 112,
param: 1,
},
{
catalog_id: 1,
catalog_type: 1,
price: 8000,
item_type: 0,
item_id: 1745,
param: 23,
},
{
catalog_id: 1,
catalog_type: 1,
price: 8000,
item_type: 0,
item_id: 1742,
param: 23,
},
{
catalog_id: 1,
catalog_type: 1,
price: 8000,
item_type: 0,
item_id: 632,
param: 8,
},
{
catalog_id: 1,
catalog_type: 1,
price: 4000,
item_type: 0,
item_id: 37,
param: 8,
},
{
catalog_id: 1,
catalog_type: 1,
price: 4000,
item_type: 0,
item_id: 239,
param: 8,
},
{
catalog_id: 1,
catalog_type: 1,
price: 2000,
item_type: 0,
item_id: 111,
param: 8,
},
{
catalog_id: 1,
catalog_type: 1,
price: 2000,
item_type: 0,
item_id: 132,
param: 8,
}
]
}
// 'debug': {
// details: {
@@ -775,13 +942,22 @@ export const VALGENE = {
export const PREGENE = [
{
id: 1,
id: 0,
items: {
'crew': [131],
'stamp': [69, 70, 71, 72, 73, 74, 75, 76, 77, 78],
'subbg': [166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185]
},
probability: [0.01, 0.39, 0.6]
},
{
id: 1,
items: {
'crew': [134],
'stamp': [110, 111, 112, 113, 114, 115, 116, 117, 118, 119],
'subbg': [200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223]
},
probability: [0.01, 0.39, 0.6]
}
]
+17 -44
View File
@@ -1,9 +1,7 @@
import { EVENT4, COURSES4, EXTENDS4 } from '../data/hvn';
import { EVENT5, COURSES5, EXTENDS5 } from '../data/vvw';
import { EVENT6, COURSES6, EXTENDS6, APRILFOOLSSONGS, XRECORDSONGS,
KONASTESONGS, BEMANI2021EVENTSONGS, BPLSTAMPRALLYSONGS, SDVX10THSTAMPSONGS,
REFLECBEATSTAMPSONGS, VALKYRIEEXCLUSIVESONGS, MISSINGSONGS6, ARENA, VALGENE,
INFORMATION6
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';
@@ -89,7 +87,15 @@ export const common: EPR = async (info, data, send) => {
}
}
} else {
let RESTRICT_SONGS = KONASTESONGS.concat(BEMANI2021EVENTSONGS, BPLSTAMPRALLYSONGS, SDVX10THSTAMPSONGS, REFLECBEATSTAMPSONGS);
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;
@@ -98,7 +104,7 @@ export const common: EPR = async (info, data, send) => {
if(foundSongIndex != -1) {
var songData = mdb.mdb.music[foundSongIndex];
if(gameVersion === 6 || gameVersion === -6) {
if(!RESTRICT_SONGS.includes(i.toString())) {
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())) {
@@ -331,7 +337,7 @@ export const common: EPR = async (info, data, send) => {
})
})
if(U.GetConfig('april_fools') || currentDate.substring(0,3) === '4/1') {
if(currentDate.substring(0,3) === '4/1') {
console.log('Using April Fools Event')
events.push('APRIL_GRACE');
events.push('EVENTDATE_APRILFOOL');
@@ -346,11 +352,6 @@ export const common: EPR = async (info, data, send) => {
}
}
if(U.GetConfig('new_year_special')){
console.log('Using New Year Special BGM')
events.push('NEW_YEAR_2022');
}
send.object(
{
valgene: {
@@ -418,12 +419,6 @@ export const common: EPR = async (info, data, send) => {
},
{ encoding: 'utf8' }
);
// function(value) {
// },
// function(error) {
// console.log('read error: ' + error)
// }
} catch (error) {
console.log(error)
}
@@ -434,32 +429,10 @@ export const log: EPR = async (info, data, send) => {
}
export const unhandledt: EPR = async (info, data, send) => {
console.log("")
console.log("Unhandled: " + info.method + " | " + info.model + " | " + info.module)
console.log("Info:")
for (let key in info) {
type ObjectKey = keyof typeof info;
const myVar = key as ObjectKey;
if (typeof info[key] === 'object') {
console.log(key + ' - ' + JSON.stringify(info[key]));
} else console.log(key + ' - ' + info[key]);
}
console.log(JSON.stringify(info))
console.log(JSON.stringify(data))
console.log("")
console.log("Data:")
for (let key in data) {
type ObjectKey = keyof typeof data;
const myVar = key as ObjectKey;
if (typeof data[key] === 'object') {
console.log(key + ' - ' + JSON.stringify(data[key]));
} else console.log(key + ' - ' + data[key]);
}
console.log("")
console.log("Send:")
for (let key in send) {
type ObjectKey = keyof typeof send;
const myVar = key as ObjectKey;
if (typeof send[key] === 'object') {
console.log(key + ' - ' + JSON.stringify(send[key]));
} else console.log(key + ' - ' + send[key]);
}
console.log('')
return send.success()
}
File diff suppressed because it is too large Load Diff
+11 -5
View File
@@ -263,9 +263,9 @@ export const copyResourcesFromGame = async (data: {}) => {
'music': mdbJsonFix
}
};
IO.WriteFile('webui/asset/json/music_db.json', JSON.stringify(mdbJsonFixFinal));
IO.WriteFile('webui/asset/json/music_db.json', JSON.stringify(mdbJsonFixFinal, null, 4));
if(!IO.Exists('webui/asset/json/music_db_' + version + '.json')){
IO.WriteFile('webui/asset/json/music_db_' + version + '.json', JSON.stringify(mdbJsonFixFinal));
IO.WriteFile('webui/asset/json/music_db_' + version + '.json', JSON.stringify(mdbJsonFixFinal, null, 4));
}
} else {
@@ -438,8 +438,8 @@ export const copyResourcesFromGame = async (data: {}) => {
runErrors.push('[chat stamp] Error reading chat stamp xml file. Check your "Exceed Gear Data Directory" config.')
}
await IO.WriteFile('webui/asset/json/data.json', JSON.stringify(resourceJsonData))
await IO.WriteFile('webui/asset/json/appeal.json', JSON.stringify(apCardJsonData))
await IO.WriteFile('webui/asset/json/data.json', JSON.stringify(resourceJsonData, null, 4))
await IO.WriteFile('webui/asset/json/appeal.json', JSON.stringify(apCardJsonData, null, 4))
await IO.WriteFile('webui/asset/logs/copyResourcesFromGame.json', JSON.stringify({
akaname: newAkanames,
nemsys: newNemsysData,
@@ -452,7 +452,7 @@ export const copyResourcesFromGame = async (data: {}) => {
jsonSongs: newJsonSongs.sort((a, b) => a[0] - b[0]),
xcdSongs: newXCDSongs.sort((a, b) => a[0] - b[0]),
errors: runErrors
}))
}, null, 4))
}
export const preGeneRoll = async (data: {
@@ -523,3 +523,9 @@ export const preGeneRoll = async (data: {
}
} else console.log('pregeneset none')
}
export const manageEvents = async (data: {
eventConfig: {}
}) => {
IO.WriteFile('webui/asset/config/events.json', JSON.stringify(data.eventConfig, null, 4));
}
+133 -131
View File
@@ -1,131 +1,133 @@
import {common,log,unhandledt} from './handlers/common';
import {hiscore, rival, saveMix, loadMix, globalMatch} from './handlers/features';
import {
updateProfile,
updateMix,
importMix,
deleteMix,
copyResourcesFromGame,
preGeneRoll
} from './handlers/webui';
import {
load,
create,
loadScore,
save,
saveScore,
saveCourse,
buy,
print,
saveValgene,
} from './handlers/profiles';
import {
ARENA
} from './data/exg';
export function register() {
R.Contributor("LatoWolf#1170");
R.Contributor("ovv (this fork)");
R.GameCode('KFC');
R.Config('sdvx_eg_root_dir', { type: 'string', needRestart: true, default: '', name: 'Exceed Gear Data Directory', desc: 'The root directory of your SDVX Exceed Gear game files (for asset copying)'});
R.Config('unlock_all_valk_items', { type: 'boolean', default: false, name:'Unlock All Valkyrie and Premium Items', desc: 'Unlock Nemsys, BGM, Submonitor BG and Stamp Items (Valk crews not included; check \'unlock all navigators\' option)'});
R.Config('enable_valk_songs' ,{ type: 'boolean', default: false, name:'Enable Valkyrie Model Songs', desc:'Unlock the valkyrie model songs on non-valkyrie mode.'});
R.Config('arena_szn',{ type: 'string', options: Object.keys(ARENA), default: 'Set 1 (04/25/22)', name: 'Arena Station Item Set', desc: 'Choose which season set of items in the arena station you want to show up in arena station'});
R.Config('x_record', {type: 'boolean', default: false, name: 'X-Record', desc: 'Activates X-record. 10 VM and 1 LM points per play.'})
R.Config('unlock_all_songs', { type: 'boolean', default: false, name:'Unlock All Songs'});
R.Config('unlock_all_navigators', { type: 'boolean', default: false, name:'Unlock All Navigators'} );
R.Config('unlock_all_appeal_cards', { type: 'boolean', default: false, name:'Unlock All Appeal Cards'});
R.Config('use_blasterpass',{ type: 'boolean', default: true, name:'Use Blaster Pass', desc:'Enable Blaster Pass for VW and EG'});
R.Config('new_year_special',{ type: 'boolean', default: false, name:'Use New Year Special', desc:'Enable New Year Special BGM for login (doesn\'t work right now)'});
R.Config('april_fools',{ type: 'boolean', default: false, name:'April Fools', desc:'Enable April Fools Event (doesn\'t work properly right now)'});
R.Config('use_information' ,{ type: 'boolean', default: true, name:'Use Information', desc:'Enable the information section after entry.'});
R.Config('use_asphyxia_gameover',{ type: 'boolean', default: true, name:'Use Asphyxia Gameover', desc:'Enable the Asphyxia gameover message after ending the game.'})
R.WebUIEvent('copyResourcesFromGame', copyResourcesFromGame);
R.WebUIEvent('preGeneRoll', preGeneRoll);
R.WebUIEvent('updateProfile', updateProfile);
R.WebUIEvent('updateMix', updateMix);
R.WebUIEvent('importMix', importMix);
R.WebUIEvent('deleteMix', deleteMix);
const MultiRoute = (method: string, handler: EPR | boolean) => {
// Helper for register multiple versions.
R.Route(`game.${method}`, handler);
R.Route(`game_2.${method}`, handler);
//R.Route(`game_3.${method}`, handler);
R.Route(`game.sv4_${method}`, handler);
R.Route(`game.sv5_${method}`, handler);
R.Route(`game.sv6_${method}`, handler);
};
// Common
MultiRoute('common', common);
// Profile
MultiRoute('new', create);
MultiRoute('load', load);
MultiRoute('load_m', loadScore);
MultiRoute('save', save);
MultiRoute('save_m', saveScore);
MultiRoute('save_c', saveCourse);
MultiRoute('save_valgene', saveValgene);
MultiRoute('frozen', true);
MultiRoute('buy', buy);
MultiRoute('print',print);
// Features
MultiRoute('hiscore', hiscore);
MultiRoute('load_r', rival);
MultiRoute('save_ap', saveMix);
MultiRoute('load_ap', loadMix);
// Lazy
MultiRoute('lounge', (_, __, send) => send.object({
interval: K.ITEM('u32', 30)
}));
MultiRoute('shop', (_, __, send) => send.object({
nxt_time: K.ITEM('u32', 1000 * 5 * 60)
}));
MultiRoute('save_e', true);
MultiRoute('save_mega',true);
MultiRoute('play_e', true);
MultiRoute('play_s', true);
MultiRoute('entry_s', globalMatch);
MultiRoute('entry_e', true);
MultiRoute('exception', true);
MultiRoute('log',log);
/*
print_h
sample
save_campaign
save_fi
save_pb
save_valgene - DONE
serial
*/
R.Route('eventlog.write', (_, __, send) => send.object({
gamesession: K.ITEM('s64', BigInt(1)),
logsendflg: K.ITEM('s32', 0),
logerrlevel: K.ITEM('s32', 0),
evtidnosendflg: K.ITEM('s32', 0)
}));
R.Route('package.list',(_,__,send)=>send.object({
package:K.ATTR({expire:"1200"},{status:"1"})
}));
R.Route('ins.netlog', (_, __, send) => send.object({
//gamesession: K.ITEM('s64', BigInt(1)),
//logsendflg: K.ITEM('s32', 0),
//logerrlevel: K.ITEM('s32', 0),
//evtidnosendflg: K.ITEM('s32', 0)
}));
// R.Unhandled();
R.Unhandled(unhandledt);
}
import {common,log,unhandledt} from './handlers/common';
import {hiscore, rival, saveMix, loadMix, globalMatch} from './handlers/features';
import {
updateProfile,
updateMix,
importMix,
deleteMix,
copyResourcesFromGame,
preGeneRoll,
manageEvents
} from './handlers/webui';
import {
load,
create,
loadScore,
save,
saveScore,
saveCourse,
buy,
print,
saveValgene,
saveE
} from './handlers/profiles';
import {
ARENA
} from './data/exg';
export function register() {
R.Contributor("LatoWolf#1170");
R.Contributor("ovv (this fork)");
R.GameCode('KFC');
R.Config('arena_szn',{ type: 'string', options: Object.keys(ARENA), default: 'Set 1 (04/25/22)', name: 'Arena Station Item Set', desc: 'Choose which season set of items in the arena station you want to show up in arena station'});
R.Config('enable_valk_songs' ,{ type: 'boolean', default: false, name:'Enable Valkyrie Model Songs', desc:'Enable the valkyrie model songs on non-valkyrie mode.'});
// R.Config('new_year_special',{ type: 'boolean', default: false, name:'Use New Year Special', desc:'Enable New Year Special BGM for login (doesn\'t work right now)'});
// R.Config('april_fools',{ type: 'boolean', default: false, name:'April Fools', desc:'Enable April Fools Event (doesn\'t work properly right now)'});
R.Config('use_blasterpass',{ type: 'boolean', default: true, name:'Use Blaster Pass', desc:'Enable Blaster Pass for VW and EG'});
R.Config('unlock_all_valk_items', { type: 'boolean', default: false, name:'Unlock All Valkyrie and Premium Items', desc: 'Unlock Nemsys, BGM, Submonitor BG and Stamp Items (Valk crews not included; check \'unlock all navigators\' option)'});
R.Config('unlock_all_songs', { type: 'boolean', default: false, name:'Unlock All Songs'});
R.Config('unlock_all_navigators', { type: 'boolean', default: false, name:'Unlock All Navigators'} );
R.Config('unlock_all_appeal_cards', { type: 'boolean', default: false, name:'Unlock All Appeal Cards'});
R.Config('sdvx_eg_root_dir', { type: 'string', needRestart: true, default: '', name: 'Exceed Gear Data Directory', desc: 'The root directory of your SDVX Exceed Gear game files (for asset copying)'});
R.Config('use_information' ,{ type: 'boolean', default: true, name:'Use Information', desc:'Enable the information section after entry.'});
R.Config('use_asphyxia_gameover',{ type: 'boolean', default: true, name:'Use Asphyxia Gameover', desc:'Enable the Asphyxia gameover message after ending the game.'})
R.WebUIEvent('copyResourcesFromGame', copyResourcesFromGame);
R.WebUIEvent('preGeneRoll', preGeneRoll);
R.WebUIEvent('manageEvents', manageEvents);
R.WebUIEvent('updateProfile', updateProfile);
R.WebUIEvent('updateMix', updateMix);
R.WebUIEvent('importMix', importMix);
R.WebUIEvent('deleteMix', deleteMix);
const MultiRoute = (method: string, handler: EPR | boolean) => {
// Helper for register multiple versions.
R.Route(`game.${method}`, handler);
R.Route(`game_2.${method}`, handler);
//R.Route(`game_3.${method}`, handler);
R.Route(`game.sv4_${method}`, handler);
R.Route(`game.sv5_${method}`, handler);
R.Route(`game.sv6_${method}`, handler);
};
// Common
MultiRoute('common', common);
// Profile
MultiRoute('new', create);
MultiRoute('load', load);
MultiRoute('load_m', loadScore);
MultiRoute('save', save);
MultiRoute('save_m', saveScore);
MultiRoute('save_c', saveCourse);
MultiRoute('save_valgene', saveValgene);
MultiRoute('frozen', true);
MultiRoute('buy', buy);
MultiRoute('print',print);
// Features
MultiRoute('hiscore', hiscore);
MultiRoute('load_r', rival);
MultiRoute('save_ap', saveMix);
MultiRoute('load_ap', loadMix);
// Lazy
MultiRoute('lounge', (_, __, send) => send.object({
interval: K.ITEM('u32', 30)
}));
MultiRoute('shop', (_, __, send) => send.object({
nxt_time: K.ITEM('u32', 1000 * 5 * 60)
}));
MultiRoute('save_e', saveE);
MultiRoute('save_mega',true);
MultiRoute('play_e', true);
MultiRoute('play_s', true);
MultiRoute('entry_s', globalMatch);
MultiRoute('entry_e', true);
MultiRoute('exception', true);
MultiRoute('log',log);
/*
print_h
sample
save_campaign
save_fi
save_pb
save_valgene - DONE
serial
*/
R.Route('eventlog.write', (_, __, send) => send.object({
gamesession: K.ITEM('s64', BigInt(1)),
logsendflg: K.ITEM('s32', 0),
logerrlevel: K.ITEM('s32', 0),
evtidnosendflg: K.ITEM('s32', 0)
}));
R.Route('package.list',(_,__,send)=>send.object({
package:K.ATTR({expire:"1200"},{status:"1"})
}));
R.Route('ins.netlog', (_, __, send) => send.object({
//gamesession: K.ITEM('s64', BigInt(1)),
//logsendflg: K.ITEM('s32', 0),
//logerrlevel: K.ITEM('s32', 0),
//evtidnosendflg: K.ITEM('s32', 0)
}));
// R.Unhandled();
R.Unhandled(unhandledt);
}
+7
View File
@@ -72,6 +72,13 @@ game
id(__type="u32") #{song}
param(__type="u32") 1
present
each item in present
info
type(__type="u8") #{item.type}
id(__type="u32") #{item.id}
param(__type="u32") #{item.param}
param
each param in params
info
+108
View File
@@ -0,0 +1,108 @@
function generateEventToggles(eventInfo, eventConfig) {
let cardContent = $('<div class="card-content">')
if(!['bpl2022', 'konasute', 'xrecord'].includes(eventInfo['id'])) {
cardContent.append(
$('<div class="field is-horizontal">').append(
$('<div class="field-label is-normal"><label class="label" for="' + eventInfo['id'] + '">Enable</label></div>')
).append(
$('<div class="field-body"><div class="field"><div class="control"><label class="switch is-rounded"><input type="checkbox" ' + (eventConfig['toggle'] ? 'checked' : '') + ' name="' + eventInfo['id'] + '"><span class="check"></span></label></div><p class="help">' + eventInfo['info'] + '</p></div></div>')
)
)
} else {
for(const infoIter in eventInfo['info']) {
cardContent.append(
$('<div class="field is-horizontal">').append(
$('<div class="field-label is-normal"><label class="label" for="' + eventInfo['id'] + '_' + (parseInt(infoIter) + 1).toString() + '">Enable Set ' + (parseInt(infoIter) + 1).toString() + '</label></div>')
).append(
$('<div class="field-body"><div class="field"><div class="control"><label class="switch is-rounded"><input type="checkbox" ' + (eventConfig['toggle'][eventInfo['id'] + '_' + (parseInt(infoIter) + 1).toString()] ? 'checked' : '') + ' name="' + eventInfo['id'] + '_' + (parseInt(infoIter) + 1).toString() + '"><span class="check"></span></label></div><p class="help">' + eventInfo['info'][infoIter] + '</p></div></div>')
)
)
}
}
return cardContent
}
async function readEventsConfigFile() {
try {
return await $.getJSON("static/asset/config/events.json", function(data) {
return data
})
} catch {
return await generateNewEventsConfigFile()
}
}
async function readEventsJsonFile() {
return await $.getJSON("static/asset/json/events.json", function(data) {
return data
})
}
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()
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']])
)
}
}
$('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) {
for(const eventIter in eventData['events']) {
let toggle = true
if($(value).css('background-color').includes("54, 54, 54")) {
toggle = false
}
if(eventData['events'][eventIter]['id'] === $(value).parent().children('input').attr('name')) {
eventConfig[eventData['events'][eventIter]['id']]['toggle'] = toggle
} else if ($(value).parent().children('input').attr('name').includes(eventData['events'][eventIter]['id'])) {
eventConfig[eventData['events'][eventIter]['id']]['toggle'][[$(value).parent().children('input').attr('name')]] = toggle
}
}
})
await emit("manageEvents", {eventConfig: eventConfig}).then(
function(response) {
alert('saved')
},
function(error) {
console.log(error)
}
)
})
})
+6 -4
View File
@@ -53,8 +53,10 @@ async function loadItems(itemSet, gene_edition, items_crew, items_stamp, items_s
if(itemCounts[0] >= itemCounts[1]) $('#pregene-roll').attr('disabled', 'disabled')
$('.count').text('Unlocked items: ' + itemCounts[0] + "/" + itemCounts[1])
if(itemSet === 1) {
$('.setinfo').append('<p style="padding:5px">These items are only usable in Japan. Change region to Japan in the ea3-config.xml file.</p>')
if(itemSet === 0) {
$('.setinfo').append('<p class="jpn-excl" style="padding:5px">These items are only usable in Japan. Change region to Japan in the ea3-config.xml file.</p>')
} else {
$('.jpn-excl').remove()
}
if('crew' in geneItems.items) {
@@ -101,7 +103,7 @@ async function loadValgeneData(gene_edition) {
$('#set_select').append('<option value=' + valGeneData.pregene[pregeneDataIndex].id + '>' + valGeneData.pregene[pregeneDataIndex].name + '</option>')
}
}
$('#set_select').val($("#set_select option").length - 1)
}
$(document).ready(function() {
@@ -130,7 +132,7 @@ $(document).ready(function() {
let gene_edition = document.getElementById("generator-edition").innerText;
loadValgeneData(gene_edition)
loadItems(1, gene_edition, items_crew, items_stamp, items_subbg, items_bgm, items_nemsys)
$('#set_select').change(function() {
$('.count').text('')
$('.item_banners').empty()
@@ -0,0 +1,73 @@
{
"events": [
{
"id": "xrecord",
"in_game_event": 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.",
"2nd 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."
]
},
{
"id": "konasute",
"in_game_event": false,
"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.",
"Enables unlock for the song 'αzalea' by BlackY upon logging in.<br>This song is originally unlocked by having played it first on the コナステ (Konasute) version of Sound Voltex.",
"Enables unlock for the song 'BAYONEX' by かめりあ as \"Revenge of Riot\" upon logging in.<br>This song is originally unlocked by having played it first on the コナステ (Konasute) version of Sound Voltex.",
"Enables unlock for the song 'Reverenced Flower' by ぺのれり upon logging in.<br>This song is originally unlocked by having played it first on the コナステ (Konasute) version of Sound Voltex.",
"Enables unlock for the song '《Re:miniscence》' by かねこちはる upon logging in.<br>This song is originally unlocked by having played it first on the コナステ (Konasute) version of Sound Voltex."
]
},
{
"id": "bpl2021",
"in_game_event": 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,
"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,
"name": "SOUND VOLTEX 10th Anniversary",
"info": "Stamp event to unlock 7 songs.<br>Enable this option to enable this stamp event."
},
{
"id": "reflecstamp",
"in_game_event": 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."
},
{
"id": "gmz2022",
"in_game_event": 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,
"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."
]
},
{
"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."
}
]
}
@@ -1,13 +1,22 @@
{
"pregene": [
{
"id": 1,
"name": "Premium Generator 1 (Aqua Set)",
"id": 0,
"name": "Premium Generator (Aqua Set)",
"items": {
"crew": [131],
"stamp": [69, 70, 71, 72, 73, 74, 75, 76, 77, 78],
"subbg": [166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185]
}
},
{
"id": 1,
"name": "Premium Generator Vol. 1",
"items": {
"crew": [134],
"stamp": [110, 111, 112, 113, 114, 115, 116, 117, 118, 119],
"subbg": [200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223]
}
}
],
"valgene":[
@@ -0,0 +1,5 @@
-
link(rel="stylesheet" href="static/asset/css/datatables.css")
div.main
script(src="static/asset/js/events.js")