Skip to content

Add Campaign Animation Set editor - #384

Merged
donkeyProgramming merged 1 commit into
donkeyProgramming:masterfrom
robert-d-schultz:campaign-animation-set-editor
Aug 9, 2026
Merged

Add Campaign Animation Set editor#384
donkeyProgramming merged 1 commit into
donkeyProgramming:masterfrom
robert-d-schultz:campaign-animation-set-editor

Conversation

@robert-d-schultz

@robert-d-schultz robert-d-schultz commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Campaign animation sets (animations\campaign\database\bin\*.bin) previously had no real editor — only a raw XML text view. This adds a dedicated editor, plus one-click generation of a complete set from an existing battle animation set.

Editor

  • Grid editor for every status and entry type (idle, selection, transitions, actions, locomotion, docks, poses, persistent metadata).
  • Generate from Battle Animation Set builds a full, working set from any battle fragment. Rider and flyer variants are auto-detected (MountBin → RIDER_ slots, FLY_STAND → FLY_ slots + PERSISTENT_METADATA_FLYING), with a Force ground animations override. Locomotion clips get their root bone frozen automatically.
  • Open / Save / Save As, scoped to animations\campaign\database\bin\ — the only folder this format is valid in. Save As asks for a filename only, since the generic pack-browse dialog can't navigate into a folder that has no files yet (exactly what a first save into a fresh mod pack hits).
  • Generated .anim clips are held in memory until you actually save the .bin, so backing out of a generate doesn't leave orphaned files behind.
  • Status names, action types and pose IDs are surfaced as known-value dropdowns with tooltips, derived from a survey of 661 vanilla cam_*.bin files.

Binary format fixes (Shared.GameFormats)

  • PersistentMeta, PersistentMeta_Pose/_Dock, LocomotionEntry, TransitionEntry and UnknownEntry read their strings as (Animation, AnimationMeta, SoundMeta, Type) when the on-disk order is (Animation, Type, AnimationMeta, SoundMeta) — meta paths were landing in the wrong properties.
  • PersistentMeta_Pose/_Dock had no real Weight field; it was the 4th string misread as a float.
  • UnknownEntry.Value wrote an int through the float parser.
  • PortholeEntry's Value0-5 are now identified and named; LocomotionEntry.Weight renamed to BlendTime to match its observed values.

Core changes worth a look

AssetEditor/Themes/Controls.xamlDataGridCell.Foreground was set to DataGrid.CellItem.Static.Background, i.e. cell text painted the same colour as its background. Now uses ABrush.Foreground.Static, which is defined in both the Dark and Light dictionaries. This affects every DataGrid in the app.
IAnimationBinGenericFormat — added MountBin (needed for rider detection). AnimationBinWh3 is the only implementer.
EditorEnums — unchanged. The new editor reuses XML_CampaginBin_Edtior, whose only previous consumer was the removed XML bin converter.

Removed

The XML text converter for campaign .bin files (CampaignAnimBinToXmlConverter + its Validator, now CampaignAnimationSetValidator) — directly replaced by this editor. The CampaignAnimationCreator tool is untouched and still registered, although it's maybe a bit redundant.

Replaces the XML-text view of animations\campaign\database\bin\*.bin with a
proper grid editor, and adds one-click generation of a complete campaign
animation set from an existing battle animation set.

Binary format fixes in Shared.GameFormats (CampaignAnimationBin):
- PersistentMeta, PersistentMeta_Pose/_Dock, LocomotionEntry, TransitionEntry
  and UnknownEntry read their strings as (Animation, AnimationMeta, SoundMeta,
  Type) when the on-disk order is (Animation, Type, AnimationMeta, SoundMeta),
  so meta paths landed in the wrong properties.
- PersistentMeta_Pose/_Dock had no real Weight field; it was the 4th string
  misread as a float.
- UnknownEntry.Value wrote an int through the float parser.
- PortholeEntry Value0-5 identified and named.
- LocomotionEntry.Weight renamed BlendTime to match its observed values.
Covered by round-trip tests against two real vanilla fixtures; this format had
no test coverage before.

Also fixes DataGridCell.Foreground app-wide, which pointed at a Background
brush and painted cell text the same colour as its background.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@donkeyProgramming
donkeyProgramming merged commit e27423c into donkeyProgramming:master Aug 9, 2026
1 check 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.

2 participants