Text formatting questions

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
7HS
Newbie
Posts: 3
Joined: Tue Jan 23, 2007 10:28 pm
Contact:

Text formatting questions

#1 Post by 7HS »

I'm giving Ren'Py a shot because I thought it would be easier to learn then ONScripter. Maybe not. :roll: So my questions here are kinda aimed towards getting it to behave more like ONScripter does. I've figured out some of it myself, but:

1) Is there a way to append dialogue/thought to the existing text window rather then clearing it upon every new statement? I can simulate this with {p}, but it'd be very useful having the freedom to insert various commands between paragraphs on the same screen. It would also resolve my second question, I think (since first_indent should properly indent each paragraph)

2) Can tabs be inserted into dialogue/thoughts, or arbitrary lines indented somehow? I tried to use the Python escape sequence \t but it doesn't seem to work, even though \n does. :?

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

#2 Post by PyTom »

Hm... You can fake what you want with {fast}, something like.

e "This is part one."

e "This is part one.{fast} And this is part 2."

You can insert whitespace using repeated backslash-space pairs. Something like:

e "\ \ \ \ This is tabbed in.\n\ \ \ \ And so is this."

If you're going to be doing alot of this, let me know exactly what you'd like and I'll add support for \t to Ren'Py, and perhaps I can whip you up something that adds text to paragraphs.

It does seem like adding text to paragraphs will be pretty rare, so perhaps {fast} will suffice, in conjunction with {w} or {p} when you don't need to run a command between lines. In general, it's probably best to avoid {w} and {p}, to prevent the user from having to click more than necessary.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

7HS
Newbie
Posts: 3
Joined: Tue Jan 23, 2007 10:28 pm
Contact:

#3 Post by 7HS »

Yeah, this is the kind of thing I mean (screenshots of Higurashi no Naku Koro ni Kai):

oops, embedding it broke the tables. just check http://www.xn--h9j8c2bv442b.net/file34/ ... xample.jpg

This effect is used to do all sorts of things other then place tachi-e, though- swap backgrounds, do flashes and other visual effects, play SFX and music, etc. So it seemed like the most flexible way to do it would simply be to add text onto that which was most recently displayed.

I hoped to basically create an ONScripter-style visual novel in your engine; the script is to be adapted from an existing short story, so fitting it into the dialogue paradigm would take some rewriting. And frankly, I like novel-style storytelling better. >_> If you don't think Ren'Py should be used for something this, though, that's fine... I'm basically just being too lazy to learn the proper tool for the job. :oops:

Anyway, {fast} does the job, but it requires a lot of duplication of text. So if you could add a more concise way to achieve something like this, it would be wonderful. :D Add \t as well if you don't mind; if you're feeling generous you could make the length match up with first_indent, or add a new style variable, but it's not necessary if that's a pain to do.

Jake
Support Hero
Posts: 3826
Joined: Sat Jun 17, 2006 7:28 pm
Contact:

#4 Post by Jake »

I'm pretty sure that what you really want are the NVL functions, which I think offhand are nvl_say() and nvl_clear(), using NVLCharacter instead of Character...

But I can never find anything in the new wiki documentation and the link to the old HTML documentation seems to have disappeared, so I can't look it up to say for certain... anyone remember which of those headings those functions are documented under, if they're documented at all anymore?
Server error: user 'Jake' not found

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

#5 Post by PyTom »

Oh, you want NVL-mode. We support that, although it's not really documented anywhere. You can see a demo of it by starting up the Ren'Py demo, and choosing: "Advanced Features" "NVL Mode".

That should do what you want, I think.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

7HS
Newbie
Posts: 3
Joined: Tue Jan 23, 2007 10:28 pm
Contact:

#6 Post by 7HS »

Thanks, NVL-mode looks like what I wanted!

Post Reply

Who is online

Users browsing this forum: No registered users