Mod Ren'Py Universal Gallery Unlocker [2024-01-24] [ZLZK]

5.00 star(s) 2 Votes

illogicallity

Member
Jun 22, 2023
254
617
Does this need an update? It never seems to work. It'll show the gallery options that weren't unlocked before but every game I've tried this with throws an error when I actually click on the gallery stuff.
 

illogicallity

Member
Jun 22, 2023
254
617
Not to my knowledge.


That error tell what is wrong.
Since you can't tell yourself,
do you mind posting those errors?
(Best with game links or names.)

Otherwise, how can I tell what is wrong?
I already deleted those games because I used different ways to see the gallery. https://f95zone.to/threads/on-my-way-home-ch-1-part-3-mrkuchi.102593/ gives errors when you try to install this mod. I don't have the error logs anymore because the games have been deleted.
 

ZLZK

Member
Modder
Jul 2, 2017
275
599

illogicallity

Member
Jun 22, 2023
254
617
It works just fine for me.
I mean no error on start.
In free roam I can click and see scenes without issue.

Since I don't get the error I can't help you.
I accessed the gallery from the main menu on the bottom right. Does URM cause any conflicts with this mod? I usually use that for most games that don't have an updated mod. I'll download the game again to get you the error report

It's a conflict with URM. Worked fine until I applied URM to the game then got this error:
Code:
I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/script.rpy", line 1539, in script
    scene scene10_1 with fade
  File "game/0x52/classes/settings.rpy", line 69, in __getattr__
  File "game/0x52/classes/settings.rpy", line 93, in get
KeyError: 'quickResumeSaveHotKey'

-- Full Traceback ------------------------------------------------------------

Full traceback:
  File "game/script.rpy", line 1539, in script
    scene scene10_1 with fade
  File "C:\Users\owner\Downloads\On_my_way_home-ch1-pc\On_my_way_home-ch1-pc\renpy\ast.py", line 1658, in execute
    renpy.exports.with_statement(trans, paired=paired)
  File "C:\Users\owner\Downloads\On_my_way_home-ch1-pc\On_my_way_home-ch1-pc\renpy\exports.py", line 1657, in with_statement
    return renpy.game.interface.do_with(trans, paired, clear=clear)
  File "C:\Users\owner\Downloads\On_my_way_home-ch1-pc\On_my_way_home-ch1-pc\renpy\display\core.py", line 2798, in do_with
    return self.interact(trans_pause=True,
  File "C:\Users\owner\Downloads\On_my_way_home-ch1-pc\On_my_way_home-ch1-pc\renpy\display\core.py", line 3377, in interact
    repeat, rv = self.interact_core(preloads=preloads, trans_pause=trans_pause, pause=pause, pause_start=pause_start, pause_modal=pause_modal, **kwargs) # type: ignore
  File "C:\Users\owner\Downloads\On_my_way_home-ch1-pc\On_my_way_home-ch1-pc\renpy\display\core.py", line 3810, in interact_core
    root_widget.visit_all(lambda i : i.per_interact())
  File "C:\Users\owner\Downloads\On_my_way_home-ch1-pc\On_my_way_home-ch1-pc\renpy\display\core.py", line 582, in visit_all
    d.visit_all(callback, seen)
  File "C:\Users\owner\Downloads\On_my_way_home-ch1-pc\On_my_way_home-ch1-pc\renpy\display\core.py", line 582, in visit_all
    d.visit_all(callback, seen)
  File "C:\Users\owner\Downloads\On_my_way_home-ch1-pc\On_my_way_home-ch1-pc\renpy\display\core.py", line 582, in visit_all
    d.visit_all(callback, seen)
  [Previous line repeated 2 more times]
  File "C:\Users\owner\Downloads\On_my_way_home-ch1-pc\On_my_way_home-ch1-pc\renpy\display\screen.py", line 451, in visit_all
    callback(self)
  File "C:\Users\owner\Downloads\On_my_way_home-ch1-pc\On_my_way_home-ch1-pc\renpy\display\core.py", line 3810, in <lambda>
    root_widget.visit_all(lambda i : i.per_interact())
  File "C:\Users\owner\Downloads\On_my_way_home-ch1-pc\On_my_way_home-ch1-pc\renpy\display\screen.py", line 462, in per_interact
    self.update()
  File "C:\Users\owner\Downloads\On_my_way_home-ch1-pc\On_my_way_home-ch1-pc\renpy\display\screen.py", line 653, in update
    self.screen.function(**self.scope)
  File "0x52/screens/main.rpy.x52", line 2, in execute
  File "0x52/screens/main.rpy.x52", line 2, in execute
  File "0x52/screens/main.rpy.x52", line 7, in execute
  File "0x52/screens/main.rpy.x52", line 7, in <module>
  File "game/0x52/classes/settings.rpy", line 69, in __getattr__
  File "game/0x52/classes/settings.rpy", line 93, in get
KeyError: 'quickResumeSaveHotKey'

Windows-10-10.0.14393 AMD64
Ren'Py 8.0.3.22090809
On my way home ch1
Sat Sep  9 18:21:55 2023
 
Last edited:
  • Like
Reactions: muki1995

lazysherlock

Newbie
Nov 28, 2021
45
50
You beat me to it. I was just going to say you cannot use 0x52_URM with this. Combining mods causes issues unless stated otherwise.
 
  • Like
Reactions: ZLZK

ZLZK

Member
Modder
Jul 2, 2017
275
599
I accessed the gallery from the main menu on the bottom right. Does URM cause any conflicts with this mod? I usually use that for most games that don't have an updated mod. I'll download the game again to get you the error report

It's a conflict with URM. Worked fine until I applied URM to the game then got this error:
Code:
I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/script.rpy", line 1539, in script
    scene scene10_1 with fade
  File "game/0x52/classes/settings.rpy", line 69, in __getattr__
  File "game/0x52/classes/settings.rpy", line 93, in get
KeyError: 'quickResumeSaveHotKey'

-- Full Traceback ------------------------------------------------------------

Full traceback:
  File "game/script.rpy", line 1539, in script
    scene scene10_1 with fade
  File "C:\Users\owner\Downloads\On_my_way_home-ch1-pc\On_my_way_home-ch1-pc\renpy\ast.py", line 1658, in execute
    renpy.exports.with_statement(trans, paired=paired)
  File "C:\Users\owner\Downloads\On_my_way_home-ch1-pc\On_my_way_home-ch1-pc\renpy\exports.py", line 1657, in with_statement
    return renpy.game.interface.do_with(trans, paired, clear=clear)
  File "C:\Users\owner\Downloads\On_my_way_home-ch1-pc\On_my_way_home-ch1-pc\renpy\display\core.py", line 2798, in do_with
    return self.interact(trans_pause=True,
  File "C:\Users\owner\Downloads\On_my_way_home-ch1-pc\On_my_way_home-ch1-pc\renpy\display\core.py", line 3377, in interact
    repeat, rv = self.interact_core(preloads=preloads, trans_pause=trans_pause, pause=pause, pause_start=pause_start, pause_modal=pause_modal, **kwargs) # type: ignore
  File "C:\Users\owner\Downloads\On_my_way_home-ch1-pc\On_my_way_home-ch1-pc\renpy\display\core.py", line 3810, in interact_core
    root_widget.visit_all(lambda i : i.per_interact())
  File "C:\Users\owner\Downloads\On_my_way_home-ch1-pc\On_my_way_home-ch1-pc\renpy\display\core.py", line 582, in visit_all
    d.visit_all(callback, seen)
  File "C:\Users\owner\Downloads\On_my_way_home-ch1-pc\On_my_way_home-ch1-pc\renpy\display\core.py", line 582, in visit_all
    d.visit_all(callback, seen)
  File "C:\Users\owner\Downloads\On_my_way_home-ch1-pc\On_my_way_home-ch1-pc\renpy\display\core.py", line 582, in visit_all
    d.visit_all(callback, seen)
  [Previous line repeated 2 more times]
  File "C:\Users\owner\Downloads\On_my_way_home-ch1-pc\On_my_way_home-ch1-pc\renpy\display\screen.py", line 451, in visit_all
    callback(self)
  File "C:\Users\owner\Downloads\On_my_way_home-ch1-pc\On_my_way_home-ch1-pc\renpy\display\core.py", line 3810, in <lambda>
    root_widget.visit_all(lambda i : i.per_interact())
  File "C:\Users\owner\Downloads\On_my_way_home-ch1-pc\On_my_way_home-ch1-pc\renpy\display\screen.py", line 462, in per_interact
    self.update()
  File "C:\Users\owner\Downloads\On_my_way_home-ch1-pc\On_my_way_home-ch1-pc\renpy\display\screen.py", line 653, in update
    self.screen.function(**self.scope)
  File "0x52/screens/main.rpy.x52", line 2, in execute
  File "0x52/screens/main.rpy.x52", line 2, in execute
  File "0x52/screens/main.rpy.x52", line 7, in execute
  File "0x52/screens/main.rpy.x52", line 7, in <module>
  File "game/0x52/classes/settings.rpy", line 69, in __getattr__
  File "game/0x52/classes/settings.rpy", line 93, in get
KeyError: 'quickResumeSaveHotKey'

Windows-10-10.0.14393 AMD64
Ren'Py 8.0.3.22090809
On my way home ch1
Sat Sep  9 18:21:55 2023
For now I don't feel like unpacking URM and checking was is wrong.
Maybe I will try it later.

But, when I deleted this code in my mod, it fixed for me error:
"TypeError: argument of type 'bool' is not iterable"
Python:
                @Hook(renpy.game.Persistent, '__getattr__')
                def hijack(func, self, name):
                    if name.startswith("_"):
                        return func(self, name)
                    else:
                        return True
Might not unlock galleries in other games though.

Generally my mod is highly incompatible with games/mods that relies on persistent.
Since my mod is faking values for all existing and non-existing persistent variables.

In past I was narrowing it only to gallery screens.
However, it was too much trouble with getting screen names.

I might work something out in some future, but not now.
 

ZLZK

Member
Modder
Jul 2, 2017
275
599
I might work something out in some future, but not now.
The time has come.

I have removed tempering of 'persistent' object.
Instead I have added condition changer for if/showif statements of screens that have persistent checks in them.

This approach is much cleaner and resolves most errors, making it compatible with other mods.

But it's not fully unlocking anymore, there can be cases where persistent checks are in replay dialogue.
I could temper with persistent only in replay, but it's playing with fire again, I don't want to.

I guess for those games real unlockers should be made.
 

ZLZK

Member
Modder
Jul 2, 2017
275
599
It doesn't seem to work well with Amnesia-version_0.96a
It does work, but it locks gallery instead. :KEK:
You can turn it around by changing: e[i] = ("True", o), to e[i] = ("False", o)
In '_mods/ZLZK/_mods/UGU/scripts/parts/screens_alterer.rpy' file.

I guess I will need to implement some conditional logic into my script,
to know If it should return True or False.
 

ZLZK

Member
Modder
Jul 2, 2017
275
599
I guess I will need to implement some conditional logic into my script,
to know If it should return True or False.
I have put that logic in.

Now instead of changing right away whole condition with persistent in to True,
it changes first persistent in condition to True, then whole condition to evaluated value of it.

It's not perfect, it can fail, since I'm not really parsing conditions,
and even if you do parse it like python do, variables in might not exist yet.
 
Oct 28, 2018
62
48
I have put that logic in.

Now instead of changing right away whole condition with persistent in to True,
it changes first persistent in condition to True, then whole condition to evaluated value of it.

It's not perfect, it can fail, since I'm not really parsing conditions,
and even if you do parse it like python do, variables in might not exist yet.
NOICE. YOU ARE AMAZING
 

BiberonSZeta

Member
Apr 17, 2017
193
312
It's amazing how few people know about your mod.

I used it a lot, and it's amazing in its simplicity yet complex in its compatibility.

Thanks you!

PS: makes me feel like I should of focused more on learning python :)
 

ZLZK

Member
Modder
Jul 2, 2017
275
599
doesn't seem to work with Star Periphery [v0.4.5]
it shows the thumbnails, but the scenes won't play
My new version doesn't temper with persistent anymore.

Here's old version converted for that game only:
Python:
init 1 python hide:


    class FakeDict(dict):
        def __contains__(self, item):
            return True


    getattribute = renpy.game.Persistent.__getattribute__
    
    def __getattribute__(self, name):
        if name != 'replay_gallery_unlocks':
            return getattribute(self, name)
        else:
            return FakeDict()

    renpy.game.Persistent.__getattribute__ = __getattribute__
 
  • Like
Reactions: Joheaster
5.00 star(s) 2 Votes