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,862
16,012
[...] but it doesn't show hidden content like: player.store for example where you have to know proper context i.e. player.store.stamina.
It's player.store.__dict__.keys()


On a side note, I advanced in the rewrite, but between the virus rebound, the holidays, and some guys in quarantine, this summer was more busy than I initially thought. So, sorry, I'll probably not meet my "end of summer" deadline :(
Be assured, reader, that it's as frustrating for me than it is for you.
 

yuuy22

Newbie
Oct 9, 2018
97
30
Ive got a game where a bunch of stats are stored together in a table, how can I edit the correct value without accidentally rewriting the entire table or deleting it?
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,862
16,012
Ive got a game where a bunch of stats are stored together in a table, how can I edit the correct value without accidentally rewriting the entire table or deleting it?
By knowing the index of the value you need to change ; whatever = [ 0, 1, 2, 3, 4, 5, ... -3, -2, -1].
Then by validating that it's the right index: whatever[4].
And finally by directly addressing this index : whatever[4] = "something new".


On a side note, I haven't forgot that I need to rewrite the code. I'm just, hmmm how to say this ? "Half depressed by Ren'Py changes".

What I mean is that with Ren'Py being in between Python 2.x and Python 3.x, coding for Python 3.x is useless because it would not works, while coding for Python 2.x is useless because it will be, more or less soon, obsolete. And I have to do this for the tool, but also for the piece of code I use to interface with Ren'Py, and for the code I use for the in game configuration interface ; and also prepare my mods to follow the change when the time will come.
So, in short it progress, but I admit that there's time where I put this aside and forget about it for a surely too long time because it's depressing. And generally when I start again, it's by working on another part of the problem (utilities, configuration, etc.) in order to keep the few rest of sanity I still have.
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,862
16,012
Some news:

I almost finished to ports my Ren'Py utilites to something that should be 100% Python 3.x compatible.

Just 3 errors out of 72 tests for the live test, and all unitary tests (few hundreds) pass.
You don't have permission to view the spoiler content. Log in or register now.
Now I cross my fingers that the code I use for the test suit is itself fully compatible with Python 3.x, because I'll need it ;)


I have more difficulties with the in game configuration interface. I progress, but it was something that I slowly extended, what mean that it's a big mess that I also need to present in a better way.
But globally speaking, I would say that 80% of the "behind the scene" part have been done, and probably 50% of the variable viewer itself.
But don't expect something too soon, it's still a matter of weeks before I can release something. Especially since so far I haven't been able to test what I wrote for the variable viewer ; It should works, but "it effectively works" would be better.

This said, contrarily to what I initially did, I'll probably starts with a WIP version. Something that will works correctly, but only on optimal condition. Then I'll progressively correct the errors due to none optimal use of Ren'Py. I don't want to pass two months tracking the exceptions that happen in less than 0.1% of the games, like I did for the current version. Nor do I want to let you uselessly wait those two months.
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,862
16,012
Some news:

I almost finished to ports my Ren'Py utilites to something that should be 100% Python 3.x compatible.
The port for my utilities is working fine on the early version of Ren'Py 8.0.0:
You don't have permission to view the spoiler content. Log in or register now.

And the port for my configuration menu is also working fine under it. Since there many part that will not be needed here, I'll write the full test suit later to not delay the release more than necessary.
And of course, my test unit also works fine ;)

It was fucking exhausting to constantly have to guess if the error was due to my code, a change in Python 3.x, or a change in Ren'Py. But the best part is that in the end, with few "if" and some inventiveness, I achieved to make the code works fine with both the 7.x and 8.x branches.

So, I'll take one or two days off, and I'll works on the port for the tools.
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,862
16,012
Still a lot to do since none of the buttons are working, and there's still features that don't have their button, but I wanted to show you what the future version will looks like, with a preview of some of the features:

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

The line with "export" and all can be shown or hidden by one click (the button at the right of "close"), same for the letters buttons (the button before "all").

No more complicated right/left click scheme. You'll have buttons at the start of the line (only the "expand the content" is actually implemented).

Since it's a significant value (Ren'Py types being rollback compliant, Python's ones not) you'll also know if it's a Ren'Py, Python or custom type.

An extended type (here a dict with additional attributes) will not limit to it's expected content, but also all additional attributes.

The "previous" value will still be available, but it will be displayed on top of the screen header. After all, if you're hovering a value, you don't need to have access to the button, nor to even see them.

Lists and dictionaries can now be expanded, what will permit to have a better understanding of the change in them, and also see the content if the value is in fact an object.
This also permit me to make a major technical change. Since I can now limit the what will be seen when the structure is "closed", I switch from a viewport to a vpgrid. This should totally remove all risk of slowdown if there's too many variables.

Also, the backward compatibility should be limited to 6.99.11, what is way less than the actual version, but will still cover 6 years of evolution. This seem enough.
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,862
16,012
Sorry, but I need to express my rage and frustration...


The magic of Ren'Py (and Python but way less) circular references:
Code:
Feb 17 15:54:32 [DEBUG  ] store.updater.ui.renpy.text.text.renpy.text.text.renpy.text.text.renpy.text.text.renpy.text.text.renpy.text.text.renpy.text.text.renpy.text.text.renpy.text.text.renpy.text.text.renpy.text.text.renpy.text.text.renpy.text.text.renpy.text.text.renpy.text.text.renpy.text.text.renpy.text.text.renpy.text.text.renpy.text.text.renpy.text.text.renpy.text.text.renpy.text.text.renpy.text.text.renpy.text.text.renpy.text.text.renpy.text.text.renpy.text.text.renpy.text.text.renpy.text.text.renpy.text.text.renpy.text.text.renpy.text.text.renpy.text.text.renpy.text.text.renpy.text.text.renpy
Feb 17 15:54:32 [DEBUG  ] exceptions.RuntimeError: maximum recursion depth exceeded in cmp
I counted, there's 36 occurrences of "renpy.text.text".
So, renpy module reference the text module, that have a sub module named text that reference the renpy module... and welcome in hell.

By itself it's not a problem, I caught the exception, and all my part is designed so each one of those 36 occurrences do not create 36 entries on my side. What mean that technically it works smoothly.
But this happen a lot of times, with a lot of different circular references, what mean that practically it could be way faster if I caught this by myself right from the start.

So, back to my third redesign...


On a side note, it's why I declined the proposition for help and wanted to do it all by myself. I knew it would be a walk through hell, and can't put this on someone else shoulders.
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,862
16,012
Rich you wanted to beta test, here it is.
79flavors I seemed to have understood that you can be interested by this.


Today, no screenshot... an archive (yeahhhh !!!!!)

I need to warn you first, this is a pure beta version ; reason why I'll not update OP yet. It's supposed to works, and it worked for me with the few games I tried it with, but for now I don't guaranty that it will effectively works for you.
I just guaranty that it will not break your save files, so you can try it without fear. But it's not impossible that, like it happened in the past, some games are so weird that it will refuse to save. So the first thing to do is probably to advance through few dialog lines, and try to save. If it don't save, tell me with which game it happened and I'll works on the issue.

WARNING: The key combination to open the viewer is temporarily ALT + U

It's designed to works with 39 different versions of Ren'Py (starting the 6.99.11) as well as with the future 7.5.x and 8.x versions. So, there's probably few differences/particularities that I haven't caught yet. It's also supposed to works with games made by persons who have sometimes near to no codding knowledge, or at the opposite believe that they have really high knowledge (those are the worse :( ). This mean that those persons can involuntarily (or voluntarily for the last ones) mess with Ren'Py in a way that I can't predict.
Normally I covered the most frequent issues, but don't hesitate to warn me in case of error, or if something feel odd.
Note that for now the log facility is fully opened. Therefore it's possible that you find a file named "AONlogFile.txt" in the main directory (where's the exe/py files). I also left part of the tool unprotected (it will throw an exception if something goes wrong). This is to help you see if something goes really wrong and be able to give me some information regarding the issue.

Only effective limitation: do NOT use it with my mod for Corruption or Super Powered. The tool automatically clean-up the old version of the viewer, configuration menu and utilities, this would totally broke those mods. Once I'll have a definitive version of the configuration menu I'll adapt the mods.



I know that it have been a long wait. I'll be totally honest, the Python 2.x/3.x compatibility was the main issue, but not the only one. Knowing what I wanted to achieve for this third version was a little scary. But I achieved to do most of what I wanted, and I guess that most of you will think that it worth the wait.

I'll not describe all the features, waiting for an official release for this. This partly because there's still few things to implement. But they don't interfere with the core of the viewer, therefore if this beta works, the final version will also works ; modulo small bugs limited to what I still have to add.
This being said here are the big lines:

Regarding the in-game configuration menu:
  • It's now natively designed to be customizable, including the style.
    The effective customization is not implemented yet. It's not something critical in regard of the viewer and, as I previously said, I don't want to let you wait more than effectively needed.
  • The "start up" screen will show up when you start the game (as actually) or when you load a save file for the first time in this play. As long as you don't quit Ren'Py itself, you'll not see it more than once, then you'll see it again when you start Ren'Py again and load a previous save.
    I find this approach more interesting since generally you add the tool (or a mod) to an already started game. This way, even in this case you'll be remembered that there's a configuration menu and how to access it. And since games can need months before being updated, you'll be sure that the tool is present even if you forgot ; as long as you kept it with the save files and all.
  • *It's NEW, it's MARVELOUSLY FABULOUS, you'll all fall in love with it* Move the mouse cursor to the (very) top left corner of the game window and enjoy.
    I know, the triggering zone is probably too small, but well, this make my logo appear, and by clicking on it you'll open the configuration menu. The usual key combinations are still present, but they are now optional.
  • I reworked the concept of "help".
    There will still be the global help presenting the tool/mod (still have to write it), but now each configuration option can have it's own help. This way, you'll have a better understanding regarding what they do.

Regarding the Variable viewer:
  • Everything that was present in the 2.x versions is still present.
    Minus the exportation that I still need to implement.
  • Like you've perhaps seen with the previous screenshot, the presentation stay the same.
    But I rethought it to be both relatively easy to use and not take too much space.
  • You can see all the variables in a store.
    By default only the variables that will be saved are presented, but enabling the "advanced mode" through the configuration menu, you can now also see all the variables ; if and when you want it.
  • You can see the Ren'Py's core modules.
    This also is part of the "advanced mode". For most users it will be totally useless, but advanced users will have the possibility to have a better understanding of Ren'Py.
    Note that this content is filtered. There's values that would break everything (and for some I mean your OS session) and obviously need to not be proceeded. But there's a "AONvve_filters.py" file that you can edit to tweak the filters. It's (almost) fully commented, but edit it at your own risks.
    Oh, by the way, no, you'll not be able to look inside my own code. It's not that I don't want, but that I can't. I mean, among the values you would find there, there's the ones you'll have right in front of you. Imagine two mirrors in front of each others, and you'll have a good representation of the problem it would cause.
  • The viewer take a deeper looks into the variables.
    It don't expect them to be limited to their original behavior, and will search for any additional values.
    Technical note: A integer that had both a __dict__ and a __slots__ will show the attributes defined in both.
  • Structures (dict, list, tuple) can now be expanded like objects are.
    This will offer a better view of their content and what changed inside.
  • All actions regarding the variables are now performed with the help of icons.
    Better than the right/left click on the name or the value that I previously used.
  • The search option have it's own list.
    You can NOT trigger it directly, but at least you'll know explicitly that you are looking at the result of a search.

Know issues:

I expected that the use of a vpgrid would remove the slowdown due to the previous value... Either the documentation lied, or I misunderstood it, but it don't. The more variables are shown, the slower it will goes when the previous values can be seen (the button is renamed "information").
I'm sorry for this, there's alas not much I can do. Still I'll add a way to build (in game) a custom filtering list, this should permit to limit the list of variables show by removing all the ones that are uselessly saved ; like with people usind default for all their characters, and things like that.


All this being said, well, the download link is HERE: AONvve 3.0 PRE 2a / Fix from PRE 2 to PRE 2a

And now I'll take one or two days off, crossing my fingers that it also works on another computer than mine, and that you'll like it.
 
Last edited:

UncleVT

Låt den rätta komma in
Moderator
Jul 2, 2017
9,438
102,034
Hi, first thanks for your work.

Unfortunately it doesn't seem to be working for me. I tried it with Artemis, Exciting Games and Hot Dawn. In the first two with clean installs and in the last one on the previous version of the utility. When press Alt+e nothing happens.

Here are the logs for each of them.
 
  • 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,862
16,012
In the first two with clean installs and in the last one on the previous version of the utility.
Hmm, the first two ones doesn't seem to be this clean install than you thought. I tried with Exciting Games, since I have saves for it, and the only way to trigger the issue was to have the previous version in a save file.

It's purely my fault. I did some test to see how to transcribe the previous configuration into the new version, and like it don't apply to the variable viewer (I pass from 8 options to near to 30) I forgot to return back to the working version. Download the attached file and extract it in the "game/AON-packages" directory, it normally fix the issue.


When press Alt+e nothing happens.
Yeah, this one also is totally on me, forgot to warn that the key combination for the viewer temporarily changed :(
It's ALT + U. It will come back to the usual later and you should even be able to define the key combination of your choice.

I'll update my post with a new archive and a warning for the key combination.
 
  • Like
Reactions: Meushi and UncleVT

Meushi

Well-Known Member
Aug 4, 2017
1,146
12,748
And now I'll take one or two days off, crossing my fingers that it also works on another computer than mine, and that you'll like it.
Did some basic, confirm it runs tests of AONvve_3.0_PRE1 (with AONvve fix.zip applied) against various games currently installed.

AOA Academy CH4_GOLD - Game loads. AONvve config displayed when load save, variable list available in game via Alt+U.
Leap of Faith 0.7.0c - Game loads. AONvve config displayed when load save, variable list available in game via Alt+U.
Stay True, Stay You v0.3.0 - Game crashed during startup. No AONlogFile.txt generated, log and traceback attached (AONvve_STSY_mi_20220303.zip). Game starts correctly once AONvve is uninstalled.
Sunshine Love CH2 0.01 - Game crashed during startup. AONlogFile.txt, log and traceback attached (AONvve_SL_mi_20220303.zip). Game starts correctly once AONvve is uninstalled.
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,862
16,012
Stay True, Stay You v0.3.0 - Game crashed during startup.
traceback: "AttributeError: 'module' object has no attribute 'gl2mesh'"
Yeah, would have been totally avoided if I haven't let the code unprotected. I guess that actually the effective compatibility for the viewer start at the 7.4.x branch. I'll make a fix when I'll come back from works.

Note: The compatibility will obviously change with the official release. At this time the code will be totally protected, and I will have had the time to analyze all the modules for all the previous version.


Sunshine Love CH2 0.01 - Game crashed during startup.
But this one... it will be a fucking fuck to solve :(
"Mar 03 17:46:32 [ERROR ] AON05.insert - exceptions.TypeError: 'LabelOverridesSwitch' object does not support item assignment"

"LabelOverridesSwitch" is not part of Ren'Py. View where the error happen, they tweaked config.LabelOverrides. And with such name, I guess that they put some kind of object in top of it, to switch from a label to another depending of the game context.
They wanted something like this, jump expression "girlRoom_{}".format( girl.love ), or like that, jump "girlRoom_{}".format( loveStep( girl ) ), but use a more complex code that break Ren'Py...
Exactly the kind of devs I hate, those who believe they have knowledge, but haven't.

This said, once again this kind of errors will not happen in the official release. The code being totally protected, at worse the tool will just not be enabled, but it will not throw errors. My priority is to keep everything as transparent as possible for the user ; my tool can be atomized, the game must continue as it nothing happened.
But obviously, doing so you would have reported that "well, it don't works with this game", what isn't really helpful actually ;)


Thanks a lot.
 
  • Like
Reactions: WhyNot and Meushi

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,862
16,012
Stay True, Stay You v0.3.0 - Game crashed during startup.
As I said, this one was easy to fix.
I took a bit of extra time and did a quick validation. I still don't guaranty that trying to look inside Ren'Py core will not lead to trouble, but in regular use it should now be effectively compatible back to 6.99.11.


Sunshine Love CH2 0.01 - Game crashed during startup.
This one is another thing... After investigation, it's the incest patch that was the cause of the issue.
This led me to a change in paradigm. Instead of fixing stupidities directly inside my AONutils module, I added an AONfixes module that will fix all those stupids things and make it easier to update ; there will be no need to download the full tool, and I'll not have a kilometers long utility module.

By the way, the fix was easy... I just built his "LabelOverridesSwitch" like it should have been wrote from the start.

I updated the announcement post with a PRE 2 version that should fix both issues.

It should also stop breaking the game in case of start-up error. You'll know that something went wrong because you'll not see the introduction screen when starting the game or loading a save for the first time.
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,862
16,012
It was totally my fault. I messed the file I put in the archive. I correctly backuped the corrected version, but forgot to move it in the directory I use to build the archive... pfff I really need those few days off :(


There's a fix attached, and I updated the announcement message.
 

Meushi

Well-Known Member
Aug 4, 2017
1,146
12,748
I updated the announcement post with a PRE 2 version that should fix both issues.
Thanks, I retested the same games with AONvve-3.0_PRE_2a:

AOA Academy CH4_GOLD - Game loads. AONvve config displayed when load save. Variable list available in game via Alt+U. (*)
Leap of Faith 0.7.0c - Game loads. AONvve config displayed when load save. Variable list available in game via Alt+U. (*)
Stay True, Stay You v0.3.0 - Game loads. AONvve config displayed when load save. Variable list available in game via Alt+U. (*)
Sunshine Love CH2 0.01 (with ipatch) - Game still crashes during startup. AONlogFile.txt, log and traceback attached (AONvve_SL_mi_20220305.zip). Game starts correctly once AONvve is uninstalled.

(*) In games which start, the initial AONvve config background image has the wrong dimensions, only filling part of the window (examples attached). If I close config, then open the variable list via Alt+U, the background image correctly fills the whole window. In all cases I'm running these games in windowed mode.

AOA_Config.jpg LoF_Config.jpg STSY_Config.jpg
 
5.00 star(s) 6 Votes