Tool Ren'Py Extended Variable Viewer 3.00.04 - For walkthrough authors, game authors and modders

5.00 star(s) 6 Votes

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Respected User
Donor
Jun 10, 2017
10,167
14,882
I take it there's also an image named 'dark' in AON.rpa, and this gets found first.
Er... Right now I just remember that there's a dark version of my logo, but don't remember its name. This said, I'm tempted to say that you are right, and that it's named "dark.whatever".

But what is strange is that the archive is named AON.rpa, so it should be one of the first to be processed, and normally Ren'Py auto creation feature should use the last image found.
Try to rename "AON.rpa" into "00AON.rpa", what should ensure that it's processed first.

Anyway, I'll take a look at my image name, and see if some don't need to be renamed in a bit more unique way.
 

FaceCrap

Active Member
Oct 1, 2020
878
617
Try to rename "AON.rpa" into "00AON.rpa", what should ensure that it's processed first.
Did that, but didn't make a difference.

I took a dive and found this...

00AONrpa.jpg

Oddly enough, Ren'Py's "Image Location Picker" showed the game's "dark" version as last in the list
RenpyImgLocationPicker.jpg

Using the "Image Load Log" overlay I managed to capture this screenshot where it shows which get loaded.
screenshot0001.jpg

EDIT: Oops, was so focussed on this that I overlooked the game's exe folder...

Found a log file from the 10th... had this in it. FWIW. Second time around it didn't generate anything.
You don't have permission to view the spoiler content. Log in or register now.
 
Last edited:
  • Like
Reactions: anne O'nymous

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Respected User
Donor
Jun 10, 2017
10,167
14,882
Oddly enough, Ren'Py's "Image Location Picker" showed the game's "dark" version as last in the list
Hmm... Initially I was tempted to say that you got my "dark", because his was missing but, it isn't missing.


Code:
Apr 10 22:24:07 [ERROR  ] [game/Acts/Act_01/act01scene01.rpy:91] AONVVE.__openVVE - 'Exception: Style 'AONvve_buttonStoreOff' does not exist.
    style.pyx:98
     
    style.pyx:216
     
    [...]/game/AON-packages/AONvve3.py:600
Hmm again...
The styles shouldn't be missing. It happened once, and I added a security check precisely for this reason.

Looks like the game is doing some strange things, I'll have to take a look at it, thanks.

Edit:
Humm, I'll share a super secret trick (does it sound mysterious enough ?)

Create a rpy file, name it "AONdebug.rpy" by example, and put this inside:
Python:
init -1 python:
    AONutils_START_DEBUG   = True
    AONutils_START_WARNING = True
    AONutils_START_ERROR   = True
    AONutils_EXTENDED_LOG  = True
    AONutils_TRACE_DEPTH   = 10

init 1000 python:
    if hasattr( store, "AONvve" ):
        AONvve.SELFDEBUG     = True
        AONvve.SELFDEEPDEBUG = True
I highly recommend to not use it when there's no issue, because it can quickly lead to a really big log file. But when there's a problem, it can provide interesting information.
The names are relatively explicit, so you can turn some to False or True depending how you feel it.
 
Last edited:

FaceCrap

Active Member
Oct 1, 2020
878
617
Got a question, I've been trying to incorporate accessing the viewer in my custom quick_menu, but so far failed in locating how to open it other than by the hot-key combo.

What would I need to put in the action to get this working?
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Respected User
Donor
Jun 10, 2017
10,167
14,882
Got a question, I've been trying to incorporate accessing the viewer in my custom quick_menu, but so far failed in locating how to open it other than by the hot-key combo.
Well, it's because strictly speaking you can't, because it's opened by a protected method from a protected object:
AONutils.keyBind.add( "VVEOpenning", "alt_K_u", self.__openVVE, isA=AONutils._CODE_ )

But:
self is nothing more that a variable that, by convention, have a particular name and that point to the object. So, it's nothing more than objectName.methodName.

Rest the issue with the "protected" part. For Python, "protected" have two meanings:
At object level, it mean that the method/variable will not be directly available. The name will be prefixed by "_className".
At module level, it mean that the object/function/variable will not be importable. But the name stay the same.
And here, there's the two ;)

So, first you need to know the name of the object. In the present case there's a trick... The "AONvve" module have an object named "AONvve", but it's the interface, not the core :p
But if you do a sorted( dir( AONvve ) ), you'll find an object named "__mySelf", it's what you are searching for.
Then if you do a sorted( dir( AONvvve.__mySelf ) ), you'll find a method named "_MySelf__openVVE".
Therefore, AONvve.__mySelf._MySelf__openVVE() (module.object.method) will open the viewer.


Now, all this is the proper way, and as you can see, while not too complicated, it's also not as easy as that. I mean, I gave you the name of the core object and the right method, but normally you would have to check all the variables in the module, until you find one that is an object and have the method you search for.

But with Ren'Py there's another way, that don't need to starts digging in the internal.

As you said, there's a key combination that do it. So you can look at sorted( config.keymap.keys() ), and find "VVEOpenning" (yeah, I know, why the hell did I put two "n", I don't know). Alternatively you can look directly at config.keymap to search by key combination.
Now, you just need to address the right key in _default_keymap.keymap, to access the associated code. Therefore, _default_keymap.keymap["VVEOpenning"]() will also open the viewer.

Put one or the other in your tweaked quick menu, and I don't see why it shouldn't works.


Side note:
I haven't forgot you, UncleVT . But I know that broken save can be really annoying, so I'm trying to find a way to secure the save.
Something that would intercept the exception, then remove the viewer from the save and save again ; while warning the player about the issue. That way, both the game and viewer would be still working, and the player would be able to continue saving his progress. Right after a load, the viewer would give inconsistent results (unless I'm smart and remember to fake an opening through the "after_load" label), but it would works fine again starting the second call.
But the issue is that all this need to works while not going in an endless loop because the save would be break by the game itself and not by the viewer.
I know it's doable, I just need to find how.
 
  • Like
Reactions: UncleVT

FaceCrap

Active Member
Oct 1, 2020
878
617
Hmmm, while both AONvve.__mySelf._MySelf__openVVE() and _default_keymap.keymap["VVEOpenning"]() work perfect if used in the console.
The moment I try using them as action [ ... ] I get an exception the moment the quick_menu shows.

The first method yields 'module' object has no attribute '_m1_transparent_box__mySelf'
The second method yields KeyError: u'VVEOpenning'
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Respected User
Donor
Jun 10, 2017
10,167
14,882
The first method yields 'module' object has no attribute '_m1_transparent_box__mySelf'
Oh, yeah, of course, Ren'Py blindly translate it :(
getattr( AONvve, "__mySelf" )._MySelf__openVVE() should works ; Ren'Py will not catch the protected object and therefore shouldn't try to change it.


The second method yields KeyError: u'VVEOpenning'
Hmm... This one puzzle me. I would understand that it works from the game and not the console (question of context), but the opposite really feel strange.

config.underlay[0].keymap["VVEOpenning"]() is an alternate way to access " _default_keymap.keymap".
But it's just another entry point for the exact same dict, so I'm not sure if it will works or not.
Yet, it's how Ren'Py do the binding, so if the key is missing you shouldn't be able to open the viewer even through the key combination.
 

FaceCrap

Active Member
Oct 1, 2020
878
617
Ren'Py s not wanting to cooperate.

It's weird though, the viewer normally only shows when I load a save, never when starting a new playthrough, but that's just a minor thing I can live with and easily worked around.

What is weirder, when I load a save, normally the config screen shows the first time, but with both 'alternative' methods the viewer automatically shows _over_ the configuration screen.
And both cause the same exception when the quick_menu shows or gets shown
If it's set to show always, the exception occurs right after closing the viewer and the config screen.
If it's set to show on hover, it happens when the quick_menu is made visible.

In both cases the exception is the same, likewise the log output from the viewer.
I think the sensible thing here is to just let it slide and keep using the hotkey.
I guess since you seem to be still working on it, I may have more luck with a potential update in the future.
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Respected User
Donor
Jun 10, 2017
10,167
14,882
In both cases the exception is the same, likewise the log output from the viewer.
Hmm ? :confused:


File "Y:\_VN\Playing\Lost-at-Birth\Lost-At-Birth-Ch9P1\renpy\ui.py", line 295, in interact
raise Exception("ui.interact called with non-empty widget/layer stack. Did you forget a ui.close() somewhere?\nStack was " + ('\n'.join([str(item) for item in stack])))
Exception: ui.interact called with non-empty widget/layer stack. Did you forget a ui.close() somewhere?
Stack was <Layer: 'transient'>
:WaitWhat: What the fuck ?


File "renpy/common/00gamemenu.rpy", line 174, in <module>
$ ui.interact()
Oh !

:oops: My bad. I've been confusing and misleading in my answers.

getattr( AONvve, "__mySelf" )._MySelf__openVVE() is the way to open the viewer from outside of my code, but what you need to use in the quick menu is getattr( AONvve, "__mySelf" )._MySelf__openVVE.

The trailing "()" will call it immediately, what isn't the expected behavior. It's Ren'Py that have to call it, and to do it on demand.
 
  • Red Heart
Reactions: FaceCrap
5.00 star(s) 6 Votes