Monday, June 14, 2010

Windows App for Development Research!

If you're a developer who's still learning the ropes of CAOS, Windows Grep may be of great use to you. It's not a tool made especially for CAOS development-- it is just a simple, light application that searches the text of all files in the folders that you designate for a word or phrase, but if you are just learning CAOS, this can be pretty invaluable for learning how different CAOS commands are used.

Let's say, for example, you don't quite understand how the "anim" command works and would like to see it in context to get a better idea. You would open up Windows Grep, type in "anim" and make sure the "find whole words only" box is checked so it doesn't return comments that might contain "animate," "animation," or "kanimakoo" (if that was actually a word).

Next you'll want to select the folders that the cos files are stored in. For most of you this will be the bootstrap directories in both your C3 and DS folders. If you often use a PRAY decompiler such as Jagent or REVELATION, you may want to select that folder as well so it can search the cosfiles of agents you have decompiled.

Next you'll want to add the *.cos extension to filetypes to be searched. You may have to add it in the "Custom file specification" box.

Tada! The search process takes almost no time at all, maybe five seconds at the most on my computer. The window will list all files that contain the "anim" command, and selecting the file will list every line where that command appears in that file. If you mouse over the page-shaped buttons in the top bar, you will find that you are able to toggle between showing the matching lines and showing the whole file, making it relatively easy to see how a command works in context.

The nice part is that the program remembers the folders and extensions you last selected, so if you want to look for a different command, all you have to do is search again, enter the new query on the first page, and click "finish." Even after you exit the program, it remembers the conditions of your last search.

This really is a very nice tool for developers or just generally curious people. Just be careful what you touch-- the program is also capable of searching and replacing words or phrases in the files-- something that could easily screw up your game if you're not careful.

I hope this can help some of you guys out. Happy searching and developing!

1 comment:

  1. Awesome tool! I'll be sure to keep this in mind when I dive into the world of CAOS and start to understand everything behind it. I love it when something not directly made for Creatures helps out so well! Thanks for sharing this information and tutorial!