Can this be done for renpy games ??

Dependable_223

Engaged Member
Jan 3, 2019
3,043
4,930
I have noticed that some renpy game are using certaint type color for text but the back ground is also the same color as the text with makes it kind of unreadible for my eyes.
 

Kthulian

www.kthuliangames.com
Game Developer
Apr 27, 2018
972
7,326
What is the question here? If there is a way to change the color of characters names in those games? Or are you making a game and want to change the color of your characters names?
 
  • Like
Reactions: papsuken

Julio

Member
Modder
Uploader
F95Zone Dev
Aug 26, 2017
120
298
style.default.color = "#"
Hex code, white would be #ffffff black would be #000000
Simply search google for color picker, and it will return the hex code. If you need further help, quote me.
 
  • Like
Reactions: Dependable_223

Dependable_223

Engaged Member
Jan 3, 2019
3,043
4,930
What is the question here? If there is a way to change the color of characters names in those games? Or are you making a game and want to change the color of your characters names?
yes i want to know if there is way to change the font color in renpy games supplies by f95 not my own. i dont make games i only play them. but because my eye is not good some fonts are not very good for eye side. So i get difficulty reading some text due to color overlapping the screen. i hope i explained because English not my native language.
 

polywog

Forum Fanatic
May 19, 2017
4,065
6,295
Ren'Py supports a self-voicing mode in which a speech synthesizer is used to read out text and other interface elements. This is intended to make Ren'Py games accessible to the vision impaired.


 

recreation

pure evil!
Respected User
Game Developer
Jun 10, 2018
6,327
22,776
Ren'Py supports a self-voicing mode in which a speech synthesizer is used to read out text and other interface elements. This is intended to make Ren'Py games accessible to the vision impaired.


TTS for a VISUAL novel... I don't know, but something sounds off here o_O

As for the font, if you can mod games you could simply edit the font color, or the say window background color. If you don't know how to mod, then I'm sorry but you have to bear with it.
 

Kthulian

www.kthuliangames.com
Game Developer
Apr 27, 2018
972
7,326
yes i want to know if there is way to change the font color in renpy games supplies by f95 not my own. i dont make games i only play them. but because my eye is not good some fonts are not very good for eye side. So i get difficulty reading some text due to color overlapping the screen. i hope i explained because English not my native language.
Do you know how to use Unren? what is you native language if you don't mind me asking
 

Rich

Old Fart
Modder
Donor
Respected User
Game Developer
Jun 25, 2017
2,566
7,382
yes i want to know if there is way to change the font color in renpy games supplies by f95 not my own. i dont make games i only play them. but because my eye is not good some fonts are not very good for eye side. So i get difficulty reading some text due to color overlapping the screen. i hope i explained because English not my native language.
The answer to this is "yes, but..."

A lot depends on how the game is structured and how it sets its colors. If you look at the most vanilla Ren'py game, the text (usually at the bottom) is displayed via the "say" screen, and its size, color, etc., are controlled by a style called "say_dialogue". It would be possible to write a bit of Ren'py code that would load at the appropriate point in the "init" process, and which could fiddle with the settings of the say_dialogue style.

In addition, the default way that the say_dialogue gets many of its parameters is via code in gui.rpy, which load with an init offset of -2. If you updated them with a file that ran at init -1, those changes should get inserted before the bulk of the initialization.

Thus, you could create a file named, say, fix_the_font.rpy containing the following:

Code:
init offset = -1

define gui.text_color = '#ffffff'
Fiddle with the text color to your heart's content, then copy that file into the "game" directory of a Ren'py game and it should work.

All that assumes, of course, that the game author is using the standard mechanisms for setting up styles. If they have their own conventions for writing styles, then this probably isn't going to work. (Personally, I have a nasty tendency to NOT use the "gui.*" settings, because I like to write my styles so I can see what they are where they are in the code. So this wouldn't work on a game I wrote.)

A second approach is to diddle with the styles using Python after Ren'py has set them up. This might go something like:
Code:
init 99 python:
    style.say_dialogue.color = "#ffffff"
Again, put that into an .rpy file and drop it in the game directory.

Here, we run this code at init 99 so it happens very late, and we use Python to modify the setting on the style that's already been created, rather than trying to shoe-horn ourselves into the process of setting up styles to begin with. This approach would work even with the way I tend to write styles, because it would happen after the fact.

Of course, if the author sets colors within text itself using the Renpy color overrides, or if they deviate from some of the standard style naming conventions, you're going to be a bit more out of luck. In that case, you'd probably have to unren the game, find where the colors are set and modify the code accordingly.

But for many, many games, one of the two "patch it" approaches I mentioned above will probably work.
 

f95zoneuser463

Member
Game Developer
Aug 14, 2017
219
1,024
An (like a shadow) improves the contrast no matter what's behind the text:
Python:
outlines [ (absolute(2), "#050505", absolute(1), absolute(1)) ]
Maybe patch this into the "default" style. Unless the games code overrides the 'outlines' style (very unlikely) in it's screens, this should work globally.

I'm don't know whether this would cause the text to *take up more space*. But I'm like 95% sure it does not. If yes, it could possibly break some screens. I love outlines. The difference in readability is huge.
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,971
16,226
Code:
init 99 python:
    style.say_dialogue.color = "#ffffff"
say_dialogue is only used as common ancestor for both VN and NVL dialogs. Therefore, for this to works, he'll need to rebuild the styles first :
Code:
    style.rebuild()

But for many, many games, one of the two "patch it" approaches I mentioned above will probably work.
The last approach is more advanced, need the use of or a similar tool, but works every time. It's a two step thing.
Firstly, put the mouse pointer right over the text, then press SHIFT + i. And look at the style associated to the text (say_thought) in the screenshot. Then click on the "Return" button at the bottom left part of the screen.
Secondly, open the console with SHIFT + o then type :
[combining both @Rich and @f95zoneuser463 methods for better result]
Python:
style.say_thought.color = "#abcdef"
style.say_thought.outlines = [ ( 2, "#fedcba", 1, 1 ) ]
style.rebuild()
exit
With say_thought being the name found in the previous step, abcdef being the wanted color for the text, and fedcba preferably the opposite color since it will be used for the outlining. To find a color's value, you can go .
Note that the style.rebuild() is optional in 99,99% of the case.

Python:
outlines [ (absolute(2), "#050505", absolute(1), absolute(1)) ]
PyTom put the absolute in the examples to ensure that the values will always be positive, since outlines can't works with negative values contrarily to almost everything else. But it can be omitted, which probably make it easier to use for people who don't feel at ease about messing with the code or, in my approach, using the console.

style inspector.jpg
 
  • Like
Reactions: Rich