Ren'Py Variant(s) of show text " .... " at truecenter or other parameter

xWhiteNinjax

Member
Jun 9, 2017
173
49
Hello,

new to renpy and creating a private project similiar to a combination of a walkthrough and a slideshow. Reading some documentations about changing the output of textlines on the screen the command "show text" is a good (enough) form for me, to give short inputs to images without adding an charactername. I found only the parameter "truecenter" and "center", but don't know, if there are specifics like "lefttopcenter" or "rightcenter", for example.

Maybe it is possible to create new styles like "say_label" and "say_dialogue" to show the text at the left side and a little higher (not really truecenter-high) or something on the left side above "truecenter". I want to display the text in respect of the underlaying background to not overlay something important with text.

If someone can show me the right direction (document) or is able to help out this would be great.
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,369
15,284
I found only the parameter "truecenter" and "center", but don't know, if there are specifics like "lefttopcenter" or "rightcenter", for example.
Would you have opened the documentation to the page dedicated to texts, and jumped to the Text Displayables section, you would have read: " ".
Then looking at the documentation content list, you would have seen, three entries below "text", that there's a whole part of the documentation dedicated to the "transforms" this sentence talk about.
There, you would have found the 11 pre-defined transforms, and a link to the ATL page, that explain how you can build your own ones ; ATL page that I previously mentioned to you as being significant to what you were doing.


Maybe it is possible to create new styles like "say_label" and "say_dialogue" to show the text at the left side and a little higher (not really truecenter-high) or something on the left side above "truecenter".
Before trying to make a template/tutorial/demonstration game that would teach people how to use Ren'Py, perhaps should you know the difference between styles and transforms.


If someone can show me the right direction (document) or is able to help out this would be great.
I already told you, twice, that the right direction to learn how to use Ren'Py is the official documentation, available both online and on your computer. I did it a third time, even explaining how simple it was to found the information in this particular case, I'll not do it a fourth time.

Being curious and wanting to learn is a good thing. But expecting to be mouth feed because you don't want to search a bit by yourself is something totally different.
 

79flavors

Well-Known Member
Respected User
Jun 14, 2018
1,581
2,219
Another thing to possibly research is the character.

Any dialogue spoken by centered is presented in the middle of the screen and obeys all the other things related to character dialogue. The big advantage in my mind is that it honors the / settings.

A bit of digging into the RenPy code itself (specifically 00definitions.rpy) and you find...

Python:
centered = Character(None, what_style="centered_text", window_style="centered_window", statement_name="say-centered")
centered_text and centered_window end up pointing to style definitions within 00style.rpy

statement_name/say-centered... I couldn't find any more information.

Since it is character dialogue spoken on a different part of the screen, it may give you some insight on how RenPy itself deals with some of the things you want to do.

Alternatively, the parameter of a character definition can be overridden to use a different screen other than screen say(). Copy the contents of screen say() to a new screen definition, customize it to death, then set up special characters to use that screen instead of the standard one.
 

xWhiteNinjax

Member
Jun 9, 2017
173
49
solved this problem (for me). Sometimes it is easier, as expected...

show text " some text ": <---

xalign "wanted position"
yalign "wanted position"

will put the text at every positon on the screen
 

Turning Tricks

Rendering Fantasies
Game Developer
Apr 9, 2022
992
2,094
solved this problem (for me). Sometimes it is easier, as expected...

show text " some text ": <---

xalign "wanted position"
yalign "wanted position"

will put the text at every positon on the screen
Just something I do, to make it easier to remember and avoid having to type in those transform properties every time, is I create special characters in my Defines for specific roles.

For example, I have one character named "ask", which I use as a narrator, placing the say text in the middle of the text box without any character label or side images.

Python:
define ask = Character(None, what_xalign=0.5, what_text_align=0.5)
I can also use this "ask" character in my Menu's, placing the question in the text box, below the menu choices...

Python:
menu:
    ask "Do you like this format?"

    "Yes":
        pass
    "No":
        pass
So, when I'm busily writing joe happy "Blah blah blah ..." a thousand times and I want to just put some narration up, its simple for me to just type ask "And after a little while..."

I've created Character defines for a bunch of variations I plan on using in dialogue. So, for example with my "joe" example... I also have joe_thinks, joe_whispers and joe_shouts... all with formatting variations in fonts, colors, case, etc.

It's a bit more work at the front end of a project, but I find it invaluable down the road when you're writing dialogue and can easily recall the name of some version you need, rather then remember a transform style or (god forbid!) inputting the transform properties each time.

If I want the text in the middle of the screen, I just use "centered" ... centered "This will be text in the center of your screen." ... or ...

Python:
scene black with dissolve
centered "A Long Time ago in a Galaxy Far Away ..."
 
Last edited:

xWhiteNinjax

Member
Jun 9, 2017
173
49
You are given an important advice for creating a project with a long storyline or playing over hours, that a good preplanning (and such for example setting defintions for less typing, too) is worth a lot of time. Being in my 8. decade of life I have a lot of time to play around for myself with more options so the more or less coding at time for a special moment is part of my fun to learn, too... and it is also possible ( and I am doing it) to have a script for textformating and experimenting and another for transformations with images where I can copy to/and from stable code to use at other scripts. With good namesettings the editor " atom " will help then with search and replace to have a working code with the new variables in less time, too.

For me "centered" or "topcentered" text was one of the most boring impression I got after some time playing or replaying something and even the tutorial or "The Question" is not really something I want to go with on public, the bulky menus with the given resolution are horrible (sorry, my opinion)... the mod transparent borders or dialoguelines here is much more to my liking and has given me some better ideas to present my ideas for my replaying or some hours with my neighbour, eating and drinking.

Thank you for pointing out the other way using dialogues and creating some different ones before starting the real work. Maybe a much better way if you have found your preferences or found your unique style, so the user will have a recognition effect...
 

Turning Tricks

Rendering Fantasies
Game Developer
Apr 9, 2022
992
2,094
You are given an important advice for creating a project with a long storyline or playing over hours, that a good preplanning (and such for example setting defintions for less typing, too) is worth a lot of time. Being in my 8. decade of life I have a lot of time to play around for myself with more options so the more or less coding at time for a special moment is part of my fun to learn, too... and it is also possible ( and I am doing it) to have a script for textformating and experimenting and another for transformations with images where I can copy to/and from stable code to use at other scripts. With good namesettings the editor " atom " will help then with search and replace to have a working code with the new variables in less time, too.

For me "centered" or "topcentered" text was one of the most boring impression I got after some time playing or replaying something and even the tutorial or "The Question" is not really something I want to go with on public, the bulky menus with the given resolution are horrible (sorry, my opinion)... the mod transparent borders or dialoguelines here is much more to my liking and has given me some better ideas to present my ideas for my replaying or some hours with my neighbour, eating and drinking.

Thank you for pointing out the other way using dialogues and creating some different ones before starting the real work. Maybe a much better way if you have found your preferences or found your unique style, so the user will have a recognition effect...

I get what you are saying and agree 100%. In my case, this project I am doing is a learning exercise, first and foremost. I "want" to make my VN unique and special, and I have hundreds of ideas on how to do that, but those things take both experience and time to do. For my first project, I am concentrating more on learning the basics of Ren'py (Work in Progress) - How to render well in Daz (Work in Progress) and improving my writing skills (Work in Progress) . That said though... I have tried to change the default Ren'py styles and menus to be nicer looking and more user-friendly.

For example, instead of using the right-click or the "return" textbutton on the default left position, I use an Icon imagebutton down in the lower right corner, to return from most of my menus. Seems more intuitive to me to "flow" in one direction such as Preferences on left pane --> The slider in the middle you want --> return button there on the right, rather than have to go back and search for the textbutton on the left pane. I also made sure to add a textbox transparency slider, because everyone has a personal preference. Another thing I am trying out, is making several styles of side images for each character. Like Happy, Angry, Sad, Sexy, etc ... They are just face expressions on different colored backgrounds but they aid the player in determining the "mood" of the scene. The same for the various dialogue styles I made (like whispering and thoughts).

It's all coming together nicely, IMO... which makes me happy. But - at least for now - I have to limit my enthusiasm to make a truly unique UI and "Graphical Style" and focus almost solely on those core three goals of mine above. I'm only in my 5th decade, old timer ( ;) ) but I have 3 decades of work as an practical engineer in a high pressure field behind me, and I am using my task management skills from that to help me complete this game of mine.

Next project though... the training wheels come off! I will definitely being making some major UI and styling improvements.
 

xWhiteNinjax

Member
Jun 9, 2017
173
49
have fun in coding and success ... one sentence let me tremble, ... sorry.... "That said though... I have tried to change the default Ren'py styles and menus to be nicer looking and more user-friendly. " The meaning is clear, but for other projects this will be fatal (imho). Your work is depended on your changes and you will learn a skill over time without realising, that you had changed something at "init-time"... and... ren'py itself is a working process... who knows, if the basic sripts will be changed with a future update? There is many antique stuff (especially with the use of text) which is ripe to change at the basic (means, the given scripts of screen, gui and so on)... then you have to change your scripts again... Imho it is better, to concentrate on the skill "after" the label start, if you will go professional (good luck with DAZ, I love to see good images). Such you won't get big surprises from updates to updates.

My solution would be having my own tool-box-project, to copy from and too... but then you have the danger, becoming over time also "fixed" in your styles... but with good comments you will have your own "manual" and will find much faster a working solution for each other project. Without forgetting, that you have to change everytime the basic scripts for your usual coding.

And that is no knowledge of programming (since I have nearly none), but from experiences of life.
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,369
15,284
[...] that you had changed something at "init-time"...
I'm pretty sure that you'll know it if you changed a configuration value. And since it's the only way to change how Ren'Py will behave...

But anyway:
who knows, if the basic sripts will be changed with a future update?
I don't know what you call "basic scripts", but I'm tempted to answer: Who care if they change in a future update ?

Firstly because you have no obligation to update the version of Ren'Py you are using.

Secondly because, 99.99% of the time, updates are compatibles with the previous versions. I haven't verified with a version 8.x, but the clicked button property is still supported in the version 7.5.3, while it was already replaced by the action property in the version 6.14.0, released August 2012.
And it's not because PyTom forgot to remove it, but because Ren'Py have one of the strongest backward compatibility you can find in a game engine. From memory, the only exception is the tag screen property, that used to be supported when included in the screen declaration, what isn't possible anymore.


There is many antique stuff (especially with the use of text) which is ripe to change at the basic (means, the given scripts of screen, gui and so on)...
Once again, who care ?

All the code that you found in the "game" directory when you create a new project is expected to be changed.
The get started part of the documentation, that you apparently still haven't read, contain a whole part dedicated to this. Including one that starts by " "
Difficult to be more explicit regarding the freedom you have to change all this.


Imho it is better, to concentrate on the skill "after" the label start, if you will go professional
While, and it's a professional who talk, it's the exact opposite.
There's nothing that say, "I'm a total amateur", more than a game that keep all the screens as it. Even if it's just by changing the main menu, make the game yours, and not one among all the others.


And, like I reached my grumpiness limits, I'll not comment the last line.