Editra/Script editor question:automatically add quotations

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
taylor85345
Newbie
Posts: 4
Joined: Mon Jan 12, 2015 7:48 pm
Deviantart: ikyikyhaha
Contact:

Editra/Script editor question:automatically add quotations

#1 Post by taylor85345 » Mon Jan 12, 2015 8:03 pm

I'm writing out the scrip for a vn, and personally I find it easier as to write in a paragraph format then break it out into separate lines after the fact.

I don't mind manually separating everything out, but can anyone think of a good command to have editra, or any other program, automatically add quotations to the beginning and end of each line of text. It would save me a lot of time.

It would be even better if I could make exceptions, such as "nvl clear" lines, or specify a range of lines for the command, but I'll take anything.

User avatar
mjshi
Regular
Posts: 179
Joined: Wed Mar 13, 2013 9:55 pm
Completed: MazeSite01, Ponderings of Time
Contact:

Re: Editra/Script editor question:automatically add quotatio

#2 Post by mjshi » Mon Jan 12, 2015 10:28 pm

I don't think Editra has that option, but you could try pasting your code into an alternative editor like Vim then pasting it back to Editra, or--

jEdit, a default Ren'Py editor, actually has a function that will do what you want.
To install jEdit, go to Preferences in the Ren'Py launcher (it's under the "Launch project" button), look for Text Editor, click Editra(which is your current), then change it to jEdit by clicking on jEdit when it prompts you. If the download fails download this in your browser, and extract the contents to your main RenPy directory (example, mine is in C:\Users\mjshi\Desktop\Ren'py)

Your dialogue has to look like this, with no "enters" inbetween:

Code: Select all

define e = Character('Eileen')

label start:

    You've created a new Ren'Py game.
    Once you add a story, pictures, and music, you can release it to the world!
    But seriously, there shouldn't be any new lines inbetween these dialogue blocks.

    return
Then select the two lines, go to Macros on the File/edit/bar on the top, go down to Text, then click "Add prefix and suffix", then in the two boxes type ["] in both of them, without the brackets.

You could even tell it to add [e "] as a prefix and ["] as a suffix if you wanted Eileen, specifically, to say those lines.

As for the nvl clear stuff, well, just don't select those lines xD

Happy visual noveling!

taylor85345
Newbie
Posts: 4
Joined: Mon Jan 12, 2015 7:48 pm
Deviantart: ikyikyhaha
Contact:

Re: Editra/Script editor question:automatically add quotatio

#3 Post by taylor85345 » Thu Jan 15, 2015 4:14 am

Thanks, that's exactly what I was looking for. It should save me a lot of time.

Post Reply

Who is online

Users browsing this forum: No registered users