(bug?) Screen language problems(hotbar & key problem)

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
backansi
Veteran
Posts: 224
Joined: Sun May 31, 2009 7:15 am
Location: Korea, Republic of
Contact:

(bug?) Screen language problems(hotbar & key problem)

#1 Post by backansi »

Code: Select all

transform move_smooth:
    alpha 0 ypos .04
    linear .3 alpha 1 ypos 0.0
screen preferences:
    tag menu

    imagemap:

        use navigation
        at move_smooth
        auto "pref_%s.png"
        
        hotspot (82, 156, 70, 20) clicked Preference("display", "window")
        hotspot (156, 156, 110, 20) clicked Preference("display", "fullscreen")
        
        hotspot (82, 240, 20, 20) clicked Preference("transitions", "all")
        hotspot (112, 240, 40, 20) clicked Preference("transitions", "none")
        
        hotspot (82, 319, 40, 20) clicked Preference("skip", "all")
        hotspot (126, 319, 50, 20) clicked Preference("skip", "seen")
        
        hotspot (82, 403, 50 , 20) clicked Preference("after choices", "skip")
        hotspot (135, 403, 50 , 20) clicked Preference("after choices", "stop")
        
        hotbar (325, 210, 180, 30) value Preference("sound volume")
        hotbar (325, 270, 180, 30) value Preference("music volume")
        hotbar (325, 325, 180, 30) value Preference("voice volume")

Code: Select all

TypeError: 'MixerValue' object is not callable

While running game code:
 - script at line 784 of renpy-6.11.0/common/00library.rpy
 - python at line 788 of renpy-6.11.0/common/00library.rpy.
 - script at line 11 of /home/tom/ab/renpy/common/_layout/screen_preferences.rpym
 - python at line 304 of E:\RP_Project\example/game/script.rpy.

  (....)
  File "E:\renpy-6.11.0\renpy\python.py", line 957, in py_exec_bytecode
  File "E:\RP_Project\example/game/script.rpy", line 304, in <module>
  File "E:\renpy-6.11.0\renpy\ui.py", line 411, in __call__
  File "E:\renpy-6.11.0\renpy\ui.py", line 900, in _hotbar
TypeError: 'MixerValue' object is not callable

Ren'Py Version: Ren'Py 6.11.0l
1. I didn't wrong anything with hotbar..... or, did I?

2. I think that selected_idle and selected_hover don't work. I added some glow effect to text in pref_selected_hover.png but it shows just a plain one.
edited: ah, I've found new ui.py in download renpy page and replacing it. This problem solved.

edited:
3. Here comes another problem.

Code: Select all

transform choice_appear:
    yanchor 0.0 ypos .9 alpha 0
    on show:
        linear .24 yalign 1.0 alpha 1.0
    on hide:
        linear .24 yanchor .0 ypos .9 alpha 0 

screen choice:
    
    window:
        at choice_appear

        style_group "choice"
        yalign 1.0
        has vbox
        
        $ k = 1
        for label, action in items:
            
            $ nkey = "%s" %k
            $ nLabel = nkey +'. ' +  label
            
            key nkey action action
            textbutton nLabel:
                action action
                xfill True
                
            $ k += 1

label start:

    menu:
        'Foo Fighters - Everlong':
            pass
        'Hoobastank - So Far, So Close':
            pass
        'The All-American Rejects -  I Wanna':
            pass

    '......'
When I only use arrow keys to select menu choice and then press Enter key, it didn't work at the next say statement. So I pressed arrow key then it worked.
(I just removed at clause in screen choice block, enter key behavior was back to normal.)

User avatar
SleepKirby
Veteran
Posts: 255
Joined: Mon Aug 09, 2010 10:02 pm
Projects: Eastern Starlight Romance, Touhou Mecha
Organization: Dai-Sukima Dan
Location: California, USA
Contact:

Re: (bug?) Screen language problems(hotbar & key problem)

#2 Post by SleepKirby »

I'm having exactly problem (1) as well, with a very similar traceback. The hotbar code seems to match the one in the documentation, only with different (xpos, ypos, width, height) parameters. Hope someone can help us here.

Also, the last bit of my traceback says

Code: Select all

While running game code:
 - script at line 784 of renpy-6.11.0/common/00library.rpy
 - python at line 786 of renpy-6.11.0/common/00library.rpy.
 - script at line 11 of /home/tom/ab/renpy/common/_layout/screen_preferences.rpym
 - python at line 291 of C:\Dai-Sukima Dan\EasternStarlightRomance(SVN)/game/settings_screen.rpy.
When the hotbar line is on line 35 of settings_screen.rpy. Not sure why it's ~256 lines off?

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:

Re: (bug?) Screen language problems(hotbar & key problem)

#3 Post by PyTom »

I've traced down the bug in hotbar, and I just fixed it. I'm not sure what's causing the bug with line numbers in the screen language - if someone can produce a repeatable case, that would help a lot.
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

User avatar
SleepKirby
Veteran
Posts: 255
Joined: Mon Aug 09, 2010 10:02 pm
Projects: Eastern Starlight Romance, Touhou Mecha
Organization: Dai-Sukima Dan
Location: California, USA
Contact:

Re: (bug?) Screen language problems(hotbar & key problem)

#4 Post by SleepKirby »

Thanks, looking forward to the hotbar fix!

For the line number problem, I've attached a test file that can be put in the game folder of any game. It's a generic main menu screen, with these lines stuck inside:

Code: Select all

        ## Comment out one of the below lines to see an error.  (Errors: "txtbtn", "actn", "Shwmnu")
        ## First two give normal errors.  Third one gives a line number that's 512 greater than it should be.
        
        # txtbtn _("Start Game") action Start()
        # textbutton _("Load Game") actn ShowMenu("load")
        # textbutton _("???") action Shwmnu("save")
I don't know if the line number oddity is only limited to screen language; I've pretty much only been working with screen language in the past several days. Still, this example shows that the line number is only wrong in certain cases.

If you'd like a full game download instead (around 5 MB) of say, the template game with this module added, let me know. (And which version, Windows/Mac/Linux.)
Attachments
test_module.rpy
Put this file in the game folder of "template", for instance.
(1.08 KiB) Downloaded 40 times

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:

Re: (bug?) Screen language problems(hotbar & key problem)

#5 Post by PyTom »

Thanks, fixed the numbering bug.
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

User avatar
SleepKirby
Veteran
Posts: 255
Joined: Mon Aug 09, 2010 10:02 pm
Projects: Eastern Starlight Romance, Touhou Mecha
Organization: Dai-Sukima Dan
Location: California, USA
Contact:

Re: (bug?) Screen language problems(hotbar & key problem)

#6 Post by SleepKirby »

Thank you very much!
I downloaded some of the recently updated files from Launchpad (ui.py, screenlang.py, style.py, display/layout.py), and I saw for myself that the hotbar and line number issues are fixed. :)

Don't forget backansi's 3rd problem, though. (I haven't played around with key behavior myself, so I don't have anything to contribute to that issue.)

User avatar
backansi
Veteran
Posts: 224
Joined: Sun May 31, 2009 7:15 am
Location: Korea, Republic of
Contact:

Re: (bug?) Screen language problems(hotbar & key problem)

#7 Post by backansi »

SleepKirby wrote: Don't forget backansi's 3rd problem, though.
//PyTom
My 3rd problem is related with ATL statement " on hide: ". This is everything that I found till now....

Post Reply

Who is online

Users browsing this forum: No registered users