Accessing and Searching T-Engine and ToME code
You could just start typing up code for your module or add-on-- but if you want to take advantage of the functions already implemented, you probably want to know how they work.
T-Engine data is stored in .teaa, .team, or .teae files (for add-on, module, or engine, respectively). These files are simple re-named zip files that can be extracted with any appropriate program. Inside, they contain the complete Lua code of the T-Engine and ToME (as well as resources such as graphics, sound, shader files, maybe more).
Once you've extracted these files, you can take a look around and see how T-Engine functions are written, and trace them to get a good grasp of how everything works. Given the size of the code base, you'll probably soon realize that you need a better tool to do this.
One such tool are the T-Engine docs, available at http://te4.org/te4-docs. However, these docs are for the most part generated by comments inside of the code. It may be easier to skip the middle man and search the code yourself. That means that you can carefully inspect each function and see how it works.
You can use your own search tools to do this; many exist. However, you can also use the on-line git repository at http://git.develz.org/?p=tome.git;a=summary to do the same thing, much more quickly and conveniently.
For instance, consider the search at http://git.develz.org/?p=tome.git&a=search&h=HEAD&st=grep&s=triggerHook which shows the location of every hook that currently exists in the code base. (Notice especially how fast it is, and how your hard drive doesn't chug during the search :) ) Finding this list by manually digging through the code would be a nightmare.
Using this, you can rapidly find the definitions of functions (typically by searching for something like _M:someFct), and you can rapidly find examples of usage of those functions (by leaving off the _M:) The search page should be showing enough context to identify if that usage is one you're interested in; if it is, you can click open that instance and locate the usage (easy since the search and display gives you line numbers). And, of course, you can open pages in new tabs if your browser supports that, perhaps even keeping multiple copies of a single .Lua open on multiple tabs for easy tracing.
