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 2:15 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  [ 26 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Tue Mar 17, 2009 12:30 pm 
Regular
User avatar

Joined: Mon Feb 09, 2009 6:45 am
Posts: 50
Location: Ward 7F
Projects: autumn, Identityless
I am having a problem with trying to get some interface working. I'd like to ask you to bear with me, as I can't provide the script at the moment, and can't specify much.

In-game Menus (choices) -

I have created few styles for buttons, but I miss a description on how to make few versions for menus (so that on one route i can have different look of the menu than on the other one). I have solved it for frames, but I don't know where to specify menus and link the styled buttons to them. Is it even possible?

/not solved and (probably?) unsolvable in easy way/

Activable buttons in mm -

I have created new button in the main menu and want to make it not selectable depending on some persistent function (gallery, unlocks after some event), but don't know how to. Tried to setting its fourth tuple to "persistent.name = True", but that fails (I suppose because the persistent isn't specified in init). How to workaround it?

/even after == not working, but nonimportant/

That said, is there some quick guide on how to create a new menu screen accesible by a new button from Main menu? The bits are all around the guides and it's hard t get it all together... ^^;;

And lastly - where can one change the questions of Yes/No prompts? I've been trying to find it, but I still fail ^^;;;

/solved/

Thanks for any pointings out and helps to this (slightly desperate) newbie o/

_________________
Currently working on: Identityless
HOW DO I INPUT THIS GODDAMN THING I WANT IN MY GAME TO IT?
WHY ARE THE CHARACTER ARTISTS SO LAZY?


Last edited by Nya-chan Production on Mon Mar 23, 2009 4:57 am, edited 1 time in total.

Top
 Profile Send private message  
 
PostPosted: Tue Mar 17, 2009 3:11 pm 
Eileen-Class Veteran
User avatar

Joined: Fri Aug 31, 2007 7:02 am
Posts: 1265
Projects: 0 completed game. Still haven't made any meaningfully completed games...
Nya-chan Production wrote:
Tried to setting its fourth tuple to "persistent.name = True", but that fails

Should have two =. So it should have been "persistent.name==True".
Nya-chan Production wrote:
That said, is there some quick guide on how to create a new menu screen accesible by a new button from Main menu? The bits are all around the guides and it's hard t get it all tögether... ^^;;


Nya-chan Production wrote:
I have created few styles for buttons, but I miss a description on how to make few versions for menus (so that on one route i can have different look of the menu than on the other one). I have solved it for frames, but I don't know where to specify menus and link the styled buttons to them. Is it even possible?

How about this one:http://www.renpy.org/wiki/renpy/doc/reference/Main_and_Game_Menus
Game menus are tough to make though.
Nya-chan Production wrote:
And lastly - where can one change the questions of Yes/No prompts? I've been trying to find it, but I still fail ^^;;;

You mean the one that say 'Are you sure you want to quit?', 'Loading will make you lose unsaved progress. Are you sure you want to do this?' and 'Are you sure you want to overwrite your save?'? Not really sure but you got to look for them in the files in the renpy folder which is in the renpy-6.X.X folder. Not sure if that's a good idea though since you got to search though all the files and the changes affect all your projects.

_________________
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.


Top
 Profile Send private message  
 
PostPosted: Thu Mar 19, 2009 10:57 am 
Regular
User avatar

Joined: Mon Feb 09, 2009 6:45 am
Posts: 50
Location: Ward 7F
Projects: autumn, Identityless
JQuartz wrote:
Should have two =. So it should have been "persistent.name==True".


/headdesks
I am an idiot >___>

For the menu things, actually, I meant the choices menu, where to customize which style it will load.

I'll give an example.

Code:
menu name_of_menu:
   "Choice 1":
      Its block
   "Choice 2":
      Its block


Is what the default looks like. Now, say, I want the look of it on Girl 1 route use one style of choice menu buttons, and on other one different. The simpliest way would be probably defining new menu (style?) and have it like:


Code:
menu1 name_of_menu:
   "Choice 1":
      Its block
   "Choice 2":
      Its block


This menu has a look for Girl 1 route, while

Code:
menu2 name_of_menu:
   "Choice 1":
      Its block
   "Choice 2":
      Its block


gives different look.

Am I approaching it right or wrong?

The other thing, with a new window I|ll try solving myself first, with the help of Gallery template on the Wiki.

As for the Yes/No prompt texts, I think I saw them somewhere there, might be wrong. Thanks for pointing me the right way and your help ^^

_________________
Currently working on: Identityless
HOW DO I INPUT THIS GODDAMN THING I WANT IN MY GAME TO IT?
WHY ARE THE CHARACTER ARTISTS SO LAZY?


Top
 Profile Send private message  
 
PostPosted: Thu Mar 19, 2009 11:37 am 
Eileen-Class Veteran
User avatar

Joined: Mon Jul 07, 2003 4:57 pm
Posts: 1151
Location: Cambridge, UK
Projects: Elven Relations 2: Mermaid Liaisons
JQuartz wrote:
Nya-chan Production wrote:
And lastly - where can one change the questions of Yes/No prompts? I've been trying to find it, but I still fail ^^;;;

You mean the one that say 'Are you sure you want to quit?', 'Loading will make you lose unsaved progress. Are you sure you want to do this?' and 'Are you sure you want to overwrite your save?'? Not really sure but you got to look for them in the files in the renpy folder which is in the renpy-6.X.X folder. Not sure if that's a good idea though since you got to search though all the files and the changes affect all your projects.

It's best not to go editing the Ren'Py source. There's almost always a way to change things in your own game, usually a much more stable and supported way than changing the Ren'Py source code yourself.

In this case, you can use config.translations() to change the text of the menus and buttons. The "Localizing_Ren'Py" reference page provides examples for how you translate things to another language; you can use the same kind of lines to just alter the wording if you want.

_________________
Author of Elven Relations (IntRenAiMo 2007), When I Rule The World (NaNoRenO 2005), Cloud Fairy (Cute Light & Fluffy, 2009), the TileEngine and UnitEngine (LSF@5), and the fantasy novel Ultimate Dream (NaNoWriMo 2006 onwards).
In development (progress slow but ongoing):
Elven Relations 2: Mermaid Liaisons: Story 96% done, script 75% done, character art 95% done, event CGs 60% done, backgrounds 50% done, customisation 0% done; demo available


Top
 Profile Send private message  
 
PostPosted: Thu Mar 19, 2009 12:05 pm 
Regular
User avatar

Joined: Mon Feb 09, 2009 6:45 am
Posts: 50
Location: Ward 7F
Projects: autumn, Identityless
Nice point out.

That's 3/4 solved, if that template helps me ^^

_________________
Currently working on: Identityless
HOW DO I INPUT THIS GODDAMN THING I WANT IN MY GAME TO IT?
WHY ARE THE CHARACTER ARTISTS SO LAZY?


Top
 Profile Send private message  
 
PostPosted: Thu Mar 19, 2009 7:09 pm 
Eileen-Class Veteran
User avatar

Joined: Fri Aug 31, 2007 7:02 am
Posts: 1265
Projects: 0 completed game. Still haven't made any meaningfully completed games...
Nya-chan Production wrote:
Am I approaching it right or wrong?

Don't know. Can't really tell from your example. Probably will work.

chronoluminaire wrote:
In this case, you can use config.translations() to change the text of the menus and buttons.

That's pretty useful. I didn't thought of that.

_________________
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.


Top
 Profile Send private message  
 
PostPosted: Mon Mar 23, 2009 5:05 am 
Regular
User avatar

Joined: Mon Feb 09, 2009 6:45 am
Posts: 50
Location: Ward 7F
Projects: autumn, Identityless
OK, since this all is for one thing, I'll add it here.

I managed to input the cookbook gallery into my script and it's working, I can alter it, and stuff.

There's one problem, though! (which is, obviously, why I am writing here ;P)

I don't want the gallery to show the navigation buttons and to return to the main menu on right-click. There'll be only three buttons for random images (which will be shown based on if commands and persistent data).
That said, I managed to turn off the navigation by setting the "def navigation" to "ui.null".
But the right-click return is somehow forbidden and I don't know this code well enough to see where it's changed. My guess is the def show part, but don't know for sure and it's tied together in a way I don't know what to add/remove.

Could anyone who understands it take a look at it, please? I don't want to break half of the useful code while making it work ^^;;

_________________
Currently working on: Identityless
HOW DO I INPUT THIS GODDAMN THING I WANT IN MY GAME TO IT?
WHY ARE THE CHARACTER ARTISTS SO LAZY?


Top
 Profile Send private message  
 
PostPosted: Mon Mar 23, 2009 6:01 am 
Eileen-Class Veteran
User avatar

Joined: Fri Aug 31, 2007 7:02 am
Posts: 1265
Projects: 0 completed game. Still haven't made any meaningfully completed games...
Nya-chan Production wrote:
I don't want the gallery...to return to the main menu on right-click

You mean you want it to return or not to return?
If you want it to return, one way is adding this code:
Code:
            ui.keymap(mouseup_3=ui.jumps("return_to_main_menu"))
in def navigation block like so:
Code:
        def navigation(self, page_name, page_num, pages):

            ui.frame(style='gallery_nav_frame')
            ui.vbox(style='gallery_nav_vbox')

            for i, p in enumerate(self.pages):
                layout.button(p.name,
                              "gallery_nav",
                              selected=(i == page_num),
                              clicked=ui.returns(("page", i)))

            ui.null(height=22)
            ui.keymap(mouseup_3=ui.jumps("return_to_main_menu")) #Added here. The other codes in this block can be removed without affecting it.
            layout.button("Return", "gallery_nav", clicked=ui.returns(("return", 0)))

            ui.close()

If you don't want it to return then just jump to it with ui.jumpsoutofcontext from the main menu like so:
Code:
    $ ui.button(clicked=ui.jumpsoutofcontext('gallery'))
    $ ui.text('Gallery')

_________________
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.


Top
 Profile Send private message  
 
PostPosted: Mon Mar 23, 2009 6:08 am 
Regular
User avatar

Joined: Mon Feb 09, 2009 6:45 am
Posts: 50
Location: Ward 7F
Projects: autumn, Identityless
JQuartz wrote:
Code:
            ui.keymap(mouseup_3=ui.jumps("return_to_main_menu"))


I added it after the ui.null in the navigation block and it helped (there's ui.jumps("_main_menu"), btw), thank you very much ^^

_________________
Currently working on: Identityless
HOW DO I INPUT THIS GODDAMN THING I WANT IN MY GAME TO IT?
WHY ARE THE CHARACTER ARTISTS SO LAZY?


Top
 Profile Send private message  
 
PostPosted: Mon Mar 23, 2009 10:01 am 
Eileen-Class Veteran
User avatar

Joined: Mon Sep 19, 2005 2:15 am
Posts: 1284
Location: Florida
Can I piggyback a question onto yours? I can't actually get mine to run either because I need to make images for everything at the top and I don't know what

Code:
# Frames added over unlocked buttons, in hover and idle states.
        g.hover_border = "gallery_hover.png"
        g.idle_border = "gallery_idle.png"


are supposed to be ...

_________________
Obviously, this post has way too much text.

Love is my weapon and trust is my armor!


Top
 Profile Send private message  
 
PostPosted: Mon Mar 23, 2009 11:26 pm 
Eileen-Class Veteran
User avatar

Joined: Mon Sep 19, 2005 2:15 am
Posts: 1284
Location: Florida
Okay, I got my questions answered in the IRC chat. Here's a Locked icon for the default thumbnail size if anyone wants it.

http://renpy.org/wiki/renpy/doc/cookbook/New_CG_Gallery

I'll also happily donate it to the Wiki.


Attachments:
locked.jpg
locked.jpg [ 23.93 KiB | Viewed 631 times ]

_________________
Obviously, this post has way too much text.

Love is my weapon and trust is my armor!
Top
 Profile Send private message  
 
PostPosted: Thu Mar 26, 2009 9:26 am 
Eileen-Class Veteran
User avatar

Joined: Mon Sep 19, 2005 2:15 am
Posts: 1284
Location: Florida
Hmm, I was told Movie.displayable is not possible using the Gallery, but is the Movie.cutscene one still possible?

_________________
Obviously, this post has way too much text.

Love is my weapon and trust is my armor!


Top
 Profile Send private message  
 
PostPosted: Thu Mar 26, 2009 9:29 am 
Epitome of Generic
User avatar

Joined: Sat Dec 22, 2007 12:59 pm
Posts: 525
Projects: yes
No, at least not with the stock code (adding a link that calls a label that just displays the movie before returning isn't that hard though).

_________________
The rest is left as an exercise for the reader.


Top
 Profile Send private message  
 
PostPosted: Sat Mar 28, 2009 11:18 am 
Eileen-Class Veteran
User avatar

Joined: Mon Sep 19, 2005 2:15 am
Posts: 1284
Location: Florida
Oh, I get what you're saying ...

It'd come right after g.button, right? I'll have to try that. Now, why didn't I think of that instead of trying to force it through the gallery interface or a movie.displayable? ...

_________________
Obviously, this post has way too much text.

Love is my weapon and trust is my armor!


Top
 Profile Send private message  
 
PostPosted: Sun Mar 29, 2009 8:47 am 
Regular
User avatar

Joined: Mon Feb 09, 2009 6:45 am
Posts: 50
Location: Ward 7F
Projects: autumn, Identityless
Another question:

I have a problem with storing persistent data for the gallery. Once I run through the set point, the gallery unlocks, but when I restart the game, it's locked again.

I have defined the persistent data in the second init block (Not init -1 python, just init).

Am I doing something wrong? ^^;;

_________________
Currently working on: Identityless
HOW DO I INPUT THIS GODDAMN THING I WANT IN MY GAME TO IT?
WHY ARE THE CHARACTER ARTISTS SO LAZY?


Top
 Profile Send private message  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 26 posts ]  Go to page 1, 2  Next

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: Exabot [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