Lemma Soft Forums

Supporting creators of visual novels and story-based games since 2003.


Visit our new games list, blog aggregator, IRC, and wiki.
Activation problem? Email [email protected]
It is currently Wed Jun 19, 2013 6:02 am

All times are UTC - 5 hours [ DST ]


Forum rules


Ask questions about one topic per thread, and use a descriptive subject. "NotImplemented error in script.rpy" is a good subject, "Tom's problems" is not. Remember to include all of traceback.txt or error.txt when reporting a problem, as well as the relevant lines of script. Use the [code] tag to format scripts.



Post new topic Reply to topic  [ 108 posts ]  Go to page Previous  1 ... 4, 5, 6, 7, 8  Next
Author Message
PostPosted: Thu Nov 24, 2011 1:48 am 
Lemma-Class Veteran
User avatar

Joined: Fri May 23, 2008 2:11 pm
Posts: 2545
Location: USA
Projects: RockRobin
That's probably because it doesn't exist yet. :P Documentation would be on on the official wiki and here.

I would like to do a tutorial about general GUI soon, but I'm extremely swamped at the moment!

If you're truly in the dark, you should make new threads on your problems. Lots of people around the forum are willing to help you as you learn.

_________________
I apologize in advance for being extremely opinionated.
[Tutorial] How to Customize the Textbox
[Tutorial] How to Customize Game Menus
Icon art by Mocha07734


Top
 Profile Send private message  
 
PostPosted: Thu Nov 24, 2011 2:00 am 
Regular

Joined: Wed Nov 23, 2011 5:30 pm
Posts: 82
So... how did all those people who know how to do it learn it themselves if there is no documentation?
I can't even find what "Return()" as a button action does. I know it exists because I saw it in a script, and I guess that it closes the screen and returns "whatever", but there is no explanation anywhere.
I already opened a thread and asked my questions, but the answers just confused me even more :oops:


Top
 Profile Send private message  
 
PostPosted: Sat Nov 26, 2011 2:23 am 
Veteran
User avatar

Joined: Sun Sep 04, 2011 1:36 am
Posts: 277
Projects: A thingie without a title. With messy code.
Milkymalk wrote:
So... how did all those people who know how to do it learn it themselves if there is no documentation?
I can't even find what "Return()" as a button action does. I know it exists because I saw it in a script, and I guess that it closes the screen and returns "whatever", but there is no explanation anywhere.
I already opened a thread and asked my questions, but the answers just confused me even more :oops:

We did it exactly how you're doing it, actually. :P

Well, I don't know about awesome people like Aleema and the others who are truly amazingly skilled (and who as a result are capable of understanding the harder documentation pages), but the average user like me tends to learn mostly from collecting bits and pieces of code throughout the forum, then tweaking it and seeing what happens. That and the understandable pages from the wiki etc.
We learn bits and pieces here and there and come back for help once we break the code we found... then someone explains what we did wrong and how this or that detail works, and bit by bit we learn. ^^

As for return, it returns the player to the previous location they were at in the game, or to the main menu if there is no location to return to (because it's the end of the game).
So if you're inside a screen, using return will indeed close that screen and bring you back to the previous place you were at in your label before that screen was called. :)

_________________
(I drew my avatar especially to express the scary feeling I get from the code as I type it... XD)


Top
 Profile Send private message  
 
PostPosted: Sat Nov 26, 2011 2:27 am 
Lemma-Class Veteran
User avatar

Joined: Fri May 23, 2008 2:11 pm
Posts: 2545
Location: USA
Projects: RockRobin
Yes, that's exactly how I learned. :)

_________________
I apologize in advance for being extremely opinionated.
[Tutorial] How to Customize the Textbox
[Tutorial] How to Customize Game Menus
Icon art by Mocha07734


Top
 Profile Send private message  
 
PostPosted: Sat Nov 26, 2011 10:02 am 
Regular

Joined: Wed Nov 23, 2011 5:30 pm
Posts: 82
I know a saying:

There are three ways of learning:
By experience, that is the bitterest,
By imitation, that is the easiest,
And by contemplation, that is the noblest.

I usually tend towards noble, then easy, but end up with bitter ;-)

Soraminako wrote:
As for return, it returns the player to the previous location they were at in the game, or to the main menu if there is no location to return to (because it's the end of the game).

So the only difference between Return() and return is that Return() can be used as an action?


Top
 Profile Send private message  
 
PostPosted: Sun Nov 27, 2011 2:46 pm 
Veteran
User avatar

Joined: Sun Sep 04, 2011 1:36 am
Posts: 277
Projects: A thingie without a title. With messy code.
Aleema wrote:
Yes, that's exactly how I learned. :)

In that case, there is still hope that one day even we basic forum dwellers might evolve from caterpillars to butterflies too! X3


Milkymalk wrote:
So the only difference between Return() and return is that Return() can be used as an action?

As far as I know, yeah. I might be missing some additional delicacies, but that's how I use it, at least. :)

_________________
(I drew my avatar especially to express the scary feeling I get from the code as I type it... XD)


Top
 Profile Send private message  
 
PostPosted: Fri Mar 09, 2012 10:53 pm 
Regular
User avatar

Joined: Fri May 27, 2011 8:23 pm
Posts: 113
N00b question. I want to make an imagemap character profile menu in-game. Basically it goes like this:

1) Normal story scene.
2) Image of characters menu show up (is an imagemap menu)
3) When you click a character, a new picture showing the character's profile
4) On profile, there is a "back" button to go back to the menu (number 3). So this probably should be an imagemap too.

Now the question:
1) Where do I declare the imagemaps? In the "screens" page? In the main code page?
2) How do I call it again?

Thanks.


Top
 Profile Send private message  
 
PostPosted: Fri Mar 09, 2012 11:07 pm 
Regular
User avatar

Joined: Sat Jun 12, 2010 11:27 am
Posts: 71
Projects: Rogue Of Heart, Awakened With A Crimson Kiss
the way I would do something like that is this:

Code:
# menu screen
screen charactermenu:
    imagemap:
        auto "characters_%s.png" #the character menu imagemap

        hotspot(1, 1, 1, 1,) action [ Show('character1'), Hide('charactermenu') ] #when you click the first character, hide this screen and show their profile
        hotspot(2, 2, 2, 2) action [ Show('character2'), Hide('charactermenu') ] #when you click the second character, hide this screen and show their profile
        hotspot (3, 3, 3, 3) action Return #when this spot is clicked, close the menu screen and return to the game

# character screen
screen character1:
    add "character1profile.png" #shows the profile image of the first character
    textbutton "go back" action[ Show('charactermenu'), Hide('character1') ] #when clicked, hides this screen and shows the menu

# other character screen
screen character2:
    add "character2profile.png" #shows the profile image of the second character
    textbutton "go back" action[ Show('charactermenu'), Hide('character1') ] #when clicked, hides this screen and shows the menu

# actual game
label start:
    "text text text"
    "more text"
    call charactermenu #call the character menu screen
    "even more text"


to declare imagemaps, you'll want to put them inside a screen. feel free to define that screen in your script file, or have your own specific file for it, or however you want to organise it. you can either call the screen with "show" or "call". in my example, I put call, so to hide it you only need to call "return" to make it go away, but if you "show" the screen, you'll need to "hide" it when you're done with it. I hope this makes sense!

_________________
VNs In Progress:
» Awakened With a Crimson Kiss «
» Rogue of Heart «


Top
 Profile Send private message  
 
PostPosted: Sat Mar 10, 2012 2:02 pm 
Regular
User avatar

Joined: Fri May 27, 2011 8:23 pm
Posts: 113
Thanks! Something I don't get a bit.
Code:
imagemap:
        auto "characters_%s.png" #the character menu imagemap


Why does it say "auto" instead of "ground" and "hover"? Does it make any difference?


Top
 Profile Send private message  
 
PostPosted: Sat Mar 10, 2012 8:20 pm 
Regular
User avatar

Joined: Sat Jun 12, 2010 11:27 am
Posts: 71
Projects: Rogue Of Heart, Awakened With A Crimson Kiss
oh! well, for imagemaps and imagebuttons, instead of going

Code:
ground "charactermenu_ground.png"
hover "charactermenu_hover.png"


if all your menu items are named "<whatever>ground.<whatever>" etc, you can just use "auto", where it will automatically work out your ground and hover and whatever else images, so you only have to type one line to declare all the images it needs.

_________________
VNs In Progress:
» Awakened With a Crimson Kiss «
» Rogue of Heart «


Top
 Profile Send private message  
 
PostPosted: Tue Mar 13, 2012 4:53 am 
Eileen-Class Veteran
User avatar

Joined: Thu Oct 14, 2010 3:53 am
Posts: 1110
Location: NC, USA
Completed: Torrey & the Vampire, Faery Tale, Madaline's Missing Miscellany, Alchemical Ink, Yaoi Story, The Visitor, Erotic Story Generator, What Kind of Fiction Should YOU Write? (Quiz Game), Falling, The End of the Raven, The Deep Dark
Organization: Erotic Visions - VNs
Thank you so much for this Tutorial, Aleema!
-- Your instructions worked like a charm. I especially liked the extras you added in your tutorial to customize all kinds of fun things.


Attachments:
ScreenShot05.jpg
ScreenShot05.jpg [ 447.35 KiB | Viewed 649 times ]
ScreenShot02.jpg
ScreenShot02.jpg [ 435.11 KiB | Viewed 694 times ]

_________________
Ookami Kasumi ~ Purveyor of fine Smut.
Erotic Visions ~ Visual Novels

"No amount of great animation will save a bad story." -- John Lasseter of Pixar
Top
 Profile Send private message  
 
PostPosted: Sat Jun 16, 2012 3:30 pm 
Newbie
User avatar

Joined: Wed Jul 14, 2010 6:58 am
Posts: 11
Location: Czech Republic
Sorry, a quick question - this is a really simple main menu image map with hot spots, but for some reason, they are messed up. I remember dealing with the same problem months ago but now I can't for my life remember how I solved it... by any chance, does anyone know?

This is what I inserted into screens.rpy:

Quote:
screen main_menu:
tag menu

imagemap:

ground "menu_idle.jpg"
hover "menu_hover.jpg"

hotspot (659,493,75,25) action Start()
hotspot (659,531,91,24) action Quit(confirm=False)


Image
How it should look.

Image
How it actually looks like. Notice the messed up hotspots.

Thank you for reading!


Top
 Profile Send private message  
 
PostPosted: Sat Jun 16, 2012 4:40 pm 
Regular
User avatar

Joined: Sat May 26, 2012 1:38 pm
Posts: 32
Location: Home
Organization: None
I don't know if this actually work, but try deleting the "cache" folder in your game game directory.
And next time, when asking questions about renpy, you could go to the Ren'Py Questions and Announcements forum.

_________________
Cactuses


Top
 Profile Send private message  
 
PostPosted: Sat Jun 16, 2012 7:22 pm 
Miko-Class Veteran
User avatar

Joined: Mon Feb 06, 2012 9:50 pm
Posts: 759
Location: NYC
Projects: Icebound
Organization: Fastermind Games
You can also do something like this to eliminate the imagemap altogether.

Code:
screen main_menu:
tag menu

add "menu_background.jpg"

vbox:
  xalign 0.9 yalign 0.9 spacing 10
  textbutton "Start" action Start() font "font.ttf"
  textbutton "Quit" action Quit(confirm=False) font "font.ttf"

_________________
ImageImage


Top
 Profile Send private message  
 
PostPosted: Sun Jun 17, 2012 4:15 am 
Newbie
User avatar

Joined: Wed Jul 14, 2010 6:58 am
Posts: 11
Location: Czech Republic
Thank you, it worked like a charm -- and sorry, I'll do that next time! I was under the impression we could ask questions about this tutorial in this thread.


Top
 Profile Send private message  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 108 posts ]  Go to page Previous  1 ... 4, 5, 6, 7, 8  Next

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: Google [Bot]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Protected by Anti-Spam ACP
Powered by phpBB® Forum Software © phpBB Group