Entry 430
Kyvia's gomoras bend through all three of their shapes: no gomora picks one of CMP_ex01gom2-4, MPH_ex01gom1 bends MDL_ex01gom1 through them by each gomora's own clip, and the port's bodies now draw their clips' morphs, checked against the game's ccAnm and GomoraInit on both discs
Files11 in 8 directories
kyvia.rscrates/piney-battle/examples/battle_probe/kyvia.rscrates/piney-world/src/body.rsfoe.rsfield_world.rscrates/piney-world/src/combat/boss.rscrates/piney-game/src/session/tests/kyvia_fx.rstools/test_battle_kyvia_rs.pydocs/engine/boss-kyvia.mdboss-kyvia-second.mdUNKNOWNS.mdMentioned incrates/piney-game/src/session/tests/kyvia_fx.rs:254tools/test_battle_kyvia_rs.py:995
Worklog 272 left open which of x01's CMP_ex01gom2, 3 and 4 each
gomora draws (boss-kyvia.md Unknown, UNKNOWNS.md). The port drew every
gomora from CMP_ex01gom2.
What the game does
No gomora picks one of the three. They are morph targets, and every gomora shows all three in turn.
- The stream.
kyviaCore::CoreInit(lv)(MUT gcmn 0x004f82c0) makes the five gomoras and callsGomoraInit(lv)(0x004fe460) on each with the core's own level.GomoraInitswitches on the level, not on the attribute:- levels 1-4 take
GetCCSAdrs("x01")to"x04"into the stream (+0xcc),kyviaGomoraAnmTblinto +0x1a8, andAllGomoraList_lv; - then
ANM_ex0gnut0of that stream into a newccAnm(+0xd4).CoreInittakes the same streams for the core. So all gomoras of a fight share one stream: x01 in Mutation's fight, x02 in Outbreak's second.
- levels 1-4 take
- The draw.
ccBoss::Draw(0x00472e50) sets the fog blend and the transparency, then callsccAnm::Drawon +0xd4. No gomora code callsChangeClut,SetUVor a clump. The anm draws its clip's objects:ANM_ex0gnut0,atc0,dmg0andmag0moveOBJ_trall3,OBJ_ex01gom1andOBJ_ex31gomc, the nodes ofCMP_trall3. OnlyMDL_ex01gom1(lit) andMDL_ex31gomchave drawn models. - The morph.
ccAnm::SetAnm(main 0x00150fd0) makes each anm its ownccMorpher(new ccMorpherat 0x001518a8).DecodeF_Morpher(0x0014e760) sets its targets and weights from the clip'sF_Morpherrecords through the anm's own index. So each gomora bends by its own clip and frame.MPH_ex01gom1bendsMDL_ex01gom1.ANM_ex0gnut0(41 frames, a loop): towardMDL_ex01gom2over frames 1-10, from it togom3by 20 andgom4by 30, back to the base by 40.- The attack, damage and magic clips: toward
MDL_ex01atc1,atc02andatc03. In one frame the weights can add up past 1 (0.99 and 0.027).
- The targets are full models (mtype 0, not position-only), each with its own one-node clump. That is why they looked like models to pick.
The same holds for the core (MPH_ex0c_out) and for Kyvia's body
(MPH_ex0bbod1, 2). x01 and x02 have the same names on Mutation and
Outbreak.
What the port did
piney_world::body::Body::draw_parts drew every model unbent
(morph: Vec::new()). Only foe::Model (enemies) and the arm's ccAnm
draw applied the clip's weights. So:
- each gomora drew the bare
MDL_ex01gom1, its clump taken asCMP_ex01gom2; - the core and the body never bent either.
The port
- piney-battle:
kyvia::stream(lv)isCoreInit's andGomoraInit's stream.Fight::filereturns the stream at its level.
- piney-world:
Bodykeeps its file's morphers (MPH_toMDL_).Body::morph_ofgives a model's targets fromPlay::morph, anddraw_partsdraws each model of the body's own file with them.foe::Modeldrops its own copy of the map and usesBody's.BossLook'sbody_morphersis gone; the arm's draw reads the body's.- The parts' clumps are
CMP_trall2andCMP_trall3, ofFight::file.
Checks
tools/test_battle_kyvia_rs.py:- Each part's stream (+0xcc, the name
CoreInitorGomoraInitaskedGetCCSAdrsfor) is compared every frame with battle_probe'skyvia::stream. bulkagrees: Mutation 120 from 9300 (161,184 frames, stream x01), Outbreak's second fight 60 (180,064, x02), its first 30 (41,061, x01).- The new
test_parts_shapessteps the core's and the gomoras' clips of the fight's file in the game'sccAnm(_AnimateForward, the morpher's targets and weights each step) againsttools/anim.py, at two speeds, on all three fights.anim.py's weights are the ones the port draws with (the morph fixtures ofpiney-data'stests/anim.rs).
- Each part's stream (+0xcc, the name
session::tests::kyvia_fx::kyvias_gomoras_bend_through_their_shapesplays 6,000 frames of each fight and reads the gomoras'MDL_ex01gom1draws:- Mutation: drawn in 5,319 frames, bent apart (two gomoras unlike) in 5,237; gom2 10,544 draws, gom3 10,214, gom4 9,689, atc1 2,162, atc02 1,789, atc03 1,051.
- Outbreak: 5,324 and 5,242; 5,757, 5,664, 5,091, 978, 1,747 and 798.
- Before, every draw had no targets.
- piney-world and piney-battle tests, piney-game's suite (four threads), clippy, fmt.
Shots (kyvia_gomora_shape_shots, /mnt/data/claude/scratch/a430): every
50th frame the gomoras are drawn. Each file is named by the first
gomora's targets and weights in percent.
gomora-x01-00750-act0-gom390-gom410.png: four gomoras, each a different shape.gomora-x01-01250-act0-atc196.png: the attack's shape.gomora-x02-01200-act0-gom360-gom440.png: Outbreak's second fight.
Still unknown: nothing.