mirror of
https://github.com/asphyxia-core/plugins.git
synced 2026-03-21 17:34:46 -05:00
Merge branch 'stable' of https://github.com/asphyxia-core/plugins into iidx
This commit is contained in:
commit
ebf56f009d
|
|
@ -11,11 +11,18 @@ Plugin Version: **v3.0.0**
|
|||
- pop'n music Usagi to Neko to Shōnen no Yume
|
||||
- pop'n music peace
|
||||
- pop'n music Kaimei riddles
|
||||
- pop'n music Unilab
|
||||
|
||||
Important : require minimum Asphyxia Core **v1.31**
|
||||
|
||||
## Changelog
|
||||
|
||||
### 4.0.0
|
||||
* Unilab: Support added
|
||||
* Lapistoria+ : Add Force Unlock
|
||||
* Remove non-core Asphyxia data import
|
||||
* Bugfix: Send correct number of Goods
|
||||
|
||||
### 3.0.0
|
||||
* Kaimei riddles: Support added
|
||||
* Usaneko: Add Daily Missions support
|
||||
|
|
@ -57,14 +64,6 @@ Update phase data : All versions are on latest phase.
|
|||
#### 1.0.0
|
||||
Initial Release.
|
||||
|
||||
## How to import data from non-core Asphyxia
|
||||
To import data, you have to :
|
||||
* Create your popn profile in Asphyxia-core. You just have to insert your card in the game and follow the process until coming to the select mode select screen. Once here, quit the game.
|
||||
* Create a backup of your savedata.db file (in case something goes wrong).
|
||||
* In the web UI of Asphyxia, go to POPN -> Profile and click detail on your profile
|
||||
* Put the content of your non-core asphyxia popn music files in the text fields (pop.json and popn_scores.json) and click Import.
|
||||
* Data is imported. Run the game, insert your card and your scores are available.
|
||||
|
||||
## Known limitations
|
||||
* No rival support for Tune Street
|
||||
* Some stats are not implemented
|
||||
|
|
@ -369,6 +369,18 @@ const getProfile = async (refid: string, name?: string) => {
|
|||
player.item.push(item);
|
||||
}
|
||||
|
||||
if(U.GetConfig("enable_force_unlock")) {
|
||||
for(let i = 1; i <= GAME_MAX_MUSIC_ID; i++) {
|
||||
player.item.push({
|
||||
type: K.ITEM('u8', 0),
|
||||
id: K.ITEM('u16', i),
|
||||
param: K.ITEM('u16', 15),
|
||||
is_new: K.ITEM('bool', 0),
|
||||
get_time: K.ITEM('u64', BigInt(0)),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// Add version specific datas
|
||||
const params = await utils.readParams(refid, version);
|
||||
utils.addExtraData(player, params, extraData);
|
||||
|
|
|
|||
|
|
@ -275,6 +275,18 @@ const getProfile = async (refid: string, name?: string) => {
|
|||
player.item.push(item);
|
||||
}
|
||||
|
||||
if(U.GetConfig("enable_force_unlock")) {
|
||||
for(let i = 1; i <= GAME_MAX_MUSIC_ID; i++) {
|
||||
player.item.push({
|
||||
type: K.ITEM('u8', 0),
|
||||
id: K.ITEM('u16', i),
|
||||
param: K.ITEM('u16', 15),
|
||||
is_new: K.ITEM('bool', 0),
|
||||
get_time: K.ITEM('u64', BigInt(0)),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// Add version specific datas
|
||||
const params = await utils.readParams(refid, version);
|
||||
utils.addExtraData(player, params, extraData);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { AchievementsUsaneko } from "../models/achievements";
|
||||
import { ExtraData, Params, Phase } from "../models/common";
|
||||
import { ExtraData, Phase } from "../models/common";
|
||||
import * as utils from "./utils";
|
||||
|
||||
export const setRoutes = () => {
|
||||
|
|
@ -37,7 +37,7 @@ const getInfoCommon = (req: EamuseInfo) => {
|
|||
}
|
||||
|
||||
// Choco
|
||||
for (let i = 1; i <= 5; ++i) {
|
||||
for (let i = 0; i < 5; ++i) {
|
||||
result.choco.push({
|
||||
choco_id: K.ITEM('s16', i),
|
||||
param: K.ITEM('s32', -1),
|
||||
|
|
@ -45,8 +45,8 @@ const getInfoCommon = (req: EamuseInfo) => {
|
|||
}
|
||||
|
||||
// Goods
|
||||
for (let i = 1; i <= 98; ++i) {
|
||||
let price = 200;
|
||||
for (let i = 0; i < GAME_MAX_DECO_ID[version]; ++i) {
|
||||
let price = 250;
|
||||
if (i < 15) {
|
||||
price = 30;
|
||||
} else if (i < 30) {
|
||||
|
|
@ -55,10 +55,12 @@ const getInfoCommon = (req: EamuseInfo) => {
|
|||
price = 60;
|
||||
} else if (i < 60) {
|
||||
price = 80;
|
||||
} else if (i < 98) {
|
||||
price = 200;
|
||||
}
|
||||
|
||||
result.goods.push({
|
||||
item_id: K.ITEM('s32', i),
|
||||
item_id: K.ITEM('s32', i + 1),
|
||||
item_type: K.ITEM('s16', 3),
|
||||
price: K.ITEM('s32', price),
|
||||
goods_type: K.ITEM('s16', 0),
|
||||
|
|
@ -66,13 +68,15 @@ const getInfoCommon = (req: EamuseInfo) => {
|
|||
}
|
||||
|
||||
// Area
|
||||
for (let i = 1; i <= 16; ++i) {
|
||||
result.area.push({
|
||||
area_id: K.ITEM('s16', i),
|
||||
end_date: K.ITEM('u64', BigInt(0)),
|
||||
medal_id: K.ITEM('s16', i),
|
||||
is_limit: K.ITEM('bool', 0),
|
||||
});
|
||||
if(version == 'v24') {
|
||||
for (let i = 0; i < 16; ++i) {
|
||||
result.area.push({
|
||||
area_id: K.ITEM('s16', i),
|
||||
end_date: K.ITEM('u64', BigInt(0)),
|
||||
medal_id: K.ITEM('s16', i),
|
||||
is_limit: K.ITEM('bool', 0),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// TODO : Course ranking
|
||||
|
|
@ -388,7 +392,7 @@ const getProfile = async (refid: string, version: string, name?: string) => {
|
|||
|
||||
// Add version specific datas
|
||||
let params = await utils.readParams(refid, version);
|
||||
utils.addExtraData(player, params, EXTRA_DATA);
|
||||
utils.addExtraData(player, params, getExtraData(version));
|
||||
|
||||
const achievements = <AchievementsUsaneko>await utils.readAchievements(refid, version, { ...defaultAchievements, version });
|
||||
|
||||
|
|
@ -462,6 +466,18 @@ const getProfile = async (refid: string, version: string, name?: string) => {
|
|||
});
|
||||
}
|
||||
|
||||
if(U.GetConfig("enable_force_unlock")) {
|
||||
for(let i = 1; i <= GAME_MAX_MUSIC_ID[version]; i++) {
|
||||
player.item.push({
|
||||
type: K.ITEM('u8', 0),
|
||||
id: K.ITEM('u16', i),
|
||||
param: K.ITEM('u16', 15),
|
||||
is_new: K.ITEM('bool', 0),
|
||||
get_time: K.ITEM('u64', BigInt(0)),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// Usaneko events
|
||||
if (version == 'v24') {
|
||||
const date = new Date();
|
||||
|
|
@ -542,6 +558,34 @@ const getProfile = async (refid: string, version: string, name?: string) => {
|
|||
}
|
||||
}
|
||||
|
||||
// Unilab events
|
||||
if (version == 'v27') {
|
||||
const teams = achievements.team || [];
|
||||
const batteries = achievements.battery || [];
|
||||
|
||||
player.event_p27.first_play = K.ITEM('bool', teams.length == 0);
|
||||
player.event_p27.elem_first_play = K.ITEM('bool', batteries.length == 0);
|
||||
|
||||
player.event_p27.team = [];
|
||||
for (const team of teams) {
|
||||
player.event_p27.team.push({
|
||||
team_id: K.ITEM('s16', team.team_id || 0),
|
||||
ex_no: K.ITEM('s16', team.ex_no || 0),
|
||||
point: K.ITEM('u32', team.point || 0),
|
||||
is_cleared: K.ITEM('bool', team.is_cleared || false),
|
||||
});
|
||||
};
|
||||
|
||||
player.event_p27.battery = [];
|
||||
for (const battery of batteries) {
|
||||
player.event_p27.battery.push({
|
||||
battery_id: K.ITEM('s16', battery.battery_id || 0),
|
||||
energy: K.ITEM('u32', battery.energy || 0),
|
||||
is_cleared: K.ITEM('bool', battery.is_cleared || false),
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
return player;
|
||||
}
|
||||
|
||||
|
|
@ -557,7 +601,7 @@ const write = async (req: EamuseInfo, data: any, send: EamuseSend): Promise<any>
|
|||
const params = await utils.readParams(refid, version);
|
||||
const achievements = <AchievementsUsaneko>await utils.readAchievements(refid, version, { ...defaultAchievements, version });
|
||||
|
||||
utils.getExtraData(data, params, EXTRA_DATA);
|
||||
utils.getExtraData(data, params, getExtraData(version, true));
|
||||
|
||||
// areas
|
||||
let areas = _.get(data, 'area', []);
|
||||
|
|
@ -753,6 +797,59 @@ const write = async (req: EamuseInfo, data: any, send: EamuseSend): Promise<any>
|
|||
}
|
||||
}
|
||||
|
||||
// Unilab (v27)
|
||||
if (version == 'v27') {
|
||||
let eventData = _.get(data, 'event_p27', []);
|
||||
let team = _.get(eventData, 'team', null);
|
||||
if(_.isPlainObject(team)) {
|
||||
if (_.isNil(achievements.team)) {
|
||||
achievements.team = [];
|
||||
}
|
||||
|
||||
const team_id = $(team).number('team_id');
|
||||
const ex_no = $(team).number('ex_no');
|
||||
const point = $(team).number('point');
|
||||
const is_cleared = $(team).bool('is_cleared');
|
||||
|
||||
let savedTeam = _.find(achievements.team, {'team_id': team_id});
|
||||
if(_.isUndefined(savedTeam)) {
|
||||
achievements.team.push({
|
||||
team_id,
|
||||
ex_no,
|
||||
point,
|
||||
is_cleared
|
||||
});
|
||||
} else {
|
||||
savedTeam.ex_no = ex_no;
|
||||
savedTeam.point = point;
|
||||
savedTeam.is_cleared = is_cleared;
|
||||
}
|
||||
}
|
||||
|
||||
let battery = _.get(eventData, 'battery', null);
|
||||
if(_.isPlainObject(battery)) {
|
||||
if (_.isNil(achievements.battery)) {
|
||||
achievements.battery = [];
|
||||
}
|
||||
|
||||
const battery_id = $(battery).number('battery_id');
|
||||
const energy = $(battery).number('energy');
|
||||
const is_cleared = $(battery).bool('is_cleared');
|
||||
|
||||
let savedBattery = _.find(achievements.battery, {'battery_id': battery_id});
|
||||
if(_.isUndefined(savedBattery)) {
|
||||
achievements.battery.push({
|
||||
battery_id,
|
||||
energy,
|
||||
is_cleared
|
||||
});
|
||||
} else {
|
||||
savedBattery.energy = energy;
|
||||
savedBattery.is_cleared = is_cleared;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
await utils.writeParams(refid, version, params);
|
||||
await utils.writeAchievements(refid, version, achievements);
|
||||
|
||||
|
|
@ -794,6 +891,9 @@ const friend = async (req: EamuseInfo, data: any, send: EamuseSend): Promise<any
|
|||
const getPhase = (version: String): Phase[] => {
|
||||
let phase = [];
|
||||
switch(version) {
|
||||
case 'v27':
|
||||
phase = PHASE['v27'];
|
||||
break;
|
||||
case 'v26':
|
||||
phase = PHASE['v26'];
|
||||
case 'v25':
|
||||
|
|
@ -804,6 +904,23 @@ const getPhase = (version: String): Phase[] => {
|
|||
return _.sortBy(phase, 'id');
|
||||
}
|
||||
|
||||
const getExtraData = (version: String, full: boolean = false): ExtraData => {
|
||||
let extraData = EXTRA_DATA_COMMON;
|
||||
if (full) {
|
||||
extraData = _.merge(extraData, EXTRA_DATA_V27, EXTRA_DATA_V26);
|
||||
} else {
|
||||
switch(version) {
|
||||
case 'v27':
|
||||
extraData = _.merge(extraData, EXTRA_DATA_V27);
|
||||
break;
|
||||
case 'v26':
|
||||
extraData = _.merge(extraData, EXTRA_DATA_V26);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return extraData;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
let isOmni = false;
|
||||
|
|
@ -814,9 +931,11 @@ const getVersion = (req: EamuseInfo): string => {
|
|||
}
|
||||
|
||||
const date: number = parseInt(req.model.match(/:(\d*)$/)[1]);
|
||||
if (date > 2020120900) {
|
||||
if (date >= 2022091300) {
|
||||
return 'v27';
|
||||
} else if (date >= 2021042600 && date < 2022091300) {
|
||||
return 'v26';
|
||||
} else if (date >= 2018101700 && date <= 2020120900) {
|
||||
} else if (date >= 2018101700 && date < 2021042600 ) {
|
||||
return 'v25';
|
||||
} else {
|
||||
return 'v24';
|
||||
|
|
@ -826,7 +945,15 @@ const getVersion = (req: EamuseInfo): string => {
|
|||
const GAME_MAX_MUSIC_ID = {
|
||||
v24: 1704,
|
||||
v25: 1877,
|
||||
v26: 2019
|
||||
v26: 2019,
|
||||
v27: 2188
|
||||
}
|
||||
|
||||
const GAME_MAX_DECO_ID = {
|
||||
v24: 97,
|
||||
v25: 133,
|
||||
v26: 133,
|
||||
v27: 81
|
||||
}
|
||||
|
||||
const defaultAchievements: AchievementsUsaneko = {
|
||||
|
|
@ -840,64 +967,71 @@ const defaultAchievements: AchievementsUsaneko = {
|
|||
stamps: {},
|
||||
riddles: {},
|
||||
missions: {},
|
||||
team: [],
|
||||
battery: []
|
||||
}
|
||||
|
||||
const PHASE = {
|
||||
v24: [
|
||||
{ id: 0, p: 11 }, // Default song phase availability (0-11)
|
||||
{ id: 1, p: 2 },
|
||||
{ id: 2, p: 2 },
|
||||
{ id: 3, p: 4 },
|
||||
{ id: 4, p: 1 },
|
||||
{ id: 5, p: 0 }, // Enable Net Taisen (0-1)
|
||||
{ id: 6, p: 1 }, // Enable NAVI-kun shunkyoku toujou, allows song 1608 to be unlocked (0-1)
|
||||
{ id: 7, p: 1 },
|
||||
{ id: 8, p: 2 },
|
||||
{ id: 9, p: 2 }, // Daily Mission (0-2)
|
||||
{ id: 0, p: 11 }, // Default song phase availability (0-11)
|
||||
{ id: 1, p: 2 }, // Unknown event (0-2)
|
||||
{ id: 2, p: 2 }, // Holiday Greeting (0-2)
|
||||
{ id: 3, p: 4 }, // Unknown event (0-2)
|
||||
{ id: 4, p: 1 }, // Unknown event (0-1)
|
||||
{ id: 5, p: 0 }, // Enable Net Taisen (0-1)
|
||||
{ id: 6, p: 1 }, // Enable NAVI-kun shunkyoku toujou, allows song 1608 to be unlocked (0-1)
|
||||
{ id: 7, p: 1 }, // Unknown event (0-1)
|
||||
{ id: 8, p: 2 }, // Unknown event (0-2)
|
||||
{ id: 9, p: 2 }, // Daily Mission (0-2)
|
||||
{ id: 10, p: 15 }, // NAVI-kun Song phase availability (0-15)
|
||||
{ id: 11, p: 1 },
|
||||
{ id: 12, p: 2 },
|
||||
{ id: 13, p: 1 }, // Enable Pop'n Peace preview song (0-1)
|
||||
{ id: 11, p: 1 }, // Unknown event (0-1)
|
||||
{ id: 12, p: 2 }, // Unknown event (0-2)
|
||||
{ id: 13, p: 1 }, // Enable Pop'n Peace preview song (0-1)
|
||||
],
|
||||
v25: [
|
||||
{ id: 0, p: 23 },
|
||||
{ id: 1, p: 4 },
|
||||
{ id: 10, p: 30 },
|
||||
// New params
|
||||
{ id: 14, p: 39 },
|
||||
{ id: 15, p: 2 },
|
||||
{ id: 16, p: 3 },
|
||||
{ id: 17, p: 8 },
|
||||
{ id: 18, p: 1 },
|
||||
{ id: 19, p: 1 },
|
||||
{ id: 20, p: 13 },
|
||||
{ id: 21, p: 20 }, // pop'n event archive
|
||||
{ id: 22, p: 2 },
|
||||
{ id: 23, p: 1 },
|
||||
{ id: 24, p: 1 },
|
||||
{ id: 0, p: 23 }, // Default song phase availability (0-23)
|
||||
{ id: 1, p: 4 }, // Unknown event (0-4)
|
||||
{ id: 10, p: 30 }, // NAVI-kun Song phase availability (0-30)
|
||||
{ id: 14, p: 39 }, // Stamp Card Rally (0-39)
|
||||
{ id: 15, p: 2 }, // Unknown event (0-2)
|
||||
{ id: 16, p: 3 }, // Unknown event (0-3)
|
||||
{ id: 17, p: 8 }, // Unknown event (0-8)
|
||||
{ id: 18, p: 1 }, // FLOOR INFECTION event (0-1)
|
||||
{ id: 19, p: 1 }, // Pop'n music × NOSTALGIA kyouenkai (0-1)
|
||||
{ id: 20, p: 13 }, // Event archive (0-13)
|
||||
{ id: 21, p: 20 }, // Pop'n event archive (0-20)
|
||||
{ id: 22, p: 2 }, // バンめし♪ ふるさとグランプリ (0-2)
|
||||
{ id: 23, p: 1 }, // いちかのBEMANI投票選抜戦2019 (0-1)
|
||||
{ id: 24, p: 1 }, // ダンキラ!!! × pop'n music (0-1)
|
||||
],
|
||||
v26: [
|
||||
// Music phase
|
||||
// Phase 24: Seize The Day, 知りたい
|
||||
// Phase 25: Triple Cross
|
||||
// Phase 26: GO²TOS, Jailbreaker
|
||||
// Phase 27: Aftermath
|
||||
// Phase 28: 「Sweet Love」
|
||||
// Phase 29: GET WILD (UPPER), シュガーソングとビターステップ (UPPER)
|
||||
// Phase 30 (MAX): 群像夏
|
||||
{ id: 0, p: 30 },
|
||||
// New params
|
||||
{ id: 0, p: 30 }, // Music phase (0: No unlock, 1-30: steps)
|
||||
{ id: 25, p: 62 }, // M&N event (0: disable, 62: all characters)
|
||||
{ id: 26, p: 3 }, // Unknown event (0-3)
|
||||
{ id: 27, p: 2 }, // peace soundtrack hatsubai kinen SP (0: not started, 1: enabled, 2: ended)
|
||||
{ id: 28, p: 2 }, // MZD no kimagure tanteisha joshu (0: not started, 1: enabled, 2: ended)
|
||||
{ id: 29, p: 5 }, // Shutchou! pop'n quest Lively (0: not started, 1-4: step enabled, 5: ended)
|
||||
{ id: 30, p: 6 }, // Shutchou! pop'n quest Lively II (0: not started, 1-5: step enabled, 6: ended)
|
||||
{ id: 26, p: 3 }, // Unknown event (0-3)
|
||||
{ id: 27, p: 2 }, // peace soundtrack hatsubai kinen SP (0: not started, 1: enabled, 2: ended)
|
||||
{ id: 28, p: 2 }, // MZD no kimagure tanteisha joshu (0: not started, 1: enabled, 2: ended)
|
||||
{ id: 29, p: 5 }, // Shutchou! pop'n quest Lively (0: not started, 1-4: step enabled, 5: ended)
|
||||
{ id: 30, p: 6 }, // Shutchou! pop'n quest Lively II (0: not started, 1-5: step enabled, 6: ended)
|
||||
],
|
||||
v27: [
|
||||
{ id: 0, p: 6 }, // Music phase (0: No unlock, 1-6: steps)
|
||||
{ id: 1, p: 6 }, // Shutchou! pop'n quest Lively II (0: not started, 1-5: steps, 6: ended)
|
||||
{ id: 2, p: 4 }, // KAC 2023 (0/2/4: disabled, 1: Caldwell 99, 3: Hexer / mathematical good-bye)
|
||||
{ id: 3, p: 0 }, // Net Taisen (0: diabled, 1: enabled, 2: enabled + local)
|
||||
{ id: 4, p: 7 }, // Unknown event (0-7)
|
||||
{ id: 5, p: 48 }, // Narunaru♪ UniLab jikkenshitsu! event (0: not started, 1-47: steps, 48: ended)
|
||||
{ id: 6, p: 2 }, // Super Unilab BOOST! (0: disabled, 1: enabled, 2: ended)
|
||||
{ id: 7, p: 6 }, // Unknown event (0-6)
|
||||
{ id: 8, p: 2 }, // Unknown event (0-2)
|
||||
{ id: 9, p: 44 }, // Kakusei no Elem event (0: not started, 1-44: steps)
|
||||
{ id: 10, p: 1 }, // Awakening Elem (0: disabled, 1: enabled)
|
||||
{ id: 11, p: 2 }, // CanCan's Super Awakening Boost (0: disabled, 1: enabled, 2: ended)
|
||||
{ id: 12, p: 2 }, // Unknown event (0-2)
|
||||
{ id: 13, p: 2 }, // Unknown event (0-2)
|
||||
]
|
||||
}
|
||||
|
||||
const EXTRA_DATA: ExtraData = {
|
||||
|
||||
const EXTRA_DATA_COMMON: ExtraData = {
|
||||
play_id: { type: 's32', path: 'account', default: 0 },
|
||||
start_type: { type: 's8', path: 'account', default: 0 },
|
||||
tutorial: { type: 's16', path: 'account', default: -1 },
|
||||
|
|
@ -923,15 +1057,6 @@ const EXTRA_DATA: ExtraData = {
|
|||
player_point: { type: 's32', path: 'account', default: 300 },
|
||||
power_point_list: { type: 's32', path: 'account', default: [0], isArray: true },
|
||||
|
||||
//v26
|
||||
card_again_count: { type: 's16', path: 'account', default: 0 },
|
||||
sp_riddles_id: { type: 's16', path: 'account', default: -1 },
|
||||
point: { type: 'u32', path: 'event2021', default: 0 }, // for peace soundtrack hatsubai kinen SP
|
||||
step: { type: 'u8', path: 'event2021', default: 0 }, // for Shutchou! pop'n quest Lively
|
||||
quest_point: { type: 'u32', path: 'event2021', default: Array(8).fill(0), isArray: true }, // for Shutchou! pop'n quest Lively
|
||||
step_nos: { type: 'u8', path: 'event2021', default: 0 }, // for Shutchou! pop'n quest Lively II
|
||||
quest_point_nos: { type: 'u32', path: 'event2021', default: Array(13).fill(0), isArray: true }, // for Shutchou! pop'n quest Lively II
|
||||
|
||||
mode: { type: 'u8', path: 'config', default: 0 },
|
||||
chara: { type: 's16', path: 'config', default: 0 },
|
||||
music: { type: 's16', path: 'config', default: 0 },
|
||||
|
|
@ -973,3 +1098,21 @@ const EXTRA_DATA: ExtraData = {
|
|||
comment_1: { type: 'u16', path: 'customize', default: 0 },
|
||||
comment_2: { type: 'u16', path: 'customize', default: 0 },
|
||||
}
|
||||
|
||||
const EXTRA_DATA_V26: ExtraData = {
|
||||
card_again_count: { type: 's16', path: 'account', default: 0 },
|
||||
sp_riddles_id: { type: 's16', path: 'account', default: -1 },
|
||||
point: { type: 'u32', path: 'event2021', default: 0 }, // for peace soundtrack hatsubai kinen SP
|
||||
step: { type: 'u8', path: 'event2021', default: 0 }, // for Shutchou! pop'n quest Lively
|
||||
quest_point: { type: 'u32', path: 'event2021', default: Array(8).fill(0), isArray: true }, // for Shutchou! pop'n quest Lively
|
||||
step_nos: { type: 'u8', path: 'event2021', default: 0 }, // for Shutchou! pop'n quest Lively II
|
||||
quest_point_nos: { type: 'u32', path: 'event2021', default: Array(13).fill(0), isArray: true }, // for Shutchou! pop'n quest Lively II
|
||||
}
|
||||
|
||||
const EXTRA_DATA_V27: ExtraData = {
|
||||
lift: { type: 'bool', path: 'option', default: 0 },
|
||||
lift_rate: { type: 's16', path: 'option', default: 0 },
|
||||
team_id: { type: 's16', path: 'event_p27', default: 0 },
|
||||
select_battery_id: { type: 's16', path: 'event_p27', default: 1 },
|
||||
today_first_play: { type: 'bool', path: 'event_p27', default: 1 },
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,32 +0,0 @@
|
|||
import { Profile, Scores } from "../models/common";
|
||||
|
||||
export const importPnmData = async (data: {
|
||||
refid: string;
|
||||
profile: string;
|
||||
scores: string;
|
||||
}) => {
|
||||
const profile = JSON.parse(data.profile);
|
||||
const scores = JSON.parse(data.scores);
|
||||
|
||||
await DB.Update<Profile>(
|
||||
data.refid,
|
||||
{ collection: 'profile' },
|
||||
{
|
||||
$set: {
|
||||
...profile
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
await DB.Upsert<Scores>(
|
||||
data.refid,
|
||||
{ collection: 'scores' },
|
||||
{
|
||||
$set: {
|
||||
scores: {
|
||||
...scores
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
};
|
||||
|
|
@ -4,7 +4,6 @@ import * as sunny from "./handler/sunny";
|
|||
import * as lapistoria from "./handler/lapistoria";
|
||||
import * as eclale from "./handler/eclale";
|
||||
import * as usaneko from "./handler/usaneko";
|
||||
import { importPnmData } from "./handler/webui";
|
||||
import { Rivals } from "./models/common";
|
||||
|
||||
const getVersion = (req: any) => {
|
||||
|
|
@ -30,7 +29,12 @@ export function register() {
|
|||
default: true,
|
||||
});
|
||||
|
||||
R.WebUIEvent('importPnmData', importPnmData);
|
||||
R.Config("enable_force_unlock", {
|
||||
name: "Unlock all songs",
|
||||
desc: "Force unlocking all songs (Lapistoria and later).",
|
||||
type: "boolean",
|
||||
default: true,
|
||||
});
|
||||
|
||||
R.WebUIEvent('updatePnmPlayerInfo', async (data: any) => {
|
||||
await DB.Update(data.refid, { collection: 'profile' }, { $set: { name: data.name } });
|
||||
|
|
|
|||
|
|
@ -122,4 +122,20 @@ export interface AchievementsUsaneko extends Achievements {
|
|||
other_count: number;
|
||||
};
|
||||
};
|
||||
|
||||
team: Team[];
|
||||
battery: Battery[]
|
||||
}
|
||||
|
||||
interface Team {
|
||||
team_id: number;
|
||||
ex_no: number;
|
||||
point: number;
|
||||
is_cleared: boolean;
|
||||
}
|
||||
|
||||
interface Battery {
|
||||
battery_id: number;
|
||||
energy: number;
|
||||
is_cleared: boolean;
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
$('#import-click').on('click', () => {
|
||||
data = {
|
||||
refid: $('#refid').val(),
|
||||
profile: $('#profile').val(),
|
||||
scores: $('#scores').val()
|
||||
}
|
||||
|
||||
emit('importPnmData', data).then(() => {
|
||||
$('#import-success').removeClass("is-hidden");
|
||||
});
|
||||
});
|
||||
|
|
@ -61,26 +61,4 @@ div
|
|||
div
|
||||
label There is a limit of 4 rivals maximum (only the 2 firsts will be used for Sunny Park and lower).
|
||||
div
|
||||
label The score sharing option also affect scores get from rivals.
|
||||
.card
|
||||
.card-header
|
||||
p.card-header-title
|
||||
span.icon
|
||||
i.mdi.mdi-account-edit
|
||||
| Import data
|
||||
.card-content
|
||||
.field
|
||||
label.label Import data from previous Asphyxia (non-core)
|
||||
.field
|
||||
input.input(type="text" id="profile" name="profile" placeholder="Put content of popn.json")
|
||||
.field
|
||||
input.input(type="text" id="scores" name="scores" placeholder="Put content of popn_scores.json")
|
||||
.field
|
||||
label.help.is-danger /!\ Please backup your savedata.db before importing data /!\
|
||||
.field
|
||||
button.button.is-primary#import-click
|
||||
span.icon
|
||||
i.mdi.mdi-file-import-outline
|
||||
span Import
|
||||
|
||||
script(src="static/js/profile_page.js")
|
||||
label The score sharing option also affect scores get from rivals.
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
export const EVENT6 = [
|
||||
export let EVENT6 = [
|
||||
'SERIALCODE_JP',
|
||||
'DEMOGAME_PLAY',
|
||||
'MATCHING_MODE',
|
||||
'MATCHING_MODE_FREE_IP',
|
||||
|
|
@ -39,13 +40,25 @@ export const EVENT6 = [
|
|||
'SUBBG_DISABLE',
|
||||
'NEMSYS_DISABLE',
|
||||
'S_PUC_EFFECT_ENABLE',
|
||||
'BEGINNER_MUSIC_FOLDER',
|
||||
'BEGINNER_MUSIC_FOLDER\t56,78,80,86,87,91,111,135,128,134,275,278,180,469,697,770,769,779,842,948,940,1057',
|
||||
'BEGINNER_MUSIC_FOLDER\t1056,1096,1062,932,1222,1136,1341,1297,1441,1472,1446,1455,1469,1475,1454,1449,1448,1540,1453,1456,1447,1451,1452,1480,1458,1457,1450,1657,1649,1471',
|
||||
'BEGINNER_MUSIC_FOLDER\t1735,1658,1756,1757,1754,1755,1758,1753,1749,1812,1820,1817,1741,1739,1740,1867,1871,1866,1872,1861,1858,1860,1862,1857,1903,1904,1859,1863,1856,1864,1865,1911,1916,1917,1914,1915,1918,1960',
|
||||
'PLAYER_RADAR_ENABLE',
|
||||
'SINGLE_BATTLE_ENABLE',
|
||||
// 'USE_CUDA_VIDEO_PRESENTER'
|
||||
// 'SUBMONITOR_VSYNC_ENABLE',
|
||||
'USE_CUDA_VIDEO_PRESENTER',
|
||||
'CHARACTER_IGNORE_DISABLE\t122,123,131,139,140,143,149,160,162,163',
|
||||
'SUBBG_IGNORE_DISABLE\t166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311',
|
||||
'SUBBG_IGNORE_DISABLE\t312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,369,370,371,372,373,374,375,376,377,378,379,380,381,419,420,421',
|
||||
'SUBBG_IGNORE_DISABLE\t422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,464,465,466,467,468,469,470,471,472,473,474,475,476,477,478,479,480,481,482',
|
||||
'STAMP_IGNORE_DISABLE\t273~312,773~820,993~1032,1245~1284,1469~1508',
|
||||
'HEXA_OVERDRIVE_ENABLE\t1,2,3,4,5,6,7,8,9,10,11,12',
|
||||
'TAMAADV_ENABLE',
|
||||
'CAMERA_CALIBRATION_TEST_MENU_ENABLE',
|
||||
'APRIL_RAINBOW_LINE_ACTIVE'
|
||||
];
|
||||
|
||||
export const COURSES6 = [
|
||||
export let COURSES6 = [
|
||||
{
|
||||
id: 1,
|
||||
name: 'SKILL ANALYZER 第1回 Aコース',
|
||||
|
|
@ -2818,7 +2831,7 @@ export const COURSES6 = [
|
|||
}
|
||||
];
|
||||
|
||||
export const SDVX_AUTOMATION_SONGS = [
|
||||
export let SDVX_AUTOMATION_SONGS = [
|
||||
1,
|
||||
2,
|
||||
3,
|
||||
|
|
@ -2893,6 +2906,7 @@ export const SDVX_AUTOMATION_SONGS = [
|
|||
228,
|
||||
229,
|
||||
239,
|
||||
241,
|
||||
247,
|
||||
250,
|
||||
251,
|
||||
|
|
@ -2940,6 +2954,7 @@ export const SDVX_AUTOMATION_SONGS = [
|
|||
376,
|
||||
377,
|
||||
381,
|
||||
390,
|
||||
393,
|
||||
398,
|
||||
408,
|
||||
|
|
@ -3051,7 +3066,7 @@ export const SDVX_AUTOMATION_SONGS = [
|
|||
787,
|
||||
];
|
||||
|
||||
export const SDVX_AUTOMATION_SONGS_2 = [
|
||||
export let SDVX_AUTOMATION_SONGS_2 = [
|
||||
788,
|
||||
789,
|
||||
790,
|
||||
|
|
@ -3284,7 +3299,7 @@ export const SDVX_AUTOMATION_SONGS_2 = [
|
|||
1280,
|
||||
]
|
||||
|
||||
const SDVX_AUTOMATION_SONGS_3 = [
|
||||
export let SDVX_AUTOMATION_SONGS_3 = [
|
||||
1281,
|
||||
1282,
|
||||
1300,
|
||||
|
|
@ -3504,8 +3519,7 @@ const SDVX_AUTOMATION_SONGS_3 = [
|
|||
99004,
|
||||
]
|
||||
|
||||
|
||||
export const EXTENDS6 = [
|
||||
export let EXTENDS6 = [
|
||||
{
|
||||
id: 91,
|
||||
type: 17,
|
||||
|
|
@ -3553,9 +3567,26 @@ export const EXTENDS6 = [
|
|||
'',
|
||||
'',
|
||||
],
|
||||
},
|
||||
{
|
||||
id: 94,
|
||||
type: 20,
|
||||
params: [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
'0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
],
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
var ITEM_TYPE_CREW = 11
|
||||
var ITEM_TYPE_APPEAL = 15
|
||||
var ITEM_TYPE_STAMP = 17
|
||||
|
|
|
|||
3522
sdvx@asphyxia/data/exg_data.json
Normal file
3522
sdvx@asphyxia/data/exg_data.json
Normal file
File diff suppressed because it is too large
Load Diff
|
|
@ -1,5 +1,6 @@
|
|||
import { EVENT6, COURSES6, EXTENDS6, VALGENE6 } from '../data/exg';
|
||||
import {getVersion, getRandomIntInclusive} from '../utils';
|
||||
import fs from 'fs';
|
||||
|
||||
export const informationString =
|
||||
`[sz:120] [olc:555555][ol:4][c:ff3333,3333ff,77ff77]Asphyxia
|
||||
|
|
@ -32,17 +33,15 @@ export const common: EPR = async (info, data, send) => {
|
|||
let courses = [];
|
||||
let extend = [];
|
||||
console.log("Calling common function");
|
||||
|
||||
const version = parseInt(info.model.split(":")[4]);
|
||||
let exg_data_json = JSON.parse(fs.readFileSync('./plugins/sdvx@asphyxia/data/exg_data.json', 'utf8'));
|
||||
|
||||
events = EVENT6;
|
||||
courses = COURSES6;
|
||||
// EXTENDS6.forEach(val => extend.push(Object.assign({}, val)));
|
||||
extend = EXTENDS6;
|
||||
extend = extend.concat(exg_data_json.extends_data);
|
||||
// extend = extend.concat(exg_data.extends_data);
|
||||
|
||||
switch (info.method) {
|
||||
case 'sv6_common': {
|
||||
events = EVENT6;
|
||||
courses = COURSES6;
|
||||
EXTENDS6.forEach(val => extend.push(Object.assign({}, val)));
|
||||
break;
|
||||
}
|
||||
}
|
||||
let songs = [];
|
||||
|
||||
if (U.GetConfig('unlock_all_songs')) {
|
||||
|
|
@ -258,8 +257,8 @@ export const common: EPR = async (info, data, send) => {
|
|||
season: K.ITEM('s32',3),
|
||||
rule: K.ITEM('s32',0),
|
||||
rank_match_target: K.ARRAY('s32', [
|
||||
1,1,1,1,
|
||||
1,1,1,1,
|
||||
2,2,2,2,
|
||||
2,2,2,2,
|
||||
1,1,1,1,
|
||||
1,1,1,1,
|
||||
0,0,0,0,
|
||||
|
|
@ -286,6 +285,9 @@ export const common: EPR = async (info, data, send) => {
|
|||
item_type: K.ITEM('s32', c.item_type),
|
||||
item_id: K.ITEM('s32', c.item_id),
|
||||
})),
|
||||
},
|
||||
invest:{
|
||||
limit_date: K.ITEM('u64',BigInt(newTime)),
|
||||
}
|
||||
},
|
||||
{ encoding: 'utf8' }
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ function unlockNavigators(items: Partial<Item>[]) {
|
|||
console.log("Unlocking Navigators");
|
||||
// 10 genesis card for MITSURU's voice
|
||||
items.push({ type: 4, id: 599, param: 10 });
|
||||
// items.push({ type: 21, id: 1, param: 1 });
|
||||
return items;
|
||||
}
|
||||
|
||||
|
|
@ -29,6 +30,16 @@ function unlockAppealCards(items: Partial<Item>[]) {
|
|||
return items;
|
||||
}
|
||||
|
||||
function unlock_all_valkgen(items: Partial<Item>[]) {
|
||||
// for (let i = 0; i < 500; ++i) items.push({ type: 17, id: i, param: 1 }); // stamp
|
||||
// for (let i = 0; i < 600; ++i) items.push({ type: 18, id: i, param: 1 }); // subbg
|
||||
// for (let i = 0; i < 100; ++i) items.push({ type: 19, id: i, param: 1 }); // bgm
|
||||
// for (let i = 0; i < 100; ++i) items.push({ type: 20, id: i, param: 1 }); // nemsys
|
||||
// for (let i = 0; i < 30; ++i) items.push({ type: 21, id: i, param: 1 }); // mainbg
|
||||
|
||||
return items;
|
||||
}
|
||||
|
||||
export const loadScore: EPR = async (info, data, send) => {
|
||||
console.log("Now loading score");
|
||||
const version = Math.abs(getVersion(info));
|
||||
|
|
@ -364,6 +375,7 @@ export const load: EPR = async (info, data, send) => {
|
|||
|
||||
let tempItem = U.GetConfig('unlock_all_navigators') ? unlockNavigators(items) : items;
|
||||
tempItem = U.GetConfig('unlock_all_appeal_cards') ? unlockAppealCards(tempItem) : tempItem;
|
||||
tempItem = unlock_all_valkgen(tempItem);
|
||||
|
||||
// Make generator power always 100%,
|
||||
for (let i = 0; i < 50; i++) {
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@ import { Mix } from '../models/mix';
|
|||
import { fstat } from 'fs';
|
||||
import { error } from 'console';
|
||||
import { setMaxIdleHTTPParsers } from 'http';
|
||||
import { unpackS3P } from '../s3p';
|
||||
import { secureHeapUsed } from 'crypto';
|
||||
|
||||
export const updateProfile = async (data: {
|
||||
refid: string;
|
||||
|
|
@ -203,7 +205,7 @@ export const deleteMix = async (data: { code: string }) => {
|
|||
|
||||
export const make_hexa_easier = async(data:{
|
||||
refid:string;
|
||||
}) => {
|
||||
}, send: WebUISend) => {
|
||||
let all_hexa = await DB.Find<Item>(data.refid, { collection: 'item' ,type:16 })
|
||||
let playedNum = [] // Prevent previous unlocked hexa from being locked again
|
||||
all_hexa.forEach((item:Item)=>{
|
||||
|
|
@ -213,7 +215,7 @@ export const make_hexa_easier = async(data:{
|
|||
}
|
||||
});
|
||||
|
||||
for(let i = 1; i <= 50; i++){ // Hexa Diver 7, up to id = 50
|
||||
for(let i = 1; i <= 71; i++){ // Hexa Diver 7, up to id = 50
|
||||
if(!playedNum.includes(i)){
|
||||
await DB.Upsert<Item>(
|
||||
data.refid,
|
||||
|
|
@ -222,19 +224,29 @@ export const make_hexa_easier = async(data:{
|
|||
)
|
||||
}
|
||||
}
|
||||
|
||||
send.json({status:"ok"})
|
||||
}
|
||||
|
||||
export const converted_received = async (data: { zip_file:any }, send: WebUISend) => {
|
||||
|
||||
}
|
||||
|
||||
|
||||
export const import_assets = async (data: { path: string }, send: WebUISend) => {
|
||||
|
||||
// await init(wasmUrl);
|
||||
// let ffmpeg = await Wasmer.fromRegistry("wasmer/ffmpeg");
|
||||
let Admzip = require('../../_shared/lib/adm-zip')
|
||||
let path = data.path
|
||||
console.log(path)
|
||||
let fs = require('fs')
|
||||
if (!fs.existsSync(path + '/data/graphics/')) {
|
||||
console.log('Path does not exist.')
|
||||
send.error(400,'Path does not exist.')
|
||||
console.log('Path for Graphics does not exist.')
|
||||
send.error(400,'Path for Graphics does not exist.')
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
await fs.promises.cp(path + "/data/graphics/ap_card", './plugins/sdvx@asphyxia/webui/asset/ap_card', {recursive: true}).catch((err: any) => {
|
||||
console.log(err)
|
||||
})
|
||||
|
|
@ -247,6 +259,210 @@ export const import_assets = async (data: { path: string }, send: WebUISend) =>
|
|||
await fs.promises.cp(path + "/data/graphics/submonitor_bg", './plugins/sdvx@asphyxia/webui/asset/submonitor_bg', {recursive: true}).catch((err: any) => {
|
||||
console.log(err)
|
||||
})
|
||||
console.log('Assets imported.')
|
||||
send.json({status:"ok"})
|
||||
|
||||
if (!fs.existsSync(path + '/data/sound/')) {
|
||||
console.log('Path for sound does not exist.')
|
||||
send.error(400,'Path for sound does not exist.')
|
||||
return
|
||||
}
|
||||
|
||||
let zip = new Admzip()
|
||||
await fs.promises.readdir(path + "/data/sound/custom").then((files: any) => {
|
||||
// let file = files[0]
|
||||
console.log(files)
|
||||
|
||||
for(let i in files){
|
||||
let file = files[i]
|
||||
if(file.endsWith('.s3p')){
|
||||
fs.mkdirSync('./plugins/sdvx@asphyxia/webui/asset/temp/'+file, { recursive: true });
|
||||
// fs.mkdirSync('./plugins/sdvx@asphyxia/webui/asset/audio/'+file.substring(0, 9), { recursive: true });
|
||||
unpackS3P('./plugins/sdvx@asphyxia/webui/asset/temp/'+file, path + "/data/sound/custom/" + file, {})
|
||||
// fs.promises.readFileSync('./plugins/sdvx@asphyxia/webui/asset/temp/'+file+'/0.wma').then(async (data: any) => {
|
||||
// const instance = await ffmpeg.entrypoint.run({
|
||||
// args: ["-i", "-", "-f", "wav", "-"],
|
||||
// stdin: new Uint8Array(data),
|
||||
// });
|
||||
// const { stdout } = await instance.wait();
|
||||
// fs.writeFileSync('./plugins/sdvx@asphyxia/webui/asset/audio/'+file.substring(0, 9)+'/0.wav', stdout);
|
||||
|
||||
// })
|
||||
// exec(shell([ffmpeg, '-i', './plugins/sdvx@asphyxia/webui/asset/temp/'+file+'/0.wma', './plugins/sdvx@asphyxia/webui/asset/audio/'+file.substring(0, 9)+'/0.mp3']), (err: any, stdout: any, stderr: any) => {
|
||||
// console.log(err)
|
||||
// })
|
||||
|
||||
// exec(shell([ffmpeg, '-i', './plugins/sdvx@asphyxia/webui/asset/temp/'+file+'/1.wma', './plugins/sdvx@asphyxia/webui/asset/audio/'+file.substring(0, 9)+'/1.mp3']), (err: any, stdout: any, stderr: any) => {
|
||||
// console.log(err)
|
||||
// })
|
||||
|
||||
// if(fs.existsSync('./plugins/sdvx@asphyxia/webui/asset/temp/'+file+'/2.wma')){
|
||||
// exec(shell([ffmpeg, '-i', './plugins/sdvx@asphyxia/webui/asset/temp/'+file+'/2.wma', './plugins/sdvx@asphyxia/webui/asset/audio/'+file.substring(0, 9)+'/2.mp3']), (err: any, stdout: any, stderr: any) => {
|
||||
// console.log(err)
|
||||
// })
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}).finally(() => {
|
||||
|
||||
zip.addLocalFolder('./plugins/sdvx@asphyxia/webui/asset/temp', 'temp')
|
||||
zip.writeZip('./plugins/sdvx@asphyxia/webui/asset/temp.zip')
|
||||
})
|
||||
|
||||
await fs.promises.rm('./plugins/sdvx@asphyxia/webui/asset/temp', { recursive: true, force: true }).catch((err: any) => {
|
||||
console.log(err)
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
console.log('Assets imported. Now converting audio files on browser...')
|
||||
send.file('webui/asset/temp.zip')
|
||||
|
||||
// fs.promises.rm('./plugins/sdvx@asphyxia/webui/asset/temp.zip', { force: true }).catch((err: any) => {
|
||||
// console.log(err)
|
||||
// })
|
||||
// send.json({status:"ok"})
|
||||
};
|
||||
|
||||
export const update_webui_nemsys_data = async (data: any, send: WebUISend) => {
|
||||
let string = data.file
|
||||
let nemsys_xml = U.parseXML(string)
|
||||
|
||||
const fs = require('fs')
|
||||
const filename = "../webui/asset/json/data.json"
|
||||
const datajson = require(filename)
|
||||
|
||||
nemsys_xml.custom_nemsys_data.info.filter((e: any) => e.id != 8 && e.id != 9 && e.id != 10 && e.id != 11).forEach((item: any) => {
|
||||
if(datajson.nemsys.filter((e: any) => e.value == item.id).length == 0){
|
||||
datajson.nemsys.push({
|
||||
value: item.id,
|
||||
name: item.texture_name
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
fs.writeFileSync("./plugins/sdvx@asphyxia/webui/asset/json/data.json", JSON.stringify(datajson, null, 2))
|
||||
send.json({status:"ok"})
|
||||
}
|
||||
|
||||
export const update_webui_stamp_data = async (data: any, send: WebUISend) => {
|
||||
let string = data.file
|
||||
let chat_stamp_xml = U.parseXML(string)
|
||||
|
||||
const fs = require('fs')
|
||||
const filename = "../webui/asset/json/data.json"
|
||||
const datajson = require(filename)
|
||||
|
||||
chat_stamp_xml.chat_stamp_data.info.forEach((item: any) => {
|
||||
if(datajson.stamp.filter((e: any) => e.value == item.id).length == 0){
|
||||
let addition = ""
|
||||
if(item.filename != ""){
|
||||
addition = item.filename.substring(item.filename.length - 2)
|
||||
}
|
||||
|
||||
datajson.stamp.push({
|
||||
value: item.id,
|
||||
name: item.title + " " +addition
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
fs.writeFileSync("./plugins/sdvx@asphyxia/webui/asset/json/data.json", JSON.stringify(datajson, null, 2))
|
||||
send.json({status:"ok"})
|
||||
}
|
||||
|
||||
export const update_webui_subbg_data = async (data: any, send: WebUISend) => {
|
||||
const fs = require('fs')
|
||||
const filename = "../webui/asset/json/data.json"
|
||||
const datajson = require(filename)
|
||||
|
||||
let subbg_folder = fs.readdirSync("./plugins/sdvx@asphyxia/webui/asset/submonitor_bg")
|
||||
let subbg_entry = {}
|
||||
subbg_folder.forEach((item: any) => {
|
||||
if(item.endsWith(".png")||item.endsWith(".mp4")){
|
||||
if(subbg_entry[item.substring(6, 10)] == undefined){
|
||||
subbg_entry[item.substring(6, 10)] = {"count":1, "video":false}
|
||||
}else{
|
||||
subbg_entry[item.substring(6, 10)]["count"] += 1
|
||||
}
|
||||
}
|
||||
if(item.endsWith(".mp4")){
|
||||
subbg_entry[item.substring(6, 10)]["video"] = true
|
||||
}
|
||||
})
|
||||
|
||||
console.log(JSON.stringify(subbg_entry, null, 2))
|
||||
|
||||
Object.keys(subbg_entry).forEach((item: any) => {
|
||||
if(datajson.subbg.filter((e: any) => e.value == item).length == 0){
|
||||
if(subbg_entry[item]["video"]){
|
||||
datajson.subbg.push({
|
||||
value: parseInt(item),
|
||||
name: "SubBG "+ item,
|
||||
video: true,
|
||||
})
|
||||
}else if(subbg_entry[item]["count"] > 1){
|
||||
datajson.subbg.push({
|
||||
value: parseInt(item),
|
||||
name: "SubBG "+ item,
|
||||
multi: true,
|
||||
})
|
||||
}else{
|
||||
datajson.subbg.push({
|
||||
value: parseInt(item),
|
||||
name: "SubBG "+ item,
|
||||
})
|
||||
}
|
||||
}else{
|
||||
if(subbg_entry[item]["video"]){
|
||||
datajson.subbg.forEach((e: any) => {
|
||||
if(e.value == parseInt(item)){
|
||||
e.video = true
|
||||
}
|
||||
})
|
||||
}else if(subbg_entry[item]["count"] > 1){
|
||||
datajson.subbg.forEach((e: any) => {
|
||||
if(e.value == parseInt(item)){
|
||||
e.multi = true
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
fs.writeFileSync("./plugins/sdvx@asphyxia/webui/asset/json/data.json", JSON.stringify(datajson, null, 2))
|
||||
send.json({status:"ok"})
|
||||
}
|
||||
|
||||
export const update_webui_bgm_data = async (data: any, send: WebUISend) => {
|
||||
const fs = require('fs')
|
||||
const filename = "../webui/asset/json/data.json"
|
||||
const datajson = require(filename)
|
||||
|
||||
let bgm_folder = fs.readdirSync("./plugins/sdvx@asphyxia/webui/asset/audio")
|
||||
let bgm_entry = []
|
||||
|
||||
bgm_folder.forEach((item: any) => {
|
||||
if(item.substring(0, 6) == "custom"){
|
||||
bgm_entry.push(parseInt(item.substring(item.length - 2)))
|
||||
}
|
||||
})
|
||||
|
||||
console.log(bgm_entry)
|
||||
|
||||
bgm_entry.forEach((item: any) => {
|
||||
if(datajson.bgm.filter((e: any) => e.value == item).length == 0){
|
||||
datajson.bgm.push({
|
||||
value: parseInt(item),
|
||||
name: "BGM "+ item,
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
fs.writeFileSync("./plugins/sdvx@asphyxia/webui/asset/json/data.json", JSON.stringify(datajson, null, 2))
|
||||
send.json({status:"ok"})
|
||||
}
|
||||
|
|
@ -9,7 +9,11 @@ import {
|
|||
importMix,
|
||||
deleteMix,
|
||||
make_hexa_easier,
|
||||
import_assets
|
||||
import_assets,
|
||||
update_webui_nemsys_data,
|
||||
update_webui_stamp_data,
|
||||
update_webui_subbg_data,
|
||||
update_webui_bgm_data
|
||||
// sendImg,
|
||||
// sendImgWithID,
|
||||
// getScore,
|
||||
|
|
@ -59,7 +63,7 @@ export function register() {
|
|||
R.Config('use_asphyxia_gameover',{ type: 'boolean', default: true, name:'Use Asphyxia Gameover', desc:'Enable the Asphyxia gameover message after ending the game.'})
|
||||
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: true, name:'Use New Year Special', desc:'Enable New Year Special BGM for login'});
|
||||
R.Config('music_count',{ type: 'integer', default: 2200, name:'Music Count', desc:'The total number of music in the game.'});
|
||||
R.Config('music_count',{ type: 'integer', default: 2200, name:'Music Count', desc:'The maximum id of music in the game.'});
|
||||
|
||||
R.WebUIEvent('updateProfile', updateProfile);
|
||||
R.WebUIEvent('updateMix', updateMix);
|
||||
|
|
@ -67,6 +71,10 @@ export function register() {
|
|||
R.WebUIEvent('deleteMix', deleteMix);
|
||||
R.WebUIEvent('easyHexa', make_hexa_easier);
|
||||
R.WebUIEvent('import_assets', import_assets);
|
||||
R.WebUIEvent('update_webui_nemsys', update_webui_nemsys_data);
|
||||
R.WebUIEvent('update_webui_chat_stamp', update_webui_stamp_data);
|
||||
R.WebUIEvent('update_webui_subbg', update_webui_subbg_data);
|
||||
R.WebUIEvent('update_webui_bgm', update_webui_bgm_data);
|
||||
|
||||
const MultiRoute = (method: string, handler: EPR | boolean) => {
|
||||
R.Route(`game.sv6_${method}`, handler);
|
||||
|
|
@ -127,6 +135,8 @@ export function register() {
|
|||
//logerrlevel: K.ITEM('s32', 0),
|
||||
//evtidnosendflg: K.ITEM('s32', 0)
|
||||
}));
|
||||
|
||||
|
||||
|
||||
|
||||
R.Unhandled();
|
||||
|
|
|
|||
|
|
@ -1,16 +0,0 @@
|
|||
- let music = 0;
|
||||
- let event = 0;
|
||||
- let catalog = 0;
|
||||
|
||||
game
|
||||
limited
|
||||
while music < 200
|
||||
music(id=music++, flag=2)
|
||||
|
||||
event
|
||||
while event < 16
|
||||
info(id=event++)
|
||||
|
||||
catalog
|
||||
while catalog < 256
|
||||
info(id=catalog++, currency=1, price=1)
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
game
|
||||
name(__type="str") #{name}
|
||||
code(__type="str") #{code}
|
||||
gamecoin_packet(__type="u32") #{packets}
|
||||
gamecoin_block(__type="u32") #{blocks}
|
||||
exp_point(__type="u32") #{expPoint ? expPoint : 0}
|
||||
m_user_cnt(__type="u32") #{mUserCnt ? mUserCnt : 0}
|
||||
have_item(__type="bool" __count=512) #{Array(512).fill(1).join(" ")}
|
||||
have_note(__type="bool" __count=512) #{Array(512).fill(1).join(" ")}
|
||||
|
||||
last(
|
||||
music_id=musicID,
|
||||
music_type=musicType,
|
||||
sort_type=sortType,
|
||||
headphone=headphone,
|
||||
hispeed=hiSpeed,
|
||||
appeal_id=appeal,
|
||||
frame0=boothFrame ? boothFrame[0] : 0,
|
||||
frame1=boothFrame ? boothFrame[1] : 0,
|
||||
frame2=boothFrame ? boothFrame[2] : 0,
|
||||
frame3=boothFrame ? boothFrame[3] : 0,
|
||||
frame4=boothFrame ? boothFrame[4] : 0,
|
||||
)
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
- let music = 0;
|
||||
- let event = 0;
|
||||
- let catalog = 0;
|
||||
|
||||
|
||||
game
|
||||
music_limited
|
||||
while music < 23
|
||||
each type in [0,1,2,3]
|
||||
info
|
||||
music_id(__type="s32") #{music++}
|
||||
music_type(__type="u8") #{type}
|
||||
limited(__type="u8") 3
|
||||
|
||||
event
|
||||
while event < 41
|
||||
info
|
||||
event_id(__type="u32") #{event++}
|
||||
|
||||
skill_course
|
||||
each course in courses
|
||||
info
|
||||
course_id(__type="s16") #{course.id}
|
||||
level(__type="s16") #{course.level}
|
||||
season_id(__type="s16") #{course.season_id}
|
||||
season_name(__type="str") #{course.season_name}
|
||||
season_new_flg(__type="bool") #{course.new_flg}
|
||||
course_name(_type="str") #{course.name}
|
||||
course_type(__type="s16") #{course.type}
|
||||
skill_name_id(__type="s16") #{course.name_id}
|
||||
matching_assist(__type="bool") #{course.matching_assist}
|
||||
guage_type(__type="s16") #{course.guage_type}
|
||||
paseli_type(type="s16") #{course.paseli_type}
|
||||
each trackinfo in course.tracks
|
||||
track
|
||||
track_no(__type="s16") #{trackinfo.no}
|
||||
music_id(__type="s32") #{trackinfo.id}
|
||||
music_type(__type="s8") #{trackinfo.type}
|
||||
|
|
@ -1,105 +0,0 @@
|
|||
game
|
||||
result(__type="u8") 0
|
||||
name(__type="str") #{name}
|
||||
code(__type="str") #{code}
|
||||
sdvx_id(__type="str") #{code}
|
||||
gamecoin_packet(__type="u32") #{packets}
|
||||
gamecoin_block(__type="u32") #{blocks}
|
||||
|
||||
|
||||
last
|
||||
music_id(__type="s32") #{musicID}
|
||||
music_type(__type="u8") #{musicType}
|
||||
sort_type(__type="u8") #{sortType}
|
||||
comment_id(__type="u16") 0
|
||||
appeal_id(__type="u16") #{appeal}
|
||||
headphone(__type="u8") #{headphone}
|
||||
narrow_down(__type="u8") #{narrowDown}
|
||||
gauge_option(__type="u8") #{gaugeOption}
|
||||
blaster_energy(__type="u32") #{blasterEnergy}
|
||||
blaster_count(__type="u32") #{blasterCount}
|
||||
extrack_energy(__type="u16") #{extrackEnergy}
|
||||
|
||||
hispeed(__type="s32") #{hiSpeed}
|
||||
lanespeed(__type="u32") #{laneSpeed}
|
||||
|
||||
ars_option(__type="u8") #{arsOption}
|
||||
notes_option(__type="u8") #{notesOption}
|
||||
early_late_disp(__type="u8") #{earlyLateDisp}
|
||||
draw_adjust(__type="s32") #{drawAdjust}
|
||||
eff_c_left(__type="u8") #{effCLeft}
|
||||
eff_c_right(__type="u8") #{effCRight}
|
||||
|
||||
|
||||
kac_id(__type="str") #{name}
|
||||
|
||||
skill_level(__type="s16") #{skill.level}
|
||||
skill_base_id(__type="s16") #{skill.base}
|
||||
skill_name_id(__type="s16") #{skill.name}
|
||||
|
||||
ea_shop
|
||||
packet_booster(__type="s32") 1
|
||||
if version < 5
|
||||
block_booster(__type="s32") 1
|
||||
if version >= 5
|
||||
blaster_pass_enable(__type="bool") 1
|
||||
blaster_pass_limit_date(__type="u64") #{currentTime}
|
||||
|
||||
eaappli
|
||||
relation(__type="s8") 1
|
||||
cloud
|
||||
relation(__type="s8") 1
|
||||
block_no(__type="s32") 0
|
||||
|
||||
skill
|
||||
course
|
||||
each course in courses
|
||||
d
|
||||
ssnid(__type="s16") #{course.sid}
|
||||
crsid(__type="s16") #{course.cid}
|
||||
sc(__type="s32") #{course.score}
|
||||
ex(__type="s32") 0
|
||||
ct(__type="s16") #{course.clear}
|
||||
gr(__type="s16") #{course.grade}
|
||||
ar(__type="s16") #{course.rate}
|
||||
cnt(__type="s16") #{course.count}
|
||||
course_total
|
||||
each course in courses
|
||||
d
|
||||
ssnid(__type="s16") #{course.sid}
|
||||
crsid(__type="s16") #{course.cid}
|
||||
sc(__type="s32") #{course.score}
|
||||
ex(__type="s32") 0
|
||||
ct(__type="s16") #{course.clear}
|
||||
gr(__type="s16") #{course.grade}
|
||||
ar(__type="s16") #{course.rate}
|
||||
cnt(__type="s16") #{course.count}
|
||||
course_all
|
||||
each course in courses
|
||||
d
|
||||
ssnid(__type="s16") #{course.sid}
|
||||
crsid(__type="s16") #{course.cid}
|
||||
sc(__type="s32") #{course.score}
|
||||
ex(__type="s32") 0
|
||||
ct(__type="s16") #{course.clear}
|
||||
gr(__type="s16") #{course.grade}
|
||||
ar(__type="s16") #{course.rate}
|
||||
cnt(__type="s16") #{course.count}
|
||||
|
||||
item
|
||||
each item in tempItem
|
||||
info
|
||||
type(__type="u8") #{item.type}
|
||||
id(__type="u32") #{item.id}
|
||||
param(__type="u32") #{item.param}
|
||||
|
||||
|
||||
play_count(__type="u32") 1001
|
||||
day_count(__type="u32") 301
|
||||
today_count(__type="u32") 21
|
||||
play_chain(__type="u32") 31
|
||||
max_play_chain(__type="u32") 31
|
||||
week_count(__type="u32") 9
|
||||
week_play_count(__type="u32") 101
|
||||
week_chain(__type="u32") 31
|
||||
max_week_chain(__type="u32") 31
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
game
|
||||
new
|
||||
each music in temp
|
||||
music
|
||||
music_id (__type="u32")#{music.mid}
|
||||
music_type (__type="u32")#{music.type}
|
||||
score (__type="u32")#{music.score}
|
||||
cnt (__type="u32")1
|
||||
clear_type (__type="u32")#{music.clear}
|
||||
score_grade (__type="u32")#{music.grade}
|
||||
btn_rate (__type="u32")#{music.buttonRate}
|
||||
long_rate (__type="u32")#{music.longRate}
|
||||
vol_rate (__type="u32")#{music.volRate}
|
||||
old
|
||||
Loading…
Reference in New Issue
Block a user