(7.4) Tag attributes and register_shader error

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.
Post Reply
Message
Author
User avatar
Dovahkitteh
Veteran
Posts: 229
Joined: Wed Sep 02, 2015 4:51 pm
Completed: YDD, RE, CoB, Req
Projects: Red Embrace: Hollywood, The Black Hand
Organization: Argent Games
Tumblr: argentgames
Skype: Dovahkitteh
itch: argent-games
Contact:

(7.4) Tag attributes and register_shader error

#1 Post by Dovahkitteh »

Changes in the most recent version of Renpy (7.4) have caused the side portraits for one of our games to break. We were setting _side_img_attr directly for side portraits in previous versions, but that appears broken in 7.4, so we wanted to switch to set_tag_att. However, tag attributes don't seem to function as expected either (see attached test; at the beginning of The Question, you can see that the sprite does not show at all).
the_question.zip
(17.59 MiB) Downloaded 14 times

For that reason, we've attempted to revert to previous versions (7.3 and 7.2) so that we can get them working properly without having to redo all the code. Since these versions did not include the auto Steam-sdk downloader that 7.4 has, we have been using the old Steam SDK .zip so that our achievements will work. The game builds and runs fine locally (though there is a "failed to initialize Steam" message sometimes), but when we upload and launch it on Steam, we get the following error:

Code: Select all

Full traceback:
  File "renpy/common/00shaders.rpy", line 1, in script
    init python:
  File "D:\Games\SteamLibrary\steamapps\common\Red Embrace\RedEmbrace-4.7.1-pc\renpy\ast.py", line 900, in execute
    renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
  File "D:\Games\SteamLibrary\steamapps\common\Red Embrace\RedEmbrace-4.7.1-pc\renpy\python.py", line 1930, in py_exec_bytecode
    exec bytecode in globals, locals
  File "renpy/common/00shaders.rpy", line 3, in <module>
    renpy.register_shader("renpy.geometry", variables="""
AttributeError: 'module' object has no attribute 'register_shader'
Is this somehow related to a version mismatch with the Steam SDK and the Ren'Py version? It seems odd because we've been using our SDK for several versions now and hadn't encountered problems until recently. It also appears to happen regardless of whether we have the SDK in the Ren'Py folder while building.

Any advice on either the tag_attributes or Steam error is appreciated. I can attach our old side_img_attr code if it would help. Thanks!
Image

Writer, Programmer, Designer

Programming/Design Commissions

Image Image

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: (7.4) Tag attributes and register_shader error

#2 Post by PyTom »

I took a look at your example, and I'm not really seeing anything that looks like a correct use of the side image system there.

Here's an example of how to use it correctly:

Code: Select all

# Declare characters used by this game.
define s = Character(_("Sylvie"), color="#c8ffc8", image="sylvie")

image side sylvie green surprised = Transform("sylvie green surprised", yoffset=400)

Code: Select all

# The game starts here.
label start:

    # Start by playing some music.
    play music "illurock.opus"

    scene bg lecturehall
    with fade
    pause 0.3
    $ renpy.set_tag_attributes ("sylvie green surprised")
    $ renpy.say(s,"test")

You need the image= and to define the side images.

I don't know what's going on with Steam, but I wouldn't expect the 7.4 libraries to work in 7.3.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

Post Reply

Who is online

Users browsing this forum: 3N16M4