Help with styles and screen language

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
User avatar
ashewalton
Newbie
Posts: 23
Joined: Thu Jul 22, 2010 5:11 pm
Location: Niagara, ON
Contact:

Help with styles and screen language

#1 Post by ashewalton » Wed Feb 20, 2013 12:32 am

I've had no problem modifying the existing main menu screens to look how I want, but when I try and create styles for an entirely new screen I get the error:
File "game\scene_01_a_groggy_morning.rpy", line 145, in script
File "game\script.rpy", line 131, in python
Exception: The style battle does not exist.
options.rpy

Code: Select all

style.battle_frame.background = None
script.rpy

Code: Select all

screen battle:
                
        ## Party Frame    
        frame:
            style "battle"
            #### (xpos, ypos, width, height)   
            area (0, 337, 960, 207)
            image "ui/screen_battle/party_bg.png"
scene_01.rpy

Code: Select all

call screen battle
Here's the full code if anyone needs it, but the filesize is huge because all of my PSDs are in there, too (sorry!)
https://dl.dropbox.com/u/76506775/The%2 ... 0Terra.zip

f00lery
Newbie
Posts: 3
Joined: Fri Feb 15, 2013 8:21 am
Contact:

Re: Help with styles and screen language

#2 Post by f00lery » Wed Feb 20, 2013 1:25 pm

I'm really interested in the answer to this, because I've been having the same problem...

User avatar
SundownKid
Lemma-Class Veteran
Posts: 2299
Joined: Mon Feb 06, 2012 9:50 pm
Completed: Icebound, Selenon Rising Ep. 1-2
Projects: Selenon Rising Ep. 3-4
Organization: Fastermind Games
Deviantart: sundownkid
Location: NYC
Contact:

Re: Help with styles and screen language

#3 Post by SundownKid » Wed Feb 20, 2013 1:44 pm

Have you tried changing the style from "battle_frame" to "battle"? How about making sure the rest of it is linked to "Style(style.default)"?

User avatar
ashewalton
Newbie
Posts: 23
Joined: Thu Jul 22, 2010 5:11 pm
Location: Niagara, ON
Contact:

Re: Help with styles and screen language

#4 Post by ashewalton » Wed Feb 20, 2013 3:24 pm

I believe I have tried without the _frame as well, but specifically I need to be able to edit the style for the frame. As it stands right now, the widget background is applying to the frame making it look like this:

https://dl.dropbox.com/u/76506775/wrong_style.png

When it should look like this:

https://dl.dropbox.com/u/76506775/psd_style.png

I can create custom styles if they're in the format of xxxxx_menu, but it's a clunky solution to me and I don't understand why the style name has to be suffixed by _menu.

As for Style(style.default), where would I call that? Above the first style.battle in options.rpy?

Post Reply

Who is online

Users browsing this forum: Bing [Bot]