Textcrawler: Why It's Useful, and How to Use It

Helpful Hints for Both the Technical and Roleplaying Aspects of the Game

Moderators: Moderator, DM

Post Reply
User avatar
Endelyon
Posts: 3606
Joined: Sun Jul 06, 2014 4:24 am

Textcrawler: Why It's Useful, and How to Use It

Unread post by Endelyon »

Textcrawler: A Guide
I got a bit frustrated about something earlier so I thought I'd channel that negative energy into something positive and post something I've been meaning to for a while now. For those of you who use Skywing's Client Extender and keep log files of all your RP, Textcrawler is an extremely powerful tool which will allow you to search those log files for various phrases. This can be incredibly simple or incredibly complex.

Some examples of use:
Don't remember when someone told your character something and you're trying to narrow it down?

Don't remember who OR when someone told you something, but you remember what they told you?

Feeling nostalgiac and want to read logs of those oh-so-special moments in your PC's existence without having to dig through the files one at a time?

Want to keep track interesting meta-information about trends in your own RP, or the answers to interesting (but mostly useless) statistics? Have you ever wondered, "I wonder how many individual characters my character has RPed with?" or "Was Fred with us that one time three years ago when we...?"

Textcrawler can do all this and more. You can download the completely free software at http://www.digitalvolcano.co.uk/textcrawler.html and install it wherever you'd like. Once you have it open, there are a few options you want to set.
Image
THIS IS THE MOST IMPORTANT STEP:
First and foremost, you are going to want to click on "File" and select "Options," then under the "Replace" tab make sure the "Create .BAK files while replacing" option is checked. Hit apply/OK and, just to be completely safe, close the program with the "X" and open TextCrawler once more, as the option might get saved if the program doesn't exit properly.

If you do not take this precaution, at LEAST back up your log files manually in a separate folder before you start tinkering around in them. The last thing I want is someone having those files erased or damaged because I didn't warn them sufficiently beforehand. My logs are precious things to me, memories of conversations, of people, of experiences.. I would be devastated to lose them, and I'm sure most of you would too. So, heed my advice, and use the option above or back them up. (Nag: You should probably be backing them up online somewhere anyway, if your hard drive crashes, you'll lose them forever.)
Image
Under File --> Options in the "Preview" tab you'll want to set these three values to 1000 like I have them listed above. Otherwise you'll only get a few words surrounding the search phrase in either direction, and it just looks strange and can seem like nonsense when you're trying to read through it. This step isn't required, but I HIGHLY recommend it. You'll see what I mean and why I say that if you do a few searches without it.
Image
On the main screen, you'll want to type one of these three things in the box labeled "File filter:"

*chatlog* -- for regular logs
*combat* -- for the combat logs
*log* -- for both regular/combat

In the "Start Location" box you'll want to type:

C:\Users\<USERNAME>\Documents\Neverwinter Nights 2\Logs\

... adjusting appropriately for wherever you store your client logs. You'll also want to check "Scan subfolders" and "Cache file list."

I personally like to click "View" at the top then select "Preview All Matches Together," but this step is not necessary, and just a matter of preference. Try both and see which you prefer.

Now it's just a matter of typing whatever word or phrase you want to search for in the "Find" bar and clicking search! You'll see a list of results pop up, each log file dated, and the matches displayed in the pane below. If you followed my advice and clicked "Preview All Matches Together" you can just start scrolling through the results in the bottom box, otherwise you have to click the log files one by one in the selection window.

The only flaw of this mode is it only finds exact matches, so if you're trying to find the phrase "Wind at your back" you can't type "wind back" and get a result (though "At your back" or "Wind at your" would both produce results). So how do you find something when you don't know EXACTLY what you're looking for? I'll talk more about that in the next part of the guide:
"What Are Regular Expressions and Why Do I Care?"
User avatar
Endelyon
Posts: 3606
Joined: Sun Jul 06, 2014 4:24 am

Re: Textcrawler: Why It's Useful, and How to Use It

Unread post by Endelyon »

What Are Regular Expressions, And Why Do I Care?
I won't get too deep into my explanation of regular expressions, and this section is probably where I'm going to lose most you. If you're only interested in the most basic functionality, you probably need delve no further. However if you have some event in your RP that you aren't QUITE able to find, even with the search feature, you might be able to use the "Regular expression" to hunt it down.

Some basic tutorials on regular expressions can be found at:

http://www.regular-expressions.info/

I must warn you though, it is a very detailed guide, but it does provide some examples.

Let's take some examples that are relevant to it from a hypothetical perspective:

"I want to find the time Endelyon and Netanya were talking about hair."
(Sorry for bringing Netanya into this, heretic! Hope you don't mind the practical example :mrgreen: )

So, I could try to search for Netanya, but that's going to pull up every conversation with her in it. Or I could search hair, but that's going to bring up every time someone ever mentioned hair. I could search "Netanya hair" but that's only going to work if someone said "Netanya hair" in conversation, and more than likely, there were a few words between the word "Netanya" and the word "hair." So what can I do to narrow it down?

In this instance we can use a simple regular expression:

Code: Select all

Netanya.*Hair
This tells the program a few things. We wanted to start our search phrase with the word Netanya, and then no matter where it is in the same line we want our search phrase to end with the word hair.
Image
Lo and behold, it found some results, and there it is, based off the most simple memory of the conversation itself. The important thing here is now we realize, as long as we remember someone who was there, or any minor detail of a conversation we can start to use these expressions to find whatever little RP jewels we thought we had lost.


"I want a list of every individual character that has spoken or emoted around my character."

Why does this one matter? Well, it doesn't obviously. It's just an example of creative use of regular expressions to find out some small interesting fact you might be curious about for curiosity's sake. In this case, we're not searching for dialogue. In fact we have no information about what we're searching, but we know every character has a name, and we know that when you type IC it outputs "Talk" and tells say "Tell." So we use one of two expressions:

Code: Select all

\[[A-Za-z].*Talk\]

Code: Select all

\[[A-Za-z].*(Talk|Whisper)\]
This one tells us we want a character's name made up of A-Z (both lowercase and capital letters), followed by any text up to the word talk, but we want the highlighted portion to stop there. This way we can get a list of individuals, but not what they said. The second one is the same but searches for dialogue both spoken allowed and whispered, while filtering out tells.
Image
Once that's done, we click "Extract" to move this information to the Scratchpad, make sure "Remove Duplicate Lines" is chosen in the drop-down, then hit "Go." Lo and behold, it has scrunched our huge, unwieldy list into a nice concise list with each individual person listed one time only.
Image
There you have it. I could go deeper and deeper into regular expressions, explaining their uses, but the information is out there in spades and I know the curious will seek it from sources much more eloquent than me. So that's it for my guide.

Please use this information responsibly. I sincerely hope I haven't opened some kind of Pandora's box where suddenly every PC remembers every detail about every conversation no matter how minimal or how much time has passed just because you can flip over to the Textcrawler to look it up. Remember, our brains don't have log files, we can't pull up the details of conversations at the fly, and neither can your PC. Having a high intelligence score doesn't mean that your character has a photographic memory, or even so much remembers the gist of every conversation they've had. Memories fade for everyone.

Hope you enjoyed it! Good luck, and if you figure out some neat or interesting way to use it feel free to post it here, I'd love to see what people do with it.
User avatar
Endelyon
Posts: 3606
Joined: Sun Jul 06, 2014 4:24 am

Re: Textcrawler: Why It's Useful, and How to Use It

Unread post by Endelyon »

Originally posted September 14th, 2014 @ 9:09 AM EST. Recreated from Google cache by request. :oops:
User avatar
Aspect of Sorrow
Custom Content
Posts: 2634
Joined: Fri Mar 28, 2014 7:11 pm
Location: Reliquary

Re: Textcrawler: Why It's Useful, and How to Use It

Unread post by Aspect of Sorrow »

For those of us on Linux and Mac

Code: Select all

grep -rnw /path/to/nwn/ -e "lookup pattern"
User avatar
TarnishedSoul
Retired Staff
Posts: 1869
Joined: Fri Nov 27, 2015 11:06 pm
Location: Candlekeep

Re: Textcrawler: Why It's Useful, and How to Use It

Unread post by TarnishedSoul »

Endelyon wrote:Originally posted September 14th, 2014 @ 9:09 AM EST. Recreated from Google cache by request. :oops:
I was the one who made that request! :D And since I needed to find this post to help a guild mate, I figured I'd bump it for the general public.

TextCrawler is a fantastic resource!
User avatar
Tantive
Posts: 1076
Joined: Thu Dec 03, 2015 10:40 am

Re: Textcrawler: Why It's Useful, and How to Use It

Unread post by Tantive »

Is this a sticky? Its not a sticky. That does not do. The ease by which to go through your chatlogs is invaluable. It is great to compartmentalize your different characters what knowledge they have or what particular they've done opposed to the other, or to get a bit of an aid to your own memory. You will not regret it.
Elyssa Symbaern - Bladesinger
Isioviel Fereyn - Elven Ranger
Charisa Flomeigne - Scion of Siamorphe
Post Reply

Return to “Tips & Tricks”