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
Donor
Respected User
Jun 10, 2017
10,382
15,290
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
885
619
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
Donor
Respected User
Jun 10, 2017
10,382
15,290
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
885
619
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
Donor
Respected User
Jun 10, 2017
10,382
15,290
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
885
619
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
Donor
Respected User
Jun 10, 2017
10,382
15,290
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
885
619
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
Donor
Respected User
Jun 10, 2017
10,382
15,290
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

FaceCrap

Active Member
Oct 1, 2020
885
619
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.
That did it! for both methods! I knew I still have a lot to learn about Ren.Py, but you're miles beyond me :)
 

john1230

Active Member
Oct 6, 2020
747
576
Sorry to bug you anne O'nymous, I've gotten errors when trying to use the tool on Sovereign (Version 0.10.0).

The tool works fine during the games prologue, but after it ends and you can move about freely the tool throws up this error:
You don't have permission to view the spoiler content. Log in or register now.

You don't have permission to view the spoiler content. Log in or register now.

You don't have permission to view the spoiler content. Log in or register now.

Can you look into it when you have some free time? Thank you.

*anne O'nymous, I have a problem not related to Extended Variable Viewer, do you mind if I message you in PM and ask you about it?

It's a RenPy error with "TypeError: can only concatenate str (not "int") to str" that I can't seem to find a answer for when searching the web.

If you don't want me to bug you about it, that's OK. Thank you.
 
Last edited:

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,382
15,290
I'm not dead... but clearly late on the update.

Here's the thing, my daughter broke with her boyfriend, and being a weak easily influenced father good father, when she asked me to help her find a new flat, fix the old one before she leave, move to the new one and then improve the new one, I said yes... What needed months, a bit week-ends after week-ends, since she live in another town, (european) far from where I live.
In top of that, like there's the Olympic Games here, and my boss expect Paris and its surrounding to be saturated, we will be closed during all the period, what mean more works to finish everything that need to be finish.

All this led to me totally forgetting that I haven't finished to works on the fixes, and also to me being currently over exhausted. So, now that my daughter don't need me anymore, I'll take few days to recover, then goes back on working on this.


Sorry for the long wait.
 

bstr2k2

Member
Sep 27, 2017
130
152
I'm not dead... but clearly late on the update.
...
Sorry for the long wait.
family and your personal well being is the most important thing.
so you dont worry about putting your project here on the backseat and continue when you´re rested and ready for it.
real life has no save/load feature and you can´t just reboot and start over.
you can be absolutely sure that we do appreciate your work and the effort you´re making for this community.
 
  • Like
Reactions: anne O'nymous

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,382
15,290
View attachment 3845752

Is there a way to edit these list items via console? Would appreciate some help :)
Well, without the part before the dot, I can't tell you precisely the syntax.

But if you click on the "copy/paste"-like button (the third on the left for each line), it should put the full name of the variable into the console stack. Then, open the console (shift + o), and press the up arrow to have it appear on the console prompt as active command.
I said "should", because there were a bug in that part for some times, and right now I don't clearly remember if the fix was in the last released update or is in the waiting one.

This being said, there's a trick here. The values are tuples, what complicate a bit the process. So, globally speaking, the syntax is: whateverBeforeTheDot.stats["charisma"] = ( 9, 0 )



Edit: fixed a typo in the formatting.
 
Last edited:
  • Like
Reactions: Naralen

Naralen

New Member
Sep 23, 2017
14
14
Well, without the part before the dot, I can't tell you precisely the syntax.

But if you click on the "copy/paste"-like button (the third on the left for each line), it should put the full name of the variable into the console stack. Then, open the console (shift + [/icode]o[/icode]), and press the up arrow to have it appear on the console prompt as active command.
I said "should", because there were a bug in that part for some times, and right now I don't clearly remember if the fix was in the last released update or is in the waiting one.

This being said, there's a trick here. The values are tuples, what complicate a bit the process. So, globally speaking, the syntax is: whateverBeforeTheDot.stats["charisma"] = ( 9, 0 )
Ok thank you. I wasn't quite sure whether I really needed to write the whole list.
 
5.00 star(s) 6 Votes