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

5.00 star(s) 6 Votes

RaXorX

Newbie
Dec 24, 2018
37
5
Is it me or the variables are accessed differently now? Playing Milfs of Sunville and in the console I can't access the variables at all.
Previously I would do this
varname [press enter] - this would show me the current value of the variable
varname = x [press enter] - and this would set x as the new value of the variable

In that said game, I can't view the variables at all. If I write varname and press enter, it simply shows that text minus the first and last char as character dialogue. I can for the moment write to normal variables as such

$varname = x [press enter] and this sets the new value. But I can't see the current value nonetheless easily and have to resort to variable viewer.

That above approach didn't work for tables unfortunately.
varname[a] throws a string of error instead of showing value.
$varname[a] = x does the same.

I am assuming it's on later versions of renpy and things have changed slightly than before.

EDIT: While using this https://f95zone.to/threads/livechea...les-generate-a-cheat-menu.89087/#post-7293348
I can edit and access the variables normally. So weird. Perhaps some failsafe coded by the dev of Mlfs of Sunville.
varname
varname = x
They both work fine while using that.

anne O'nymous While using your v3 var viewer, when using the data tables and using the option to copy var name to console history.

if the data within the table initially use a string variable it needs to be accessed as varname[u'string']. Right now your tool for the moment sends it as varname[string]

Also, in my 6 years of playing renpy games I could never figure out a way to add variables to the game from the console. Only the vars that are initialized/created after some event/scene only. It would be awesome if we could.
 
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,111
14,790
STJay and UncleVT published an update that should fix the issues you encountered.


For Trouble in Paradise and The Big Beyond, it was easy. Everything was my fault ; I once fixed an exceptional issue and then created a more frequent one. Well, I fixed my fix, it now works as expected.

As for Fates: Determination... I don't know who's making this game, but I hate it already. It works with the 2.x version only because it silently deal with all the errors and is built differently. The problem was simple: The dev decided that the 'start' label, common to every single game made by Ren'Py, is a stupidity and should be named "lblstart".
I fixed the issue, changing how I deal with the 'start' label, to test other names (among which now figure 'lblstart') in case of error. I shouldn't have had to do this, I hate this devs.

And finally Witch Hunter... Hmm...
I totally see what is the problem. For some reason the styles are not defined, or disappear. This was coupled to a wrong value returned to Ren'Py, that was generating the breaking exception.
I fixed the wrong value issue, but I was totally unable to reproduce the problem itself. I tried everything that crossed my mind, using both clean saved files, and saved files with the 2.x version, saving/loading on a long run, and all, but the error was never triggered. I also took a look at the game code, and didn't found obvious reason for this to happen. It's surely a combination of deep playthrough, coupled to saves past from update to update, or something like this, therefore something that can't be easily reproduced, if even it can be voluntarily reproduced.
So, I took an alternate way. I can't find why the styles aren't defined, and so fix directly this issue, but I can test if the styles are defined, every time the viewer is opened, and force their recreation if needed. I assumed that all the styles were either present/absent, so tested only one. Don't hesitate to tell me if it's not enough.
Normally this should fix the issue, but like I wasn't able to reproduce it, I can't confirm it.
 
  • Like
Reactions: STJay and UncleVT

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Respected User
Donor
Jun 10, 2017
10,111
14,790
In that said game, I can't view the variables at all. If I write varname and press enter, it simply shows that text minus the first and last char as character dialogue.
Hmm... In a way it's not strange, the console proceed Ren'Py statement and so you can write "blablabla" and it will then process this as if it was a dialog line for the narrator.
But of course, it shouldn't happen the way it happen for you.


I am assuming it's on later versions of renpy and things have changed slightly than before.
No, nothing changed in Ren'Py on the console. At least nothing that could explain this. Either it's a bug specific to this version of Ren'Py, specific to that game, or some voluntary messing move made by the author of the game.


if the data within the table initially use a string variable it needs to be accessed as varname[u'string']. Right now your tool for the moment sends it as varname[string]
Oops, missed this edit. I'll fix it with the next update, thanks for the report.


Also, in my 6 years of playing renpy games I could never figure out a way to add variables to the game from the console. Only the vars that are initialized/created after some event/scene only. It would be awesome if we could.
Technically it's possible, just type myNewVariable = "whatever" in the console, and the game will now have a new variable named "myNewVariable". But practically it present no interest because the game wouldn't know what to do with this variable.
It's something only useful when an update is broke and throw you a "missing [whatever] variable" error. Rolling back one/two time, permit to create the said variable and then fix the game from the console.
 

RaXorX

Newbie
Dec 24, 2018
37
5
Technically it's possible, just type myNewVariable = "whatever" in the console, and the game will now have a new variable named "myNewVariable". But practically it present no interest because the game wouldn't know what to do with this variable.
Technically, I meant this for variables that are present in the game but is only defined in some specific branch/scene. So if I make the variable later on, it'll be as if had actually visited that branch. Oh wait, I think you're right. I can indeed make a variable that way, sorry I meant to ask if there's a way I could add data to a table.
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Respected User
Donor
Jun 10, 2017
10,111
14,790
Version 2.05.01 did NOT work.
Not surprising, but I thought that the design of the version 3.x what strong enough to prevent this kind of problems.
I'll look at this, thanks for the report.
 
  • Like
Reactions: STJay

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Respected User
Donor
Jun 10, 2017
10,111
14,790
Hi, strange thing in Dimivera
View attachment 1835254
I had to close the game to exit.
Hmm. Part of the User Interface that is displayed over the screen... I hate this kind of thing.
Try to open "game/AON-packages/AONvve.rpy"
Line 10 there's zorder 199, replace the "199" by "1099", it should fix the problem.

I'll look more closely tomorrow (it's near to 4AM here) to find a better value and will add it when I've the fix for the previous report.
 
  • Like
Reactions: UncleVT

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Respected User
Donor
Jun 10, 2017
10,111
14,790
Firstly, I've been told in PM that the introduction screen (the one with the "to the game" and "configuration" buttons) appear each time the person load a save file.
Is someone else also have this issue ?


Got an error for The Guardian when attempting to save.
Ok, this one will need time :(
It's not at all what I thought at first.
For some reason, the rollback for this game include many things that shouldn't be there. It was triggered by the viewer because it handle tons of value that can't be saved, but like they normally don't make it in the rollback structure, it's usually not a problem.
The only thing I know so far is that it's not due to this particular version of Ren'Py (it don't happen with the other 7.3.5 I tried), therefore I'll have to take a deep look at the code of the game.


Tried and doesn't work.
Ok, after a look at the game, they totally messed with Ren'Py and created their own way to deal with menu screens and overlays ; in short they replaced something simple by something over complicated.
But I found a way to fix this. I'll wait to have fixed the issue above before releasing a new version (unless I can't fix it at all). But in between:
Open "game/AON-packages/AONvve.rpy". The first lines are:
Code:
init 999 python:
    try:    import AONvve3 as AONvve
    except: pass
add the two lines with config[...] for it to looks like that:
Code:
init 999 python:
    try:    import AONvve3 as AONvve
    except: pass

    config.context_clear_layers = config.layers[:]
    config.context_clear_layers.remove( "master" )
Because they messed really deep, this works for the tool and configuration menu, but not for Ren'Py screens, like the console by example.

By the way, the viewer screen is handled like a game menu. Therefore the next time you're stuck on it, you don't need to quit the game. Just press either Escape or the right button of the mouse, and you'll be sent back to the game.
The same apply for the configuration menu.
 

Meushi

Well-Known Member
Aug 4, 2017
1,146
12,685
Firstly, I've been told in PM that the introduction screen (the one with the "to the game" and "configuration" buttons) appear each time the person load a save file.
Is someone else also have this issue ?
No, at least not within a single game session.

Start game > Load save > AON screen > Load another save > No AON screen

Close & restart game > Load save > AON screen > Load another save > No AON screen
 
Last edited:

UncleVT

Låt den rätta komma in
Moderator
Jul 2, 2017
9,416
97,330
add the two lines with config[...] for it to looks like that:
Thank you, solved the issue.
By the way, the viewer screen is handled like a game menu. Therefore the next time you're stuck on it, you don't need to quit the game. Just press either Escape or the right button of the mouse, and you'll be sent back to the game.
It didn't work.
No, at least not within a single game session.

Start game > Load save > AON screen > Loan another save > No AON screen

Close & restart game > Load save > AON screen > Loan another save > No AON screen
Same to me.
 

kare

Member
Aug 5, 2016
201
269
In honey kingdom I'm getting "intro" screen every time game moves to main office screen.
Overall I would prefer an option to hide it altogether.
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Respected User
Donor
Jun 10, 2017
10,111
14,790
In honey kingdom I'm getting "intro" screen every time game moves to main office screen.
Overall I would prefer an option to hide it altogether.
Er... Ok, so you're the second person having this problem. I'll try to see why it happen with this game.
 

yuuy22

Newbie
Oct 9, 2018
94
29
I installed this in lost in paradise (https://f95zone.to/threads/lost-in-paradise-v0-15-dimajio333.133833/) but upon startup got this error:
I'm sorry, but an uncaught exception occurred.

While running game code:
File "renpy/common/00start.rpy", line 194, in script call
call _start_store
File "renpy/common/00start.rpy", line 142, in script
python hide:
File "renpy/common/00start.rpy", line 142, in <module>
python hide:
File "renpy/common/00start.rpy", line 148, in _execute_python_hide
i()
AttributeError: 'NoneType' object has no attribute 'log'

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

Full traceback:
File "renpy/common/00start.rpy", line 194, in script call
call _start_store
File "renpy/common/00start.rpy", line 142, in script
python hide:
File "renpy/ast.py", line 923, in execute
renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
File "renpy/python.py", line 2235, in py_exec_bytecode
exec(bytecode, globals, locals)
File "renpy/common/00start.rpy", line 142, in <module>
python hide:
File "renpy/common/00start.rpy", line 148, in _execute_python_hide
i()
File "D:\works\renpy\projects\AONtools/game\AON-packages/AONmodCenter.py", line 1076, in __late
File "D:\works\renpy\projects\AONtools/game\AON-packages/AONmodCenter.py", line 1005, in __uninstall
AttributeError: 'NoneType' object has no attribute 'log'

Windows-10-10.0.22621
Ren'Py 7.4.8.1895
Lost in Paradise 0.15
Fri Oct 14 22:27:56 2022
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Respected User
Donor
Jun 10, 2017
10,111
14,790
File "D:\works\renpy\projects\AONtools/game\AON-packages/AONmodCenter.py", line 1076, in __late
File "D:\works\renpy\projects\AONtools/game\AON-packages/AONmodCenter.py", line 1005, in __uninstall
AttributeError: 'NoneType' object has no attribute 'log'
Hmm... Apparently it can't works for some reason (else it wouldn't end in the __uninstall method), but it shouldn't crash.

I'll look at this, thanks.
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Respected User
Donor
Jun 10, 2017
10,111
14,790
It works fine to me in that game.
I'll have to fix something anyway.
At worse the tool should die silently and log the last error. But here not only it complained, but the complain is precisely that it can't log.


But, what you said imply that I'll need more information, so:
yuuy22 do you use a mod or something like that in addition to the viewer ?
And is there a file named "AONlogFile.txt" in the same directory than the game executable ? If yes, can you link it ?
If not, can you drop the attached file in the "[path to the game]/LostinParadise-0.15-pc/game/" folder, and start the game again ? It should force the creation of the log file and give me more information regarding what happen.
 
5.00 star(s) 6 Votes