Skip to content

Implement native PAL3/PAL3A effects and editing tools - #93

Open
0x7c13 wants to merge 4 commits into
mainfrom
feat/native-effects
Open

0x7c13 wants to merge 4 commits into
mainfrom
feat/native-effects

Conversation

@0x7c13

@0x7c13 0x7c13 commented Nov 13, 2026

Copy link
Copy Markdown
Owner

两作的剧情与场景特效改为直接读取原版 CPK 数据播放,覆盖当前清单中的 PAL3 56 个、PAL3A 93 个根组,并移除外部 prefab 特效回退。运行时统一使用 EffectRuntime,Unity 编辑器通过 PAL3 / PAL3A → Effect Editor 检查、播放和编辑特效。

改动

  • 补齐特效组、任务、粒子及 SPar 格式读取,加入原版粒子、SPar、几何体、CVD/POL 模型和爆炸碎片播放,处理组回调、音效、暂停与 Seek。SPar 包含关键帧插值、路径、六槽控制器及混合模式。
  • 实现两作传送点,PAL3A 按场景参数选择七种样式,重现圆盘、双光锥、贴图与配色。角色定位使用指令执行时的坐标快照;找不到角色时保留上次位置,两作一致。
  • 提供 Effect Editor、覆盖资产及 ResourceViewer 命令,保留编辑器改名的 Unity GUID。切场景时取消旧预加载、清理播放实例,并回收不再使用的渲染资源。
  • 删除外部 prefab 回退、相关设置、并排预览、旧组件及预制体索引;保留素材路径的 Git 忽略规则,同步中英文 README 和 CI 说明。
  • 加入两作共用的 C# 格式检查和 CI 工作流。默认只应用改动行及删除边界上的格式修正,检查临时副本,保留其余历史格式;显式路径与 --all 支持全文件检查。

验证

检查 PAL3 PAL3A
特效专项 EditMode 108/108 108/108
通用回归(排除 LocalGameData) 294/294 311/311
  • 上述测试均无失败或跳过;专项使用本地原版资源,通用回归不依赖游戏数据。测试源码的 723 个文件哈希与最终源码一致。
  • Game / ResourceViewer × 原版 / Toon 两作共八组 Play Mode 检查通过,覆盖播放器创建、角色坐标快照、GPU 输出和离场清理。日志中的隔离编辑器启动索引异常与 QA 初始化查询单独记录,播放器报告无错误。
  • 格式工具集成自测通过;针对本 PR 与最新 main 的完整差异执行 python3 tools/format-csharp.py --check --base origin/main,两作分支通过;git diff --check 通过。
  • 提交配置保持 PAL3,ProjectSettings 与 Packages 无改动。PR 分支从最新 main 建立,文件树与已验证的本地提交完全一致。

范围与限制

战斗导演等未支持类型会明确诊断并跳过整组,留待对应玩法系统实现。模型旋转与缩放采用独立的 60 FPS 兼容参考;GPU 输出检查不等同于与原版程序逐帧画面对齐。本轮没有新增移动设备或 Windows 实机验证。原版游戏数据仍由本地读取,不随项目分发。

Enable shared playback for supported PAL3A groups with POL models, model opacity, and explosive geometry. Parse SPar resources for complete dependency diagnostics while retaining whole-group private fallback for pending simulation.

Preserve the last effect position when actors are missing or removed in both games, and keep actor-specific shape changes and private fallback guarded. Expand the editor and viewer to both variants and fix opaque alpha for RGB TGA textures.

Validation: PAL3/PAL3A effect suites 54/54 each; general regressions 278/278 and 295/295. Both-variant formatting and diff checks passed.
Add SPar emitter simulation, native blending and billboard rendering for the
remaining 26 script/scene groups. Restore PAL3A transport geometry and seven
styles in game, the editor and ResourceViewer.

Preserve native live-state initial-frame behavior and mark the runtime UV
table non-serialized. Update the README and add format, playback, geometry
and resource-lifetime regression coverage.

Validation: targeted tests 106/106 for both variants; general regressions
PAL3 293/293 and PAL3A 310/310. Both-variant formatting checks passed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant