Controller rumble (executable + cast animation profiles)

The PC build has rumble (H for the chain and the cast data; M for the stage sources). Corrects “Cast animation profiles”, which called the 0x0C..0x22 groups undecoded and the 0x34..0x4A set unused.

Output chain. The feedback manager (class handle pdvkComFeedBack, pointer 0x140533428) holds two motor values per pad slot (0..3), integers clamped to 0..0xFFFF: left and right. 0x14022c660(manager, left, right, slot) adds to them. The send step 0x14022c480 runs every tick for the four slots and sends zero unless all of these hold:

It then calls 0x1400de3f0(slot, {u16 left, u16 right}), which builds the gamepad vibration record of four doubles {left / 65535, right / 65535, 0, 0} (the trigger motors are never driven) and calls the Windows.Gaming.Input gamepad’s vibration setter. The two values are cleared after sending: every source adds its value again each tick.

Source 1: the cast rumble sequencer. One sequencer per pad slot (tick 0x14022c780): up to 16 steps {active, mode (0 = set once, 1 = add every tick), motor mask (bit 0 left, bit 1 right), level in percent, start tick, end tick}, a clock, the current left / right levels (percent → × 0.01 × 65535, clamped) and an end mode. It is loaded from the caster’s cast animation profile at cast start (0x14025a8a0, from the cast-start paths) and again at release with the profile’s release set (0x14025aad0, after the skill object spawns); 0x14025ace0 stops it. Only for the player on this machine (the character’s battle-menu object is the local one); pad slot = that player’s pad in local multiplayer (0x1404bc9d4 = 6), else 0.

Profile fields (s16, record layout of “Cast animation profiles”):

off field meaning
0x0A end mode 0 = run once and stop, 1 = loop from tick 0, 2 = hold the last level (401 profiles: 396 / 2 / 3)
0x0C step 0: motor, level, start, length motor 0 none, 1 both, 2 left, 3 right; level in percent, set at tick start; the sequence lasts until start + length
0x14, 0x1C, 0x24, 0x2C steps 1–4, same four fields ramps: add level percent per tick, from step 0’s start + their own start, for length ticks (levels −5..50)
0x34 release step 0 as 0x0C, started at the release tick
0x3C, 0x44 release steps 1–2 ramps as above (three profiles use the release set)

Data: the motor is 3 (right, the fine motor) in every used step; 225 profiles have three steps, 120 two, 40 one, 16 none; lengths 3–35 ticks; step-0 starts 0–20. A typical shape: jump to a level, ramp up for a few ticks, ramp down.

Source 2: shake sources (tick 0x14022bf80; the same objects as the camera’s positional shake, “Play camera / Shake”). For a player within the source’s radius r at distance d: f = (1 − (d / r)²) × fade × pattern value; left += left strength × f × pattern[2k], right += right strength × f × pattern[2k + 1] (k = the source’s clock mod the pattern length); the camera shake strengths of the same source use the same f. Rumble and camera shake share these sources; their strengths and patterns per skill are still open (as in the camera section). M.

Source 3: stage. EF00 screen-shake entries (pdvkEbScrShk, 0x14022106f, 0x14022124e): right motor, pad slots 0 and 1, clamp(f, 0, 1) × a constant, with the entry’s camera shake. The stage collapse (0x14021c6bf): right motor, slot 0 (and 1 in local multiplayer), level from 0x14021af10. M, constants not written down.

Not decoded: who creates shake sources and with what numbers (hits, explosions, landing); the two stage sources’ constants; whether being hit has a dedicated rumble besides the shake sources.

Implementation notes for the rebuild