On Asking Questions

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.
Message
Author
nixrlz
Newbie
Posts: 5
Joined: Sun Aug 13, 2017 11:50 am
Contact:

Re: On Asking Questions

#91 Post by nixrlz » Sat Aug 19, 2017 12:57 pm

How do I link user choice to two variable ?
FOR EXAMPLE :

$ USERCHOICE = "X" OR "Y"

X = IMAGE_CHARACTER1

Y= IMAGE_CHARACTER2

the chosen X or Y become 1 variable = image CHOOSENCHARATER

so i can just type

show image CHOOSENCHARACTER

and the shown image will depend on user choice(whether it's X or Y)

evilangelhl
Newbie
Posts: 1
Joined: Mon Sep 04, 2017 6:48 am
Contact:

Re: On Asking Questions

#92 Post by evilangelhl » Mon Sep 04, 2017 7:02 am

I want to translate Katawa Shoujo from English to Vietnamese for my friends in vietnam. But DejaVuSans not support vietnamese. I don't change font in game. Help me how to change font ? Example font DejaVeSans to Time News Roman (or .....) :( Thanks

JerzyEx
Newbie
Posts: 2
Joined: Sat Oct 07, 2017 3:40 pm
Contact:

Re: On Asking Questions

#93 Post by JerzyEx » Sat Oct 14, 2017 4:40 am

What about updating Python 2.7? Especially platform.py to correctly detect windows version.

User avatar
Imperf3kt
Eileen-Class Veteran
Posts: 1034
Joined: Mon Dec 14, 2015 5:05 am
Location: Your monitor
Contact:

Re: On Asking Questions

#94 Post by Imperf3kt » Sat Oct 14, 2017 7:53 am

JerzyEx wrote:
Sat Oct 14, 2017 4:40 am
What about updating Python 2.7? Especially platform.py to correctly detect windows version.
PyTom did not create Python 2.7, he cannot update it.
Python does have an update, it is calld Python 3.4, Ren'Py cannot be 'simply updated' to 3.4 without significant work.
PyTom has also stated his intentions to stay with 2.7.

As to the detecting windows version, start > run > winver
If it says Windows 10, this is not a fault with Python, but a fault with Windows x. If it says something else and does not match what tracebacks, etc report, then it may be python.
Image

Warning: May contain trace amounts of gratuitous plot.

JerzyEx
Newbie
Posts: 2
Joined: Sat Oct 07, 2017 3:40 pm
Contact:

Re: On Asking Questions

#95 Post by JerzyEx » Sat Oct 14, 2017 9:38 am

Sorry for my english. I mean update current version of Python (2.7.10?) in RenPy. Last Python version is 2.7.14 and it contain new platform.py

Changelog from platform.py:

Code: Select all

...
#    1.0.8 - changed Windows support to read version from kernel32.dll
#    1.0.7 - added DEV_NULL
#    1.0.6 - added linux_distribution()
...
I`am replacing platform.py at renpy/lib/pythonlib2.7 and it`s correctly detect windows version. But this method is a bad way.

seden
Newbie
Posts: 1
Joined: Sat Oct 28, 2017 6:21 pm
Contact:

Re: On Asking Questions

#96 Post by seden » Sat Oct 28, 2017 6:46 pm

Hello,

Here is the error Im getting, some others games are also having the very same..

Code: Select all

Traceback (most recent call last):
  File "/home/seden/bin/Jeux/RPG/!Adult/!Renpy/Heart of Fire-1.1/Heart of Fire.py", line 198, in <module>
    main()
  File "/home/seden/bin/Jeux/RPG/!Adult/!Renpy/Heart of Fire-1.1/Heart of Fire.py", line 195, in main
    renpy.bootstrap.bootstrap(renpy_base)
  File "/home/seden/bin/Jeux/RPG/!Adult/!Renpy/Heart of Fire-1.1/renpy/bootstrap.py", line 270, in bootstrap
    renpy.import_all()
  File "/home/seden/bin/Jeux/RPG/!Adult/!Renpy/Heart of Fire-1.1/renpy/__init__.py", line 365, in import_all
    renpy.styledata.import_style_functions()
  File "/home/seden/bin/Jeux/RPG/!Adult/!Renpy/Heart of Fire-1.1/renpy/styledata/__init__.py", line 26, in import_style_functions
    import renpy.styledata.style_functions  # @UnresolvedImport
  File "style.pxd", line 84, in init style_functions (gen/renpy.styledata.style_functions.c:18784)
AttributeError: 'module' object has no attribute 'StyleCore'
^C
Any idea if there is something to do ?

User avatar
Ookami
Newbie
Posts: 1
Joined: Thu Nov 16, 2017 1:26 pm
Contact:

Re: On Asking Questions

#97 Post by Ookami » Fri Nov 17, 2017 3:41 pm

Hii Does anyone know How to do make appending messages and the ability to scroll up in nvl mode??

opaopa13
Newbie
Posts: 3
Joined: Mon Nov 20, 2017 9:25 pm
Contact:

Re: On Asking Questions

#98 Post by opaopa13 » Tue Dec 05, 2017 10:22 pm

This is probably a really simple syntax problem, but for the life of me, I cannot figure out what I'm doing wrong. All I want is for a bar to descend from off the top of the screen, decrease in value, then rise back up. Here's how I define the bar and its animations (in screens.rpy):

Code: Select all

screen funnybar:
    frame:
        xalign 0.9 ypos 0
        xanchor 1.0 yanchor 1.0
        xsize 500
        bar:
            value funny range 100
            left_bar Solid("#0F0")
            right_bar Solid("#F00")
 
transform descend:
    linear 3.0 ypos 50

transform ascend:
    linear 3.0 ypos 0
Then I try to display the funnybar. But the only things that works is renpy.show_screen("funnybar")!

"show funnybar" generates the default "image not found" silhouette, "screen funnybar" doesn't show anything, so I have to use the renpy.show_screen() python statement. Then I try to apply the transform, and that's where I'm completely stuck: renpy.show_screen() doesn't take a transform, so I don't know how to make it drop down from there.

Can transforms simply not be applied to screens? Am I fundamentally misunderstanding the role of screens? Should I be composing funnybar out of Displayables instead? I hope I can still take advantage of a smooth animation when the bar's value is decreased...

Thank you for any help/guidance!

edit: tried to make a Displayable version instead. Can't get it to display. This is my approach so far:

Code: Select all

define green = Solid("#0F0", xfill=True, yfill=True)
define red = Solid("#F00", xsize=400, yfill=True)
define fbar = HBox(green, red, xpos=500, ypos=500, xsize=500, ysize=50)
Not sure why this one is going wrong either. Any advice?

edit2: Okay, got it. Here's my code -- if anyone wants to look over this and tell me if I made anything more complicated than necessary, I'd appreciate the advice. There's definitely room for improvement, but as this is just used for a brief visual gag, I didn't bother making it a really robust "class".

setup:

Code: Select all

    
        python:
        def show_green(st, at):
            # improvements: replace the globals with local variables; make timing based on clock, not on refreshes
            global target_width, displayed_width
            if target_width < displayed_width:
                displayed_width -= 2
            elif target_width > displayed_width:
                displayed_width += 2
            return Solid("#0F0", xsize=displayed_width, yfill=True), 0.005
    
    define dynamic_green = DynamicDisplayable(show_green)
    define red = Solid("#F00", xfill=True, yfill=True)
    define barback = Solid("#FFF", xfill=True, yfill=True, xanchor=0.5, yanchor=0.5)
    define inner_bar = HBox(dynamic_green, red, xsize=400, ysize=30, xanchor=0.5, yanchor=0.5)
    # note: the thing you want to put on screen needs to be an "image"!
    image fbar = Fixed(barback, inner_bar, xsize=404, ysize=34, xanchor=0.5, yanchor=1.0, xpos=0.95, ypos=0)
Then I can use fbar with Positions and Transforms, just like I want, while also changing its appearance by setting the value of "target_width" (for a gradual change) or both "target_width" and "displayed_width" (for an immediate change).

I hope this helps someone?

Post Reply

Who is online

Users browsing this forum: No registered users