feat: add temporary changes

This commit is contained in:
Haoyu Xu
2023-05-02 22:28:10 -04:00
parent 13dde32a96
commit 326ac43cc1
18 changed files with 12344 additions and 304 deletions

View File

@@ -11,10 +11,10 @@ Since [ArknightsGameData](https://github.com/Kengxxiao/ArknightsGameData) failed
Version: `4th Anniversary`
- [ ] Operator: Muelsyse
- [ ] Skin: Born as One / Specter the Unchained
- [ ] Skin: Ten Thousand Mountains / Ch'en/Chen the Holungday
- [ ] Skin: Remnant / Kal'tsit (probably with new voice)
- [ ] Background and Music Update
- [x] Skin: Born as One / Specter the Unchained
- [x] Skin: Ten Thousand Mountains / Ch'en/Chen the Holungday
- [ ] Skin: Remnant / Kal'tsit
- [x] Background and Music Update
- [ ] Voice: Chinese Topolect for Lee
## Softwares
@@ -157,7 +157,7 @@ I'm still struggling to find a command-line tool to extract in-game assets. But
<sup>1</sup>: `portrait_hub` is required to locate the image
<sup>2</sup>: `gamedata/excel/display_meta_table.json->homeBackgroundData`<sup>3</sup> is required to locate the music. A more detailed mapping can be found at [音乐鉴赏/游戏内音乐一览 - PRTS.wiki](https://prts.wiki/w/%E9%9F%B3%E4%B9%90%E9%89%B4%E8%B5%8F/%E6%B8%B8%E6%88%8F%E5%86%85%E9%9F%B3%E4%B9%90%E4%B8%80%E8%A7%88) and [首页场景一览 - PRTS.wiki](https://prts.wiki/w/%E9%A6%96%E9%A1%B5%E5%9C%BA%E6%99%AF%E4%B8%80%E8%A7%88)
<sup>2</sup>: `gamedata/excel/display_meta_table.json->homeBackgroundData`<sup>3</sup> and `gamedata/excel/audio_data.json`<sup>3</sup> is required to locate the music.
<sup>3</sup>: Data is encryped, decryped version can be obtained from [ArknightsGameData](https://github.com/Kengxxiao/ArknightsGameData)

View File

@@ -1 +1 @@
3.5.2
3.5.5

View File

@@ -113,10 +113,16 @@ async function main() {
})
}
})
const voiceLangs = Object.keys(voiceJson.voiceLangs["zh-CN"])
const subtitleLangs = Object.keys(voiceJson.subtitleLangs)
let voiceLangs = [], subtitleLangs = [];
try {
voiceLangs = Object.keys(voiceJson.voiceLangs["zh-CN"])
subtitleLangs = Object.keys(voiceJson.subtitleLangs)
writeSync(JSON.stringify(voiceJson), path.join(OPERATOR_SOURCE_FOLDER, OPERATOR_NAME, 'charword_table.json'))
} catch (e) {
console.log(`charword_table is not available`)
}
const envPath = path.join(OPERATOR_SOURCE_FOLDER, OPERATOR_NAME, '.env')
writeSync((new EnvGenerator()).generate([

View File

@@ -40,6 +40,13 @@ showcase:
2021/05/26:
- First commit
directory:
2023/05/01:
- Added new background and music
- Added Born as One / Specter the Unchained
- Added Ten Thousand Mountains / Ch'en/Chen the Holungday
# - Added Remnant / Kal'tsit
# - Added Muelsyse
# - Added Chinese Topolect for Lee
2023/03/15:
- Added background music
2023/03/03:

View File

@@ -57,4 +57,4 @@ operators:
chen_ten_thousand_mountains: !include config/chen_ten_thousand_mountains.yaml
specter_born_as_one: !include config/specter_born_as_one.yaml
muelsyse: !include config/muelsyse.yaml
kaltsit_remnant: !include config/kaltsit_remnant.yaml
# kaltsit_remnant: !include config/kaltsit_remnant.yaml

View File

@@ -2,7 +2,7 @@ description: !match "~{split('config', 'title' ,' - ')[0]} Live 2D\n~{split('con
localization:
en-us:
ui_notice_title: <hr><h4>📝 Notes</h4><hr>
ui_notice_changelog: <span><b>Now supports Background Music!</b></span>
ui_notice_changelog: <span><b>New Background and Music Added!</b></span>
ui_notice_set_fps: <span><b>Set FPS target in Settings</b></span>
ui_notice_github: "Github: https://github.com/Halyul/aklive2d"
ui_notice_other_operators: "Previews: https://arknights.halyul.dev/"
@@ -40,7 +40,7 @@ localization:
ui_music_offset: Offset
zh-chs:
ui_notice_title: <hr><h4>📝 通知</h4><hr>
ui_notice_changelog: <span><b>现在支持背景音乐! </b></span>
ui_notice_changelog: <span><b>已添加新背景音乐! </b></span>
ui_notice_set_fps: <span><b>在设置中设定FPS目标</b></span>
ui_notice_github: "Github: https://github.com/Halyul/aklive2d"
ui_notice_other_operators: "预览: https://arknights.halyul.dev/"

View File

@@ -2,10 +2,10 @@ date: 2023/04
filename: dyn_illust_char_1013_chen2_boc#6
logo: logo_rhodes_override
fallback_name: char_1013_chen2_boc#6
viewport_left: 0
viewport_right: 0
viewport_top: 0
viewport_bottom: 0
viewport_left: -1
viewport_right: 1
viewport_top: 2
viewport_bottom: -1
invert_filter: false
color: rgb(6, 34, 129)
codename:

View File

@@ -1,13 +1,13 @@
date: 2023/04
filename: dyn_illust_char_249_mlyss
logo: logo_rhodes_override
logo: logo_rhine
fallback_name: char_249_mlyss_2
viewport_left: 0
viewport_right: 0
viewport_top: 0
viewport_bottom: 0
invert_filter: false
color: rgb(118, 165, 185)
color: rgb(146, 212, 143)
codename:
zh-CN: 缪尔赛思
en-US: Muelsyse

View File

@@ -2,10 +2,10 @@ date: 2023/04
filename: dyn_illust_char_1023_ghost2_boc#6
logo: logo_abyssal
fallback_name: char_1023_ghost2_boc#6
viewport_left: 0
viewport_right: 0
viewport_left: -1
viewport_right: 1
viewport_top: 0
viewport_bottom: 0
viewport_bottom: 1
invert_filter: false
color: rgb(140, 7, 7)
codename:

View File

@@ -3,7 +3,7 @@ VITE_APP_VOICE_URL=jp/CN_037.ogg
VITE_VOICE_FOLDERS={"main":"voice","sub":[{"name":"jp","lang":"JP"},{"name":"cn","lang":"CN_MANDARIN"},{"name":"en","lang":"EN"},{"name":"kr","lang":"KR"},{"name":"custom","lang":"CUSTOM"}]}
VITE_DIRECTORY_FOLDER="_assets"
VITE_BACKGROUND_FOLDER="background"
VITE_AVAILABLE_OPERATORS=["chen","dusk","dusk_everything_is_a_miracle","ling","nearl","nian","nian_unfettered_freedom","phatom_focus","rosmontis","skadi","skadi_sublimation","w","w_wonder","specter","gavial","surtr_colorful_wonderland","lee_trust_your_eyes","texas_the_omertosa","nearl_relight","rosmontis_become_anew","passager_dream_in_a_moment","mizuki_summer_feast","chongyue","ling_it_does_wash_the_strings","pozemka_snowy_plains_in_words"]
VITE_AVAILABLE_OPERATORS=["chen","dusk","dusk_everything_is_a_miracle","ling","nearl","nian","nian_unfettered_freedom","phatom_focus","rosmontis","skadi","skadi_sublimation","w","w_wonder","specter","gavial","surtr_colorful_wonderland","lee_trust_your_eyes","texas_the_omertosa","nearl_relight","rosmontis_become_anew","passager_dream_in_a_moment","mizuki_summer_feast","chongyue","ling_it_does_wash_the_strings","pozemka_snowy_plains_in_words","chen_ten_thousand_mountains","specter_born_as_one","muelsyse"]
VITE_ERROR_FILES={"files":[{"key":"build_char_128_plosis_epoque%233","paddings":{"left":-120,"right":150,"top":10,"bottom":0}},{"key":"build_char_128_plosis","paddings":{"left":-90,"right":100,"top":10,"bottom":0}}],"voice":"CN_034.ogg"}
VITE_MUSIC_FOLDER=music
VITE_MUSIC_MAPPING={"operator_bg.png":{"intro":"m_sys_void_intro.ogg","loop":"m_sys_void_loop.ogg"},"bg_anniversary_1.png":{"intro":"m_dia_nightoflongmen_intro.ogg","loop":"m_dia_nightoflongmen_loop.ogg"},"bg_iberia_1.png":{"intro":"m_sys_act18d3d0_intro.ogg","loop":"m_sys_act18d3d0_loop.ogg"},"bg_kazimierz_1.png":{"intro":"m_dia_street_intro.ogg","loop":"m_dia_street_loop.ogg"},"bg_main_victoria_1.png":{"intro":"m_avg_ghosthunter_intro.ogg","loop":"m_avg_ghosthunter_loop.ogg"},"bg_rhodes_day.png":{"intro":"m_sys_void_intro.ogg","loop":"m_sys_void_loop.ogg"},"bg_rhodes_night.png":{"intro":"m_sys_tech_intro.ogg","loop":"m_sys_tech_loop.ogg"},"bg_rogue_1.png":{"intro":null,"loop":"m_avg_rglk1secretevent_loop.ogg"},"bg_siesta_1.png":{"intro":"m_sys_ddd_intro.ogg","loop":"m_sys_ddd_loop.ogg"},"bg_ursus_1.png":{"intro":"m_avg_loneliness_intro.ogg","loop":"m_avg_loneliness_loop.ogg"},"bg_yan_1.png":{"intro":null,"loop":"m_sys_bitw_loop.ogg"}}
VITE_MUSIC_MAPPING={"operator_bg.png":{"intro":"m_sys_void_intro.ogg","loop":"m_sys_void_loop.ogg"},"bg_anniversary_1.png":{"intro":"m_dia_nightoflongmen_intro.ogg","loop":"m_dia_nightoflongmen_loop.ogg"},"bg_iberia_1.png":{"intro":"m_sys_act18d3d0_intro.ogg","loop":"m_sys_act18d3d0_loop.ogg"},"bg_kazimierz_1.png":{"intro":"m_dia_street_intro.ogg","loop":"m_dia_street_loop.ogg"},"bg_laterano_1.png":{"intro":"m_sys_act16side_intro.ogg","loop":"m_sys_act16side_loop.ogg"},"bg_main_victoria_1.png":{"intro":"m_avg_ghosthunter_intro.ogg","loop":"m_avg_ghosthunter_loop.ogg"},"bg_rhine_1.png":{"intro":"m_sys_act19side_intro.ogg","loop":"m_sys_act19side_loop.ogg"},"bg_rhodes_day.png":{"intro":"m_sys_void_intro.ogg","loop":"m_sys_void_loop.ogg"},"bg_rhodes_night.png":{"intro":"m_sys_tech_intro.ogg","loop":"m_sys_tech_loop.ogg"},"bg_rogue_1.png":{"intro":null,"loop":"m_avg_rglk1secretevent_loop.ogg"},"bg_rogue_2.png":{"intro":null,"loop":"m_sys_rglk2DLC_loop.ogg"},"bg_siesta_1.png":{"intro":"m_sys_ddd_intro.ogg","loop":"m_sys_ddd_loop.ogg"},"bg_ursus_1.png":{"intro":"m_avg_loneliness_intro.ogg","loop":"m_avg_loneliness_loop.ogg"},"bg_yan_1.png":{"intro":null,"loop":"m_sys_bitw_loop.ogg"}}

View File

@@ -1 +1 @@
1.2.3
1.2.4

View File

@@ -51,6 +51,10 @@
"zh-CN": "语音",
"en-US": "Voice"
},
"music": {
"zh-CN": "音乐",
"en-US": "Music"
},
"showcase": {
"zh-CN": "壁纸",
"en-US": "Wallpaper"

View File

@@ -25,7 +25,7 @@ export default function ({ backgrounds, musicMapping }) {
try {
cur.workshopId = JSON.parse(readFile(path.join(__projectRoot, __config.folder.operator, cur.link, 'project.json'))).workshopid
} catch (e) {
console.log(`No workshop id for ${cur.link}!`, e)
console.log(`No workshop id for ${cur.link}!`)
}
return acc

View File

@@ -21,22 +21,22 @@
"vite:directory:preview": "vite preview"
},
"devDependencies": {
"@perfsee/rollup": "^1.5.0",
"@types/react": "^18.0.34",
"@types/react-dom": "^18.0.11",
"@perfsee/rollup": "^1.6.0",
"@types/react": "^18.2.0",
"@types/react-dom": "^18.2.1",
"@vitejs/plugin-react-swc": "^3.3.0",
"autoprefixer": "^10.4.14",
"eslint": "^8.38.0",
"eslint": "^8.39.0",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-react-hooks": "^4.6.0",
"postcss": "^8.4.21",
"postcss": "^8.4.23",
"prop-types": "^15.8.1",
"rollup": "^3.20.2",
"sass": "^1.61.0",
"stylelint": "^15.4.0",
"rollup": "^3.21.2",
"sass": "^1.62.1",
"stylelint": "^15.6.0",
"stylelint-config-standard": "^30.0.1",
"stylelint-config-standard-scss": "^7.0.1",
"vite": "^4.2.1"
"vite": "^4.3.3"
},
"dependencies": {
"@parcellab/react-use-umami": "^2.0.1",
@@ -46,10 +46,10 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-refresh": "^0.14.0",
"react-router-dom": "^6.10.0",
"react-router-dom": "^6.11.0",
"react-simple-typewriter": "^5.0.1",
"reset-css": "^5.0.1",
"sharp": "^0.31.3",
"yaml": "^2.2.1"
"yaml": "^2.2.2"
}
}

72
playground/index.html Normal file
View File

@@ -0,0 +1,72 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<script src="./spine-player.js"></script>
<link rel="stylesheet" href="../src/libs/spine-player.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<style>
body {
background: gray;
margin: 0px;
}
</style>
<body>
<div id="container" style="width: 640px; height: 380px;"></div>
<div>
<button id="walk">Walk</button>
<button id="jump">Jump</button>
<button id="roar">Roar</button>
</div>
</body>
<script>
// Creates a new spine player. The debugRender option enables
// rendering of viewports and padding for debugging purposes.
new spine.SpinePlayer("container", {
skelUrl: "assets/spineboy-pro.skel",
atlasUrl: "assets/spineboy-pma.atlas",
animation: "run",
premultipliedAlpha: true,
backgroundColor: "#cccccc",
viewport: {
debugRender: true,
},
showControls: true,
});
// Creates a new spine player with a transparent background,
// so content from the website shines through. Hides the controls.
// Instead, the user can control the animation via buttons.
var jsControlledPlayer = new spine.SpinePlayer("container-raptor", {
jsonUrl: "assets/raptor-pro.json",
atlasUrl: "assets/raptor-pma.atlas",
animation: "walk",
showControls: false,
premultipliedAlpha: true,
backgroundColor: "#00000000",
alpha: true,
defaultMix: 1,
success: (player) => {
// Register button click event handlers once the
// skeleton has been loaded successfully
document.getElementById("walk").addEventListener("click", event => {
jsControlledPlayer.setAnimation("walk", false); // set the walk animation to play once
});
document.getElementById("jump").addEventListener("click", event => {
jsControlledPlayer.setAnimation("jump", false); // set the jump animation to play once
});
document.getElementById("roar").addEventListener("click", event => {
jsControlledPlayer.setAnimation("roar", true); // set the jump animation to loop
});
}
});
</script>
</body>
</html>

11947
playground/spine-player.js Normal file

File diff suppressed because one or more lines are too long

538
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@@ -7,8 +7,6 @@ import react from '@vitejs/plugin-react-swc'
import getConfig from './libs/config.js'
import { rmdir, writeSync } from './libs/file.js'
import { increase } from './libs/version.js'
import EnvGenerator from './libs/env_generator.js'
import directory from './libs/directory.js'
import { PerfseePlugin } from '@perfsee/rollup'
global.__projectRoot = path.dirname(fileURLToPath(import.meta.url))