Trouble copying and pasting script...

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
crimsonnight
Veteran
Posts: 298
Joined: Fri Apr 20, 2012 4:44 am
Contact:

Trouble copying and pasting script...

#1 Post by crimsonnight » Fri Apr 20, 2012 11:20 am

Hi guys,

I'm new to Ren'Py but seem to be getting to grips with everything ok thus far :) The only thing is, I'm having a bit of a problem copying and pasting my script into the engine though. I've been through it in Word and have added quote marks at the beginning and end of each line. After a bit of research I found out that Word uses the wrong type of quote marks so I did a find and replace on those. Although this made a lot more of the script green (and therefore ok) I still have a lot of black and brown bits, with most of the brown bits occurring after single quotes ('), from what I've read though Ren'Py should be fine with single quotes? I tried putting a backslash before every single quote but it didn't help.

Would you mind checking out a small section of my story and letting me know where I'm going wrong? It would be much appreciated :)


“I awoke sharply, upright and panting heavily.”
r “Must have just been a bad dream”
“I muttered under my breath.”
r “After all, the last few days have been pretty stressful.”
“I collapsed back down and spent a minute taking in my new beach-side apartment.”
r “This feels alien.”
“It then registered that the light coming through the large windows was pretty bright…”
r “Shit!”
“I leaped out of bed and rooted frantically through the open suitcase on the floor.”
r “Damn it! 9:21 already? College starts in nine minutes... the alarm must have been muffled.”
“I grabbed my toothbrush and headed to the bathroom scratching the back of my head.”
“I didn’t need to turn on the light as it was already bright enough which seemed bizarre as it had been winter when I left England.”
“I looked barely human but unfortunately didn’t have much time to do anything about it.”
“As I brushed my teeth it dawned on me that I have little recollection of the last few days… ‘must be the lack of sleep’ I pondered.”
“’Things have been a bit of a mad, but I'm used to moving around, I need to snap out of it.’”
“And I was, I'd been enrolled into more schools than I could remember off the top of my head.”
“I threw on the first t-shirt and pair of jeans I could find. I grabbed a crumpled up map (along with various other miscellaneous items,)”
“and threw them in my bag, then legged it in the desperate hope I wouldn’t be more than ten minutes late.”
“It took me an extra five minutes to find classroom 1D, as the instructions on the map were nowhere near as straightforward as they made themselves out to be.”
“I ended up being around twenty minutes late; and the teacher was not impressed.”
“I apologised/introduced myself awkwardly while I felt the coldness of forty-odd pairs of eyes attempting to glare into my soul.”
“She cut my explanation short and agitatedly told me to take a seat. I turned around to face my new classmates, their expressions ranged from boredom to disinterest.”
“It was at that moment I saw her, the most beautiful girl I'd ever seen in my life.”
“She literally took my breath away; I stood there fixated on her.”
“She wasn't tanned (not to say she was pale,) but her hair gave the impression she had spent her life bathing in the sun as it appeared to contain every shade of blonde imaginable.”
“Although a rare perfection, it was not her flowing hair that first caught my attention, for her eyes were by far her most striking feature; a piercing apple-green.”
“I felt she had access to my very essence; there was nothing I could keep from her.”
“Although I felt exposed, I did not feel intimidated as her warm smile amongst all the dirty looks and sniggering comforted me...”
“’Bollocks!’”
“I came crashing back down to reality as I realised I'd been standing gormlessly there for a lot longer than could be considered socially appropriate.”
“I felt pretty stupid as I sheepishly took my place in the last remaining seat, which was guess where? Right next to her of course! Perfect...”
“I spent the rest of the day trying to avoid eye contact with her.”
''OK, good job class, I expect to see you promptly tomorrow, the teacher said glaring at me once again.”
k ''Hi, I'm Kira; it's a pleasure to meet you!”
“She turned to face me, her hair gently falling behind one ear.”
“Her full attention was focused on me and I was caught completely off guard, in that moment I couldn’t for the life of me figure out what to say.”
k “Are you new?”
k ''I haven't seen you around here before, but then again, I’ve only been on this particular island a few of terms myself.”
r ''Ryan!''
“I exclaimed, excited that I had finally figured out correct response to her introduction. I cleared my throat.”
r ''I mean, my name's Ryan and yeah I’m new here, it’s very nice to meet you.”
“I gave her a slight nod and clumsily shook her hand whilst she vigorously she beamed at me.”
“I felt my embarrassment subsiding.”
r “I just arrived here last night in fact, that’s why I’m still a tad zoned-out.”
r “I was lucky to find an international school in such a remote place really… especially on such short notice.”
“I smiled awkwardly.”
k ''I guessed you weren't from around here, you're from England aren’t you?
“I was shocked.”
r ''How did you know that?!''
k “Your accent.”
“She said chuckling a little at my expression.”
r “‘Great, glad things are picking up' I thought sarcastically; trying to stop myself grinning.”
“I tried to work out where she was from so that I could provide her with a half-decent response, but I was baffled.”
“Even though I had lived in various parts of every continent, I had never encountered an accent like hers before, not that it didn’t compliment her perfectly.”
“I had no choice but to succumb.”
r “I’m sorry, but I can’t work out where you’re from. I don’t think I’ve ever heard an accent like yours before?”
k “It’s a secret.”
“She replied flirtatiously with a wink.”
“My chest pounded.”
k “Would you like me to show you around... well the places I’ve discovered so far anyway?”
r “Yeah, that’d be awesome if you’re sure you don’t mind?”
“She smiled enthusiastically.”
k “I’d love to.”
“With that she grabbed my clammy hand and dragged me out the classroom.”

User avatar
Anima
Veteran
Posts: 448
Joined: Wed Nov 18, 2009 11:17 am
Completed: Loren
Projects: PS2
Location: Germany
Contact:

Re: Trouble copying and pasting script...

#2 Post by Anima » Fri Apr 20, 2012 11:30 am

Single quotes can also be used to mark strings. You still have the wrong word quotes in your script, that's why Ren'Py marks the single quote strings. Since those are in the middle of words, you get such a strange syntax highlighting.
Avatar created with this deviation by Crysa
Currently working on:
  • Winterwolves "Planet Stronghold 2" - RPG Framework: Phase III

Calissa Leigh
Regular
Posts: 54
Joined: Wed Apr 11, 2012 11:04 am
Completed: No games, just books. :)
Projects: Murder Mystery 1
Organization: Arcato Publishing
Location: Among the people, and Cajuns
Contact:

Re: Trouble copying and pasting script...

#3 Post by Calissa Leigh » Fri Apr 20, 2012 11:33 am

It is your quotation marks. You can tell because of the curly quotes marks. ;) Replace them all in Notepad or in Ren'py.

crimsonnight
Veteran
Posts: 298
Joined: Fri Apr 20, 2012 4:44 am
Contact:

Re: Trouble copying and pasting script...

#4 Post by crimsonnight » Fri Apr 20, 2012 11:33 am

Anima wrote:Single quotes can also be used to mark strings. You still have the wrong word quotes in your script, that's why Ren'Py marks the single quote strings. Since those are in the middle of words, you get such a strange syntax highlighting.
Oh so the issue's to do with the wrong quote marks still?.. weird as I copied them from a forum which compared the different quote types - do you know the easiest way to change them all into the correct format? Thanks for your time!

User avatar
redeyesblackpanda
Eileen-Class Veteran
Posts: 1006
Joined: Thu Dec 22, 2011 4:26 am
Projects: Eternal Memories, plot bunnies that won't die.
Organization: HellPanda Studios
Location: United States
Contact:

Re: Trouble copying and pasting script...

#5 Post by redeyesblackpanda » Fri Apr 20, 2012 11:37 am

Use control f, copy one of the two word quotes, replace it with the right quote, then repeat. (In jedit, that is). Sorry if this post seems awkward, I'm typing on a tablet. -_-
(All projects currently on a hiatus of sorts. I blame life.)
Tsundere VN
Not really checking the forums any more due to time constraints, so if you want to contact me, PM. I'll get a notification and log in. :mrgreen:
Also, I've been hit and run posting, which means I don't see many replies. If you want to respond to something I've said, also feel free to PM me.

NOTE: if you've got questions about vnovel or things like that, it's Leon that you should be contacting. Leon's been pretty much handling everything, but due to various reasons, I've had to withdraw entirely.

User avatar
Alex
Lemma-Class Veteran
Posts: 2981
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: Trouble copying and pasting script...

#6 Post by Alex » Fri Apr 20, 2012 1:02 pm

It's better to prefix all single quotes and apostrophes with backslash to let Ren'Py know that they are a part of text.
Like

Code: Select all

r “\‘Great, glad things are picking up\' I thought sarcastically; trying to stop myself grinning.”

crimsonnight
Veteran
Posts: 298
Joined: Fri Apr 20, 2012 4:44 am
Contact:

Re: Trouble copying and pasting script...

#7 Post by crimsonnight » Fri Apr 20, 2012 3:28 pm

Thanks for your suggestions but something's still not working... here's a section with a lot of black/brown bits in, I'll also attach a screenshot:

"It was at that moment I saw her, the most beautiful girl I\'d ever seen in my life."
"She literally took my breath away; I stood there fixated on her."
"She wasn\'t tanned (not to say she was pale,) but her hair gave the impression she had spent her life bathing in the sun as it appeared to contain every shade of blonde imaginable."
"Although a rare perfection, it was not her flowing hair that first caught my attention, for her eyes were by far her most striking feature; a piercing apple-green."
"I felt she had access to my very essence; there was nothing I could keep from her."
"Although I felt exposed, I did not feel intimidated as her warm smile amongst all the dirty looks and sniggering comforted me..."
"’Bollocks!’"
"I came crashing back down to reality as I realised I\'d been standing gormlessly there for a lot longer than could be considered socially appropriate."
"I felt pretty stupid as I sheepishly took my place in the last remaining seat, which was guess where? Right next to her of course! Perfect..."
"I spent the rest of the day trying to avoid eye contact with her."
"OK, good job class, I expect to see you promptly tomorrow, the teacher said glaring at me once again."
k \'\'Hi, I\'m Kira; it\'s a pleasure to meet you!"
"She turned to face me, her hair gently falling behind one ear."
"Her full attention was focused on me and I was caught completely off guard, in that moment I couldn’t for the life of me figure out what to say."
k "Are you new?"
k \'\'I haven\'t seen you around here before, but then again, I’ve only been on this particular island a few of terms myself."
r \'\'Ryan!\'\'
"I exclaimed, excited that I had finally figured out correct response to her introduction. I cleared my throat."
r \'\'I mean, my name\'s Ryan and yeah I’m new here, it’s very nice to meet you."
"I gave her a slight nod and clumsily shook her hand whilst she vigorously beamed at me."
"I felt my embarrassment subsiding."
r "I just arrived here last night in fact, that’s why I’m still a tad zoned-out."
r "I was lucky to find an international school in such a remote place really… especially on such short notice."
"I smiled awkwardly."
k \'\'I guessed you weren\'t from around here, you\'re from England aren’t you?
"I was shocked."
r \'\'How did you know that?!\'\'
k "Your accent."
"She said chuckling a little at my expression."
r "‘Great, glad things are picking up\' I thought sarcastically; trying to stop myself grinning."
"I tried to work out where she was from so that I could provide her with a half-decent response, but I was baffled."
"Even though I had lived in various parts of every continent, I had never encountered an accent like hers before, not that it didn’t compliment her perfectly."
"I had no choice but to succumb."
r "I’m sorry, but I can’t work out where you’re from. I don’t think I’ve ever heard an accent like yours before?"
k "It’s a secret."
"She replied flirtatiously with a wink."
"My chest pounded."
k "Would you like me to show you around... well the places I’ve discovered so far anyway?"
r "Yeah, that’d be awesome if you’re sure you don’t mind?"
"She smiled enthusiastically."
k "I’d love to."
"With that she grabbed my clammy hand and dragged me out the classroom."

"***"

"I was starting to wonder where the hell she was taking me after following her through random side-roads and dark alleys for what must have been at least half an hour."
"She would stop occasionally when she was confronted by more than one path, her gaze flicking between them,"
"before confidently strolling down the one that seemed to lead closest to where we had originally departed from."
"It was this, coupled with the signpost we had past four times previously, that had lead me to believe we had been going around in circles."
"…I left her to it though as I didn’t mind where we were, I just enjoyed being with her."
k "I could’ve sworn it was this way!"
"Kira said agitatedly as if accusing the streets of rearranging overnight."
r "How long have you lived here again?"
I asked, tongue in cheek.
k "Only a few months…"
"she started hopefully."
k "…long enough to know."
"She finished defeated."
r "What are the people like on this island then? I think you’re the only person I’ve actually talked to so far – is there anyone you’re close to?"
"I thought this would be a good way to find out whether she was in a relationship or not without being too obvious."
k "I try to keep myself to myself but I have been close with a couple of people..."
"This seemed like a contradiction from my view-point but I didn’t have time to contemplate it as Kira had cut herself off with a sharp look to her right."
k "You know what, I’m sure this is where I lost my earring the other week."
"Kira’s feet followed her gaze purposefully down the side street, her eyes focusing on different points as she described it to me."
k "They’re only small, made from azure stone with melted-silver decoration. They mean a lot to me…
k "Oh no, you don’t have to!"
"She exclaimed as I kneelt down to look through a small gap."
r "No really I insist."
"I was entirely sincere as although it sounds odd, seeing this girl I barely knew hurting made me unhappy, and I wanted to remedy the situation for both our sakes."
"We searched as thoroughly as we could but to no avail. Kira was obviously disappointed but she seemed more content and perkier than when we started, I was happy to have contributed towards this."
k "So here we are then..."
"Kira said turning suddenly at the end of an alley. Our faces were now only inches apart, she was beaming at me."
"I felt her soft, soothing breath caress my face. I was too on edge to breathe myself."
k "The town centre!"
"As she said this, she leant to one side, still examining my expression."
"I felt the light she had been guarding hit my face. I was greeted with a bustling, charming, pretty town centre."
"She giggled and I realised she had expected my stunned reaction."
k "I love it here; everyone’s so friendly… would you like to see some of my favourite stores?"
r "Yeah sure."
"I said smiling at her enthusiasm."
k "Great because I have impeccable taste."
Attachments
example.jpg

User avatar
Alex
Lemma-Class Veteran
Posts: 2981
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: Trouble copying and pasting script...

#8 Post by Alex » Fri Apr 20, 2012 3:45 pm

That means that you need to check all those double and single quotes. Start from
k \'\'Hi, I\'m Kira; it\'s a pleasure to meet you!"
First - you don't need to backslash first quote (second - it must be a double quote), 'cause it shows Ren'Py that next there will be some character's words, that will be closed with another double quotes at the end of sentence.

Code: Select all

k "\'Hi, I\'m Kira; it\'s a pleasure to meet you!"
You'll see how highlighting will change (all character's words should become green). Keep doing so till the end of your script.

Calissa Leigh
Regular
Posts: 54
Joined: Wed Apr 11, 2012 11:04 am
Completed: No games, just books. :)
Projects: Murder Mystery 1
Organization: Arcato Publishing
Location: Among the people, and Cajuns
Contact:

Re: Trouble copying and pasting script...

#9 Post by Calissa Leigh » Fri Apr 20, 2012 6:52 pm

Where's your indentation? Check here. There's a helpful tutorial to get started.

crimsonnight
Veteran
Posts: 298
Joined: Fri Apr 20, 2012 4:44 am
Contact:

Re: Trouble copying and pasting script...

#10 Post by crimsonnight » Sat Apr 21, 2012 7:34 pm

Thanks again, I'm still having a bit of trouble though, for example, how do I get these 2 sentences to turn green?

"Things have been a bit of a mad, but I\'m used to moving around, I need to snap out of it."
"And I was, I\'d been enrolled into more schools than I could remember off the top of my head."

Also why is indentation important? The guide you linked me to says they'll tell u why later on but they never do lol

User avatar
redeyesblackpanda
Eileen-Class Veteran
Posts: 1006
Joined: Thu Dec 22, 2011 4:26 am
Projects: Eternal Memories, plot bunnies that won't die.
Organization: HellPanda Studios
Location: United States
Contact:

Re: Trouble copying and pasting script...

#11 Post by redeyesblackpanda » Sat Apr 21, 2012 8:20 pm

Indentation is important because if it's wrong, your game won't work. :wink:
Those sentences should be green. Make sure to check that you haven't forgotten a " somewhere else. If your quotation marks aren't paired properly, you'll have problems.
(All projects currently on a hiatus of sorts. I blame life.)
Tsundere VN
Not really checking the forums any more due to time constraints, so if you want to contact me, PM. I'll get a notification and log in. :mrgreen:
Also, I've been hit and run posting, which means I don't see many replies. If you want to respond to something I've said, also feel free to PM me.

NOTE: if you've got questions about vnovel or things like that, it's Leon that you should be contacting. Leon's been pretty much handling everything, but due to various reasons, I've had to withdraw entirely.

crimsonnight
Veteran
Posts: 298
Joined: Fri Apr 20, 2012 4:44 am
Contact:

Re: Trouble copying and pasting script...

#12 Post by crimsonnight » Sat Apr 21, 2012 8:30 pm

Sorry I know I'm being a pain, but I really can't see where I've gone wrong? (see attached)
I'm guessing there's not going to be an easy way to indent each line is there lol?
If I do it manually, so I just put 4 spaces at the beginning of every line?
Thank you :)

*EDIT* Here's the text where it started to stop working if it's easier than the screen cap:

"I looked barely human but unfortunately didn’t have much time to do anything about it."
"As I brushed my teeth it dawned on me that I have little recollection of the last few days… ‘must be the lack of sleep’ I pondered."
"Things have been a bit mad, but I\'m used to moving around, I need to snap out of it."
"And I was, I\'d been enrolled into more schools than I could remember off the top of my head."
"I threw on the first t-shirt and pair of jeans I could find. I grabbed a crumpled up map (along with various other miscellaneous items,)"
"and threw them in my bag, then legged it in the desperate hope I wouldn’t be more than ten minutes late."
Attachments
example2.jpg

User avatar
redeyesblackpanda
Eileen-Class Veteran
Posts: 1006
Joined: Thu Dec 22, 2011 4:26 am
Projects: Eternal Memories, plot bunnies that won't die.
Organization: HellPanda Studios
Location: United States
Contact:

Re: Trouble copying and pasting script...

#13 Post by redeyesblackpanda » Sat Apr 21, 2012 9:07 pm

Hm... from your screen shot, it looks like there might be a problem above what you've written. The # comment should be red, and the names should be black. You might have used an extra " somewhere higher up. (when you were defining characters or something)

As for indenting each line, try highlighting them, then holding alt and pressing the right arrow key.
(All projects currently on a hiatus of sorts. I blame life.)
Tsundere VN
Not really checking the forums any more due to time constraints, so if you want to contact me, PM. I'll get a notification and log in. :mrgreen:
Also, I've been hit and run posting, which means I don't see many replies. If you want to respond to something I've said, also feel free to PM me.

NOTE: if you've got questions about vnovel or things like that, it's Leon that you should be contacting. Leon's been pretty much handling everything, but due to various reasons, I've had to withdraw entirely.

crimsonnight
Veteran
Posts: 298
Joined: Fri Apr 20, 2012 4:44 am
Contact:

Re: Trouble copying and pasting script...

#14 Post by crimsonnight » Sun Apr 22, 2012 5:57 am

Perfect! Thanks redeyesblackpanda, u r a legend! ;)

You know how how the character's name takes up the first row (/line of text) of the text box? Is there a way to move their name above the box? This would look a lot better with the text that has no character associated with it, ie everything would start on the same row at the top of the text box. I've tried the following two things based on the official guides but don't seem to be having much luck:

# Declare characters used by this game.
define r = Character("Ryan", color="#c8ffc8")
$ r = Character("Ryan", show_two_window=True)
define k = Character("Kira", color="#c8ffc8")
$ k = Character("Kira", show_two_window=True)

# Declare characters used by this game.
define r = Character("Ryan", color="#c8ffc8")
$ r = Character("Ryan", show_two_window=True)
style.say_who_window.background = Frame("frame.png", 15, 15) #Background skin
style.say_who_window.xalign = 0.0
style.say_who_window.yalign = 1.0
#style.say_who_window.xpos = 100 #For precise placement
#style.say_who_window.ypos = 100 #For precise placement
style.say_who_window.left_padding = 15
style.say_who_window.top_padding = 15
style.say_who_window.right_padding = 15
style.say_who_window.bottom_padding = 15
style.say_who_window.xminimum = 150
style.say_who_window.yminimum = 15
style.say_who_window.xfill = False
define k = Character("Kira", color="#c8ffc8")
$ k = Character("Kira", show_two_window=True)
style.say_who_window.background = Frame("frame.png", 15, 15) #Background skin
style.say_who_window.xalign = 0.0
style.say_who_window.yalign = 1.0
#style.say_who_window.xpos = 100 #For precise placement
#style.say_who_window.ypos = 100 #For precise placement
style.say_who_window.left_padding = 15
style.say_who_window.top_padding = 15
style.say_who_window.right_padding = 15
style.say_who_window.bottom_padding = 15
style.say_who_window.xminimum = 150
style.say_who_window.yminimum = 15
style.say_who_window.xfill = False
alwaysthesamebluesky.com

crimsonnight
Veteran
Posts: 298
Joined: Fri Apr 20, 2012 4:44 am
Contact:

Re: Trouble copying and pasting script...

#15 Post by crimsonnight » Sun Apr 22, 2012 1:57 pm

Right update: I've trawled the forums some more and found this:

Code:
define stw = Character(None, show_two_window=True)

define eileen = Character("Eileen", kind=stw)
define lucy = Character("Lucy", kind=stw)

Which I'm using and it seems to work perfectly :) Only thing is the box is too big, is there a way to shorten it? Also is there also a way to customise it's appearance?
alwaysthesamebluesky.com

Post Reply

Who is online

Users browsing this forum: No registered users