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.
I'm searched for hours for an answer and didn't find it. You have to know that I am very newbie with Ren py and also, english is not my native language. I'm sorry if I'm not very understandable x)
I would display the name of the player with a specific position and specific style (the name have been chosen by the player with the input function).
Newnewbie wrote: ↑Sun Dec 08, 2019 4:30 am
Hi guys!
I'm searched for hours for an answer and didn't find it. You have to know that I am very newbie with Ren py and also, english is not my native language. I'm sorry if I'm not very understandable x)
I would display the name of the player with a specific position and specific style (the name have been chosen by the player with the input function).
My problem is that I cannot choose a specific position, change the color, size and the font of the text...
I already tried like 48154 things but it never worked T_T Help would be very appreciated!
If your problem is only to define the name of the character that is speaking....
so, you must see the file "GUI" and look all the definition and setting about the "name.box"
on how to chenage the color of the "name" for each character and/or his dialogue text , you must define this (generally at the begin in the script file)
as is:
Thank you so much for your answer. But my issue is elsewhere. I'm so sorry for my bad explaining...
I have no problem for positionning and stylising my characters names in the dialogues. My issue is when I would want to display the name elsewhere like i did in this picture :
define e = Character('Eileen', color="#c8ffc8")
# Le jeu commence ici
label start:
screen text_example():
frame:
xalign 0.5 ypos 50
text "Text tags {color=#c8ffc8}work{/color} in screens.":
size 30
e "This is a test"
return
Its comes from directly from the tutorial, but it does'nt display anyting (I mean eccept the dialogue test) :/ Does someone know why please?
define e = Character('Eileen', color="#c8ffc8")
# Le jeu commence ici
label start:
screen text_example():
frame:
xalign 0.5 ypos 50
text "Text tags {color=#c8ffc8}work{/color} in screens.":
size 30
e "This is a test"
return
The screen is a function. It is written outside the label start (like all variables).
But it is not enough to write it down. Then it should be called. To do this, use the commands show and call
define e = Character('Eileen', color="#c8ffc8")
screen text_example():
frame:
xalign 0.5 ypos 50
text "Text tags {color=#c8ffc8}work{/color} in screens.":
size 30
# Le jeu commence ici
label start:
show screen text_example
e "This is a test"
return
define e = Character('Eileen', color="#c8ffc8")
screen text_example():
frame:
xalign 0.5 ypos 50
text "Text tags {color=#c8ffc8}work{/color} in screens.":
size 30
# Le jeu commence ici
label start:
show screen text_example
e "This is a test"
return
Ok, I'm stucked again..
The code works perfectly, but there is a black box background behind my text and I cannot find how to change the font style. Do you know how could I remove the black background and change the font style of the text ?
Newnewbie wrote: ↑Sun Dec 08, 2019 10:03 am
The code works perfectly, but there is a black box background behind my text and I cannot find how to change the font style. Do you know how could I remove the black background and change the font style of the text ?
"black box" refers to an frame element. If it is not needed, it can be removed. And style settings, positions can be applied directly to the text.
screen text_example():
text "Text tags {color=#c8ffc8}work{/color} in screens." xalign 0.5 ypos 50 size 30 italic True color "#f00" font 'DejaVuSans.ttf'
P.S. If you use your own fonts, the font files should be placed in the game folder of project
image info_text = ParameterizedText(size=42, color='#A46C')
label start:
show info_text "Parameterized Text": # show info_text will use that image with the passed string
pos (400,100)
Last edited by Remix on Sun Dec 08, 2019 1:02 pm, edited 1 time in total.