Search found 1233 matches

by Ocelot
Thu Sep 23, 2021 3:06 pm
Forum: Ren'Py Questions and Announcements
Topic: how to pass additional arguments to bar's changed function
Replies: 3
Views: 11

Re: how to pass additional arguments to bar's changed function

If understand you correctly, you can use Function action: value i[1] range i[2] changed Function(g.changed, arg1, arg2, key=value)
Or you can use renpy.curry, if you want to.
by Ocelot
Wed Sep 22, 2021 3:38 am
Forum: Ren'Py Questions and Announcements
Topic: How to make music change affect returning to main menu from music room
Replies: 2
Views: 51

Re: How to make music change affect returning to main menu from music room

Code: Select all

on "replaced" action If(persistent.op2, true=Play("music", "audio/gs.ogg"), false=Play("music", "audio/wa.ogg"))
by Ocelot
Fri Sep 17, 2021 6:01 am
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Displacement between the game menus after I added a new screen
Replies: 4
Views: 116

Re: Displacement between the game menus after I added a new screen

Oh, I misread your problem. You just need to adjust gui.navigation_xpos in either gui.rpy or config.rpy so it would look well.
by Ocelot
Fri Sep 17, 2021 3:03 am
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Displacement between the game menus after I added a new screen
Replies: 4
Views: 116

Re: Displacement between the game menus after I added a new screen

Code: Select all

    vbox:
        style_prefix "navigation"

        if renpy.get_screen("main_menu"):

            xalign 0.5
            yalign 0.6

        else:

            xpos gui.navigation_xpos
            yalign 0.5
Replace xpos gui.navigation_xpos with xalign 0.5
by Ocelot
Wed Sep 15, 2021 7:36 am
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] "Exception: Fixed Fit Width is too large"
Replies: 6
Views: 157

Re: "Exception: Fixed Fit Width is too large"

IS this a standard history screen? Were there any changes to it? It looks like position of each element is set manually instead of relying on any container (this might be why size was set explicitely)
by Ocelot
Mon Sep 13, 2021 4:12 am
Forum: Ren'Py Questions and Announcements
Topic: Can you make a Ren'Py-made game with a collection of non-continuous stories?
Replies: 3
Views: 161

Re: Can you make a Ren'Py-made game with a collection of non-continuous stories?

Just notice that you cannot save your game while in replay and sometimes strange thing happens to variables changed while in replay mode. If you have something longer than a few minute scene, it would be better to use Start action
by Ocelot
Thu Sep 09, 2021 5:07 am
Forum: Ren'Py Questions and Announcements
Topic: simulate a keypress from python
Replies: 1
Views: 132

Re: simulate a keypress from python

I am not sure if pysdl used by RenPy exposes that, but you can try to use pygame interface for that: import pygame key_event = pygame.event.Event(pygame.locals.KEYDOWN, unicode="e", key=pygame.locals.K_e, mod=pygame.locals.KMOD_NONE) pygame.event.post(key_event) https://www.pygame.org/docs/ref/event...
by Ocelot
Wed Sep 08, 2021 2:20 pm
Forum: Ren'Py Questions and Announcements
Topic: Using two different textboxes together with a python: statement
Replies: 2
Views: 154

Re: Using two different textboxes together with a python: statement

Input screenm is not say screen and does not uses its styles. I do not really remember, where it gets background from, but you can check either by using style inspector, or just define your own style for input screen window.
by Ocelot
Sun Sep 05, 2021 6:47 pm
Forum: Ren'Py Questions and Announcements
Topic: simplify personality point system
Replies: 1
Views: 160

Re: simplify personality point system

As usual, if you want complex behavior from your variables, either make them a class, or shove them in class: class Traits: def __init__(self): self.genuine = 0 self.sarcastic = 0 self.aggressive = 0 @property def dominant_trait(self): trait = sorted([(self.genuine, 3, 'genuine'), (self.sarcastic, 2...
by Ocelot
Sun Sep 05, 2021 3:59 am
Forum: Ren'Py Questions and Announcements
Topic: RenPy Crash With AutoReload On, PC Black Screens
Replies: 2
Views: 162

Re: RenPy Crash With AutoReload On, PC Black Screens

I had the same problem with outdated graphic card drivers. Make sure you have latest version downloaded from nvidia website.
by Ocelot
Sat Sep 04, 2021 4:52 pm
Forum: Ren'Py Questions and Announcements
Topic: Conditional staements for Image Buttons
Replies: 2
Views: 188

Re: Conditional staements for Image Buttons

If you need button to appear only if certain condition is satisfied, it is straightforward:

Code: Select all

screen inv():
    if certain_condition:
        imagemutton <...>
by Ocelot
Thu Sep 02, 2021 5:01 pm
Forum: Ren'Py Questions and Announcements
Topic: Variable won't change when picked
Replies: 2
Views: 290

Re: Variable won't change when picked

if journalism = True:if journalism == True:
Same with others.
Also in your script there is nothing to change value of major after menu selection.
by Ocelot
Thu Sep 02, 2021 3:12 pm
Forum: Ren'Py Questions and Announcements
Topic: [ADDED VIDEO] BUG - Random show commands not working
Replies: 6
Views: 324

Re: BUG - Random show commands not working

I have a suspiction that you never hide images.
Try to do:

Code: Select all

hide maya7
show maya7 at left
If this works, then you will need to fix another problem before you run into it.
by Ocelot
Thu Sep 02, 2021 6:51 am
Forum: Ren'Py Questions and Announcements
Topic: Remove function not working
Replies: 2
Views: 327

Re: Remove function not working

So there is roughly what happens when you create a Qlist object(pseudocode not an actual code): Qlist.__create__: # class initialization self.add = <function>(someaddress) self.addop = <function>(someaddress) self.opdone = <function>(someaddress) self.done = <function>(someaddress) # executing init ...
by Ocelot
Wed Sep 01, 2021 9:30 am
Forum: Ren'Py Questions and Announcements
Topic: Resizing Frame Image based on String Length
Replies: 6
Views: 455

Re: Resizing Frame Image based on String Length

1) Just set tooltip value to whatever you want in the first place: tooltip item.name + "\n" + item.tooltip that way you won't have to bother with hovered 2) len(tooltip) does not do what you want. It returns number of characters, not string width. 3) what happens with your background? Why are border...