Court Records
https://forums.court-records.net/

Pywright tutorial (interactive tutorial available)
https://forums.court-records.net/viewtopic.php?f=36&t=27314
Page 5 of 6

Author:  saluk [ Sun Jan 04, 2015 5:23 am ]
Post subject:  Re: Pywright tutorial (interactive tutorial available)

Yeah, macs and windows machines use a different line ending character. Makes things a lot of fun! Most decent text editors besides notepad should be ale to display the files correctly though whichever system you are on.

To the text timing issue Ultrawave is having... This is both badly coded and documented, but I looked at the code, and when you use "delay" it puts the text mode into "wait manual" which is a slower mode. To bump back into normal mode you'll need a "{wait auto}{delay 2}".

Nice work with the new chapter of the tutorial Ropfa. This is some heavy stuff to explain, I'm impressed you tackled it at all haha. I'll let you know if I see anything that could be tweaked.

Author:  Darth Wiader [ Wed Jan 07, 2015 9:05 am ]
Post subject:  Re: Pywright tutorial (interactive tutorial available)

In Turnabout Most Awesomest, PyWright suddenly closes when I want to "check" a map in the court records 0_o.

Author:  Ropfa [ Wed Jan 07, 2015 7:35 pm ]
Post subject:  Re: Pywright tutorial (interactive tutorial available)

That's addressed in one of the early parts of the tutorial. You need to fix some lines in the coding for the map before it's usable.

However, I did just change this so that you don't actually get the map until you need it, so that people won't accidentally open it up and crash the game before they realize that. The change will be in the next update.

Author:  Darth Wiader [ Wed Jan 07, 2015 7:38 pm ]
Post subject:  Re: Pywright tutorial (interactive tutorial available)

Okay, I guess I was too hasty. :larry:

Author:  ApolloGrimoire [ Wed Jan 07, 2015 10:19 pm ]
Post subject:  Re: Pywright tutorial (interactive tutorial available)

I'm trying to change my character's emotion mid sentence and nothing happens when I add the coding in.

Spoiler: Current text
char Trucy hide
"{sound blipfemale.ogg}{f}Trucy's fine!{p30} ...{p30}{e gasp}{sfx/Key.ogg}{n}Kinda?"

Later in the text when Ali speaks her emotion changes but not when Trucy speaks.

Author:  Ropfa [ Fri Jan 16, 2015 4:02 am ]
Post subject:  Re: Pywright tutorial (interactive tutorial available)

Is one of Trucy's animation files called "gasp"?

Author:  Vendily [ Mon Jan 26, 2015 6:24 pm ]
Post subject:  Re: Pywright tutorial (interactive tutorial available)

I finished all of the tutorial cases (learned a lot too.)
It's really through.
My only question is if it's possible to do a gallery reaction shot or is it something that needs to be coded manually?

Author:  Ropfa [ Tue Jan 27, 2015 12:58 am ]
Post subject:  Re: Pywright tutorial (interactive tutorial available)

That would just be a background (or foreground if you decide to have it animated) and a sound effect. Nothing fancy.

Author:  Darth Wiader [ Tue Jan 27, 2015 8:24 am ]
Post subject:  Re: Pywright tutorial (interactive tutorial available)

Actually, there are few macros that control gallery and other people in courtroom, but I have yet to test if they work.

They were included in an archive file called "Resources".
I believe I found it on Pywright forum, however I cannot find the link at the moment.
The whole package includes various graphic and sound resources e.g. evidence, characters, buttons, sfx etc.

I reuploaded for now the ''macro'' part (I hope the original uploader won't mind):

https://mega.co.nz/#!n44Ema5a!xGfMDs30C ... RRLLEGLgIQ

PS. What exactly does "talkchoice_high" do? :meekins:

Author:  Ropfa [ Tue Jan 27, 2015 2:41 pm ]
Post subject:  Re: Pywright tutorial (interactive tutorial available)

Darth Wiader wrote:
PS. What exactly does "talkchoice_high" do? :meekins:


After searching through my files, it appears that there is also a button with this name. I would assume it's similar to graphichigh, where it highlights the button when you click it. If anybody knows more than I do, feel free to confirm or deny this.

Author:  Darth Wiader [ Tue Jan 27, 2015 2:45 pm ]
Post subject:  Re: Pywright tutorial (interactive tutorial available)

Quote:
it appears that there is also a button with this name.


Yeah, I was refferring exactly to a button that goes by this name.
I've searched all macros and documentation and I couldn't find any command to activate it.

PS. I've just finished all your tutorials! :will:

Author:  jmkrebs30 [ Thu Jan 29, 2015 10:55 pm ]
Post subject:  Re: Pywright tutorial (interactive tutorial available)

Hey, I'm having a problem with the PyWright gif2strip webpage. It keeps giving me the 502 error and something about "nginx/1.4.1" I've tried opening it up in other servers, but it gives me the same thing. Am I the only one having this problem, or is anyone else experiencing this? :eh?:

Author:  Ropfa [ Fri Jan 30, 2015 9:50 am ]
Post subject:  Re: Pywright tutorial (interactive tutorial available)

It's not working for me either. I'd recommend contacting Saluk, because I don't have any control over the actual Pywright engine or the website.

Author:  Darth Wiader [ Fri Jan 30, 2015 9:53 am ]
Post subject:  Re: Pywright tutorial (interactive tutorial available)

It's definitely something wrong with Saluk's server.
Downloading updates and games from the PyWright's menu screen doesn't work either.

---

Is there a way to call a gui Button in a middle of a scene?

Author:  DaddyWarbucks [ Mon Apr 06, 2015 6:22 pm ]
Post subject:  Re: Pywright tutorial (interactive tutorial available)

Hello. I was wondering if I could have the coding for the macros map.mcro and gui.mcro in Turnabout Most Awesome. I can't seem to open them.

Author:  Darth Wiader [ Wed Apr 08, 2015 1:40 pm ]
Post subject:  Re: Pywright tutorial (interactive tutorial available)

You should be able to open *.mcro files in a mere Windows notepad or any other text editor.
(However, I personally prefer to edit them in Notepad ++)

Author:  DaddyWarbucks [ Wed Apr 08, 2015 2:52 pm ]
Post subject:  Re: Pywright tutorial (interactive tutorial available)

I know and that's what I've been trying to do, but whenever I open it in text edit, it just says "Failed to open this file. Please try again." However, it does let me see the name.mcro, perceive.mcro and timer.mcro. Can I please get the coding?

Author:  Darth Wiader [ Wed Apr 08, 2015 5:51 pm ]
Post subject:  Re: Pywright tutorial (interactive tutorial available)

What operating system are you running and exactly what application do you use to open *.mcro files with?
Maybe the files are corrupted? Try to re-download the whole tutorial.

Author:  Ropfa [ Wed Apr 08, 2015 10:58 pm ]
Post subject:  Re: Pywright tutorial (interactive tutorial available)

DarwinThe100 wrote:
but whenever I open it in text edit


That's Text Edit for Mac? That's the exact program I often use to write the files. It should work perfectly fine.

Edit: And in fact, I just tried it and they both worked. But regardless, here you go.

Spoiler: gui.mcro
Code:
macro _crbut
showrecord
endmacro

macro _default_court_record_button
gui Button {_crbut} name=_crbut_ graphic=general/record x=176 y=191 hotkey=k_tab z=6 try_bottom
//PUT THE NEW INFORMATION AFTER GENERAL/RECORD. KEEP IT ALL ON THE SAME LINE.
endmacro

macro show_court_record_button
isnot _cr_button exit
{hide_court_record_button}
{_default_court_record_button}
label exit

endmacro

macro hide_court_record_button
delete name=_crbut_ suppress
endmacro

macro disable_court_record_button
set _cr_button false
delete name=_crbut_ suppress
endmacro

macro enable_court_record_button
set _cr_button true
endmacro

macro theme_screen2
    set theme $1
    print The theme is $theme
    set _screen2_scanlines on
    set _screen2_letterbox on
    set _screen2_letterbox_img general/bigbutton/border
    goto $theme
    "ERROR, NO BIGBUTTON THEME {$theme}"
    label default
        set _bigbutton_bg bg/main
        set _bigbutton_img general/buttonpress
        set _bigbutton_cross general/cross_exam_buttons
        set _screen2_scanlines off
        exit
    label phoenix
        print label phoenix
        set _bigbutton_bg bg/mainpw
        set _bigbutton_img general/bigbutton/phoenix
        set _bigbutton_cross general/bigbutton/phoenix_cross
        endscript
    label empty
    label apollo
        print label apollo
        set _bigbutton_bg bg/mainaj
        set _bigbutton_img general/bigbutton/empty
        set _bigbutton_cross general/bigbutton/empty_cross
        endscript
    label mia
        print label mia
        set _bigbutton_bg bg/mainpw
        set _bigbutton_img general/bigbutton/mia
        set _bigbutton_cross general/bigbutton/mia_cross
        endscript
    label edgeworth
        print label edgeworth
        set _bigbutton_bg bg/mainpw
        set _bigbutton_img general/bigbutton/edgeworth
        set _bigbutton_cross general/bigbutton/edgeworth_cross
        endscript
    label gk
        print label gk
        set _bigbutton_bg bg/maingk
        set _bigbutton_img general/bigbutton/gk
        set _bigbutton_cross general/bigbutton/gk_cross
        endscript
endmacro


Spoiler: map.mcro
Code:
macro map2
delete name=map1
bg map2 fade
gui Button {map1} x=115 y=200 name=map2 West Side
endmacro


//COPY MACRO MAP2
//CHANGE MAP1 to MAP2
//CHANGE MAP2 to MAP1
//CHANGE WEST SIDE to EAST SIDE
//You should have two full macros

//For evidence with more than two pages, do the same thing for each page
//For two or more pages, remember to use "delete name=..." when changing pages
//That way, your screen won't get cluttered with all the different buttons


//Also note that gui Button macros are incredibly finnicky. The macro's
//name or label (in this case, {map2}) must be IMMEDIATELY after "Button"
//or else Pywright will crash. Also, if you are not using a custom graphic
//then the words showing up on the button MUST come last.
//For example, in a button coded:
//gui Button {map1} x=115 y=200 West Side name=map2
//...ingame the player would see a button labelled "West Side name=map2"
//The correct usage must be:
//gui Button {map1} x=115 y=200 name=map2 West Side

Author:  E.D.Revolution [ Thu Apr 09, 2015 1:28 am ]
Post subject:  Re: Pywright tutorial (interactive tutorial available)

I've been able to open .mcro files in windows Notepad. Did you right click one of the files and set the default program to Notepad?

Author:  DaddyWarbucks [ Thu Apr 09, 2015 3:32 am ]
Post subject:  Re: Pywright tutorial (interactive tutorial available)

Thanks. I just redownloaded them and they work now. Thanks for the help!

Author:  kaiten619 [ Sat Oct 10, 2015 1:09 pm ]
Post subject:  Re: Pywright tutorial (interactive tutorial available)

is there a way to put chapters inside the case like end of chapter 1 and still continue in case to go to chapter 2 within the same case and folder?

Author:  Nerdowl [ Fri Feb 19, 2016 7:09 pm ]
Post subject:  Re: Pywright tutorial (interactive tutorial available)

Been messing around with this for the first time this evening, and this Tutorial seemed a great place to start, but I think I got ahead of myself and...

Okay I was really hoping to work this out myself (call myself a computer programmer? Perhaps my mind is just derping tonight :oops: But I'm running out of ideas as to why I'm getting this error, despite Gumshoe's sprite displaying properly (Note: Yes this is a mac screenshot but I'm running the Windows version of PyWright via Crossover. That shouldn't be an issue though as I've been playing Super Effective Turnabout without any problems)...

Spoiler: errorscreenshot
Image


Spoiler: code
bg naruhodotalent

char apollo hide
“You are seriously accusing her of murdering her own father?”

char gumshoe e=normal
“Sorry pal, but the evidence is overwhelming.”

script scene2


I've the same issue in my second scene but this is the simpler one so I've been trying work out what is causing it from this one.



EDIT: nevermind, fixed it. TextEdit was adding something odd at the end of speech segments. Using text wrangler and saving it with Windows line breaks has fixed it. :trucy:

Author:  UltrawaveStudios [ Wed Jun 22, 2016 10:19 pm ]
Post subject:  Re: Pywright tutorial (interactive tutorial available)

Might it be possible to have art fade out? We can fade them in, but how do we fade them out? Not to black, just out.
I'm sure there is a way, but can you say how if there is?

Author:  UltrawaveStudios [ Fri Jun 24, 2016 4:10 pm ]
Post subject:  Re: Pywright tutorial (interactive tutorial available)

Also I'm going through Turnabout Most Awesomest, and I'm stuck at the second text editor for Scene 4.

Spoiler: scene4.script.txt editor 2
Code:
//TEXT EDITOR 2 BEGINS


label texteditor2

gui Input scene4text2 x=218 y=95 name=Nameyy width=20

//FOR GUI INPUT SCENE4TEXT2, PUT IN X COORDINATES, Y COORDINATES, A NAME=CODENAME, AND
// WIDTH= FOR THE TEXTBOX

gui Button next x=218 y=95 name=inbtn Enter

gui Wait

label next

//ISEMPTY LINE HERE
isempty scene4text2 none

delete name=Nameyy
// USE THE SAME CODENAME YOU USED FOR GUI INPUT SCENE4TEXT2

delete name=inbtn

is_ex scene4text2 == 'testytest' next2 fail=mistake
//PUT PASSWORD CONFIRMATION LINE HERE
//IS_EX SCENE4TEXT2 == 'yourpassword' NEXT2 FAIL=MISTAKE


//TEXT EDITOR 2 ENDS


My problem is that after Trucy's prompt to edit the coords, name, and width, the game skips over to Books's dialogue. Something wrong here?

Author:  Ropfa [ Tue Oct 18, 2016 3:06 pm ]
Post subject:  Re: Pywright tutorial (interactive tutorial available)

Okay, so I haven't gone through the third tutorial in a really long time, but I'm fairly certain that with the recent(ish) update to Pywright, the instructions in the perceive section are now just plain wrong. I keep telling myself to update it, but just haven't gotten around to it. I'll have to make a note of it and get that done sometime soon.

Author:  CE53 [ Thu Oct 27, 2016 7:10 am ]
Post subject:  Re: Pywright tutorial (interactive tutorial available)

I must be doing something wrong because I've been running into an issue with Pywright where it seems to pick and choose when it wants to allow a custom character on screen.

Spoiler: Exhibit A
Image


This is a screenshot of the emotion I got to play from this character in the Pywright engine. As the highlighted part of Notepad++ suggests...

Spoiler: Exhibit B
Image


This part of the emote, when the character actually syncs its lips with the text appearing on screen, won't play at all.

Spoiler: Exhibit C
Image


Not only that, but the emotes of this character don't even register on screen. No nametag or anything.

Spoiler: Exhibit D
Image


Both characters are in the port folder with the same names as the names used in the code. I'm not sure what's going on here: if I'm doing something wrong, or if Pywright is just being inconsistent.

It also could be a problem with the sprite. If someone has an answer, PM me or let me know in the thread.

Author:  Darth Wiader [ Thu Oct 27, 2016 7:44 am ]
Post subject:  Re: Pywright tutorial (interactive tutorial available)

Do all emotions display wrong or only those you have highlighted on screenshots?

It may be a stupid question, but... have you tried to reverse the naming order of your files? I mean, instead of "(talk)normal" try to change it to "normal(talk)" etc. Don't forget to restart PyWright after this operation.
I've just run a quick test and none of characters named your way did work for me.

Could you also post the code for the "acesmile" *txt file?

Author:  CE53 [ Thu Oct 27, 2016 5:00 pm ]
Post subject:  Re: Pywright tutorial (interactive tutorial available)

Darth Wiader wrote:
Do all emotions display wrong or only those you have highlighted on screenshots?

It may be a stupid question, but... have you tried to reverse the naming order of your files? I mean, instead of "(talk)normal" try to change it to "normal(talk)" etc. Don't forget to restart PyWright after this operation.
I've just run a quick test and none of characters named your way did work for me.

Could you also post the code for the "acesmile" *txt file?


You're right! Moving the (blink) and (talk) to the end worked.

That's going to be annoying to change around for all the characters, but I'm glad it was just a minor error on my part. Thanks for the help, my main squeeze.

Author:  iCeCoCaCoLa64 [ Fri Apr 28, 2017 8:33 pm ]
Post subject:  Re: Pywright tutorial (interactive tutorial available)

Ropfa wrote:
Okay, so I haven't gone through the third tutorial in a really long time, but I'm fairly certain that with the recent(ish) update to Pywright, the instructions in the perceive section are now just plain wrong. I keep telling myself to update it, but just haven't gotten around to it. I'll have to make a note of it and get that done sometime soon.


Just making this post as a little reminder for ya, I'd love for you to update this. Thanks for making these tutorials, by the way :)

Author:  Lotus [ Sun Sep 09, 2018 10:22 pm ]
Post subject:  Re: Pywright tutorial (interactive tutorial available)

Hey sorry to bother, i'm kind of new to PYWright, i've been learning the engine and some questions popped up and i hope you, or someone, can answer them:


1. Is it possible to use commands in the middle of text? Like if i wanted to use the showevl command to show an evidence mid-text without it stopping, or use Franziska's whip animation as an fg multiple times during the text, can it be done? If yes, how?

2. Can i make music fade out during text too? It seems like it can only be done after or before the text stops

I might have more questions but those are the most prominent ones at the moment, thanks in advance!

Author:  BirbIsTheWord [ Mon Sep 10, 2018 1:17 pm ]
Post subject:  Re: Pywright tutorial (interactive tutorial available)

To question 1: Yes, you can use commands in the middle of the text, {f}, {s} {e(emotionname)} {p} and so on. it also works with the showevl command by using {showevl (name of evidence)}.

2. You can't make the music fade out in the middle of the text. (at least, from all the things i've tried, no one did work)

Hope this helped. :eh?:

Author:  N_tonio36 [ Thu Sep 20, 2018 12:07 pm ]
Post subject:  Re: Pywright tutorial (interactive tutorial available)

Hi everyone, I'm facing a bug that I'm unable to fix, so I'd like to ask for a helping hand or two.

Code:
label label23
li option1
li option2
showlist

label option1
# some huge chat here
goto label23

label option2
# insert chat here
goto label23


This is a scene.talk script, with naturally the proper menu and the talk / examine / move / present menu and stuff.

Now the issue is, whenever I enter the talk menu and I click on back, the code inside label option1 runs by itself. Why is this?

EDIT: another quick question, how to replace the default pywright typewriter sound with the "real" typewriter one?

Author:  LuckyDev03 [ Sat Sep 29, 2018 1:11 pm ]
Post subject:  Re: Pywright tutorial (interactive tutorial available)

Hello,
I'm working on game in PYWright...
and i wanna know HOW to set background in Case Selection Screen?

Author:  Darth Wiader [ Sat Sep 29, 2018 2:12 pm ]
Post subject:  Re: Pywright tutorial (interactive tutorial available)

You need to create a file named "case_screen.txt" in your case folder and write a patch to your case art in it.

Author:  TheChatotMaestro [ Sun Oct 14, 2018 8:24 pm ]
Post subject:  Re: Pywright tutorial (interactive tutorial available)

Hi! I'm working on a fangame using Spirit of Justice graphic assets. I have all the sprites I need- albeit shamelessly taken from an Attorney Online graphic pack- but they are all in gif form. Ahlbi is the first character I want to appear, however, some of his sprites run as long as 210 frames. That's a little inconvinient for making the sprite sheets I need, so I thought I might as well try out that program that automatically makes the sheets from gifs- that CGI file from the official website. The problem is, I can't for the life of me figure out how to get it to work without downloading some kind of personal web server. Is that the only way, or am I missing something?

Author:  Kaaskoppie [ Wed Dec 11, 2019 6:05 pm ]
Post subject:  Re: Pywright tutorial (interactive tutorial available)

When I try to start my trial to test it, it goes back to the case menu when I click on the case.
I mean that I click on the "new game" button and it disappeares there is loading in screen and then it goes back to the case menu.
Do you know how to fix this?

Author:  guiguiba [ Fri Jan 03, 2020 11:27 pm ]
Post subject:  Re: Pywright tutorial (interactive tutorial available)

Is there some way to make PyWright use accents like this: ã ô í è ç? I have tried, and don't work. It causes script error or it just skips. :sadshoe:

Author:  TimeAxis [ Fri Mar 05, 2021 9:27 am ]
Post subject:  Re: Pywright tutorial (interactive tutorial available)

Sorry to bump this, and I know it's outside the scope of this tutorial, but is there any way to change the bottom screen's background, or change anything about the bottom screen UI? When I try to make a little intro before the case menu, as soon as I add a text box, it causes the bottom screen to glitch out, showing the dialogue advance button underneath the case selection menu. Is there some way to fix that, like clearing the bottom screen somehow?

Author:  SuperAj3 [ Fri Mar 05, 2021 9:42 am ]
Post subject:  Re: Pywright tutorial (interactive tutorial available)

TimeAxis wrote:
Sorry to bump this, and I know it's outside the scope of this tutorial, but is there any way to change the bottom screen's background, or change anything about the bottom screen UI? When I try to make a little intro before the case menu, as soon as I add a text box, it causes the bottom screen to glitch out, showing the dialogue advance button underneath the case selection menu. Is there some way to fix that, like clearing the bottom screen somehow?

There is a way. To change the bottom screen's background during ordinary text, you'll need to change it in your intro.txt:
Code:
"set _bigbutton_bg IMAGE"

(change "IMAGE" to the name of your picture.)

for the bottom screen UI, for investigation menus (that show the talk, present, examine, move buttons), you can just do:
Code:
bg IMAGE y=192 stack

in your menu script just after you set your background for the top screen.

This might also need to be done for lists, but you can set a permanent background for lists in your intro.txt with:
Code:
set _list_bg_image IMAGE


If you're still confused, my best advice is look at someone else's code to see how they did it, and learn from that.

Page 5 of 6 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/