TorqueScript documentation
by NoobGank · in Torque Game Engine · 11/13/2004 (6:11 am) · 20 replies
Hi,
First off an apology because I'm sure this question must have been asked a million times already. Is there anywhere where I can find a comphrehensive list of all the TorqueScript commands and what they do. Maybe I'm just havig a dumb moment - but I don't seem to be able to find them. I have done a preliminary search through the forums and its not showing up anything.
Thanks in advance,
KC
First off an apology because I'm sure this question must have been asked a million times already. Is there anywhere where I can find a comphrehensive list of all the TorqueScript commands and what they do. Maybe I'm just havig a dumb moment - but I don't seem to be able to find them. I have done a preliminary search through the forums and its not showing up anything.
Thanks in advance,
KC
#3
Cheers
11/13/2004 (8:08 am)
Thanks guys. I know the Torque Documentation product will be available shortly, but I think this only covers the C++ engine code, is this correct? It would be really useful to have some documentation similar to Ron's, but maybe in greater depth. Longer usage examples, maybe Cookbook style. I'll maybe see about getting this one into a Windows Help file format.Cheers
#4
The big thing it doesn't include however are the various console functions that are implemented for math, string manipulation, etc.
Don't get me wrong, the info is there, just scattered about in various places--which is what I meant by not having a comprehensive index. As a comparison, I use C/C++ Reference when I need to quickly lookup C++ stuff...and I haven't been able to find anything similar around anywhere for the Torque Script functionality (which is a lot bigger then you might think!).
11/13/2004 (8:26 am)
@Jeff: That's a great overview, and is the one I mentioned above (incorrectly attributed it to Melv, guess he can't do EVERYTHING!) is listed near the bottom.The big thing it doesn't include however are the various console functions that are implemented for math, string manipulation, etc.
Don't get me wrong, the info is there, just scattered about in various places--which is what I meant by not having a comprehensive index. As a comparison, I use C/C++ Reference when I need to quickly lookup C++ stuff...and I haven't been able to find anything similar around anywhere for the Torque Script functionality (which is a lot bigger then you might think!).
#6
11/13/2004 (7:25 pm)
Have you tried running the console autodocumentor? It will generate documentation for every console method, field, and function. It's not very indepth, but it's plenty good for a reference.
#7
can you point us idiots to what you are talking about :)
a quick search for autodocumentor doesn't reveal anything in resources or forum, other than this.
are you talking about doxygen or some other magical nugget I would like to know about!
another way to find out what functions are available to you is just to open up your compiler or text editor and do a find in files for ConsoleFunction and ConsoleMethod that'll give you a taste of what there is...although this autodocumentor monkey sounds like the thing to make friends with.
11/14/2004 (12:11 am)
"console autodocumentor"can you point us idiots to what you are talking about :)
a quick search for autodocumentor doesn't reveal anything in resources or forum, other than this.
are you talking about doxygen or some other magical nugget I would like to know about!
another way to find out what functions are available to you is just to open up your compiler or text editor and do a find in files for ConsoleFunction and ConsoleMethod that'll give you a taste of what there is...although this autodocumentor monkey sounds like the thing to make friends with.
#8
11/14/2004 (12:14 am)
Ah hah. I spoke too soon. in the doxygen generated docs there is this paragraph..Quote:
How to Generate Console Docs
Console docs can be generated by running the dumpConsoleFunctions() and dumpConsoleClasses(), then running the output through Doxygen. There is an example Doxygen configuration file to do this in HEAD, at doc\doxygen\html\script_doxygen.html.cfg. Doxygen will parse the psuedo-C++ generated by the console doc code and produce a class hierarchy and documentation of the global namespace. You may need to tweak the paths in the configuration file slightly to reflect your individual setup.
#9
I got Doxygen to generate the documentation for the engine based on the C++ stuff. From the website you can see their is some fairly good documentation for some of the object classes. However when you run doxygen on your own SDK directory you don't get some of the good stuff on the web site. For example SimObject has some good notes - but I don't get these when I doxygen at home with my SDk. Anyone know why? The version on the website is 1.1.2 mine is 1.2 - maybe?
I didn't get much luck trying to run doxygen on the output from the console functions - dumpConsoleFunctions() and dumpConsoleClasses(). I tried fiddling with the the config file but no luck. Some help would be cool. BTW what's the defintion of a console command? does it just mean the script functions and classes?
Cheers,
KC
11/15/2004 (3:48 am)
OK a couple of things here.I got Doxygen to generate the documentation for the engine based on the C++ stuff. From the website you can see their is some fairly good documentation for some of the object classes. However when you run doxygen on your own SDK directory you don't get some of the good stuff on the web site. For example SimObject has some good notes - but I don't get these when I doxygen at home with my SDk. Anyone know why? The version on the website is 1.1.2 mine is 1.2 - maybe?
I didn't get much luck trying to run doxygen on the output from the console functions - dumpConsoleFunctions() and dumpConsoleClasses(). I tried fiddling with the the config file but no luck. Some help would be cool. BTW what's the defintion of a console command? does it just mean the script functions and classes?
Cheers,
KC
#10
Are you sure you've tweaked the config file that ships with Torque properly?
The "console command", the auto documentor stuff for script, will list everything the console system knows about - all the functions, all the methods, all the classes, and all the C++-based fields on each class. Where there is documentation info in the engine that will be output as well. Just peeking at the files generated from those functions should make it obvious what info is coming from the engine.
11/15/2004 (10:28 am)
Do you have a recent copy of doxygen? The docs on the site and the docs from HEAD/CVS should be very similar if not identical.Are you sure you've tweaked the config file that ships with Torque properly?
The "console command", the auto documentor stuff for script, will list everything the console system knows about - all the functions, all the methods, all the classes, and all the C++-based fields on each class. Where there is documentation info in the engine that will be output as well. Just peeking at the files generated from those functions should make it obvious what info is coming from the engine.
#11
I downloaded the most recent version of Doxygen from the website - 1.3.9.1 (release date 10 October 2004). I ran it on the doxygen.html.cfg file that shiips with the SDK and it made a couple of changes to bring that file up to date. I.e.. 'doxygen doxygen.html.cfg' from the command line. It generates the documentation just fine but as I said its missing information as stated above. Am I missing extra parameters?
As for the auto documentor stuff. Take a few steps back pleas - treat me like a complete newbie (I am - well to this anyway). First is the auto documentor the two commands I listed - dumpConsoleFunctions() and dumpConsoleClasses()? These worked fine for me - I have a log file file containing the output form both. The excerpt from Clint S. Brewer's post above seems to suggest you can also run doxygen on this file - is this the case? If so could you chuck me some baby steps or a config file that will work?
Thanks,
KC
11/15/2004 (12:11 pm)
Hi Ben,I downloaded the most recent version of Doxygen from the website - 1.3.9.1 (release date 10 October 2004). I ran it on the doxygen.html.cfg file that shiips with the SDK and it made a couple of changes to bring that file up to date. I.e.. 'doxygen doxygen.html.cfg' from the command line. It generates the documentation just fine but as I said its missing information as stated above. Am I missing extra parameters?
As for the auto documentor stuff. Take a few steps back pleas - treat me like a complete newbie (I am - well to this anyway). First is the auto documentor the two commands I listed - dumpConsoleFunctions() and dumpConsoleClasses()? These worked fine for me - I have a log file file containing the output form both. The excerpt from Clint S. Brewer's post above seems to suggest you can also run doxygen on this file - is this the case? If so could you chuck me some baby steps or a config file that will work?
Thanks,
KC
#12
www.garagegames.com/docs/torque.sdk/engine/console_autodoc.php
Then I stuck those 2 log files (scriptFunctions.txt and scriptClasses.txt) in the SDK/engine directory, and re-ran doxygen.
The generated files are scriptClasses_8txt.html and scriptFunctions_8txt.html.
One thing though ... if you look at doxygen.log, it shows some errors parsing other files (e.g. F:/Torque/SDK/engine/console/simBase.h:960: Warning: unable to resolve reference to 'SimDataBlock_preload' for \ref command
)
11/17/2004 (3:34 pm)
I used the two functions writeOutFunctions(), and writeOutClasses() from here:www.garagegames.com/docs/torque.sdk/engine/console_autodoc.php
Then I stuck those 2 log files (scriptFunctions.txt and scriptClasses.txt) in the SDK/engine directory, and re-ran doxygen.
The generated files are scriptClasses_8txt.html and scriptFunctions_8txt.html.
One thing though ... if you look at doxygen.log, it shows some errors parsing other files (e.g. F:/Torque/SDK/engine/console/simBase.h:960: Warning: unable to resolve reference to 'SimDataBlock_preload' for \ref command
)
#13
11/17/2004 (8:58 pm)
Useful - thanks Boni.
#14
at the top of those sections it will get them to output and the references to resolve.
I was looking to generate the script reference myself and looking over http://www.garagegames.com/docs/torque.sdk/engine/console_autodoc.php
It has the following:
There is an example Doxygen configuration file to do this in HEAD, at doc\doxygen\html\script_doxygen.html.cfg
Which can't be found.
11/29/2004 (9:43 am)
@Boni, Those errors are due to a goofup/incompatibility with recent doxygens, if you stick a @class I was looking to generate the script reference myself and looking over http://www.garagegames.com/docs/torque.sdk/engine/console_autodoc.php
It has the following:
There is an example Doxygen configuration file to do this in HEAD, at doc\doxygen\html\script_doxygen.html.cfg
Which can't be found.
#16
I think everybody needs a script reference with description of each method. What do you guys think ?
12/18/2004 (1:07 am)
DumpConsoleFunctions() just lists the functions, whitout even their signature. A bit short...I think everybody needs a script reference with description of each method. What do you guys think ?
#17
12/20/2004 (2:15 pm)
Not true, it will dump all the available information. Release builds may not have all that information available, but debug versions do have everything.
#18
12/20/2004 (11:44 pm)
Ah, it was worth a mention. Thanks.
#19
12/21/2004 (12:48 am)
Ben, why is it that the release build shows less then the debug?
#20
12/21/2004 (5:25 pm)
Because we added some macros to make it not compile that info in for a release build. There's no overwhelming reason it should be one way or another.
Torque 3D Owner Stephen Zepp
If you come up with a fully comprehensive one, please let us know..I'd like to see it myself!