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

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

Author:  E.D.Revolution [ Sat May 24, 2014 4:44 am ]
Post subject:  Re: Pywright tutorial (interactive tutorial available)

This is not currently possible without a future update from saluk.

Author:  Darth Wiader [ Sat May 24, 2014 9:22 pm ]
Post subject:  Re: Pywright tutorial (interactive tutorial available)

Really? I remember to have seen such a feature in one of 'examples' or 'betas'...

EDIT: Yeah, it's labeled as ''show hidden case'' in beta 10.9.

However, I'm not sure if it is working properly, especially with the newest version of PyWright.

Author:  E.D.Revolution [ Mon May 26, 2014 12:06 am ]
Post subject:  Re: Pywright tutorial (interactive tutorial available)

Huh... So it looks like that works. Ze multiple variable tricks.

If you have the newest version of PyWright, you will have to download "old examples" in order to get to it.

Saluk did say he's going to change how to do that feature sometime in the future.

Author:  kaiten619 [ Mon May 26, 2014 1:49 am ]
Post subject:  Re: Pywright tutorial (interactive tutorial available)

ahh i see. looks like i will wait then

Author:  venser [ Sat Jun 07, 2014 6:27 pm ]
Post subject:  Re: Pywright tutorial (interactive tutorial available)

Thank you so much for making this guide! I cannot wait to use PyWright over the summer. After being a fan of AAO casemaker it's nice to use something new as a change and the format makes the games seem more real.

Thanks for the help.

Author:  UltrawaveStudios [ Sat Jul 19, 2014 3:43 pm ]
Post subject:  Re: Pywright tutorial (interactive tutorial available)

I don't know if this has been asked yet, but...
I'm working on a case, and this is one of the lines in the intro:
Code:
"{center}{c505}{delay 4}...{p30}{s4}{sfx shock}{delay 1}What the hell?!{p30}{s4}{n}Is that a body in the water?!{p45}{next}"

Here, I'm making the first "..." be slowed down, and when the guy says "What the hell?!", the text speeds up to normal speed. However, delay 1 is a bit slower than the regular speed, delay 0 is too fast, and putting down "delay" or decimal numbers at the end causes script errors.
What do I need to put down to make the text scroll at normal speed?

Author:  E.D.Revolution [ Sun Jul 20, 2014 8:45 pm ]
Post subject:  Re: Pywright tutorial (interactive tutorial available)

According to the code in the internal engine, the default speed is 2. So, if you need to go back to normal speed, {spd 2} is the command to use.

Unlike AAO, you have to use whole numbers (no decimals or negatives or 0s) when specifying text speed. Because most time or speed things are clocked in terms of 60 frames per second, decimals mean absolutely nothing and will result in an error.

Author:  UltrawaveStudios [ Sun Jul 20, 2014 11:06 pm ]
Post subject:  Re: Pywright tutorial (interactive tutorial available)

E.D.Revolution wrote:
So, if you need to go back to normal speed, {spd 2} is the command to use.

https://www.youtube.com/watch?v=hlZxPT-LNZ4 Didn't seem to help at all...

Code:
"{center}{c069}(I can {f}{c940}{sfx idea}pin this on him{c069}!{p60} Yes!){p60}{next}"
bg nothing
"{center}{c505}{delay 4}...{p30}{s nowait}{sfx shock}{spd 2}What the hell?!{p30}{s nowait}{n}Is that a body in the water?!{p45}{next}"
"{center}{c940}{f}{sound}{sfx shutter}*CLICK*{p50}{f}{sfx shutter} *CLICK*{p60}{next}"

Author:  E.D.Revolution [ Mon Jul 21, 2014 5:43 am ]
Post subject:  Re: Pywright tutorial (interactive tutorial available)

Odd, this worked before, if only in reverse.

Try to use the {linked} macro.
Code:
"{center}{c505}{delay 4}...{p30}{next}"
"{linked}{center}{s nowait}{sfx shock}{spd 2}What the hell?!{p30}{s nowait}{n}Is that a body in the water?!{p45}{next}"
"{center}{c940}{f}{sound}{sfx shutter}*CLICK*{p50}{f}{sfx shutter} *CLICK*{p60}{next}"


In order for {linked} to work, you need to have a {next} command at the end of the previous text box.

Author:  UltrawaveStudios [ Mon Jul 21, 2014 10:22 am ]
Post subject:  Re: Pywright tutorial (interactive tutorial available)

E.D.Revolution wrote:
Try to use the {linked} macro.
Code:
"{center}{c505}{delay 4}...{p30}{next}"
"{linked}{center}{s nowait}{sfx shock}{spd 2}What the hell?!{p30}{s nowait}{n}Is that a body in the water?!{p45}{next}"
"{center}{c940}{f}{sound}{sfx shutter}*CLICK*{p50}{f}{sfx shutter} *CLICK*{p60}{next}"

Nope... Still doesn't work. All it really does is make a one second pause between "..." and "What the hell?!".
I also tried getting rid of {spd 2} and moving it, but nothing works.

Author:  UltrawaveStudios [ Tue Jul 29, 2014 7:05 pm ]
Post subject:  Re: Pywright tutorial (interactive tutorial available)

Hello?

Author:  PiGreat [ Fri Aug 01, 2014 7:02 pm ]
Post subject:  Re: Pywright tutorial (interactive tutorial available)

So, I've been doing some script for my new, improved and hopefully-living fangame and I've come upon a bit of a hitch. Basically, the player is offered a choice after raising an objection, with one of the options allowing procedure to the next scene. Standard stuff. Yet, when I test the script, it bypasses the list and jumps straight to one of the options, which - as you can imagine - isn't ideal. Here's the script for reference.

Code:
char phoenix e=thinking
"{c089}(Hm... Is that really true?)"

list questiontime
li It's true
li It's not
showlist

label It's true
bg defence
fg dbench
char phoenix e=thinking
"fillertextlol"

label It's not
script scene11


In other words, rather than showing a list, it just jumps straight to "Fillertextlol".

Author:  E.D.Revolution [ Fri Aug 01, 2014 7:30 pm ]
Post subject:  Re: Pywright tutorial (interactive tutorial available)

Add the command "noback" after the list command. So it should read
Code:
list questiontime noback
li It's true
li It's not
showlist


If that doesn't work, then put "result=x" after each "li" command and change the labels to match "x" (obviously, replace x with your custom label). It is possible that PyWright might be confusing some labels, like if there's multiple "It's true", but without the other parts of the script to work with, this would be my best guess.

Try indenting the li command lines.

It could be the fact that if you let pywright run for too long and not force quit, bugs might occur. The sample syntax looks correct, to be honest.

Author:  PiGreat [ Fri Aug 01, 2014 7:49 pm ]
Post subject:  Re: Pywright tutorial (interactive tutorial available)

Well, I did what you said, and it still automatically jumps to "tryagain". Hmm.

Code:
list questiontime noback
 li It's true result=tryagain
 li It's not result=next
showlist

label tryagain
bg defence
fg dbench
char phoenix e=thinking
"fillertextlol"

label next
script scene11

Author:  E.D.Revolution [ Fri Aug 01, 2014 8:07 pm ]
Post subject:  Re: Pywright tutorial (interactive tutorial available)

Hmm, has this similar problem happened before?

Author:  PiGreat [ Fri Aug 01, 2014 8:15 pm ]
Post subject:  Re: Pywright tutorial (interactive tutorial available)

Couldn't tell you. All of my script for Hallowed be thy Turnabout died with my previous laptop, but it worked fine then. This is my first time scripting a list in this context.

Author:  PiGreat [ Tue Aug 05, 2014 9:28 pm ]
Post subject:  Re: Pywright tutorial (interactive tutorial available)

Forgive the double post. I'm writing a cross-examination scene which goes as follows:

Code:
cross vladimir
label start
statement uri2d test=show_uri2d
set show_uri2d false

statement uri2a
bg witness
fg wbench
char vladimir
"statement 1"

statement uri2b
bg witness
fg wbench
char vladimir
"statement 2"

statement uri2c
bg witness
fg wbench
char vladimir
"statement 3"

statement uri2d
bg witness
fg wbench
char vladimir
"--HIDDEN STATEMENT--"

statement uri2e
bg witness
fg wbench
char vladimir
"statement 4"
endcross


From my understanding,
Code:
statement uri2d test=show_uri2d
set show_uri2d false
should make statement uri2d invisible until the trigger is... well, triggered by pressing another statement. The trouble is, it still shows up despite the fact I coded it to not appear until prompted to. Any ideas?

Author:  Ropfa [ Tue Aug 05, 2014 10:51 pm ]
Post subject:  Re: Pywright tutorial (interactive tutorial available)

You should put set "show_uri2d false" sometime before the testimony even begins. Maybe at the the beginning of the file.

Author:  PiGreat [ Tue Aug 05, 2014 11:47 pm ]
Post subject:  Re: Pywright tutorial (interactive tutorial available)

I put it at the start of the file and it's still showing up. Hm.

Author:  E.D.Revolution [ Wed Aug 06, 2014 4:30 am ]
Post subject:  Re: Pywright tutorial (interactive tutorial available)

Hmm, you know what? Let's try something else.

Do NOT define show_uri2d as false. Rather, set that to true wherever you want to "activate" that variable. By default, all named variables are false until defined. Then, merge the statement-test together. So it should read
Code:
statement uri2d test=show_uri2d
bg witness
fg wbench
char vladimir
"--HIDDEN STATEMENT--"


Also, it might be the fact that you have a duplicate, empty statement. So remove that statement at the top and start the cross examination with statement uri2a and we'll see from there if that solves the problem.

Author:  PiGreat [ Wed Aug 06, 2014 8:50 am ]
Post subject:  Re: Pywright tutorial (interactive tutorial available)

It worked! Thanks, man. You're the best. :edgey:

Author:  Guest [ Fri Aug 22, 2014 4:36 am ]
Post subject:  Re: Pywright tutorial (interactive tutorial available)

Okay, I am absolutely lost

http://pastebin.com/aShMCs0f

I'm trying to make these lists show, but NONE of them do. For example when Apollo asks himself "Hmm. I wonder if I need a{n}refresher on how to perform a{n}cross-examination...?", rather than showing the list below it ("Give me a refresher" and "I'm fine"), it just jumps straight to him asking Trucy (option 1). I absolutely for the life of me cannot figure out what the problem is here.

No matter what I do, I cannot make lists appear in my game in any shape or form :/

I bet it's something ridiculously obvious that I'm overlooking...

Author:  Ropfa [ Fri Aug 22, 2014 10:17 am ]
Post subject:  Re: Pywright tutorial (interactive tutorial available)

Hmm... Well, I just tried what you have on my computer and the first list worked out fine. However, the second one isn't showing up because you don't have "showlist." So instead, the second list should be...

Code:
list secondquestiontime
li Uh... Run that by me again
li I'm fine
showlist

Author:  Guest [ Fri Aug 22, 2014 4:22 pm ]
Post subject:  Re: Pywright tutorial (interactive tutorial available)

Yeah, thanks, I added the showlist to the second one. Shame I still can't get either to work... Maybe there's something screwy with my PyWright, gonna redownload it and try again. Thanks anyway :)

Author:  UltrawaveStudios [ Fri Aug 22, 2014 5:57 pm ]
Post subject:  Re: Pywright tutorial (interactive tutorial available)

*cough*...
I kinda still have a problem... With the text speeds... and stuff...

Author:  Guest [ Fri Aug 22, 2014 6:54 pm ]
Post subject:  Re: Pywright tutorial (interactive tutorial available)

EDIT: Problem solved! Something to do with a weird background. Nevermind!

Author:  E.D.Revolution [ Sat Aug 23, 2014 2:50 am ]
Post subject:  Re: Pywright tutorial (interactive tutorial available)

Yeah, I think you may have to adjust settings for lists.

Go to defaults and check on "set _list_bg_image" to make sure you have the bg or the adjusted bg exists. That's usually one thing NOBODY would suspect would be the problem.

Author:  Guest [ Sat Aug 23, 2014 2:00 pm ]
Post subject:  Re: Pywright tutorial (interactive tutorial available)

EDIT: Nvm, solved thanks to PiGreat :D

Author:  Ropfa [ Sun Aug 24, 2014 12:18 pm ]
Post subject:  Re: Pywright tutorial (interactive tutorial available)

UltrawaveStudios wrote:
*cough*...
I kinda still have a problem... With the text speeds... and stuff...


If {spd2} doesn't work, just play around with larger numbers until it does. You were using {delay 4}, so you might need a bigger number to offset that.

Author:  Ropfa [ Fri Aug 29, 2014 3:44 am ]
Post subject:  Re: Pywright tutorial (interactive tutorial available)

So, I'm hoping to get out a third installment for this. It will primarily deal with macros, as those can get pretty complicated and have a whole bunch of different uses. I'm planning to have it cover...

--Explaining what the heck macros are
--Editing pre-existing macros, like the guilty animation or the court record button
--Custom buttons
--Multiple pages of evidence
--Perceive
--Text editor
--Timers
--Variables

If there is anything else you'd like me to include, please let me know.

Author:  DebesteIsTheBest [ Sun Aug 31, 2014 5:19 pm ]
Post subject:  Re: Pywright tutorial (interactive tutorial available)

Ropfa, I have a problem with the sprites. I make them transparent, but in Pywright they show with a black background.
How do I solve this?

Author:  UltrawaveStudios [ Mon Sep 08, 2014 9:57 pm ]
Post subject:  Re: Pywright tutorial (interactive tutorial available)

DebesteIsTheBest wrote:
Ropfa, I have a problem with the sprites. I make them transparent, but in Pywright they show with a black background.
How do I solve this?


Transparency in PyWright = Pink, not clear.

Author:  E.D.Revolution [ Tue Sep 09, 2014 6:22 am ]
Post subject:  Re: Pywright tutorial (interactive tutorial available)

UltrawaveStudios wrote:
DebesteIsTheBest wrote:
Ropfa, I have a problem with the sprites. I make them transparent, but in Pywright they show with a black background.
How do I solve this?


Transparency in PyWright = Pink, not clear.


That's wrong. Transparency in Py is, in fact, clear. Pink was used in the default assets, but I could not get the same results when applied elsewhere.

One reason that you might have a black background is that your sprites aren't truly transparent. Check with Paint.net, and use the color picker on the blank area. If the Alpha value is not 0, it's not transparent.

The other reason is, are you sure the sprite has a black background and not just because your script has a character but no defined background?

Check by placing a bg command in your script before putting a char command and see if it still comes black.

Author:  DebesteIsTheBest [ Tue Sep 09, 2014 9:03 pm ]
Post subject:  Re: Pywright tutorial (interactive tutorial available)

E.D.Revolution wrote:
UltrawaveStudios wrote:
DebesteIsTheBest wrote:
Ropfa, I have a problem with the sprites. I make them transparent, but in Pywright they show with a black background.
How do I solve this?


Transparency in PyWright = Pink, not clear.


That's wrong. Transparency in Py is, in fact, clear. Pink was used in the default assets, but I could not get the same results when applied elsewhere.

One reason that you might have a black background is that your sprites aren't truly transparent. Check with Paint.net, and use the color picker on the blank area. If the Alpha value is not 0, it's not transparent.

The other reason is, are you sure the sprite has a black background and not just because your script has a character but no defined background?

Check by placing a bg command in your script before putting a char command and see if it still comes black.


I'll try to do that! Thanks!! :redd:

Author:  Ropfa [ Fri Oct 31, 2014 2:25 am ]
Post subject:  Re: Pywright tutorial (interactive tutorial available)

I'm at about the halfway point in making Turnabout Most Awesomest, a tutorial entirely on macros and variables. I'm hoping to get a beta out within the next few weeks (depending on how much work I have), so I'll need some testers. I'd like to have two volunteers:

1) An experienced coder who knows enough about Pywright to keep me accurate and accountable and to let me know whenever I explain something wrong.

2) A less experienced coder. Somebody who knows the information in the first two tutorials, but is still practicing. This person will tell me when the concepts I'm showing are not explained easily enough and if something is still too confusing.

Author:  E.D.Revolution [ Fri Oct 31, 2014 4:55 am ]
Post subject:  Re: Pywright tutorial (interactive tutorial available)

I'll help. I'm right in the middle of both types of scripters.

Author:  Ropfa [ Fri Nov 28, 2014 7:11 am ]
Post subject:  Re: Pywright tutorial (interactive tutorial available)

The beta for Turnabout Most Awesomest has been sent out to the testers. I hope to have it ready within the next few weeks.

Author:  Ropfa [ Mon Dec 22, 2014 1:27 am ]
Post subject:  Re: Pywright tutorial (interactive tutorial available)

Planning to release Turnabout Most Awesomest within the next few days. I have a plane flight this week and I'm hoping to get it finished before then.

Author:  Ropfa [ Sat Dec 27, 2014 9:30 pm ]
Post subject:  Re: Pywright tutorial (interactive tutorial available)

Okay, here's the link for the third tutorial. This package contains all three tutorials. The third and most recent one is Turnabout Most Awesomest, and is all about variables and macros, which you'll probably need for many of the more complicated and interesting functions of Pywright. Lots of things you can do with these, and I'm sure if you get creative you can have some really fun stuff in your games.

Macros and variables can be pretty confusing, so if you have any questions, feel free to ask them here. Also, if you encounter anything that's too confusing in the tutorials, also mention it here and I will continually try to improve the content.

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

Author:  Ropfa [ Tue Dec 30, 2014 5:33 pm ]
Post subject:  Re: Pywright tutorial (interactive tutorial available)

I forgot to mention this in the previous post.

I've gotten reports from my testers that my games' coding has a tendency to all run together in one big blob, rather than appearing as neat, separate lines as it should. I'm fairly certain this has something to do with me writing it all on a Mac computer, because it all looks fine on mine. To fix this, if you have Windows, just open the .txt files with Wordpad.

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