Déjà vu
Okay. We seem to be jumping all over the place now.
1. Getting list of labels
2. Getting list of variables
3. Should I use Atom?
4. I type "{command}" and got an error.
I'm going to add a "0" to this... and ask "What is your goal?" - Because WHY you are doing some of this, might make it easier to offer you better advice.
So....
0. What is is your goal?
I initially assume you were writing a game and were losing track of your labels and therefore were just looking for a way to keep yourself organized.
But you specifically mentioned "Being a DIK", which is a huge lumbering monstrosity of a game that is particularly hard to follow.
So are you writing a walk through guide? Are you trying to see what content you might have missed during your playthrough?
1. Getting a list of labels.
I think this one is "asked and answered". You seem to be happy the text file contains what you needed. I'll consider this one dealt with.
2. Getting a list of variables
The problem with RenPy is that "variables" cover a LOT of ground. RenPy has a lot of things going on in the background, which are held in variables - even if you don't normally see them.
I think my initial answer would be to use the Developer Console (SHIFT+D), then pick "Variable Viewer" from the list of options. It'll mainly only show the variables a developer will care about (though some internal variables will get shown). But it's only a basic list. Things get trickier when you start dealing with reference variables (variable that are pointers to other variables), especially when they are references to custom classes or list/dictionary objects.
If you want to "drill down" into multilayered variables/references, then your going to need something especially written for that purpose - as it doesn't exist in the base game. Thankfully
anne O'nymous wrote the
Extended Variable Viewer almost 4 years ago now. It does what the basic variable viewer does, but with lots more bells and whistles. You can see the contents of lists and follow references to other classes.
But both of those are onscreen tools. They aren't writing anything to a file and they aren't giving you a simple bit of code you can type at the console to dump the list to a file. Except it's not clear to me WHY you want the list of variables and so I don't know what the answer is, beyond "Variable Viewer" and "Extended Variable Viewer".
3. Should I use Atom.
As I already suggested, if you're happy with Notepad++, keep on using it. I think Atom is better, but I can't really say why.
3b. I tried to use Atom, but it didn't do what you said it would.
Difficult for me to say.
Firstly, are you using the recommended version of Atom? (Click Help -> About). It should say version "1.35" or "1.35.1". Anything newer than 1.36.0 will not work properly with RenPy, even if you install the addons. If it's newer, it's likely you installed it yourself and didn't follow the recommendation in my previous post that explained using the RenPy launcher to install it's customized version for you (RenPy Launcher -> Preferences -> Text Editor -> [Select Atom]).
If you are on the correct version. Again, difficult for me to say. All I can offer is that if I press (CTRL+SHIFT+F) for "Find in Project", stick "label" in the search box and put
*.rpy
in the "File/Directory pattern" box, then click the "Find All" - I get a clickable list of all the places where "label" is mentioned, regardless of which file it's included within. I only limit things to
*.rpy
for speed, so it's not searching all the image files when the project could be 4GB+ in size. I suppose it's possible you've switched some of the filters on the right side inadvertently (above the Find All button), Case Sensitivity, Search using RegEx expressions and "Whole Word" searches only - but even so, I'd expect them to find text as simple as "label" regardless.
However, nobody is twisting your are to use Atom. If it's not working out for you... there's still Notepad++
4. I type "{command}" and got an error.
This one seems to be you copy/pasting answers without really understanding them.
In this case,
len( renpy.python.store_dicts["store"].ever_been_changed )
became
for i in sorted(len( renpy.python.store_dicts["store"].ever_been_changed )): f.write("{}\n".format(i))
.
len()
is pretty much "count the
length of". And Anne was using it to show that there were a lot more (unnecessary) variables stored in
dir()
than there are in
renpy.python.store_dicts["store"].ever_been_changed
.
Breaking it down, you effectively ended up with
for i in sorted( 14 ): f.write("{}\n".format(i))
.
Renpy then sorted "14" to get "14" and threw an error to complain than you can iterate a
for i in
loop against a simple integer number (14).
The answer to your error is to remove the
len()
from the statement, to get
for i in sorted( renpy.python.store_dicts["store"].ever_been_changed): f.write("{}\n".format(i))
.
I guess our worry is that if you can't spot something as simple as
len()
being there - how much are we actually helping you. Potentially, we're giving you solutions that aren't really suitable for you.
Which links back to "what are your goals?"
I know from my own past that I sometimes decide to put lists together instead of focusing on what I should be doing. It's a delaying tactic so that I can procrastinate about how to create the list rather then actually just getting on with things - especially if I'm feeling out of my depth.