so I decided to check out how much time it would take to loop through files looking for a specific thing, with python
I'm guessing that server commands need to be, like... registered, or something, so they probably have a pretty regular form in which they appear that can be searched for
I don't actually know what these functions should look like (if someone wants to tell me I could make this a little bit more interesting)
so I decided to just look for things that look like "mass = 10"
and I got these results:
Result list:
{
'Tiger_Tire.cs': [
'mass = 10'
],
'Vehicle_Tiger.cs': [
'mass = 300'
],
'Vehicle_Tank.cs': [
'mass = 200000',
'mass = 10',
'mass = 300'
],
'JEEP_server.cs': [
'mass = 300'
]
}
Time taken: 0.002830969774702307
the "result list" is actually not a list, it's a dictionary, and it's formatted like this
{
'file name': [
'first example found',
'second',
'etc'
]
}to be completely honest, I just did this for fun. python is probably significantly faster than torquescript would be, not to mention the fact that I'm not checking in a bunch of
compressed files (or even through a considerable number of uncompressed files)
but that's still a pretty short amount of time, and even if it was multiplied by a thousand it'd only be about three seconds
so take it as you will
here's the source code, if anyone's interested
http://pastebin.com/6J505QNZif you want to try it at home, you gotta put the file in a folder directly with other text files, NOT in a folder with folders that then have text files, and it certainly won't try to open any .zip files
like, this is what the folder I was playing with looked like:

(extra note: if you're using linux instead of windows, the time measurement is gonna be a LOT less accurate. that's because on windows, time.clock() is really accurate and time.now() isn't, but on linux it's the other way around. there's some function, somewhere, that abstracts that little detail away and automatically uses the right one for your platform but bleh. most of you are probably on windows too anyway)
...I put a lot more effort into this than I needed to
but if someone's interested, I could take a stab at making a python script that'll go through all your add-ons BEFORE you start a server, and stick all the commands it found in a text file, and you could make an add-on that'll use what's in that text file
really though, why do you need any kind of weird workaround anyway? if the commands have to be registered, I feel like there oughta be some simple way to get a list of them in torquescript :/