Board index » Phoenix Wright » Defendant's Lobby

Page 1 of 1[ 9 posts ]
 


Ever wondered how the PW engine works? (spoilers may be insiTopic%20Title
User avatar

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 ( :keiko: ) 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. :beef:
Re: Ever wondered how the PW engine works? (spoilers may beTopic%20Title
User avatar

What?

Gender: None specified

Rank: Decisive Witness

Joined: Sun Nov 18, 2007 10:28 am

Posts: 228

Word.
Image
http://www.youtube.com/AngryAsianAce
Re: Ever wondered how the PW engine works? (spoilers may be insiTopic%20Title
User avatar

It's stuck?

Gender: Male

Location: Olympia, WA

Rank: Ace Attorney

Joined: Tue Nov 20, 2007 4:29 pm

Posts: 2107

Congratulations. You have solved roughly half the crude part of the click system.
Lana_Skyes_Heart wrote:
SO I was stuck all day inside the changing room with nothing but a glued on bra.

Panty thief strikes again! :-P
Re: Ever wondered how the PW engine works? (spoilers may be insiTopic%20Title

The truth has been elegantly revealed!

Gender: None specified

Rank: Suspect

Joined: Thu Nov 29, 2007 2:18 am

Posts: 12

Zvarri! A brilliant deduction indeed.

Now how does the "examine" phase work? For example, how does it tell if you're examining Dusky Bridge wth Maya, alone, or
Spoiler: 3-5
as Edgeworth with Gumshoe's "help"?
Re: Ever wondered how the PW engine works? (spoilers may be insiTopic%20Title
User avatar

Ready to RAWK!?

Gender: Male

Location: Ontario, Canada.

Rank: Ace Attorney

Joined: Wed Oct 10, 2007 10:56 pm

Posts: 9051

I wonder if the whole "segemented testimony" and "contradictions only" aspects of PW:AA could be adapted to the real world... It'd be awesome.
Image
Image Image Image Image
Posted by Request.
Sig by Elriel. Avatar taken from a YouTube video of Rawk Hawk's Theme.
Sig changed on December 08, 2008. Avatar changed on December 14, 2008.
Re: Ever wondered how the PW engine works? (spoilers may be insiTopic%20Title
User avatar

Gender: None specified

Rank: Medium-in-training

Joined: Sun Jun 24, 2007 6:19 pm

Posts: 449

Look At Luke wrote:
Zvarri! A brilliant deduction indeed.

Now how does the "examine" phase work? For example, how does it tell if you're examining Dusky Bridge wth Maya, alone, or
Spoiler: 3-5
as Edgeworth with Gumshoe's "help"?


The game probably just stores some variables like "mayaishere", and has a pointer for examining things that just redirects to another pointer. Like:

PTR56:
<if mayaishere=1 then gotoptr=57 else gotoptr=58>

or something.

Spoiler: GS3-5
The whole Edgeworth part is just a whole different script file though. I don't think they reuse many investigation parts that much, even if it has the exact same text. It would get too complicated if there was just one script file for all the investigation parts.

Also, Gumshoe never leaves you when you're Edgeworth in 3-5, so the examine text is just always the same.
Re: Ever wondered how the PW engine works? (spoilers may be insiTopic%20Title
User avatar

Let's! Objection!

Gender: Male

Location: Philippines

Rank: Desk Jockey

Joined: Wed Dec 19, 2007 9:20 am

Posts: 90

BigFish wrote:
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 ( :keiko: ) 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.


I just dealt with this, so here's my opinion on it: It makes perfect sense in the story as well as being a technical limitation.

Spoiler: Case 3-3
In state 1, it's just a CD. At that point, Phoenix has absolutely no idea that "MC Bomber" was a virus; it's just a mere name at that point. So showing that to Lisa in that state would really yield nothing as Phoenix would have no idea what to talk to her about regarding the CD (and Lisa could probably easily deny that it's a virus). So it makes perfect sense.


So you can blame both the programmers *and* the writers :P
Image
Re: Ever wondered how the PW engine works? (spoilers may be insiTopic%20Title
User avatar

Thick and Professional

Gender: Male

Location: Baltimore

Rank: Decisive Witness

Joined: Thu Aug 02, 2007 12:09 am

Posts: 166

How did you find this out? Do they actually store their scripts in ASCII on the cart? I would imagine they would compress them into a binary format to save space...
Re: Ever wondered how the PW engine works? (spoilers may beTopic%20Title
User avatar

Gender: None specified

Rank: Medium-in-training

Joined: Sun Jun 24, 2007 6:19 pm

Posts: 449

Quote:
How did you find this out? Do they actually store their scripts in ASCII on the cart? I would imagine they would compress them into a binary format to save space...


Well, I found it out from Comeback Courtroom, the unofficial GS3 translation project. On the "Translator's Guide" page, there's a lot of info about the GS3 GBA rom. Obviously, they didn't use ASCII in the Japenese ROM, so....

(I don't know the technical details. All I know is that any character that isn't text is a command in the script.)

However, I'm pretty much clueless about how the DS roms work. If anyone knows what changes were made in the DS versions, feel free to enlighten me. I do know that the "character number" for showing characters on the screen became obsolete, but that's it.
Page 1 of 1 [ 9 posts ] 
 
Display posts from previous:  Sort by  

 Board index » Phoenix Wright » Defendant's Lobby

Who is online
Users browsing this forum: Majestic-12 [Bot], Yandex [Bot?] and 28 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum
Jump to:  
cron
News News Site map Site map SitemapIndex SitemapIndex RSS Feed RSS Feed Channel list Channel list
Powered by phpBB

phpBB SEO