Files
aklive2d/README.md
Haoyu Xu d6e7bc20d3 feat: migrate to turbo (#22)
* feat: migrate top turbo

* ci: ci test

* fix: fix codeql issues

* feat: ci test

* chore: lint

* chore: misc changes

* feat: rename vite helpers

* feat: use fetch to handle assets

* feat: update directory

* feat: fetch charword table

* feat: migrate download game data and detect missing voice files

* feat: symlink relative path

* feat: finish wrangler upload

* feat: migrate wrangler download

* feat: finish

* chore: auto update

* ci: update ci

* ci: update ci

---------

Co-authored-by: Halyul <Halyul@users.noreply.github.com>
2025-02-22 15:11:30 +08:00

8.1 KiB

aklive2d

A project that builds showcase webpage for Arknights Live2D-equipped operators. Showcase webpage can be used as a wallpaper for Wallpaper Engine on Windows or Plash on macOS (not tested).

Softwares

  • For Windows users: Use Wallpaper Engine or other softwares that support using webpage as desktop wallpaper.
  • For macOS users: Use Plash, however, I don't have macOS machine, so your mileage may vary.
  • For Linux users: You power user should be able to find your solutions!

Supported Operators

A list of supported operators can be found at Directory page.

Usage

Command Line Tool

$ pnpm run update
Update data from official website and github repo
$ pnpm run lint
ESLint and StyleLint
$ pnpm run build
Build showcase webpage for all operators and directory page
$ name=<name> pnpm run build
Build showcase webpage for an operator
$ name=<name> id=<id> pnpm run init
To initialize folder and config file for an operator
$ name=<name> pnpm run dev:showcase
Run dev server for showcase webpage for an operator
$ name=<name> pnpm run preview:showcase
Preview built showcase webpage for an operator

Webpage & JavaScript

Add query string aklive2d to bring up the settings panel to adjust your settings. Settings can be adjusted under window.aklive2d or by dispatching custom events (under window.aklive2d.events) to document. Examples can be found at showcase/src/libs/wallpaper_engine.js.

Using JS events to change settings is recommended.

Config

General Config

in packages/config/config.yaml

folder: 
  operator: ./operator/ # folder for operator assets
  release: ./release/ # folder for released showcase page
operators:
  chen: !include config/chen.yaml # include the config for the operator under folder `config/chen.yaml`
  dusk: !include config/dusk.yaml
  dusk_everything_is_a_miracle: !include config/dusk_everything_is_a_miracle.yaml
  ling: !include config/ling.yaml
  nearl: !include config/nearl.yaml
  nian: !include config/nian.yaml
  nian_unfettered_freedom: !include config/nian_unfettered_freedom.yaml
  phatom_focus: !include config/phatom_focus.yaml
  rosmontis: !include config/rosmontis.yaml
  skadi: !include config/skadi.yaml
  skadi_sublimation: !include config/skadi_sublimation.yaml
  w: !include config/w.yaml
  w_fugue: !include config/w_fugue.yaml
  specter: !include config/specter.yaml
  gavial: !include config/gavial.yaml
  surtr_colorful_wonderland: !include config/surtr_colorful_wonderland.yaml
  lee_trust_your_eyes: !include config/lee_trust_your_eyes.yaml
  texas_the_omertosa: !include config/texas_the_omertosa.yaml
  nearl_relight: !include config/nearl_relight.yaml
  rosmontis_become_anew: !include config/rosmontis_become_anew.yaml
  passager_dream_in_a_moment: !include config/passager_dream_in_a_moment.yaml
  mizuki_summer_feast: !include config/mizuki_summer_feast.yaml

Operators Config

in packages/operator/config.yaml

chen: !include config/chen.yaml
dusk: !include config/dusk.yaml
dusk_everything_is_a_miracle: !include config/dusk_everything_is_a_miracle.yaml
ling: !include config/ling.yaml
nearl: !include config/nearl.yaml
nian: !include config/nian.yaml
nian_unfettered_freedom: !include config/nian_unfettered_freedom.yaml
phatom_focus: !include config/phatom_focus.yaml
rosmontis: !include config/rosmontis.yaml
skadi: !include config/skadi.yaml
skadi_sublimation: !include config/skadi_sublimation.yaml
w: !include config/w.yaml
...

Operator Config

in packages/operator/config/<name>.yaml

filename: dyn_illust_char_1013_chen2 # live2d assets name
logo: logo_rhodes_override # operator logo
fallback_name: char_1013_chen2_2 # fallback image name
viewport_left: 0 # live2d view port settings
viewport_right: 0
viewport_top: 0
viewport_bottom: 0
invert_filter: false # operator logo invert filter
codename: # operator name
  zh-CN: 假日威龙陈
  en-US: Ch'en/Chen the Holungday
use_json: false # whether the spine skel is in json format

LICENSE

The LICENSE file applies to all files unless listed specifically.

LICENSE_SPINE file applies to following files including adapted code for this repo:

  • apps/module/libs/spine-player.css
  • apps/module/libs/spine-player.js

Copyright © 2017 - 2023 Arknights/Hypergryph Co., Ltd applies to following files:

  • all files under packages/operator/data folder and its sub-folders
  • all files under packages/music/data folder and its sub-folders
  • all files under packages/background/data folder and its sub-folders

Instructions on Extracting In-Game Assets

I'm still struggling to find a command-line tool to extract in-game assets. But AssetRipper seems to have a command-line interface, I'm too lazy to have a deeper inverstigation.

Assets Name Location Type
Logos spritepack/ui_camp_logo_h2_0.ab Sprite
Logos for collaboration spritepack/ui_camp_logo_h2_linkage_0.ab Sprite
Logo Mapping gamedata/art/handbookpos_table.json3 TextAsset
Dynaimc Character arts/dynchars/ Texture2D & TextAsset
Static Image Operator: chararts/ ; Skin: skinpack/ Texture2D
Background arts/ui/homebackground/wrapper/ Sprite
Voice Clips audio/sound_beta_2/voice{_*}/ AudioClip
Voice Lines3 gamedata/excel/charword_table.ab TextAsset
Portrait Images1 arts/charportraits Texture2D & MonoBehaviour
Home Music2 audio/sound_beta_2/music AudioClip

1: portrait_hub is required to locate the image

2: gamedata/excel/display_meta_table.json->homeBackgroundData3 and gamedata/excel/audio_data.json3 is required to locate the music.

3: Data is encryped, decryped version can be obtained from ArknightsGameData for the Chinese version and Kengxxiao/ArknightsGameData_YoStar for other regions.

URLs

Name URL Note
Config link Version info
Current Hot Update JSON link Directory JSON
Voice JP link Voice JP
Voice CN link 1, link 2 Voice CN
Voice KR link Voice KR
Voice EN link Voice EN
Voice Custom link Voice Custom
Misc link Latest Home Background, Skin Static Image
Init link Logos, Background, Portrait Images
Dynaimc Characters link Dynaimc Character
Static Image link Operator Static Image
Home Music link Home Music
L Com? link portrait_hub.ab