Codes and Scripting Guide [V5+(V6?)]

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

Moderator: EN - Forum Moderators

Phantom

Codes and Scripting Guide [V5+(V6?)]

Post by Phantom »

As I was playing with the editor, when you went to the SCRIPT tab and inserted some dialog into the text box, you could choose 3 effects called Pause, Shake, and Flash {in the form of [#]}!
As I checked this thread: http://aceattorney.sparklin.org/forum/v ... =28&t=3652:
It turns out, there is MORE THAN 3 [#] codes, and I'm going to list everything (that is known).
I WILL PROVIDE DEMO TRIALS TO SHOW YOU THE CODE WHEN PUT INTO EFFECT!

It is RECOMMENDED YOU USE FIREFOX to edit your trials!



Without further ado, here is the list with explanation:

Code: Select all

1.) [#] -->PAUSE 1 second while speaking
  1. This is used to pause when someone is speaking (as if they are hesitating), best used before typing a sentence for emphasis.

-Example 1: [#] It's true....I murdered the victim.....
You can also put it in the middle of a sentence:
-Example 2: [#] I didn't want to...... [#] but I did!


-DEMO of examples: http://aceattorney.sparklin.org/jeu.php?id_proces=18260

-Note: You should try a combination to see what kind of effect you can have, but don't overdo it! You might bore the player and make him/her skip the frame just because it takes too long for the sprite to talk!




Code: Select all

2.) [#f] -->FLASH
  • This is used as a dramatic effect, or as a way to transition to a flashback

-Example 1: [#f] NO WAY!
For dramatic purposes, you can use two frames and put the flash code at the second frame to bring interest to the player:
-Example 2: [#f] Actually.....
[#f] YES WAY!


-Example 3: Inside..... [#f] he's a Fraulein!

-DEMO of examples:http://aceattorney.sparklin.org/jeu.php?id_proces=18262

-Note: This is very good presentation effect, I'm sure you can overdo it without giving the player seizures ;)

Code: Select all

3.) [#s] -->SHAKE
  • This is used to shake the screen (like you're in a 1 second earthquake, or someone being shot/stabbed), this is a dramatic effect used to show the reader something's usually happening (but can also be used as a humor effect like Pearly slapping Phoenix)

-Example 1: [#s] OW! That hurt!
Good for first person, easy to implement
-Example 2: Coffee....
POW!

[#s] Oof!

Good for Court View, a bit harder to implement.

-DEMO of examples: http://aceattorney.sparklin.org/jeu.php?id_proces=18267


There are 2 more that I currently know:

Code: Select all

4.) [#pn] -->PAUSE Longer/Shorter.
  • n=number of seconds you want to pause, it's an "extension" of the [#] code.

  • This is to quicken the dialog or make it longer out without the arrow disappearing.

-Example 1: [#p50] Olay! [#p300] Okay!

-DEMO (Don't CLICK THE ARROW BUTTON ON FRAME 2!): http://aceattorney.sparklin.org/jeu.php?id_proces=18272

(I don't know too much about this):

Code: Select all

5.) [#var:y]
  • Displays the value of whatever variable you put in y, [#var=example]

Thanks to Moltor, we have a really detailed explanation of how [#var:y] works:
OK. For the first trial, before each cross-examination, I defined 3 or 4 variables t1, t2, etc. to be a string of text for each part of the testimony statement. I used the expression checkbox and single quotes around the word in the define action. Like, define t1 to be the expression 'I'. When displaying the testimony during the CE, I used 3 or 4 statements like this:
Statement 1: [#var:t1]
Statement 2: <lime>[#var:t1]</lime> [#var:t2]
Statement 3: <lime>[#var:t1] [#var:t2]</lime> [#var: t3]
etc.

I used the green button in the textboxes in addition to the <lime> tags to make the untagged parts green also. The lime tags are there to force the previous parts of the sentence to appear instantly rather than being slowly typed out.

There were two possibilities for each part of the statement and pressing that part toggled them. For each "when pressed" I did something like:
Evaluate the condition t1 = 'I'
If true, jump to a frame that defines t1 to 'Scott'
If false, jump somewhere that defines it back to 'I'
Also, show dialogue to explain this changing of testimony of course.

I used similar checks of the testimony variables in the co-council chat and when successfully presenting evidence. Maya had a couple different things she could say in each CE depending on how certain variables were defined. And the successful present part needed to check to see if all the testimony variables were a certain way. If not, it jumps to the failed present section.

The other examples were simpler. The tic-tac-toe board is just:
[#var:c7] [#var:c8] [#var:c9]
[#var:c4] [#var:c5] [#var:c6]
[#var:c1] [#var:c2] [#var:c3]
Each of those variables could be defined as 'X' or 'O' (or '-' for an empty space)
Thanks again Moltor!


There's one more advanced function:

Code: Select all

6.) f:get_date() function
  • Defines variables before and after the shot, subtracts them to get the elapsed time, compares this to the time limit (which is another variable that keeps decreasing) and prints the result on successful shots.

-Examples: Moltor's shooting game.

-------------------------------------
You are welcome to post this guide in the other forums, just give credit and tell me that you're doing it so I'll know my work is for something :april:


And post here if you have anymore codes that I don't know about and improve upon the explanations I have already given!

Here is a basic summary by E.D. Revolution, thanks man:

  • [#] 1 second pause
  • [#f] flash + 1 second pause
  • [#s] shake + 1 second pause
  • [#px] custom pause (x/100 seconds). Must have the [#p] before the x otherwise it will be interpreted as a 1 second pause.
  • [#var:y] displays the value of the value of y, whatever it happens to be. This last one is pretty new to a lot of us (myself included), so ask henke about it.
Another NOTE by E.D. Revolution:
I should mention that, at the moment, it's not possible to combine [#f] and [#s] to make it play at the same time. They will be played in the order you put it in. Watch some AA walkthroughs on youtube in order to see the effect of combining [#s] and [#f]. This may have to do with the JavaScript engine and however Unas programmed it to be at the moment. He may change it as time comes.
Last edited by Phantom on Tue Mar 24, 2015 4:37 am, edited 12 times in total.
User avatar
Dypo deLina
Posts: 5528
Joined: Fri Apr 02, 2010 7:24 am
Gender: Male
Spoken languages: English, Dutch, German, French, Spanish, Al Bhed
Location: Exactly where you least expect me to be.
Contact:

Re: [#] Codes and Purposes Guide (SCRIPTS)

Post by Dypo deLina »

Wow. Your guides are incredibly handy. Are you a guide-writer IRL? :)
チラセ・マギタ
~Married to Evolina deLuna~ <3
~Loving father to ZetaAzuel~


Proud creator of Cynder Janice, Rex Gladiorum, and Raimpius in Endless Time.

Image Image
User avatar
E.D.Revolution
Posts: 5743
Joined: Mon Jul 26, 2010 9:00 pm
Gender: Male
Spoken languages: English and decent Spanish
Location: Across dimensions, transcending universes

Re: [#] Codes and Purposes Guide (SCRIPTS)

Post by E.D.Revolution »

Oh, and Phantom, it's [#var:y], not [#var=y].

I should mention that, at the moment, it's not possible to combine [#f] and [#s] to make it play at the same time. They will be played in the order you put it in. Watch some AA walkthroughs on youtube in order to see the effect of combining [#s] and [#f]. This may have to do with the JavaScript engine and however Unas programmed it to be at the moment. He may change it as time comes.

And thank you, Phantom. :pearlhappy:
Image
Phantom

Re: [#] Codes and Purposes Guide (SCRIPTS)

Post by Phantom »

If I could get paid to write guides I so totally would :p

I'm just some random Asian dude in high school, I wanted to work on a side hobby/project for the time being, but it might be affecting my studies abit :p

I also manage and run other forums, so this isn't my first time doing this kind of stuff (what with suggesting new ideas to improve the site/community, to writing guides for whatever purpose the site does)

Also, PhPBB's forums are not only free, but easy to run if your just a mod :P.



@ E.D.: I'll fix it, I just copy and pasted your quote haha :P
edit: I see you meant what I wrote, whoops :calisto:

------
I'm still pretty new to all this, but I already have a demo of my fangame (as basis for all my guides), but it's under wraps because it's taking much more time to figure out trivial things like what the heck vars and expressions serve for the editor :p.

I think I might create a showcase to get things like high quality prologues and the like (basically make guides for everyone to mastering the basics of the editor), so it feels like you're playing an actual AA....but there's some limitations unfortunately :(
User avatar
Dypo deLina
Posts: 5528
Joined: Fri Apr 02, 2010 7:24 am
Gender: Male
Spoken languages: English, Dutch, German, French, Spanish, Al Bhed
Location: Exactly where you least expect me to be.
Contact:

Re: [#] Codes and Purposes Guide (SCRIPTS)

Post by Dypo deLina »

Asian? Me too! Well, half Asian, actually. I'm half Dutch.
チラセ・マギタ
~Married to Evolina deLuna~ <3
~Loving father to ZetaAzuel~


Proud creator of Cynder Janice, Rex Gladiorum, and Raimpius in Endless Time.

Image Image
User avatar
Singapore123
Posts: 2085
Joined: Wed May 05, 2010 8:56 am
Gender: Male
Spoken languages: English, 1337, french, spanish,

Re: [#] Codes and Purposes Guide (SCRIPTS)

Post by Singapore123 »

Another one! Yay.
User avatar
E.D.Revolution
Posts: 5743
Joined: Mon Jul 26, 2010 9:00 pm
Gender: Male
Spoken languages: English and decent Spanish
Location: Across dimensions, transcending universes

Re: Guide: Codes and Purposes Guide (SCRIPTS)

Post by E.D.Revolution »

Yay! I'm full asian. :larry:
Image
Phantom

Re: Guide: Codes and Purposes Guide (SCRIPTS)

Post by Phantom »

That's where it's man :p
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: Guide: Codes and Purposes Guide (SCRIPTS)

Post by henke37 »

Shakes and flashes are not possible to combine for one reason, they have built in delay times. These times are not technologically required, Unas just chose to have them.
Currently working on a redesign of Court-records.net.
User avatar
E.D.Revolution
Posts: 5743
Joined: Mon Jul 26, 2010 9:00 pm
Gender: Male
Spoken languages: English and decent Spanish
Location: Across dimensions, transcending universes

Re: Guide: Codes and Purposes Guide (SCRIPTS)

Post by E.D.Revolution »

All right. Fair enough on why tags cannot be combined, but we still don't know exactly how [var:y] can be used in the trial, like real applications, I'm talking about.
Image
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: Guide: Codes and Purposes Guide (SCRIPTS)

Post by henke37 »

You can either use it to debug your scripts, or you can store text in the variables. That's actually how a recent trial works.
Currently working on a redesign of Court-records.net.
Phantom

Re: Guide: Codes and Purposes Guide (SCRIPTS)

Post by Phantom »

Sweet deal, I'll edit the OP to reflect this along with Moltor's trial as example.
Moltor
Posts: 76
Joined: Thu Jun 03, 2010 3:43 pm
Gender: Male

Re: Guide: Codes and Purposes Guide (SCRIPTS)

Post by Moltor »

Hey, an opportunity to plug moar of my stuff :). The var thing is very useful. I also used it for my tic-tac-toe board and to display shooting times.
Phantom

Re: Guide: Codes and Purposes Guide (SCRIPTS)

Post by Phantom »

Ofc, with your permission :p

If you can Moltor, can you post how to apply this var:y to the editor? (Like give steps to go along with the examples you provided above) so I can edit the OP to reflect this?

I'd have no sense in how to do it, so...
Moltor
Posts: 76
Joined: Thu Jun 03, 2010 3:43 pm
Gender: Male

Re: Guide: Codes and Purposes Guide (SCRIPTS)

Post by Moltor »

OK. For the first trial, before each cross-examination, I defined 3 or 4 variables t1, t2, etc. to be a string of text for each part of the testimony statement. I used the expression checkbox and single quotes around the word in the define action. Like, define t1 to be the expression 'I'. When displaying the testimony during the CE, I used 3 or 4 statements like this:
Statement 1: [#var:t1]
Statement 2: <lime>[#var:t1]</lime> [#var:t2]
Statement 3: <lime>[#var:t1] [#var:t2]</lime> [#var: t3]
etc.

I used the green button in the textboxes in addition to the <lime> tags to make the untagged parts green also. The lime tags are there to force the previous parts of the sentence to appear instantly rather than being slowly typed out.

There were two possibilities for each part of the statement and pressing that part toggled them. For each "when pressed" I did something like:
Evaluate the condition t1 = 'I'
If true, jump to a frame that defines t1 to 'Scott'
If false, jump somewhere that defines it back to 'I'
Also, show dialogue to explain this changing of testimony of course.

I used similar checks of the testimony variables in the co-council chat and when successfully presenting evidence. Maya had a couple different things she could say in each CE depending on how certain variables were defined. And the successful present part needed to check to see if all the testimony variables were a certain way. If not, it jumps to the failed present section.

The other examples were simpler. The tic-tac-toe board is just:
[#var:c7] [#var:c8] [#var:c9]
[#var:c4] [#var:c5] [#var:c6]
[#var:c1] [#var:c2] [#var:c3]

Each of those variables could be defined as 'X' or 'O' (or '-' for an empty space)

The shooting game uses the f:get_date() function to define variables before and after the shot, subtracts them to get the elapsed time, compares this to the time limit (which is another variable that keeps decreasing) and prints the result on successful shots.
Last edited by Moltor on Sat Oct 30, 2010 12:51 pm, edited 1 time in total.
Post Reply