Gender: None specified
Rank: Medium-in-training
Joined: Sun Jun 24, 2007 6:19 pm
Posts: 449
Behold! Almost all your questions, answered!
Okay, for one, the script format is very simple: ASCII characters are text, anything else is a command. The script is NOT OBJECT ORIENTED. The titles at the beginning of testimonies are just blocks of text, same as the rest. Going for less object-oriented for cases makes the thing a heck of a lot more flexible. (Ex: You could put testimony buttons in the middle of an investigation for a Hotel Dusk style conversation thing, without the little testimony animation and stuff.)
At the begging of each script for a part of a case, there's some header information at the beginning of the script that adds evidence to the court record. Each case has data in it for default evidence that's always there. (Ex: Attorney's Badge, Maya's profile) But the header for the script has all the evidence that's gotten during the investigation, or in previous court sessions.
Ever wondered how the game knew what parts of the script you have and have not visited, so you can skip parts you've already seen? It's simple, really. The script uses pointers, and I think the max is 255 pointers. So, I think the game uses one 255 bit long variable to check off which pointer you've seen.
The conversation/present evidence data for characters in investigation is stored in the background. When the game switches to a certain character, with a special code added to the character's ID number, it sets the conversation/present evidence data to that of the corresponding character.
The conversation/present evidence data merely stores the button picture/evidence number and the pointer to go to for the conversation/evidence data. For example: (psudeocode, obviously)
CONV1: PIC4/PTR45
CONV2: PIC2/PTR48
EVID1: #15/PTR67
To make a conversation or evidence to make a new conversation option, this is a command in the script. Like <addconv PIC5/PTR49> or something.
Different states of evidence are considered different pieces of evidence just with the same picture. The best example of this is GS3-3, with the MC Bomber CD.
State 1: "The CD Maggey saw on the table."
State 2: "A CD with a virus that Glen Elg coded."
This is why so many people got stuck on Keiko's (

) psyche-locks. For the final present evidence in there, it needed to be in state 2, although it SHOULD have worked with state 1, too. But wait! Don't blame the writers! This is a technical problem. The GBA psyche locks used THE SAME SYSTEM THAT THE TESTIMONIES DID! There wasn't just a "stop" button in the court record. It actually showed a "stop" and a "present" button that worked just like the testimony buttons! And testimonies in the GBA version could only have one correct evidence per statement! Although, you'd probably want to change this in the case maker.
On the subject of testimonies, each statement for cross-examining is a separate pointer. The testimony before cross-examining is just a bunch of text boxes. Nothing special except for the animations there. Here's roughly what the pointers look like for cross-examining look like: (psudeocode)
Code:
PTR54:
<testimony_settings PRESSPTR:65><setperson person:bob talkanim:45 silentanim:46>
/2I saw him get killed!<nextpage_button>
Pretty easy to get, right?
Also, notice the "setperson" command there. It has a person number, and two anim numbers, just like the real game. Believe it or not, the game does not use the name tag on the text box to determine whether to move the mouths or not! It uses "setperson" commands. This is how they got those flashback scenes with Phoenix and Edgeworth working in JFA, where other characters would talk, but Phoenix/Edgeworth's mouth would move.
During the court, "presentevidence" commands are used to present evidence outside of testimonies. Like, "Please show us the murder weapon!", and etc. These can have multiple correct evidence pieces.
Whew, that's about it.