Odd Renpy Problem

SteelyDan14

Formerly Known as GeekBone
Modder
Donor
Jan 13, 2018
1,385
6,071
I create these gallery MODs using Renpy and I use the same basic code for all of my Gallery MODs.

Recently, one of my MODs has been acting funny. It is the same code I have been using for the VN since the VN launched and it has been working fine. Two updates ago, one of my lines of code stopped working.

Code:
hover im.Blur("images/thumbnails/scenes/scene4.png", 1.5)
Specifically, the Blur attribute. I got the following error:

Code:
AttributeError: 'module' object has no attribute 'Blur'
I could not figure out what was causing this. I checked Renpy documentation and it had not been depricated or anything and it was working fine in my other mods. Interestingly, if I launched it from the Renpy SDK, it would work fine, but on a fresh install it would not work and I would get the error. So I created blurred images as a work around.

On this update, I had to add a page to the gallery. This is the code I used and is the same code I use for all my other MODs.

Code:
textbutton ("Pages") text_style "my_button_page_text"
textbutton ("1") action SetScreenVariable("cg_spage_a", 1) text_style "my_button_page_text"
textbutton ("2") action SetScreenVariable("cg_spage_a", 2) text_style "my_button_page_text"
This time, I got this error message:
Code:
NameError: name 'SetLocalVariable' is not defined
SetLocalVariable is part of Renpy and should be built in so how can it not be defined!

Again, launches fine from the Renpy SDK but on a fresh install, it gives this error. WTH? I have no idea what to do or what is causing this. Any suggestions would be appreciated.
 

LightmanP

Well-Known Member
Modder
Game Developer
Oct 5, 2020
1,750
16,547
I create these gallery MODs using Renpy and I use the same basic code for all of my Gallery MODs.

Recently, one of my MODs has been acting funny. It is the same code I have been using for the VN since the VN launched and it has been working fine. Two updates ago, one of my lines of code stopped working.

Code:
hover im.Blur("images/thumbnails/scenes/scene4.png", 1.5)
Specifically, the Blur attribute. I got the following error:

Code:
AttributeError: 'module' object has no attribute 'Blur'
I could not figure out what was causing this. I checked Renpy documentation and it had not been depricated or anything and it was working fine in my other mods. Interestingly, if I launched it from the Renpy SDK, it would work fine, but on a fresh install it would not work and I would get the error. So I created blurred images as a work around.

On this update, I had to add a page to the gallery. This is the code I used and is the same code I use for all my other MODs.

Code:
textbutton ("Pages") text_style "my_button_page_text"
textbutton ("1") action SetScreenVariable("cg_spage_a", 1) text_style "my_button_page_text"
textbutton ("2") action SetScreenVariable("cg_spage_a", 2) text_style "my_button_page_text"
This time, I got this error message:
Code:
NameError: name 'SetLocalVariable' is not defined
SetLocalVariable is part of Renpy and should be built in so how can it not be defined!

Again, launches fine from the Renpy SDK but on a fresh install, it gives this error. WTH? I have no idea what to do or what is causing this. Any suggestions would be appreciated.
Image Manipulators are outdated and apparently can have some issues as stated in the documentation. I'm using them myself in some of the older stuff, but was advised to use transforms instead. So, maybe try using blur transform instead.

But yeah, the overall issue seems odd. Could it be related to the Ren'Py version, did the game switch the version, or is using some very old one? Since it works fine in SDK, I'd look in that direction. And it'd probably help if you name the game.
 

SteelyDan14

Formerly Known as GeekBone
Modder
Donor
Jan 13, 2018
1,385
6,071
Image Manipulators are outdated and apparently can have some issues as stated in the documentation. I'm using them myself in some of the older stuff, but was advised to use transforms instead. So, maybe try using blur transform instead.

But yeah, the overall issue seems odd. Could it be related to the Ren'Py version, did the game switch the version, or is using some very old one? Since it works fine in SDK, I'd look in that direction. And it'd probably help if you name the game.
Well... I changed SetLocalVariable to SetScreenVariable and it works. Still not sure why this is not happening with my other MODs... but whatever. It's working. I will work on the Blur issue later.
 

LightmanP

Well-Known Member
Modder
Game Developer
Oct 5, 2020
1,750
16,547
Well... I changed SetLocalVariable to SetScreenVariable and it works. Still not sure why this is not happening with my other MODs... but whatever. It's working. I will work on the Blur issue later.
The game uses Ren'Py 7.0 iirc and SetLocalVariable was introduced in 7.1.
 
  • Like
Reactions: SteelyDan14

SteelyDan14

Formerly Known as GeekBone
Modder
Donor
Jan 13, 2018
1,385
6,071
It doesn't matter... I appreciate the help. I will reach out to the dev and ask them a couple of questions and make sure they are using the latest version.

Thanks again!!!
 
  • Like
Reactions: LightmanP

LightmanP

Well-Known Member
Modder
Game Developer
Oct 5, 2020
1,750
16,547
Huh.... When I looked at the ABOUT page of the game it said 7.4. Is there somewhere else I should be looking?
Same, just looked in the About section of the game *shrug*.
I will reach out to the dev and ask them a couple of questions and make sure they are using the latest version.
Game saves will probably break if they update to the latest version, 7.0 is pretty old, I don't think rpyc files from that version are compatible with the newer ones.
 
  • Like
Reactions: SteelyDan14