Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Need Support? Post here! Sticky

A topic by Feniks created Jul 23, 2023 Views: 166 Replies: 7
Viewing posts 1 to 4
Developer

If you're having trouble or run into any bugs with the code, post a comment here! I will try to get back to you within a few days.

(1 edit)

hey!! i'm not sure if i'm doing something wrong, since i'm relatively new to coding, but i've tried to use this a few times with multiple projects. here are the main errors i've been getting.


when i call the pronoun_entry screen:

I'm sorry, but an uncaught exception occurred.
While running game code:
  File "game/script.rpy", line 13, in script
    call screen pronoun_entry
  File "renpy/common/000statements.rpy", line 670, in execute_call_screen
    store._return = renpy.call_screen(name, *args, **kwargs)
TypeError: Missing required positional arguments: 'input_value', 'title', 'example', 'sentence'

when i call the pick_multiple_pronouns screen:

I'm sorry, but an uncaught exception occurred.
While running game code:
  File "game/script.rpy", line 13, in script
    call screen pick_multiple_pronouns
  File "renpy/common/000statements.rpy", line 670, in execute_call_screen
    store._return = renpy.call_screen(name, *args, **kwargs)
  File "game/multi_bar/pronoun_screens.rpy", line 153, in execute
    screen pick_multiple_pronouns():
  File "game/multi_bar/pronoun_screens.rpy", line 153, in execute
    screen pick_multiple_pronouns():
  File "game/multi_bar/pronoun_screens.rpy", line 157, in execute
    frame:
  File "game/multi_bar/pronoun_screens.rpy", line 161, in execute
    has vbox
  File "game/multi_bar/pronoun_screens.rpy", line 163, in execute
    hbox:
  File "game/multi_bar/pronoun_screens.rpy", line 165, in execute
    use pick_pronouns_checkbox()
  File "game/multi_bar/pronoun_screens.rpy", line 209, in execute
    screen pick_pronouns_checkbox():
  File "game/multi_bar/pronoun_screens.rpy", line 209, in execute
    screen pick_pronouns_checkbox():
  File "game/multi_bar/pronoun_screens.rpy", line 210, in execute
    vbox:
  File "game/multi_bar/pronoun_screens.rpy", line 214, in execute
    for pron in filter(lambda x: x != "custom", possible_pronouns):
  File "game/multi_bar/pronoun_screens.rpy", line 214, in <module>
    for pron in filter(lambda x: x != "custom", possible_pronouns):
NameError: name 'possible_pronouns' is not defined

when i call the term_customization screen:

I'm sorry, but an uncaught exception occurred.
While running game code:
  File "game/script.rpy", line 13, in script
    call screen term_customization
  File "renpy/common/000statements.rpy", line 670, in execute_call_screen
    store._return = renpy.call_screen(name, *args, **kwargs)
  File "game/multi_bar/pronoun_screens.rpy", line 327, in execute
    screen term_customization():
  File "game/multi_bar/pronoun_screens.rpy", line 327, in execute
    screen term_customization():
  File "game/multi_bar/pronoun_screens.rpy", line 337, in execute
    frame:
  File "game/multi_bar/pronoun_screens.rpy", line 341, in execute
    has vbox
  File "game/multi_bar/pronoun_screens.rpy", line 344, in execute
    frame:
  File "game/multi_bar/pronoun_screens.rpy", line 346, in execute
    has hbox
  File "game/multi_bar/pronoun_screens.rpy", line 353, in execute
    for pron in player_pronouns:
  File "game/multi_bar/pronoun_screens.rpy", line 353, in <module>
    for pron in player_pronouns:
NameError: name 'player_pronouns' is not defined

and when i call the enter_pronouns screen:

I'm sorry, but an uncaught exception occurred.
While running game code:
  File "game/script.rpy", line 13, in script
    call screen enter_pronouns
  File "renpy/common/000statements.rpy", line 670, in execute_call_screen
    store._return = renpy.call_screen(name, *args, **kwargs)
  File "game/multi_bar/pronoun_screens.rpy", line 8, in execute
    screen enter_pronouns(confirm_action=Return(), cancel_action=Return("cancel")):
  File "game/multi_bar/pronoun_screens.rpy", line 8, in execute
    screen enter_pronouns(confirm_action=Return(), cancel_action=Return("cancel")):
  File "game/multi_bar/pronoun_screens.rpy", line 17, in execute
    default c_they = EnterInputValue(custom_pronouns, "they")
  File "game/multi_bar/pronoun_screens.rpy", line 17, in <module>
    default c_they = EnterInputValue(custom_pronouns, "they")
NameError: name 'EnterInputValue' is not defined
Developer(+1)

This looks to me like you didn't add pronoun_backend.rpy or pronoun_setup.rpy to your project! They come from https://feniksdev.itch.io/in-depth-pronouns-for-renpy, which you need to download separately from the multi-bar code. It's got a ton of essential code to make the bar work with pronouns specifically. You will need all the files from the zipped folder in your project except for pronoun_labels.rpy, which just has examples, and you should use the included pronoun_screens.rpy from the multi-bar zip instead of the one that comes with the pronouns code if you want the pronouns screens to use the multi-bar.

Additionally, you shouldn't call the pronoun_entry screen on its own; that's just a helper screen. The screen where you can input custom pronouns is called screen enter_pronouns. I suggest you take a look at the examples in pronoun_labels.rpy; there are several examples of the screens you will need to call and the variables you will need to adjust in order to take advantage of the pronoun system.

Of course, if you're not using the multi bar in tandem with the pronouns system, you can just remove pronoun_screens.rpy and pronoun_multibar.rpy that you got from the multi-bar zip file. They're only there to integrate with the pronouns system.

Hope that helps!

oooh, got it- thank you so much for your help, I didn’t even think about that! it works now, and i really appreciate it :)

(1 edit)

hello, I hope you are able ot read this. I bought the code as is, and went over it all to make sure I was doing everything right. How ever, as I wanted to add a multi bar that displayed my character's hp values, I kept getting this error.

`File "game/Scripts/Defines/windows.rpy", line 712: 'multi_bar' is not a keyword argument or valid child of the fixed statement.
multi_bar 3:


I added the multibar.rpy file to the right files, and tried using it in my screen, but it didn't work. Here is my code I was using.



``` for Chara in active_party_members:
frame:
    xysize (500,500)
    xalign 0.5 yalign 0.5
    text "Name: {} Defense: {} Attack: {}".format(Chara.name,Chara.defense,Chara.attack_damage)
    vbox:
    yalign 0.7
    spacing 10
    fixed:
        text "HP: {}/{} Max Hp: {}".format(Chara.hp,Chara.max_hp,Chara.total_hp) size 25 xalign 0.1 yalign 0.45
        text "{}".format(Chara.choose_battle_quote()) size 25 xalign 0.5 yalign 0.8
        bar value StaticValue (Chara.max_hp, Chara.total_hp):
        at transform:
            matrixcolor TintMatrix("#ff0404ff")
            xalign 0.5 yalign 0.5 xsize 250 ysize 10
        bar value AnimatedValue(Chara.hp,Chara.max_hp,delay = 0.50,old_value = 1):
        at transform:                                      
            matrixcolor TintMatrix("#f10505fa")
            xsize 250 ysize 10 xalign 0.50 yalign 0.55                                  
            right_bar Frame("gui/bar/right_2.png", gui.bar_borders, tile=gui.bar_tile)
                                                        
        multi_bar 3:                                  
        xysize (250,10)                                  
        xalign 0.5 yalign 60                                  
        bars["#03389b","#578bfd","#e70d0d"]                                  
        bar_range (0, Chara.total_hp)                                  
        start_values [Chara.hp,Chara.max_hp,Chara.total_hp]                                  
        sensitive False```

         
               
         

If there is more information you need, please let me know. thank you ^_^

Developer

There are a few problems I see - assuming the indentation is an issue with copy-pasting, you need to fix the following for the multi-bar to work:

  • You need 2 thumbs, not 3. Your bar has 3 sections, but there is one less thumb than the number of sections since the thumbs only go in the boundaries between sections. So you'd want multi_bar 2 not multi_bar 3
  • The bar range isn't a tuple, it's just a number. So for you, the range would be Chara.hp+Chara.max_hp+Chara.total_hp assuming your start values are correct
  • Remember that start values are the value of each individual bar section. So if you have a bar worth 100 and it's split into 5 parts, then the start values are [20, 20, 20, 20, 20] and NOT [20, 40, 60, 80, 100]. With your current start_values, you'll have one section with a value of Chara.hp, one section with a value of Chara.max_hp, and one section with a value of Chara.total_hp. You might not have to fix anything here, but I'm pointing it out because I wasn't 100% sure what your intentions were.

Otherwise, assuming those are fixed up and the indentation is normal, the code runs just fine for me! Let me know if you have any further issues.

Thank you, I got it to work. But also thank you for your help in the discord channel as well.

Also, question about this, but in the future, will support for animated values be a possibility?  like how: bar value AnimatedValue: is right now?

Developer

It's not impossible! It's not a priority for me at the moment, but I'll keep that suggestion in mind :)