sonolus-pack v5.3.0
sonolus-pack
CLI tool to pack Sonolus source files into repository and database.
Links
Usage
npx
Use npx to execute without installing.
Packing using default options:
npx sonolus-packUse -h to see a list of available options:
npx sonolus-pack -hInstall Globally
Installing globally (only need once):
npm i -g sonolus-packsonolus-pack will become available to use:
sonolus-pack -hInput
Resources
Each resource (except info.json):
- if a file with default extension is provided, it will be processed, and corresponding
SRLwill be generated. - if an extension-less file is provided, processing will be skipped, and corresponding
SRLwill be generated. - if an
.srlextension file is provided, its content will be used asSRL.
For example resource cover[.png/.srl]:
- if file
cover.pngis provided, it will be processed, and correspondingSRLwill be generated. - if file
coveris provided, processing will be skipped, and correspondingSRLwill be generated. - if file
cover.srlis provided, its content will be used asSRL.
Localization Text
Common type for text with localization.
type LocalizationText = Record<string, string>For example:
{
"en": "Hello!",
"zh-hans": "你好!",
"ja": "こんにちは!",
"ko": "안녕하세요!"
}Folder Structure
+---levels
| +---{level}
| +---...
| \---{level}
| info.json
| cover[.png/.srl]
| bgm[.mp3/.srl]
| data[.json/.srl]
|
+---skins
| +---{skin}
| +---...
| \---{skin}
| info.json
| thumbnail[.png/.srl]
| data[.json/.srl]
| texture[.png/.srl]
|
+---backgrounds
| +---{background}
| +---...
| \---{background}
| info.json
| thumbnail[.png/.srl]
| data[.json/.srl]
| image[.png/.srl]
|
+---effects
| +---{effect}
| +---...
| \---{effect}
| info.json
| thumbnail[.png/.srl]
| data[.json/.srl]
| {clip}[.mp3/.srl]
| ...
| {clip}[.mp3/.srl]
|
+---particles
| +---{particle}
| +---...
| \---{particle}
| info.json
| thumbnail[.png/.srl]
| data[.json/.srl]
| texture[.png/.srl]
|
\---engines
+---{engine}
+---...
\---{engine}
info.json
thumbnail[.png/.srl]
data[.json/.srl]
configuration[.json/.srl]Levels
Resources of each level is located in /levels/{name}.
info.json
Level information.
type LevelInfo = {
version: number
rating: number
engine: string // name of referenced engine
useSkin: Use
useBackground: Use
useEffect: Use
useParticle: Use
title: LocalizationText
artists: LocalizationText
author: LocalizationText
description: LocalizationText
meta?: unknown // (optional) user-defined meta information
}
type Use = {
useDefault: boolean
item?: string // name of referenced item
}cover[.png/.srl]
Level cover.
bgm[.mp3/.srl]
Level bgm.
data[.json/.srl]
Level data.
Skins
Resources of each skin is located in /skins/{skin}.
info.json
Skin information.
type SkinInfo = {
version: number
title: LocalizationText
subtitle: LocalizationText
author: LocalizationText
description: LocalizationText
meta?: unknown // (optional) user-defined meta information
}thumbnail[.png/.srl]
Skin thumbnail.
data[.json/.srl]
Skin data.
texture[.png/.srl]
Skin texture.
Backgrounds
Resources of each background is located in /backgrounds/{background}.
info.json
Background information.
type BackgroundInfo = {
version: number
title: LocalizationText
subtitle: LocalizationText
author: LocalizationText
description: LocalizationText
meta?: unknown // (optional) user-defined meta information
}thumbnail[.png/.srl]
Background thumbnail.
data[.json/.srl]
Background data.
image[.png/.srl]
Background image.
Effects
Resources of each effect is located in /effects/{effect}.
info.json
Effect information.
type EffectInfo = {
version: number
title: LocalizationText
subtitle: LocalizationText
author: LocalizationText
description: LocalizationText
meta?: unknown // (optional) user-defined meta information
}thumbnail[.png/.srl]
Effect thumbnail.
data[.json/.srl]
Effect data.
Clips in effect data should simply be string that references the corresponding clip file.
{clip}[.mp3/.srl]
Effect clip referenced in effect data.
Particles
Resources of each particle is located in /particles/{particle}.
info.json
Particle information.
type ParticleInfo = {
version: number
title: LocalizationText
subtitle: LocalizationText
author: LocalizationText
description: LocalizationText
meta?: unknown // (optional) user-defined meta information
}thumbnail[.png/.srl]
Particle thumbnail.
data[.json/.srl]
Particle data.
texture[.png/.srl]
Particle texture.
Engines
Resources of each engine is located in /engines/{engine}.
info.json
Engine information.
type EngineInfo = {
version: number
title: LocalizationText
subtitle: LocalizationText
author: LocalizationText
description: LocalizationText
skin: string // name of referenced skin
background: string // name of referenced background
effect: string // name of referenced effect
particle: string // name of referenced particle
meta?: unknown // (optional) user-defined meta information
}thumbnail[.png/.srl]
Engine thumbnail.
data[.json/.srl]
Engine data.
configuration[.json/.srl]
Engine configuration.
Output
Output contains:
/repositorycontains processed resources./db.jsoncontains information of items.
Output can be used by sonolus-express and sonolus-generate-static to develop Sonolus servers.
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
4 years ago
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
5 years ago