Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

inkacorn

3
Posts
A member registered Nov 16, 2023 · View creator page →

Recent community posts

hahah wouldn’t it be super hilarious if you pranked everyone by adding witch doctor in the game despite him not being a terraria boss? haha i think that would be super funny especially if you could go on dates with him, can you imagine that? going on dates with the witch doctor?? that would be hilarious! and wouldn’t be even more funny if you could kiss him too? it would be so unexpected and hilarious. imagine kissing the witch doctor, who would want that?? not me no sirree! kissing the witch doctor and holding his hand, looking beyond the skull mask and into his luscious eyes before leaning in for a kiss? that would be so funny i believe. hahaha you should totally add that hahah

once u have both rpy files inside your renpy game, simply use the transform corresponding to the shader u want onto the sprite!
for example:

label start:

     show eileen happy at whateverShaderName

you can find the transform names inside the MVNTemplates.rpy folder, hope this helps <3

you could always try shaders, heres an example:

# Example shader for vertical gradients
init python:
     renpy.register_shader("example.gradient", variables="""
         uniform vec4 u_gradient_color_1;
         uniform vec4 u_gradient_color_2;
         uniform vec2 u_model_size;
         varying float v_gradient_done;
         attribute vec4 a_position;
     """, vertex_300="""
         v_gradient_done = a_position.y / u_model_size.y;
     """, fragment_300="""
         float gradient_done = v_gradient_done;
         gl_FragColor *= mix(u_gradient_color_1, u_gradient_color_2, gradient_done);
     """)
# Transform that applies the gradient
transform gradientTransform:
     shader "example.gradient"
     u_gradient_color_1 (1.0, 1.0, 1.0, 1.0) # Formatted rgba (1.0 is equivalent to 255)
     u_gradient_color_2 (1.0, 1.0, 0.0, 1.0) # The two colors in the example are white and yellow
# Color is applied manually meaning you cannot change it in text tags sadly
# This block creates the tag and applies it to text
init python:
     def gradient_tag(tag, argument, contents):
         return [(renpy.TEXT_DISPLAYABLE, At(Text(text), gradientTransform())) for _,text in contents]
     config.custom_text_tags["Vgradient"] = gradient_tag
# script.rpy
label start:
     show eileen happy
     e "This text is normal. {Vgradient}This text is yellow.{/Vgradient}"
     show elieen happy at gradientTransform
     e "You can also apply the gradient over sprites!"

the result should look something like this

there are some draw backs to this approach such as text outlines not working and requiring predetermined gradients rather than defining them in the text tag

if you have multiple vertical gradients you need displayed, you can always try this:

# Well create two custom transforms for different colors
transform gradientRedBlue:
      shader "example.gradient"
      u_gradient_color_1 (1.0, 0.0, 0.0, 1.0) # Red
      u_gradient_color_2 (0.0, 0.0, 1.0, 1.0) # Blue
transform gradientPinkWhite:
       shader "example.gradient"
       u_gradient_color_1 (1.0, 0.5, 0.7, 1.0) # Pink
       u_gradient_color_2 (1.0, 1.0, 1.0, 1.0) # White
# This block creates the tag and applies it to text 
init python:
      def red_blue_gradient(tag, argument, contents):
           return [(renpy.TEXT_DISPLAYABLE, At(Text(text), gradientRedBlue())) for _,text in contents]
      def pink_white_gradient(tag, argument, contents):
           return [(renpy.TEXT_DISPLAYABLE, At(Text(text), gradientPinkWhite())) for _,text in contents]
      config.custom_text_tags["RedBlueGradient"] = pink_white_gradient  
      config.custom_text_tags["PinkWhiteGradient"] = pink_white_gradient  
# Please note i have not tested this so it might not work


hope this helps!