Entry 108
Back in the town with the field's party: the registry carried, the members at their StartPos
Documented in Leaving the town - Kite in a field and its dungeon.
This entry answers the question left open by The party in a field: members join and leave the running fights.
Filescrates/piney-world/src/party.rscrates/piney-game/src/session.rscrates/piney-game/src/session/event22.rscrates/piney-game/src/session/event11.rsdocs/engine/field-game.mddocs/engine/field-walk.md
Worklog 103 left one gap. The session carried ccSpcManager and
ccPartyManager from the town into a field and from area to area, but
not back into a town: Mac Anu always started from a new game's registry.
In the game both are globals, so the town's set-up builds the party the
field left.
Where a returning member stands
ccGetStartPositions(1, 2, 3) (gcmn 0x0059ff50) runs before
rebootSpcManager:
WORLD_MAN::SetCharPositionfillsStartPos[0..3]by party slot. In a town that is the start, then the start + (200, 100), + (-200, 100) and- (0, 300), all facing Kite's way.
- Then each registered slot 1-4 gets its
posanddirc(+0x20, +0x30): a party member's from its party slot's scalars (+0x04-+0x10), anyone else the origin facing 0. - The loop reads the scalars and writes the vectors, so one slot's write cannot spoil another's read.
ccFellow::Initialize then stands the character at
StartPos[listNum], its registry slot.
Before. The port's town built every fellow at the origin. That was right only for characters registered outside the party, whom their entry's marker then moves.
The port
World::set_spcstakes the area'sSpcs, with everybootParam0 as the old area'sccThSpcDeleteleaves them.- The session gives it the
Spcsright afterWorldMode::enteron a change of scene into a town. Logging in still starts a new game's registry, asccSetupNewGamedoes. - The town's
build_spcplaces each fellow at itsStartPos(start_of, using the field'sparty_startsfor the town's offsets).
Checked
the_town_takes_the_party_back:- It starts in area 31 with Piros in the party and Gates Out to Mac Anu.
- The town's party is [0, 8, -1], with Piros at (200, 5700, 600).
- Event 22's town blocks are kept out by setting
eventStatus[0]: they are written for a party without Piros, and theirmember_addwould add him a second time.
event_11_church_ends_with_blackrose_outnow checks Mac Anu's own party again. Before, that check passed only because the town ignored the field.
- No following in town. The party in town does not follow Kite:
ccAI::ActInTownis ported inpiney-battle(ai_move), but the town's fellows runpiney-world's own frame, which has only the manual paths. A member not under the events' control stands where it arrived. - Positions not checked against the game. The town branch ofSetCharPositionwas read, not run. Its member offsets are the same numbers as the field'sparty_starts, whichtest_field_rt.pychecks against the game for the fields.