Board index » Present Evidence » Games

Page 1 of 6[ 213 posts ]
Go to page 1, 2, 3, 4, 5, 6  Next
 


Pywright tutorial (interactive tutorial available)Topic%20Title
User avatar

Dracarys!

Gender: Male

Location: In a courtroom, for some reason

Rank: Ace Attorney

Joined: Tue Nov 02, 2010 1:00 pm

Posts: 1224

SO YOU WANT TO LEARN HOW TO USE PYWRIGHT...

I know Saluk has made many a tutorial for this great casemaker. However, I still see many people having difficulties with learning how to use it. Many times it's one of the biggest hurdles one has to get over in making a game, and I've seen a few people give up because of it. I know that when I first started writing my game I also had a lot of trouble understanding it as well.

So, I thought I'd take it upon myself to make a walkthrough for the basics - a step-by-step process. I'll do my best to keep this in laymen's terms, so that even somebody with no programming experience could hopefully be able to figure it out. Pywright can be a very daunting experience, trying to learn all the coding from scratch. With this guide, you should be able to set up a basic case and hopefully be on your way to making more complicated things eventually.

There are two "sequels" for this first tutorial available. The link is at the end of this post. However, it is highly recommended that you familiarize yourself with the contents of the first tutorial first, as the second and third ones cover more intermediate material.


CONTENTS
I. Setting up your case menu
II. Inserting art
III. Starting the case
IV. Dialogue
V. SFX and music
VI. The next scene
VII. Menus
--a. Talk
--b. Present
--c. Examine
--d. Move
VIII. Flags and labels
IX. Evidence
X. Testimonies
--a. Pressing
--b. Presenting
--c. Penalties
XI. Advanced dialogue
XII. More art stuff
XIII. Finishing touches


I. Setting up your case menu

Spoiler:
First things first, you're gonna need a folder for your game. If you've played a Pywright game before, you should know that all the games go in the conveniently labelled "games" subfolder. This is where yours will go as well.

Name the folder what you want the title of your game to be. I'll call this one "Ropfa Is Awesome"
Image
Because I am.
Humility isn't one of my strong points.

Once inside, you're gonna need to put in some subfolders. Title them "art", "music", and "sfx". It should be obvious what will go into each of these.

Most aspiring case writers I see want to make more than one trial, so you'll need another subfolder for each case you have. I'll make two: "Turnabout Awesome" and "Turnabout Awesomer".
Image

After this, you're going to need to make a few .txt files. Create one called "intro". This will be what lets you choose which case to play. The file should look something like this:

Code:
set _order_cases variable
   set _case_1 Turnabout Awesome
   set _case_2 Turnabout Awesomer
   casemenu


This sets it so that Turnabout Awesome will be case #1. Awesomer will be the one the player plays second (unless they choose to sequence break and do everything backwards).
Image

Make another .txt file called "data". This file is going to be exactly that: data on your fangame. It will also decide what picture shows up in the main Pywright menu (but we'll get to that later).
Image

And voila: You have a functioning case menu. Too bad you can't actually do anything else yet. Which brings us to...



II. Inserting art

Spoiler:
Remember that art subfolder you made? Go into that. You're going to make even MORE subfolders. Make ones called "bg", "ev", "fg", "general", and "port". Each of these will be used for specific types of images.
Image
-bg is for backgrounds, like the Wright Anything Agency
-ev is for evidence. Anything that shows up in one of those little square boxes
-fg is for foregrounds, like the defense and witness benches
-general is for interface stuff. You can probably get most of the stuff you need here from the Pywright website or one of the in-engine downloads.
-port is for characters. You will need to create another separate subfolder for each character.
Image
Image

Remember that data.txt file you made in part I? You can now create a path for the game image.
Mine was labelled:
icon art/ev/ropfa.png
This directs into the art folder, then the /ev subfolder, then finally to the "ropfa" image.
Image

And there you have it.



III. Starting the case

Spoiler:
Turnabout Awesome is my first case, so I'll work on that. Go into that subfolder.

Nothing here yet. Let's start with the easiest file you'll need to make: The evidence. If you've gotten to the coding process of your case, then you should hopefully have an idea of the evidence you'll need. (If not, then please stop reading this, and go back to writing your rough draft. Seriously, I'm not joking. Rough drafts are not optional.)

For each profile or piece of evidence, you will need to write an entry here. This includes different entries for updates for the same evidence or profile.

Right now, I'll just need two things: My attorney's badge and a character profile.
Choose a codename for your evidence. This is what you will refer to it as when writing it in the code. It can be the actual title showing up in the game or it can be something else. In Turnabout on the Web, Anton Simms' title was "bakagaijin", which embarrassingly ended up showing up in Fuandon's LP of the case, due to a bug.
I'll just give the attorney's badge the handle "badge", to make things shorter.
Code:
set badge_name Attorney's badge

Now, I'll choose what picture shows up in the court record. This should be EXACTLY the same name as whatever picture you have in there. If your photo is called "roflstomppwnn00bzors", then that's what will go here.
Code:
set badge_pic roflstomppwnn00bzors

And now, finally, the description that will show up in the court record.
Code:
set badge_desc I'm a freaking attorney, dude. How boss is that?


Character profiles are only slightly different. You will need to put a dollar sign after each codename.
Code:
set thebest$_name Best Character

Image

Note: Anything following two backslashes // will not affect the coding of the game. These can be used for you to make useful notes for yourself. Try it!

Now you're gonna need to make another intro.txt file. This one is going to tell your game everything it should do immediately after loading, such as what evidence you want to start out with and which scene file should be the first to go to after.

set _textbox_wrap false (defines whether or not text will automatically wrap to the beginning of a line. I usually do this manually.)
set _textbox_lines 3 (AA games have always just had three lines per text box, from what I recall)
include evidence
addev badge (adds the badge evidence)
addev thebest$ (adds the profile for the best character)

script scene1 (this tells the game what file to jump to)
Image

You don't have to actually name the next file "scene1". It can be anything, however, I find it's more convenient to have the scenes labelled in order of when the player sees them.

If you want to have caseart in the main menu, you can create a file called case_screen.txt and put the label of the image you want showing up.

Example:
Code:
bg caseart



IV. Dialogue

Spoiler:
Let's make a new .txt file in Turnabout Awesome. Label it "scene1.script", because that's what we called the file in the last section.

We're gonna have a little chat with our supreme overlord faithful assistant. In the /port subfolder of /art, we had her folder called "BestCharacter", so we should refer to her as "char bestcharacter".

Note: I'm told by Saluk that while this works on my computer, on certain other operating systems (such as Linux or Android), it may not, due to the different capitalizations. In general, when using Pywright, it may be best to just not use capital letters at all.

You can choose her emotion too, by typing "e=" and then giving the name of one of her sprites.

Code:
char bestcharacter e=pumped
"I am the very best, {n}like no one ever was!"


Image

Oh wait... But now there's nothing behind her. We should probably throw her in the WAA.
Every time you want to loop the text to the beginning of the line, put in {n}.

Code:
bg wrightanything

Image

And just for added effect, we'll say she stole the witness stand.

Code:
fg wbench

Image

There. That's better!

If you ever want to have a character speaking while offscreen, just leave out the "e=whatever" phrase and instead use "hide".



V. SFX and music

Spoiler:
It's a bit boring to just listen to the same blip stuff over again. So maybe we should add some other noises in. There are lots of sound effects in the AA universe. You should be able to find most of them either on Pywright or on Court-records. Throw the files into your /sfx subfolder.
Image
Note: For best results, you should probably have them be .ogg files.
Whenever using one of these, just use the command:
sfx whatever

Example:
Code:
sfx shout-loud


To insert sound effects into the middle of dialogue, just put it into brackets.

"Blah blah blah {sfx whatever}blah"

The AA series also likes to use a recent invention called music, so we'd better throw some of that stuff in too. Most songs are going to need two separate files: An introduction and something that loops. To use music, type like so:
Code:
mus thisisasong
set _music_loop thisisasong2


Example:
Code:
mus Warehouse Tiger
set _music_loop Warehouse Tiger - loop


Image

Image
You can't hear it, but Best Character is now emphasizing her words with dramatic explosive noises and a BA jazz tune. Don't you wish stuff exploded when YOU talked?

If you REALLY want the music to stop, just use this:
Code:
mus


For fading the music in or out, do like this:

Code:
music_fade_in
music_fade_out


Note that if you fade out, you won't be able to hear ANY music until you use the music_fade_in command again.

To add pauses, use {p number}. Only instead of "number", use an actual number. 60 comes out to about one second.



VI. The next scene

Spoiler:
Now that Nick and Best Character are finished having their meaningful conversation, they should continue on to the next scene. They're gonna go on down to criminal affairs and talk politics with their good pal Gumshoe. Remember the "script scene1" command earlier?" Well, we're gonna do the same thing. Only instead of a neat, orderly title by scene number, I'm gonna get creative with this one and call it "script gumshoe". (Remember, you can call the scene anything you want).

So, create a .txt file called "gumshoe.script". This is where the game will jump to after Nick and Maya finish talking.

Nick and Gumshoe's chat about federal financial policy ends, sending us to the NEXT scene. Create a new .txt file accordingly.

script gumshoemenu
gumshoemenu.script
Image

We're actually gonna stick around the police department and keep talking to Gumshoe, because it seems we have a case to solve. This leads to...



VII. Menus

Spoiler:
We're in the investigation part, after all. We need some kind of way to interact with the environment. There are multiple ways to go about this. I'm going to show you the one I use for my game. I have one file for the menu "base" and one for each of the different interaction methods - Talk, Examine, Present, and Move.
In the base, end the file with:
Code:
menu gumshoe

Because, you know, that's the name of the scene we're in.

Each of the other four files will deal with its corresponding interaction. Which goes with what should be pretty self-explanatory.
Image


--a. Talk

Spoiler:
We're gonna learn about lists now. A list is exactly what it sounds like - a list of stuff to choose from. In this case, it's gonna be conversation options. Give the list a name. It can be anything. Like so:
Code:
list thisismylist

Each option in the list should be named what you want the player to see. It will come after "li".
Code:
li Plot
li More plot

And then...
Code:
showlist
menu gumshoe

That will show the list (duh) and give you the option of returning to the menu.

From here, you need to make dialogue for each list option. Start each conversation with a label.
Code:
label Plot
label More Plot


Labels are pieces that the game can skip to if commanded. In this case, it's the conversation options. We'll learn more about labels later.

Once you're done with the conversation, return to the top of the talk menu by putting in:
Code:
goto thisismylist


Goto commands should again be self-explanatory. However, in case you were wondering, they make the game "go to" a specific line of the script. In this case, the beginning of the talk list. This will only work for this specific file. So you can't have the game goto a part of a different scene.
Image
Image



--b. Present

Spoiler:
Only one new command here, and that's "present". This will cue up a prompt for the player to show something.

Code:
label top
   bg police
   char gumshoe e=normal
   present
   menu gumshoe

   label badge
   char phoenix hide
   "This is dialogue."
   char gumshoe e=normal
   "Yes, it is."
   goto top

   label thebest$
   char phoenix hide
   "It was probably Maya. She did it."
   char gumshoe e=mad
   "That little scamp!"
   goto top

Image

"label top" is where the game will go after every time you present something. The goto commands send it there.

In this case, we only have two pieces of evidence. However, in your game you'll probably have more and not every character will have something to say about everything. So, you'll need to make an option for if they don't have anything to say: label none.

Code:
label none
char gumshoe e=normal
"Sorry, pal. I can't say anything {n}about that."
goto top



--c. Examine

Spoiler:
This one's a bit trickier. It starts out about the same as before, but then...

Code:
label top
bg police
char gumshoe e=normal

examine
region 8 69 97 77 computers
region 159 54 73 16 badgers
region 120 51 21 26 chief
menu gumshoe

label computers
char phoenix hide
"Computers."
goto top

label chief
char phoenix hide
"The police chief."
goto top

label badgers
char phoenix hide
"Mushroom, mushroom."
goto top

label none
char phoenix hide
"Nothing here."
goto top


Holy crap, what are all those numbers?!

For each examine spot, there is an invisible rectangle. Each set of four numbers tells how big these rectangles are. The first two numbers give the X and Y coordinates for the upper left corner of the box (basically, where it is on the map). The last two say how tall and wide it will be. There are a few programs you can use to find these. I personally recommend using GIMP, because you can very easily find them in the proper order with the rectangle tool (and also because it's free).
Image
Image
Image



--d. Move

Spoiler:
This part will require another list, like the talk menu. It's pretty much the same, too. The only difference is that instead of giving you dialogue, it sends you to another scene.

Code:
bg police
   char gumshoe e=normal

   list gumshoemove
   li Wright Anything Agency
   li Court
   showlist
   menu gumshoe

   label Wright Anything Agency
   mus
   script scene1

   label Court
   mus
   script courtscene



VIII. Flags and labels

Spoiler:
But wait...! That leaves open the possibility of the player proceeding to the next scene without them seeing everything you want them to see. How could we possibly prevent them from doing that?

We need flags. These little guys can be kind of hard to understand at first, but I assure you they're essential to a proper AA fangame. They're used to:
-Unlock new move options (Phoenix can now move to the killer's hideout)
-Unlock new talk options (maybe we want to confront the killer after breaking his psyche-locks)
-Trigger new scenes (after finding some evidence, the killer suddenly shows up to confront Phoenix)
-For testimonies that require you to press certain statements or present multiple pieces of evidence
-SUPER objections where you need to present multiple pieces of evidence at the same time
-Different dialogue after talking about the same thing twice (the killer gets annoyed and slips up the second time around)
-Skipping an entire chunk of dialogue if you've already seen it once.
-And more

So as you can see, flags are pretty dang useful.

To place one, use the command "setflag".
Example:
Code:
setflag thisisaflag


"thisisaflag" is the name of your new flag. You can choose to stop the player or allow him to continue based on whether or not he has activated this flag. For this, use either "flag" or "noflag"
Code:
flag thisisaflag theend
noflag thisisaflag tryagain


"theend" and "tryagain" will be labels that you are sending the player to. "flag" means that if the player has set the flag, he will go to "label theend". "noflag" means that if he DOESN'T have the flag set yet, he will be sent directly to "label tryagain".

If the player reaches "flag thisisaflag theend" and he hasn't already set the flag, he will just skip that line and go to whatever is next. He will only continue to "label theend" once he sets the flag. The opposite is true for "noflag thisisaflag tryagain". The player will only go to "label tryagain" if he doesn't have the flag. If he does, he'll skip it.

Let's try this with the examine scene with Gumshoe. You can put "AND" between multiple flags to create more than one requirement for proceeding.

Code:
label top
   bg police
   char gumshoe e=normal

   examine
   region 8 69 97 77 computers
   region 159 54 73 16 badgers
   region 120 51 21 26 chief
   menu gumshoe

   label computers
   char phoenix hide
   "Computers."
   setflag examinecomputers
   flag examinebadgers AND examinechief AND examinecomputers dead
   goto top

   label chief
   char phoenix hide
   "The police chief."
   setflag examinechief
   flag examinebadgers AND examinechief AND examinecomputers dead
   goto top

   label badgers
   char phoenix hide
   "Mushroom, mushroom."
   setflag examinebadgers
   flag examinebadgers AND examinechief AND examinecomputers dead
   goto top

   label none
   char phoenix hide
   "Nothing here."
   goto top

   label dead
   char BestCharacter e=mad
   "{sfx shout-loud}Haha!! I just killed you!"
   char phoenix hide
   "Woe, I am slain!"
   setflag mayakilledphoenix
   goto top


Now after examining the computers, chief, and badgers, Maya will show up and kill Phoenix. The three flags are set by examining each piece. Then after the third one, the game will skip to the new "label dead" dialogue at the end. If Phoenix HASN'T examined all three, the game will skip the "flag" command and go to the "goto top" statement.

Flags, unlike labels, can last for the whole case. So you could set a flag in one scene, and move on to another area. So maybe the killer will ambush Phoenix at the Wright Anything Agency, but only after he's found all the evidence in a completely different area.

If you'll notice, I added another flag in the last piece called "setflag mayakilledphoenix". We're gonna make this so Nick can't move to court until AFTER he is dead.

Code:
bg police
   char gumshoe e=normal

   list gumshoemove
   li Wright Anything Agency
   flag mayakilledphoenix cangocourt
   showlist
   menu gumshoe
   label cangocourt
   li Court
   showlist
   menu gumshoe

   label Wright Anything Agency
   mus
   script scene1

   label Court
   mus
   script courtscene


Now the option for "Court" won't even appear until Phoenix is dead.

You can delete flags by using "delflag".
Example:
Code:
delflag thisisaflag



IX. Evidence

Spoiler:
Let's move onto court. We'll have Gumshoe give us some evidence.
Code:
bg witness
   char gumshoe e=normal
   set _ev gumshoe
   showevl
   "I'm your evidence, pal!"
   hidevl

Image

"set_ev" tells which item from the art/ev folder to use.
"showevl" makes that evidence show up on the left side of the screen. You can also use "showevr" to make it show up on the right side. "hideevl" and "hideevr" will make it disappear.

Now to add it to the court record with "addev".
Code:
bg defense
   fg dbench
   char phoenix e=handsondesk
   "Gumshoe is my evidence."
   addev gumshoe


You can also remove stuff from the court record with "delev".
Code:
bg defense
   fg dbench
   char phoenix e=handsondesk
   "Oh no! Maya just stole my badge!"
   delev badge
   "What'll I do?!"

Image



X. Testimonies

Spoiler:
Time to confront the bad guy. Testimonies should start out with a label to come back to.
Code:
bg witness
   char BestCharacter e=cheerful
   mus Confrontation - Moderato.ogg
   set _music_loop Confrontation - Moderato - loop.ogg
   label start


That'll do for now. Now to begin the cross-examination...
Code:
cross mayatestimony


Followed by names for the different statements (stuff you can easily remember).

Code:
statement mayaA
   bg witness
   char BestCharacter e=cheerful
   "Let me tell you something..."

   statement mayaB
   bg witness
   char BestCharacter e=cheerful
   "We're all the killer!"

   statement mayaC
   bg witness
   char BestCharacter e=cheerful
   "And I didn't steal the witness bench!"

   endcross


And of course, something to loop into once you've finished cycling through... and then return to the "label start" at the beginning.

Code:
label afterlast
   bg defense
   fg dbench
   char phoenix e=handsondesk
   "She's lying! But how can{n}I prove it?!"
   goto start

Image



a. Pressing

Spoiler:
To create dialogue for pressing, use:
Code:
label press mayaA
   bg defense
   fg dbench
   char phoenix e=handsondesk
   "What?!"

   bg witness
   char BestCharacter e=mad
   "Pay attention and I'll tell you!!!"

   bg defense
   fg dbench
   char phoenix e=handsondesk
   "Okay..."
   resume


   label press mayaB
   char BestCharacter e=normal
   "These are words."
   resume


   label press mayaC
   char BestCharacter e=pumped
   "These are more words!!!"
   goto afterlast


Notice the "goto afterlast" that makes it loop around to the side-comments section.



b. Presenting

Spoiler:
To choose what the player needs to present and where, write:
Code:
label [EVIDENCE] [STATEMENT]

Example:
Code:
label gumshoe mayaB


Code:
label gumshoe mayaB
   mus
   sfx /phoenix/objection
   fg ObjectionAnim
   bg defense
   fg dbench
   char phoenix e=handsondesk
   "Gumshoe didn't kill me!{n}YOU DID!!!"   
   char phoenix e=pointing
   "And you're not Maya!{n}You're Don Paolo!!!"
   "Give the witness bench back!!!"

   bg witness
   fg wbench
   char BestCharacter e=paolo
   "Okay.  Sorry."
   exit

Image

"Exit" will cause the game to end.



c. Penalties

Spoiler:
If the player presents the wrong thing, you can send him to the end. This will be another "label none" statement.
Code:
label none
   bg witness
   char maya e=mad
   "WRONG!!!"
   penalty -30
   is penalty 0 gameover
   goto start


"penalty -30" takes 30 points off of your penalty bar (out of 100). You can also add penalty points with "penalty +30".

"is penalty 0 gameover" means that once the penalty bar reaches 0, the game will be sent to the "gameover" label.
Code:
label gameover
   bg defense
   fg dbench
   char phoenix
   "Whoops.  Better reload from{n}my last save!"
   exit

Image



XI. Advanced dialogue

Spoiler:
You can alter the dialogue in different ways. We've already seen how you can add sound effects or skip to the next line.

{f} will cause the screen to flash.

{s number} will cause the screen to shake. The bigger the number, the bigger the shake.

{delay number} will cause the text to slow down. The bigger the number, the slower the text.

{spd number} will cause the text to go faster. The bigger the number, the faster it will be.

{p number} will cause the text to pause. The bigger the number, the longer the pause. 60 is about a one second pause.

{e emotion} will cause the character speaking to change emotions in mid-sentence. Replace "emotion" with the name of one of their different poses (aka the name of the file in the art/port folder.)

Place {next} at the end of the quote to have it skip to the next line without the player's input. This is good for ranting witnesses, like Oldbag or Wesley Stickler.

As an example, look at the breakdown for the killer in A Turnabout Is Worth A Thousand Words (not really spoilers, since it's a tutorial case and there's only one witness). It uses every single one of these. See if you can pick out what happens, and where.

Code:
"Bu{p15}-Bu{p15}-But... {p30}They love me...!"
   "M{p15}{delay 1}-My career......"
   "My {p20}{spd 2}{e crying}{f}{sfx shout-scream}{s5}FFFFFF{sfx shout-shock}   {s5}FFFFFFFFFFFA{sfx shout-scream}{s10}AAAAAAA{n}AAAAAAAAAAA{sfx    shout-scream}{s5}AAAAAAA{f}{sfx shout-shock}AAAAAA{n}AAAAAA{sfx       shout-general}AAAAAAAAA{sfx shout-scream}{s10}AAAAAAAAA{next}"
   "{spd 3}AAAAAAA{f}{sfx shout-objection}{s5}AAAAAAAAAAA{sfx shout-      shock}{f}AAAAAA{n}AAAAA{s5}{sfx shout-shock}AAAAAAAAAAAAA{sfx       shout-general}{s5}AAAANN{n}NNNNNN{sfx shout-shock}{s10}         NNNNNNNNNNNNNN{sfx shout-general}{s5}NNNNNN{next}"
   "{spd 4}NNNNNNNNN{s15}{f}{sfx shout-scream}{s5}               NNNNNNNNNNNNNNNNN{n}SSSSS{sfx shout-shock}{s10}   
   SSSSSSSSSSS{sfx shout-scream}{s10}SSSSSSSSSS{n}SSSSSSSSSS{f}   {sfx shout-objection}{s15}SSSSSSSSSSSSSSSS{next}"



XII. More art stuff

Spoiler:
Any custom sprites you make will need to have a .txt file associated with them. The .txt file should have the same name as the picture file.

I've seen some tutorials for Pywright recommending three sprites per emotion - (talk), (blink), and (combine). I, however, have only ever needed to use two - (talk) and (blink). (talk) is for when the person is speaking. (blink) is for when they aren't speaking.

All the frames for a sprite should be on the same page. I find it easiest to put them each in a separate 256x192 pixel rectangle, with everything but the character being transparent (most good art programs have a transparency option). I say it's easy because 256x192 is the same size as the standard background in the game, so you can just place the sprite in the exact spot you'd want it to appear on the screen.
horizontal - how many frames wide the file is
vertical - how many frames tall it is
length - how many frames it is in total
loops - whether it should loop or play once and then stop. Use 1 for looping and 0 for only playing once.

This step will probably require a lot of copy/pasting. The way I've always done it has been to post the first frame into a 256x192 box and then manually copy/paste that until all the different frames were in place. It takes a bit of time, but it gets the job done.
Alternately, there is a program on the Pywright website that lets you turn animated .gif files into the proper format.
http://pywright.dawnsoft.org/gif2strip/index.cgi

You can also have animated backgrounds or foregrounds. They too will need .txt files.
Image



XIII. Finishing touches

Spoiler:
There are various other features you can use in Pywright, some more complicated than others. Here are some common ones you can use to improve the look of things:

fade - used to (obviously) make stuff fade into view, as opposed to instantly showing up. Can be used with pretty much any art piece
Examples:
Code:
char maya e=normal fade
      bg wrightanything fade
      fg wbench fade


name - give a temporary name to an object. This is not a name the player will see in-game, but rather something you can use to specifically call an object at a later point.

delete - exactly what it sounds like
Example:
Code:
bg witness
      fg wbench name=harold
      char maya e=normal
      "Hi, I'm definitely not Don Paolo."
      delete name=harold


This script would cause "harold", the witness bench, to disappear after Maya says she isn't Don Paolo.

pause - just what it sounds like. Put a number in after it and it will pause for that many frames. About 60 frames per second.
Example:
Code:
pause 60


stack - stacks one background on top of the other. If you put up a new background without using this, it will automatically delete everything else on the screen. Using "stack" will make it so that the character or foreground on the screen will still remain (among other uses).
Example:
Code:
bg witness
      fg wbench
      char maya e=normal
      pause 60
      bg black stack fade
      "Ha ha!! {e pumped}{n}I just stole the background!!!"



FINAL THOUGHTS

This was just a very basic tutorial. There are many, many different commands in Pywright. However, once you have these basics down, learning the more complicated stuff shouldn't be too difficult. There are already several tutorials in Pywright itself for some more complicated stuff (see the "examples subfolder"), as well as some things on the Pywright website. Hopefully this can help some of you aspiring case writers out there to get started.

Please let me know if anything I said here was too confusing and I'll try to reword it or expand on it.


TURNABOUT AWESOMER AND TURNABOUT MOST AWESOMEST
What was originally just a gag title ended up actually getting made. These are the interactive "sequels" to Turnabout Awesome. Recommended for people who have already familiarized themselves with the first tutorial.

Turnabout Awesomer deals with some intermediate functions of Pywright, while Turnabout Most Awesomest deals with macros and variables.

http://www.mediafire.com/download/z651y38iei28kfc/Pywright_Tutorial.zip


Once you've got your coding down, before you release your case, be sure to test it thoroughly to make sure it works. More information on that in this thread.


Last edited by Ropfa on Wed Feb 18, 2015 10:48 am, edited 20 times in total.
Re: So you want to learn how to use Pywright... (a tutorial)Topic%20Title
User avatar

NYAN-NYAN-NYAN-NYAN-NYAN-NYAN-NYAN

Gender: Male

Location: Finland

Rank: Decisive Witness

Joined: Mon Apr 08, 2013 12:28 pm

Posts: 256

One word: Mindblow!
Thanks to this i can start coding tommorow!
Image

NYAN
Re: So you want to learn how to use Pywright... (a tutorial)Topic%20Title
User avatar

Gender: Male

Rank: Suspect

Joined: Sat Jun 22, 2013 6:47 pm

Posts: 30

Hey, I'm having a problem over here. It won't bring me to menu after Phoenix finishes talking to Maya in my own scene. It's supposed to first show Phoenix and Maya talking, and the bring up the menu, but it won't. I followed your instructions, but I still don't know why it's doing this.
Image
Behold! The Ace Attorney Band!
Re: So you want to learn how to use Pywright... (a tutorial)Topic%20Title
User avatar

Dracarys!

Gender: Male

Location: In a courtroom, for some reason

Rank: Ace Attorney

Joined: Tue Nov 02, 2010 1:00 pm

Posts: 1224

I assume you're referring to the the talk/examine/present/move menu. The instructions here don't teach how to do that until later. At that point, it's just supposed to skip directly to the scene with Gumshoe.

(See "VI. The next scene)

Anytime there is a menu, you will need separate files and coding for it. This will all be explained once you get to the part with Gumshoe.
Re: So you want to learn how to use Pywright... (a tutorial)Topic%20Title
User avatar

NYAN-NYAN-NYAN-NYAN-NYAN-NYAN-NYAN

Gender: Male

Location: Finland

Rank: Decisive Witness

Joined: Mon Apr 08, 2013 12:28 pm

Posts: 256

region 8 69 97 77 computers
region 159 54 73 16 badgers
region 120 51 21 26 chief
menu gumshoe



i must say that that explained a lot to me, but im missing one thing. what do the first numbers mean?
theyre all different, i can understand the lastones but not the first ones.
Image

NYAN
Re: So you want to learn how to use Pywright... (a tutorial)Topic%20Title
User avatar

Gender: Male

Rank: Medium-in-training

Joined: Wed Aug 24, 2011 2:25 pm

Posts: 343

Ropfa wrote:
Each set of four tells how big the rectangle is to find something. The first two numbers give the X and Y coordinates for the upper left corner of the box. The last two say how tall and wide it will be.


In simpler terms, it's an imaginary rectangle placed in the 256x192 image. The area that, when the player clicks it, will make the dialogue go.

The first two numbers is the placement of this imaginary rectangle inside of the actual image (specifically, it's left upper corner) and the other two are width and length. ...If that makes sense.
That one guy from AAO that made about a dozen cases that all kinda go off the deep end and fall apart at one point or another.
Re: So you want to learn how to use Pywright... (a tutorial)Topic%20Title
User avatar

Gender: Male

Rank: Prosecutor

Joined: Thu Mar 06, 2008 8:36 pm

Posts: 770

This is AWESOME!

Quote:
i must say that that explained a lot to me, but im missing one thing. what do the first numbers mean?
theyre all different, i can understand the lastones but not the first ones.


To figure out the numbers, most graphics programs have an option to use a rectangle to select an area of the image. I based the numbers off of what gimp reports as the numbers for the selected rectangle. So as Dude says, it's the left x coordinate, the top y coordinate, and then the width and height.
Creator of PyWright, the lovable case construction system!
Also visit the PyWright post.
Re: So you want to learn how to use Pywright... (a tutorial)Topic%20Title
User avatar

NYAN-NYAN-NYAN-NYAN-NYAN-NYAN-NYAN

Gender: Male

Location: Finland

Rank: Decisive Witness

Joined: Mon Apr 08, 2013 12:28 pm

Posts: 256

Danke, Herr Forhead
Image

NYAN
Re: So you want to learn how to use Pywright... (a tutorial)Topic%20Title
User avatar

Dracarys!

Gender: Male

Location: In a courtroom, for some reason

Rank: Ace Attorney

Joined: Tue Nov 02, 2010 1:00 pm

Posts: 1224

I've already talked with a few of the other Pywright casewriters, but I'm currently in the process of making a sequel tutorial for this, covering some more advanced stuff. This one's going to be playable and interactive and will require the player to actually go in and edit various things.

Before I finish it, I'd like to know if there's anything that wasn't covered in this first tutorial which you'd like to see in the second. The whole purpose of this is to help out other people, so I'd like to know what specific things you're struggling with.
Re: So you want to learn how to use Pywright... (a tutorial)Topic%20Title
User avatar

NYAN-NYAN-NYAN-NYAN-NYAN-NYAN-NYAN

Gender: Male

Location: Finland

Rank: Decisive Witness

Joined: Mon Apr 08, 2013 12:28 pm

Posts: 256

How would i publish it?
Image

NYAN
Re: So you want to learn how to use Pywright... (a tutorial)Topic%20Title
User avatar

Dracarys!

Gender: Male

Location: In a courtroom, for some reason

Rank: Ace Attorney

Joined: Tue Nov 02, 2010 1:00 pm

Posts: 1224

Publish it? As in get a trademark on it and put it up for sale and everything?

You can't do that.
Re: So you want to learn how to use Pywright... (a tutorial)Topic%20Title
User avatar

NYAN-NYAN-NYAN-NYAN-NYAN-NYAN-NYAN

Gender: Male

Location: Finland

Rank: Decisive Witness

Joined: Mon Apr 08, 2013 12:28 pm

Posts: 256

....no, i meant how do i put it on somewhere where others can upload it and play it....
Image

NYAN
Re: So you want to learn how to use Pywright... (a tutorial)Topic%20Title
User avatar

Dracarys!

Gender: Male

Location: In a courtroom, for some reason

Rank: Ace Attorney

Joined: Tue Nov 02, 2010 1:00 pm

Posts: 1224

Just put it onto any download site like Megaupload or Rapidshare, then post the link on here.
Re: So you want to learn how to use Pywright... (a tutorial)Topic%20Title
User avatar

NYAN-NYAN-NYAN-NYAN-NYAN-NYAN-NYAN

Gender: Male

Location: Finland

Rank: Decisive Witness

Joined: Mon Apr 08, 2013 12:28 pm

Posts: 256

Ok.
Image

NYAN
Re: So you want to learn how to use Pywright... (a tutorial)Topic%20Title
User avatar

Dracarys!

Gender: Male

Location: In a courtroom, for some reason

Rank: Ace Attorney

Joined: Tue Nov 02, 2010 1:00 pm

Posts: 1224

For all you Spanish speakers out there, this tutorial is in the process of getting a translation, thanks to HOYGAN. Not yet finished.

http://aceattorneyspain.com/foro/index.php?topic=4808.0
Re: So you want to learn how to use Pywright... (a tutorial)Topic%20Title
User avatar

Dracarys!

Gender: Male

Location: In a courtroom, for some reason

Rank: Ace Attorney

Joined: Tue Nov 02, 2010 1:00 pm

Posts: 1224

As I said before, I'm making an interactive sequel tutorial for some more advanced things. This will be a downloadable tutorial "game", which you will need to actually go in and change or write new code. I'm just about done writing it. I'd like some people to help test it for me, once it's done. I'll only need two people: One person who already has experience with Pywright and one person who is new and has little to no coding experience.

I'm hoping to get it released before next month, when I start grad school. Please post here if you want to be one of the two testers.
Re: So you want to learn how to use Pywright... (a tutorial)Topic%20Title
User avatar

Previously Cardiovore

Gender: Male

Location: England

Rank: Prosecutor

Joined: Wed Jul 01, 2009 4:47 pm

Posts: 933

I sure wouldn't mind testing it for you :)
Phoenix Wright: The Contempt of Court
FULL GAME AVAILABLE
Re: So you want to learn how to use Pywright... (a tutorial)Topic%20Title
User avatar

NYAN-NYAN-NYAN-NYAN-NYAN-NYAN-NYAN

Gender: Male

Location: Finland

Rank: Decisive Witness

Joined: Mon Apr 08, 2013 12:28 pm

Posts: 256

Me too, I know as much as a.......a newbie.
Image

NYAN
Re: So you want to learn how to use Pywright... (a tutorial)Topic%20Title
User avatar

NYAN-NYAN-NYAN-NYAN-NYAN-NYAN-NYAN

Gender: Male

Location: Finland

Rank: Decisive Witness

Joined: Mon Apr 08, 2013 12:28 pm

Posts: 256

BTW, about this tutorial... I feel as if it is missing something, like pshyce-locks and preciving for apollo, that small but critical nitpick-like things that make games flawless. :odoroki: :phoenix:
Image

NYAN
Re: So you want to learn how to use Pywright... (a tutorial)Topic%20Title
User avatar

Gender: None specified

Rank: Ace Attorney

Joined: Fri Apr 19, 2013 12:38 am

Posts: 6446

Oh wow. I like this style of system for creating your own cases. It seems abit better than the other one they have linked on court-records.
Re: So you want to learn how to use Pywright... (a tutorial)Topic%20Title
User avatar

Gender: Male

Rank: Suspect

Joined: Sat Jun 22, 2013 6:47 pm

Posts: 30

I'm as new as a newbie can get. May I play it?
Image
Behold! The Ace Attorney Band!
Re: So you want to learn how to use Pywright... (a tutorial)Topic%20Title
User avatar

Gender: None specified

Rank: Ace Attorney

Joined: Fri Apr 19, 2013 12:38 am

Posts: 6446

chcoman123 wrote:
I'm as new as a newbie can get. May I play it?


Which one? The one in the tutorial or the one linked on the home page of court-records?
Re: So you want to learn how to use Pywright... (a tutorial)Topic%20Title
User avatar

Boogy-oogy-oogy-oogy

Gender: Female

Location: USA

Rank: Desk Jockey

Joined: Wed Jun 19, 2013 2:42 am

Posts: 92

I know absolutely nothing about PyWright as well! Pick me, pick me!!!
Voodoo Sprites
I do some graphics for Conflict of Interest.
Re: So you want to learn how to use Pywright... (a tutorial)Topic%20Title
User avatar

Dracarys!

Gender: Male

Location: In a courtroom, for some reason

Rank: Ace Attorney

Joined: Tue Nov 02, 2010 1:00 pm

Posts: 1224

Okay, the two testers will be Cardiovore and TTG. Turnabout Guy asked first and I know for a fact that he has practiced with reading through this first tutorial, so he should fit the profile of what I'm looking for.

Once I'm finished with my part, I'll send it to you two to beta-test and give feedback. It may be within the next few days, since it's almost finished.
Re: So you want to learn how to use Pywright... (a tutorial)Topic%20Title
User avatar

NYAN-NYAN-NYAN-NYAN-NYAN-NYAN-NYAN

Gender: Male

Location: Finland

Rank: Decisive Witness

Joined: Mon Apr 08, 2013 12:28 pm

Posts: 256

Yepee! Thank You!
Image

NYAN
Re: So you want to learn how to use Pywright... (a tutorial)Topic%20Title
User avatar

Dracarys!

Gender: Male

Location: In a courtroom, for some reason

Rank: Ace Attorney

Joined: Tue Nov 02, 2010 1:00 pm

Posts: 1224

Okay, the Turnabout Awesomer tutorial has been sent out to the two testers.

Content that will be covered in it:

-Changing character names
-Changing character voices
-Changing text color
-Stacking
-Scrolling
-XYZ coordinates
-Evidence zoom-ins
-Flags
-Psyche-locks
-Courtroom scrolling
-Penalty threats
-Removing the back button
-Blocking evidence/profiles from being presented
-And a few other things

My guess would be that it'll be finished and ready for release within a few weeks at the most.
Re: So you want to learn how to use Pywright... (a tutorial)Topic%20Title
User avatar

Art Person

Gender: Male

Location: Making Sprites

Rank: Ace Attorney

Joined: Thu Sep 30, 2010 11:23 am

Posts: 3269

Ropfa, you truly are awesome!
Thanks for this tutorial! Now I can finally use PYWright and make a case!
Re: Pywright tutorialTopic%20Title
User avatar

Gender: Male

Location: California

Rank: Suspect

Joined: Thu Sep 12, 2013 12:11 am

Posts: 6

Great tutorial! Seems a bit incomplete, but it's enough. I'm currently working on a game starring judge. I distinctly remember his name being Judge Chambers, but the wiki disagrees. Was that from one of your fan-games? Or someone else's?
Balance > elegance > flavor > superultramythicrarekilleveryhtingstuffs to make players happy
Re: Pywright tutorialTopic%20Title
User avatar

Fate Testarossa

Gender: Male

Location: Uminari City

Rank: Prosecutor

Joined: Thu Feb 19, 2009 2:29 pm

Posts: 901

The name being Judge Chambers was from TSub, a fancase.
Image

Fate is made by クロス
Re: Pywright tutorialTopic%20Title
User avatar

Dracarys!

Gender: Male

Location: In a courtroom, for some reason

Rank: Ace Attorney

Joined: Tue Nov 02, 2010 1:00 pm

Posts: 1224

Yeah, that was from Turnabout Substitution. Officially, I don't believe he's been given a name (sort of like "Bellboy").
Re: Pywright tutorialTopic%20Title
User avatar

Gender: Male

Location: California

Rank: Suspect

Joined: Thu Sep 12, 2013 12:11 am

Posts: 6

thanks! TS was a great game, by the way. :odoroki:
Now I understand the confusion; I meant:
For Ropfa: Thanks for letting me know it was from Turnabout Substitution.
For other people reading this and Ping: TSub is a great game
Balance > elegance > flavor > superultramythicrarekilleveryhtingstuffs to make players happy


Last edited by Jereshroom on Sun Sep 15, 2013 7:40 pm, edited 2 times in total.
Re: Pywright tutorialTopic%20Title
User avatar

Dracarys!

Gender: Male

Location: In a courtroom, for some reason

Rank: Ace Attorney

Joined: Tue Nov 02, 2010 1:00 pm

Posts: 1224

I agree with you, however I had nothing to do with that project.
Re: Pywright tutorialTopic%20Title
User avatar

Gender: Male

Location: California

Rank: Suspect

Joined: Thu Sep 12, 2013 12:11 am

Posts: 6

Sorry, I meant to address Ping.
Balance > elegance > flavor > superultramythicrarekilleveryhtingstuffs to make players happy
Re: Pywright tutorialTopic%20Title
User avatar

GETCH'ER SCIENTIFIC STUFF READY

Gender: None specified

Rank: Medium-in-training

Joined: Fri Aug 09, 2013 8:17 pm

Posts: 508

This question may be irrelevant to PYwright: What do the percentages mean in someone's game thread?
Like people put
''Story: 100% Sprites: 80% Music 80% etc.'' Does it mean originality or progress?

Oh yeah and one more thing, the game kept showing the background and going back to the case screen every time I click ''new game'' no matter what I put in the folders or the text documents.

I had to put the files I need in the ''general'' folder and every other file, but nothing happens. Can anyone explain what's causing the problem?
"Oh holy father, holy Brother, holy master... My sacred mission is at last complete. With these two hands, mankind is saved. I am your will made flesh. In your name, I give thanks."


Last edited by BonnyMono on Thu Sep 12, 2013 3:13 pm, edited 1 time in total.
Re: Pywright tutorialTopic%20Title
User avatar

It is simple math!

Gender: None specified

Rank: Suspect

Joined: Sun Mar 03, 2013 11:05 pm

Posts: 37

BonnyMono wrote:
This question may be irrelevant to PYwright: What do the percentages mean in someone's game thread?
Like people put
''Story: 100% Sprites: 80% Music 80% etc.'' Does it mean originality or progress?


It is meant to be the progress the author has in their respective games. Each of those components are measured in how completed they are, and put as a percentage-
Re: Pywright tutorialTopic%20Title
User avatar

Dracarys!

Gender: Male

Location: In a courtroom, for some reason

Rank: Ace Attorney

Joined: Tue Nov 02, 2010 1:00 pm

Posts: 1224

BonnyMono wrote:
This question may be irrelevant to PYwright: What do the percentages mean in someone's game thread?
Like people put
''Story: 100% Sprites: 80% Music 80% etc.'' Does it mean originality or progress?


That's not Pywright so much as it is fangames in general. It's just a progress bar for how much you've finished.

I don't really think it would make sense to give a percentage for originality...
Re: Pywright tutorialTopic%20Title
User avatar

GETCH'ER SCIENTIFIC STUFF READY

Gender: None specified

Rank: Medium-in-training

Joined: Fri Aug 09, 2013 8:17 pm

Posts: 508

Ropfa wrote:
BonnyMono wrote:
This question may be irrelevant to PYwright: What do the percentages mean in someone's game thread?
Like people put
''Story: 100% Sprites: 80% Music 80% etc.'' Does it mean originality or progress?


That's not Pywright so much as it is fangames in general. It's just a progress bar for how much you've finished.

I don't really think it would make sense to give a percentage for originality...

Haha, I was just guessing randomly.
"Oh holy father, holy Brother, holy master... My sacred mission is at last complete. With these two hands, mankind is saved. I am your will made flesh. In your name, I give thanks."
Re: Pywright tutorialTopic%20Title
User avatar

GETCH'ER SCIENTIFIC STUFF READY

Gender: None specified

Rank: Medium-in-training

Joined: Fri Aug 09, 2013 8:17 pm

Posts: 508

[quote="BonnyMono"]This question may be irrelevant to PYwright: What do the percentages mean in someone's game thread?
Like people put
''Story: 100% Sprites: 80% Music 80% etc.'' Does it mean originality or progress?
"Oh holy father, holy Brother, holy master... My sacred mission is at last complete. With these two hands, mankind is saved. I am your will made flesh. In your name, I give thanks."
Re: Pywright tutorialTopic%20Title
User avatar

GETCH'ER SCIENTIFIC STUFF READY

Gender: None specified

Rank: Medium-in-training

Joined: Fri Aug 09, 2013 8:17 pm

Posts: 508

BonnyMono wrote:
BonnyMono wrote:
This question may be irrelevant to PYwright: What do the percentages mean in someone's game thread?
Like people put
''Story: 100% Sprites: 80% Music 80% etc.'' Does it mean originality or progress?
]
Oops, sorry, I have no idea how this got posted. My apologies.
"Oh holy father, holy Brother, holy master... My sacred mission is at last complete. With these two hands, mankind is saved. I am your will made flesh. In your name, I give thanks."
Re: Pywright tutorialTopic%20Title
User avatar

Dracarys!

Gender: Male

Location: In a courtroom, for some reason

Rank: Ace Attorney

Joined: Tue Nov 02, 2010 1:00 pm

Posts: 1224

Okay, I have a bit of a community project for all y'all who are eager to learn Pywright.

Huddini is aiming to port his AAO game, Turnabout Generations, over to Pywright. However, it's a really big game and he isn't quite sure where to get started. So, I ran a little idea by him.

I know of a certain language-learning website that is able to generate all of its money by having its students translate articles for other groups. It's working really well for them, so much that they're able to keep the site completely free. I was thinking of something similar.

I want to see if this community can "translate" Turnabout Generations into Pywright. There are lots of people here looking to practice on Pywright. If each of those people chipped in even just a little toward this project, a lot could be done for it. People can practice by porting it, and afterwards, maybe some veteran casewriters could check it all over to make sure there aren't any gamebreaking errors.

Right now, the main thing Huddini wants is to get all the files organized. If you look in the first few sections of this tutorial, you should have enough information to tell you what to do.

This isn't asking for a huge commitment from anyone. You can do as much or as little as you want. If all you're able to do is organize one folder, that's perfectly fine. But every little bit will help and practice is always good if you're looking to make your own fancase sometime in the future.

Plus you'll get brownie points from me.

If you're interested in helping, either PM one of us or post in this thread. No limit to sign-ups.
Page 1 of 6 [ 213 posts ] 
Go to page 1, 2, 3, 4, 5, 6  Next
 
Display posts from previous:  Sort by  

 Board index » Present Evidence » Games

Who is online
Users browsing this forum: No registered users and 3 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:  
News News Site map Site map SitemapIndex SitemapIndex RSS Feed RSS Feed Channel list Channel list
Powered by phpBB

phpBB SEO