Game Development Community

Constructor Documentation Help

by Scott Johnson · in Constructor · 10/05/2007 (10:42 pm) · 1 replies

Wow, I'm really starting to see the power of the Constructor, Excellent potential, it's already replaced Hammer as my .dif editor.

Since I'm more of a programmer than an modeller, I've been digging into the plug-in's code naturally.

By examining the tools, and plugin scripts, I've been able to gather the basics of how to create a tool, and have a working "template" framework I'm going to be posting as a resource.

First my assumptions:
A) Constructor is basically a "mod" of the Torque Engine, similar to what would be done to make a game... right?

B) We have access to all of the typical Torque Script that is normally available in TGE.

C) Most of the "core" functionality is in the compiled .dso's, while the plugin's and tools are available via script.

So, naturally, I've Got a few questions, and some requests.


1) The %version variable passed into Plugin::Activate function:

I know that it's a "tool" version, can anyone elaborate on why this is a better way to "step down" plugin code, say compared to using $Ver::Major, $Ver::Minor, and $Ver::Revision?

It sounds like to me that there might be more exposed "tool" functionality coming at some point that we would want to use, and I just want to make sure I'm going to properly handle this scenario.


2) Can someone provide a list of currently available Tool Functions? Even if it's just copying the function prototypes from a header file somewhere?

For example: tool.FUNC_BADVERSION(), tool.FUNC_OK(), etc. Any usage comments would be welcome, even if it's just a basic one liner...


3) Regarding Plugin::Interface(), specifically the %form variable.
I think Jaimi had requested this before, and I've also been able to find some of the available form "fields"
For example, in the %form.addField() functions, the 3rd parameter controls the type of control.
A list of form fields would be useful, like: distance3, divider, axis3, popup, etc..


4) A list of MapBrush() functions, such as %brush.setOrigin, %brush.setTextureOffset(), etc.. again a similar request.



I've learned a lot from just reading through the existing scripts, however I feel that I would be a better understanding If I were to have a fuller, and more organized picture of the functions available.

I'm not picky, I feel that even if it's just a list of functions prototypes and variables, pulled straight out of the code base it would be better than digging around inside the existing tools for insight. It wouldn't take long I would imagine for a bit of copy and paste into a TDN resource or something.. :D

Anyhow thanks to anyone who can help out, I'm going to jump back into it.. pretty exciting stuff.


P.S. Thanks to jaimi for asking some good questions, and getting me pointed in the right direction!

#1
10/24/2007 (1:34 pm)
This is a bit out of date but it should still be helpful.

Also, don't forget about:

dumpConsoleClasses();
dumpConsoleFunctions();
<object id>.dump();