Randomized Failure Conversations

Find detailed help from the AAO community, or write your own tutorials.

Moderator: EN - Forum Moderators

Post Reply
User avatar
Bad Player
Posts: 7228
Joined: Wed May 20, 2009 10:53 pm
Gender: Male
Spoken languages: American
Location: Under a bridge

Randomized Failure Conversations

Post by Bad Player »

I'm finally writing a guide~

In the Ace Attorney games, unless you've never ever done anything wrong in them, you're probably aware that when you make an incorrect present during a cross-examination, you get one of three randomized failure conversations. However, in almost every AAO fancase, an incorrect present during a cross-examination will yield one, unchanging failure conversation for the cross-examination. However, in this guide, I'll show you how you can make randomized failure conversations, like in the actual AA games, and my fancase New Year's Turnabout! It'll take some frame redirection, variables, and expressions, but I'll be leading you the whole way, so it should be fine!

Anyway, let's get started!

Randomized Failure Conversations


Go to the failure conversation block for the first testimony. Make the first, blank frame; this is the frame that will select and advance to a failure conversation. (I personally like to use 'Stop the music' on this frame, because then the music will stop even on wrong presents, faking the player out into thinking they did it correctly! If you want the music to continue to play during wrong presents, don't do anything with the music.) Set the wait timer to 1, to make the frame almost invisible.

Make the action for this frame "Read a variable's value." For 'variable's name,' check the 'Expression' box, and then enter 'f:random_int(1,3)' (without the apostrophes) in the box. Hit the "Add" button once, then put '1' and '2' in the two boxes for "variable's value."
(Note: This is for 3 failure conversations. If you want a different number, change the 3 in 'f:random_int(1,3)' to the number you want, and add boxes to "variable's value" until it's one less than the number of conversations you have, and number them starting with 1. So if you want 5 conversations, you would use 'f:random_int(1,5)', have 4 boxes for "variable's value," and label them from 1 to 4.)
Hit confirm.

Now in the rest of the block, make all the failure conversations you want, one after the other. Each failure conversation should start with the OBJECTION! bubble.

After the end of the last failure conversation, add in a blank frame, and set the wait timer to 1. Take note of this frame's number. Now for the last frame of each failure conversation, set the frame's action to "Proceed directly to another frame" and enter the noted frame number. (It's not necessary to do this for the last frame of the last conversation, because it should go to the frame we want anyway.)

Now go through the whole block, and take note of the frame number of each frame with an 'OBJECTION!' bubble. (Technically, only the 'OBJECTION!' bubbles that mark the beginning of a failure conversation, if you have other 'OBJECTION!'s in your failure conversations.) Go back to editing the action of the first frame in the block. In the boxes for 'Frame to go to if success' and 'Frame to go to if failure,' enter in the noted box numbers. In the end, it should look something like this:
Spoiler : space saver :
Image
In my trial, the first failure conversation starts on frame 247, the second on frame 256, and the last on frame 267.
And voila! This testimony now has randomized failure conversations. However, I know what you're probably thinking: this is too much work and hassle to do for every single testimony. Well, guess what. You don't!

You are going to need to use a variable to keep track of the testimony the player is currently on. I like to use a variable called 'testimony.' If you already have a variable called 'testimony' for whatever reason, you can use whatever you want, but I'm going to refer to this variable as the 'testimony' variable.

Before each testimony in the case, you need to do two things: First, you must set the variable 'testimony' to whichever number testimony it is, with the "Define a variable's value" action. So 1 for the first testimony, 2 for the second, and so on. (This can be done any time before the testimony, but I like to use this on the frame with 'Cross-Examination.') Second, you must make a blank frame immediately preceding the cross-examination block, with a wait timer of 1. (I like to set the music for the cross-examination on this frame.)
Here is an example:
Spoiler : space saver :
Image
So these are the 3 frames immediately before the 3rd cross-examination. Also, the music in that last frame is the music I want to play for the cross-examination.
For the cross-examination's failure block, you only need one frame. Go take note of the frame number of the first frame in the first testimony's failure block. (The one with the 'f:random_int(1,3)' thing.) Go to your current testimony, make a blank frame for the failure block, and set the wait timer to 1. Set the action to "Proceed directly to another frame," and make it the noted frame number, like so:
Spoiler : space saver :
Image
The frame number of the first frame of the failure conversation of the first testimony in my trial is 246. Also, the wait timer for this frame is 1.
Remember how I made you make a blank frame with a wait timer of 1 before each testimony? Go through the trial, and take note of the frame number of each of these frames (along with which testimony is corresponds to). Now go to the last frame in the failure block of the first testimony. (It should be a blank frame with a wait timer of 1.) Make the action "Read a variable's value." Make the variable's name "testimony". For "variable's value" put the testimony number, and for "Frame to go to if success" put the frame number for the frame immediately preceding the cross-examination block in question. Press "Add" to make enough columns for the number of testimonies you have.
It should look like this:
Spoiler : space saver :
Image
As you can see in my picture above, the first frame before the third testimony's cross-examination block was indeed frame 773. It doesn't matter what you put in the "frame to go to if failure" box because, in theory, it should never use that. However, you need to put something in there, or else you'll get an error when you try to save, so I just put in 1.

And with that, you should have randomized failure conversations for your entire trials!

If you don't exactly get it, to break down the process that happens: Before each cross-examination, the game notes which testimony the player is on, with the 'testimony' variable. When the player makes an incorrect present, it advances the player to the first frame in the failure conversation for the first testimony. This frame advances the player to a randomly selected failure conversation. At the end of the failure conversation, the player is advanced to the final frame in the first testimony's failure block. Finally, this frame uses the 'testimony' variable to bring the player back to the testimony s/he was on.



And... that's it! If there are any typos, errors, ambiguities or the like, please make a post saying so!

I hope this guide helped~
Last edited by Bad Player on Sun Aug 21, 2011 12:57 am, edited 2 times in total.
User avatar
henke37
Security expert / tools programmer
Posts: 3031
Joined: Wed Mar 04, 2009 9:42 pm
Gender: Male
Spoken languages: Swedish,English
Location: Sweden
Contact:

Re: Randomized Failure Conversations

Post by henke37 »

There is an easier, but risky way to reuse failure conversations: Store the frame number to return to directly in a variable. Then just read the value of the variable in an expression in the jump to frame action.

The risk should be obvious: now you have to ensure that the frame number in the variable is always correct. But then again, with the other solution you kinda had to do that anyway. I guess they are equally risky there.
Currently working on a redesign of Court-records.net.
User avatar
Thursday
Posts: 701
Joined: Sat Oct 30, 2010 2:45 am
Gender: Male
Spoken languages: English, Tagalog, Some French
Location: Toronto, ON

Re: Randomized Failure Conversations

Post by Thursday »

Wow, I've been wanting to do this for a long time.
Great guide :D Can't wait to test this out.

EDIT:
Just noticed something: the guide says to enter 'f:random(1,3)', which should be 'f:random_int(1,3)'. (Thankfully, the screenshot is correct :) ) Could throw people off if they don't look at the screenshots.
Image

Image
Day 2 - Trial COMPLETE and Playable now!
User avatar
.Saboteur
Posts: 237
Joined: Sun Dec 30, 2012 7:46 am
Gender: Male
Spoken languages: English
Location: USA

Re: Randomized Failure Conversations

Post by .Saboteur »

Thanks, this is an authenticity question I've had for a while. I'll definitely be testing it out sometime!
User avatar
Bad Player
Posts: 7228
Joined: Wed May 20, 2009 10:53 pm
Gender: Male
Spoken languages: American
Location: Under a bridge

Re: Randomized Failure Conversations

Post by Bad Player »

@Henke: Yeah, that would also work. However, I think the method already in the guide is better, because if you add/remove frames in the middle it'll still work, but with your method, you would also have to manually readjust those frames that set the variable.

@Thursday: Oh, you're right! Nice catch. Fix'd.

@AMP: No prob! Good luck!
Post Reply