cinematic_subtitles-1.0.0.jar
Curse Maven Snippet
What's new
V 1.0.0 Update
English
Major Change (.sfst format reworked)
.sfstreworked into object blocks: the old.sfstlooked too much like.srtand was hard to tell apart when many lines stacked. Each entry is now a{ ... }object; field order is free and keys are case-insensitive:{ style:"style-registered-id" timeline:[start - (optional) end] text:"content, all escapes preserved, use \n for newline" animation:"animation-registered-id" // optional }textpreserves every escape verbatim:{#color}/{time}/{mc:...}/ bare§/{img:...}/{lang:...}/\n.timelineacceptsHH:MM:SS,mmm/MM:SS.xx/[MM:SS.xx]/ plain seconds; the end may be omitted (-or?also mean "unset", auto-filled to the next line's start).- Blank lines and
#///comments between fields and blocks are ignored; inline{tags}no longer confuse block boundaries. - Old three-line blocks still work: the parser tries object blocks first and falls back to the legacy format, so already-published subtitles keep playing without migration.
Added (style / animation separation)
- Glyph style and animation fully separated:
stylenow covers only the glyph layer — color, size, layout, outline, text decoration (glow, ornaments), font style. Animations independently cover entry / exit / idle effects (neon flicker entrance, shake, shimmer, typewriter, glitch, scale-pop, particle dissolve, etc.). - Standalone animation presets
AnimationPreset: configure animations in independent JSON files underconfig/cinematic_subtitles/animations/*.json, alongside the glyph style directorystyles/(both plural for clarity). Preset shape:{ "id": "neon_intro", "extends": "base_preset", "entry": { "preset": "neon_flicker", "duration": 900, "params": { "flicker_count": 3 } }, "exit": { "preset": "fade_out", "duration": 400 }, "idle": { "preset": "shimmer", "band_width": 3, "speed_tick": 0.3 }, "custom": { "any_third_party_key": 123 } }- Five ready-to-use presets ship with the mod:
neon_intro/typewriter_reveal/pop_shake/glitch_cut/soft_blink. - Each line references a preset via
animation:"id"(line override wins); styles may also reference via"animation_ref": "id". Unregistered ids safely fall back to the style's built-in animation instead of hiding the subtitle.
- Five ready-to-use presets ship with the mod:
extendsinheritance: any style or animation preset can derive a new flavor from a built-in base, overriding only a few parameters. Animation inheritance merges per parameter: unset segments fully inherit the base, and same-presetparamsare merged key by key.
Added (third-party registration & export)
- Register brand-new styles / animations: new API —
registerAnimationPreset(...),registerAnimationPreset(id, json),registerStyle(id, json),styleTemplate(id),animationPreset(id). Third parties can fully register new styles/animations with their own configuration scheme, are not limited to built-in presets, can copy a built-in viastyleTemplate/animationPresetand modify it, or derive withextends. - Custom parameter passthrough on export: both styles and animation presets carry
customParams; arbitrary third-party values (number / boolean / string / Map / List) are written back verbatim on export, enabling "export compatible with custom styles/animations". - Export commands:
/subtitles export style [id],/subtitles export animation [id],/subtitles export both <styleId> <animationId>write toconfig/cinematic_subtitles/styles/(existing directory) and.../animations/(new directory) respectively; omit the id to export all. Added/subtitles animationsto list all animation presets. API counterparts:exportStyle/exportAnimationPreset/exportStyleAndAnimation. - On export, glyph styles write only an
animation_refreference and no longer embed entry/exit/idle animations; all third-party custom parameters are preserved.
中文
重大变更(.sfst 格式重做)
.sfst全面改为对象块格式:旧的.sfst与.srt三行结构太像、多条文字难以辨认,现彻底重做。每个条目是一个{ ... }对象,字段顺序随意、大小写不敏感:{ style:"样式注册id" timeline:[开始时间轴 - (可选)结束时间轴] text:"内容,保留全部参数转义,可用 \n 换行" animation:"动画注册id" // 可选 }text完整保留{#色值}/{time}/{mc:...}/ 裸§/{img:...}/{lang:...}/\n等所有转义。timeline兼容HH:MM:SS,mmm/MM:SS.xx/[MM:SS.xx]/ 纯秒数;结束可省略(写-或?也表示缺省,自动补到下一条开始时间)。- 字段之间、块之间的空行与
#///注释都会被忽略;行内{标签}的花括号不会再被误判为块边界。 - 完全兼容旧三行块:解析器先尝试新对象块,未发现则自动回落到旧格式,已发布的老字幕无需迁移即可继续播放。
新增(样式与动画分离)
- 字形样式与动画彻底分离:
style只负责字形层——字色、字号、排版、描边、文字装饰(发光、图案装饰)、字体样式;动画独立负责入场 / 出场 / 常驻三类效果(霓虹闪烁出场neon_flicker、震动shake、炫光shimmer、打字机、故障、弹入、粒子消散等)。 - 独立动画方案文件
AnimationPreset:动画方案可用独立 JSON 文件配置,放在config/cinematic_subtitles/animations/*.json,与字形样式目录styles/并列(复数命名便于区分)。方案结构:{ "id": "neon_intro", "extends": "base_preset", "entry": { "preset": "neon_flicker", "duration": 900, "params": { "flicker_count": 3 } }, "exit": { "preset": "fade_out", "duration": 400 }, "idle": { "preset": "shimmer", "band_width": 3, "speed_tick": 0.3 }, "custom": { "任意第三方键": 123 } }- 随模组附带 5 套开箱即用的预设:
neon_intro/typewriter_reveal/pop_shake/glitch_cut/soft_blink。 - 字幕逐句用
animation:"id"引用方案(台词覆盖优先),样式也可用"animation_ref": "id"引用;未注册时安全回落到样式自带动画,不会让字幕消失。
- 随模组附带 5 套开箱即用的预设:
extends继承:任何样式或动画方案都能以本模组自研预设为基底,只覆盖少数参数派生全新风格。动画继承按参数逐键合并:未设置的段完整继承基底,同名 preset 的params逐键覆盖。
新增(第三方注册与导出)
- 第三方注册全新样式 / 动画:API 新增
registerAnimationPreset(...)、registerAnimationPreset(id, json)、registerStyle(id, json)、styleTemplate(id)、animationPreset(id)。第三方模组可用自己的配置方案完整注册全新样式 / 动画,不受本模组预设方案限制;也可用styleTemplate/animationPreset取到本模组自研样式的副本再改造,或只写extends基于预设派生。 - 自定义参数透传导出:样式与动画方案都带
customParams,第三方塞入的任意参数(数值 / 布尔 / 字符串 / Map / List)随导出原样写回 JSON,实现"兼容自研样式 / 动画的参数导出"。 - 指令导出:
/subtitles export style [id](样式)、/subtitles export animation [id](动画)、/subtitles export both <styleId> <animationId>(同时导出),分别写入config/cinematic_subtitles/styles/(既有目录)与.../animations/(新增目录)。不写 id 则导出全部。新增/subtitles animations列出全部动画方案。API 侧对应exportStyle/exportAnimationPreset/exportStyleAndAnimation。 - 导出时字形样式只写
animation_ref引用、不再内嵌入场 / 出场 / 常驻动画,第三方的所有自定义参数完整保留。
This mod has no additional files