How to manipulate NVL mode

A place to discuss things that aren't specific to any one creator or game.
Forum rules
Ren'Py specific questions should be posted in the Ren'Py Questions and Annoucements forum, not here.
Post Reply
Message
Author
dr-black-jack
Newbie
Posts: 12
Joined: Fri Dec 05, 2008 6:52 am
Contact:

How to manipulate NVL mode

#1 Post by dr-black-jack »

I was reading the NVL page on the main renpy page and was wondering about something that had not been mentioned.


Would it be at all possible to divide the presenting NVL page into two halves so that on one side it displays the scrollable text, whilst on the other side it displays the image you want to show? It's something similar to the Higurashi DS game which was displayed on two screens.

Image

User avatar
PyTom
Ren'Py Creator
Posts: 16097
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:

Re: How to manipulate NVL mode

#2 Post by PyTom »

Yes, and this one is actually pretty easy. You can write:

Code: Select all

init python:
    style.nvl_window.left_margin = 400
and the NVL-mode window will take up half the screen. (You'll have to define Positions for images to be shown at, as well.)
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

dr-black-jack
Newbie
Posts: 12
Joined: Fri Dec 05, 2008 6:52 am
Contact:

Re: How to manipulate NVL mode

#3 Post by dr-black-jack »

whoa that was quick! thank you very much!

monele
Lemma-Class Veteran
Posts: 4101
Joined: Sat Oct 08, 2005 7:57 am
Location: France
Contact:

Re: How to manipulate NVL mode

#4 Post by monele »

For some reason, it looks like it's a format that would be very pleasant to read. Much better than having the whole text over the pictures :) (though I'd go for a smaller font than in this example ^^)

pinkmouse

Re: How to manipulate NVL mode

#5 Post by pinkmouse »

PyTom wrote:Yes, and this one is actually pretty easy. You can write:

Code: Select all

init python:
    style.nvl_window.left_margin = 400
and the NVL-mode window will take up half the screen. (You'll have to define Positions for images to be shown at, as well.)
Talking of which, how DO you define positions for character images to be shown on the main screen? You know - positioning them relative to the background, I mean.

I've tried reading the reference manual, but it's all geek to me. I'd really appreciate it if someone would walk me through setting up a bespoke "position". Imagine you've got a garden background, and you want to

show gardener at hedge with dissolve

so that the gardener has his little clippers positioned believably. How would I do that?

I'd probably need to scale him too, but first things first!

PM

JQuartz
Eileen-Class Veteran
Posts: 1265
Joined: Fri Aug 31, 2007 7:02 am
Projects: 0 completed game. Still haven't made any meaningfully completed games...
Contact:

Re: How to manipulate NVL mode

#6 Post by JQuartz »

pinkmouse wrote:I'd really appreciate it if someone would walk me through setting up a bespoke "position".
If it's just a one time thing, just replace 'at hedge' with 'at Position(xpos=0.5, xanchor=0.5, ypos=0.5, yanchor=0.5)'. Reduce the xpos value to move it left, increase the xpos value to move it right. (Eg. xpos=0.2 to move it left). To move it up, reduce the ypos value; to move it down, increase the ypos value.
You can also use integers but I'm too lazy to explain it.

If you'll use it a lot of times, set hedge with the values like so:

Code: Select all

init:
    $ hedge=Position(xpos=0.5, xanchor=0.5, ypos=0.5, yanchor=0.5)
Set the values like the above example. Then when you want to use it just use

Code: Select all

show gardener at hedge with dissolve
I suspect somebody is stealing my internet identity so don't believe everything I tell you via messages. I don't post or send messages anymore so don't believe anything I tell you via messages or posts.

pinkmouse

Re: How to manipulate NVL mode

#7 Post by pinkmouse »

JQuartz wrote:
pinkmouse wrote:I'd really appreciate it if someone would walk me through setting up a bespoke "position".
If it's just a one time thing, just replace 'at hedge' with 'at Position(xpos=0.5, xanchor=0.5, ypos=0.5, yanchor=0.5)'. Reduce the xpos value to move it left, increase the xpos value to move it right. (Eg. xpos=0.2 to move it left). To move it up, reduce the ypos value; to move it down, increase the ypos value.
You can also use integers but I'm too lazy to explain it.

If you'll use it a lot of times, set hedge with the values like so:

Code: Select all

init:
    $ hedge=Position(xpos=0.5, xanchor=0.5, ypos=0.5, yanchor=0.5)
Set the values like the above example. Then when you want to use it just use

Code: Select all

show gardener at hedge with dissolve

Fabulitudinous! I'll be testing that over the weekend. Thanks for the quick response.

If I do manage to conquer this, would it be okay for me to make a recipe item for the cookbook? (Suitably credited, of course.)

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

Re: How to manipulate NVL mode

#8 Post by Jake »

pinkmouse wrote: If I do manage to conquer this, would it be okay for me to make a recipe item for the cookbook? (Suitably credited, of course.)
It's hardly the kind of thing that really belongs in the cookbook, since it's just use of a single feature of Ren'Py to do exactly what that feature's designed for. What Ren'Py really needs is more non-programmer-oriented documentation, not more cookbook recipes.
Server error: user 'Jake' not found

Post Reply

Who is online

Users browsing this forum: No registered users