Entry 397
Mutation's walking PCs: the later class, its SEARCH PCs and the Flag Race's hiding, and the Event NPC
This entry answers what was left open by Mutation's Shop Keeper stands at his marker: an event's entry 4 is the Administrator's ccMerchan, and every town NPC entry is made by its row's class.
Linked from The Event NPC's Item List: menus 90 and 91 register what Kite holds, wears and keeps at Elf's Haven, and once all is in give the desktop items and send the NPC away, Mutation's town camera is pushed out of walls by another mask: from Mutation on cameraPosCalc asks ccModelHitCheckQZ for bit 2, and the world harness lays ROOTTOWN01 out as each disc does, Every Root Town's merchants stand on its floor as in the game: the merchant harness had never registered the town's mesh, and now checks every merchant in every town, The Event NPC's turned dummy lasts while the town's file does: a scene change to the same town keeps it, leaving reads the file afresh.
Files24 in 11 directories
rtownpc.rsmerchant.rslib.rsevent.rsrace.rstalk.rstown.rscrates/piney-world/examples/world_probe.rsmerchcam_probe.rscrates/piney-gen/src/rtownpc.rsrace.rsmanifest.rslib.rscrates/piney-data/src/tables/world.rscrates/piney-data/src/pack.rscrates/piney-game/src/world.rstown_fx.rscrates/piney-game/src/session/tests/side_events.rstools/test_world_rs.pytest_grunty_rs.pydocs/engine/field-game.mdflag-race.mdplans/outbreak-side-events.mdUNKNOWNS.mdMentioned inplans/outbreak-side-events.md:138
393 left two later-volume pieces open: Mutation's ccRtownPC and the
"Event NPC" that ccSetMerchant(0) makes from Mutation on. Both are
ported here, against the game's code on all four volumes. Outbreak's and
Quarantine's class is recompiled (other registers, the same shape).
What Mutation's class does differently
-
Who walks (
ccRegisterRandomNpc, MUT main 0x001ccdf0). 393 did not list this one. The draw is no longer Infection's:- server 1 and 3 have 2 fewer PCs, 2 has 6 fewer, 4 has 10 fewer;
- the first three slots draw
|ccRand() % 50|, the rest draw% 56; - rows 50-55 of the 56 are 180, 181, 183, 182, 120 and 121 (MUT main 0x0032ef10): the sign PCs, Sieg and Kaz. Each is open once its event is done (300, 358, 315), else taken.
Before the fix the harness's
test_selectdiffered on Mutation from the fourth slot on. -
The model.
rtpcCcsNamehas 50 files:ctwmk(Kaz) is new, andcbuzis nowctbuz.- 393's "texture tables" are the TV PCs' weapon tables: rows 159-179
read 0x0061c250 and 180 on read 0x0061c280. The generator had carried
Infection's
tvpcWeaponNameto the second table, so rows 159-167 took the sign PCs' weapons. - Type 35 holds its weapon in the left hand. Type 49 holds one in the right, as 48.
- The body is kind 8 (merchants' 16). Kite's
HitCheck, the same code, tests kind 2, so it no longer flags a PC he touches.
-
The Flag Race (
ccSnd +0x13a).- A PC placed in an even slot of 4 or more gets +0x2d7.
- While the race runs, such a walker goes after its move to act 9 (MUT gcmn 0x00524320): off the character and command lists, hidden.
- It walks again when the race ends.
-
Event mode.
npc_act 3's fade-in starts witheffTransfer. -
The SEARCH PCs (
entry 3 row marker -1, rows 159-167, Outbreak's events 267-275).- The set-up (MUT gcmn 0x00521e50) reads the row's stage from
eventStatus[row - 117], the status the events step (BT's is index 48). markPoscomes fromsearch_marks[row - 159][stage](0x0061c890).- Below stage 5 the PC starts at landmark
markPos[0]and routes on. From 5 it stands at dummysearch_dummies[markPos[0]](0x0061c8c0), facing the dummy's way for the first three. The marker is not used. - The constructor makes a TV PC glimmer (0.3) and walk at 3.5.
- It runs
searchMode(0x005243f0) in place ofnormalMode. The walks, shops and gate are the same, with these differences:- it walks with
anmTbl[1]; - it stays off the character list and collides with nothing;
- it greets no one and makes no step sounds;
- its
transrateis0.3 sin, at least 0.1, of an angle turning 256 a frame.
- it walks with
npc_act 2turns it to Kite and brightens it to 0.8.npc_act 5takes it off the lists and callseffOpenBoxat its place. At stage 5 it also callseffVirusCrystalandccSeOn3DNote(167, pos, 40). It then fades throughroutine(30 frames) and hides after 33.npc_act 6hides it.
- The set-up (MUT gcmn 0x00521e50) reads the row's stage from
The Event NPC
- When it appears.
ccSetMerchant(0)(MUT gcmn 0x00520910) makes row 175 + town after the town's merchants whileeventStatus[52](+0x652c) is set. - What sets the byte. Event 317 "ITEM COMPLETE": it opens once 315 is done (a Quarantine event, on every disc) and sets the status when mail 328 is read, in the desktop.
- The row. Flags 0x10000000, the town's
CTR1-CTR4. - Where it stands (
setMerchant, 0x005207b4).- 175, 176 and 178 stand at
DMY_marker_ev04. - 177 stands at
DMY_marker_ev01, its rotation z written toDEG2RAD(24576). - 179 stands at
DMY_marker_ev02, x and y 0, zDEG2RAD(-24576). - The writes go into the town's dummies, so markers 1 and 2 read them
for the rest of the visit (
Base::written,World::marker_dummy).
- 175, 176 and 178 stand at
- Its acts (0x00521a00): the breeders' three. Once the status is clear
it goes: idle,
effTransfer,deleteCmnd(1), a fade by 0.02. Thenmainreturns 1 and the entry control deletes it. - Its affect (0x00521990): 15 faces Kite from the talk clip's start, 14 only turns it, 0 faces its way again.
- Its talk. Its action button opens menu 90 (MUT gcmn 0x00536aa0), so 394's "who opens 90" is answered. Menus 90 and 91 are not ported, and the port shuts 90 at once.
- A deleted merchant's body.
~ccCharHittakes it off the character list. The port had left the Administrator's there after his act 5; nowMerchant::steptakes it off.
Fix
-
piney-gen (
rtownpc.rs) finds the tables per volume through the code:- the constructor's
addiu -159/-180give the weapon tables, and itsaddiu $v0, $a0, -159gives the SEARCH marks; - the set-up's next table is the dummies;
ccRegisterRandomNpc's two moduli and its table give the extra rows;rtpcCcsNameandrtpcAnmTblrun to the null.
New entries:
sign_weapon_names,search_marks,search_dummies,walk_extra_rows.DATA_VERSIONis 29. - the constructor's
-
piney-world:
rtownpc::Poolandregister_random_npc;pc_kind;OriginandSearch::set_upwithRtownPc::place_as;search_mode, act 9,TownPcs::race_hold(set by the race'sccPgBgmInitand its end) andevent_status;merchant::body_kind,EVENT_NPC,event_npc_act,event_npc_influence,dummy_of/dummy_turn;talk::menu_forgives 0x10000000 menu 90.
-
The town's Kite takes the disc's volume (
player.volume), as the fields' did. On Outbreak and Quarantine his camera fade used Infection's square root (1 ulp at frame 493 of the harness). -
piney-game shows the SEARCH PC's going (
effOpenBox, the crystal and its sound).
Checked
- Against the game's code (tools/test_world_rs.py, eemu, beside
world_probe):TownPcsAgainstGamematches on all four volumes. The harness reads the later class's offsets, and its new cases are:test_selectwith servers 0-4 and every mix of the three events;test_framesadds five SEARCH PCs at stages 0-5 in Mac Anu (spoken to, going with and without the crystal, hidden), the Flag Race on and off, server 4, and the extra rows open;test_search_dummiessets up stage 5 in Dun Loireag and Fort Ouph, where the turned dummies are.
MerchantsAgainstGame.test_event_npc(Mutation on): the Event NPC in Mac Anu and Carmina Gadelica, spoken to, then going and deleted.test_merchantsandtest_event_merchantnow also pass on Outbreak and Quarantine.
- Harness fixes.
- The module loads on Outbreak and Quarantine. ROOTTOWN01's vtable is
found through its constructor (+0x1b0 there), and the unnamed
AwakeDistantLightis left to run. - Each PC's clips are read from its own file (Mutation's files share clip names).
- The PCs' dummies carry their rotation.
- tools/test_grunty_rs.py now matches on all four volumes, which
answers 395's open point on the grunty harness. It finds the
Grunty's
dogActionas the function beforedogAction2.
- The module loads on Outbreak and Quarantine. ROOTTOWN01's vtable is
found through its constructor (+0x1b0 there), and the unnamed
- Played (piney-game, Outbreak):
search_bt_walks_from_its_stages_landmark: SEARCH BT starts at its stage-0 landmark in Carmina Gadelica, walks at 3.5, glimmers, and is off the character list.search_bt_meets_its_npc_in_six_towns(it was..._at_six_gates): the pilot catches BT in each town and the event ends at frame 12,543.- Shot (
search_bt_shot, ignored):/mnt/data/claude/scratch/i63/ out-search-bt.png, BT translucent beside Kite.
- piney-world's tests (
mutations_pool,search_marks), piney-game's suite (four threads), clippy, fmt,piney-gen gen --check,cairns checkandtools/docs.py checkpass.
- Menus 90 and 91 (the Event NPC's list and its item registry, MUT gcmn 0x0058d470 and 0x0058d9f0, page 0x0058edc0) are not ported. They can be done in the repo with a talk-harness case.
- Two other classes of tools/test_world_rs.py fail on Mutation, from before
this work and not read:
PropsAgainstGame.test_town_drawstops on a syscall in Mutation'sROOTTOWN01::Draw;WorldAgainstGame.test_frames_randomdiffers in Kite's camera at frame 88 of "town01 random 0".
- In Carmina Gadelica merchants 15 and 16 land higher in the port than in
MerchantRun(z 2.0 and 1.4e-4 against 0). That harness registers the town's Hit chunk as ROOTTOWN01 does; whether ROOTTOWN03 registers it otherwise is not read.test_event_npccompares the Event NPC alone there.