Author Topic: What are good guides to Torquescript and Blockland's specific features?  (Read 1869 times)

What you really need to learn most of all is how to find stuff out.

Your new best friends:
/getid - Tells you the ID of what you're looking at, and its classname. Obviously requires that you're a super admin. Keep in mind this is a serverCmd so it obviously runs on the server; if you're not the host process, this ID won't match anything on your client (or worse, it will match something unrelated and you'll mess up).
<ID or name>.dump(); - Dumps out all the information on whatever object you specify - this includes all methods associated with it.
tree(); - Shows you a dialog with a tree view of all objects that exist at this moment. Want to know what GUIs are open? Look in GuiGroup->Canvas - it shows everything that's open, or GuiGroup is all GUIs currently defined. ServerConnection contains all the client-side ghosts that exist, including all bricks (I say this because it's potentially useful, and also because if you open it on a server with 60,000 odd bricks it's gonna be a long damn list). ServerGroup however is server-side, and contains some subgroups of different objects, including MissionCleanup which is everything that will be deleted when the server closes - ie every existing object in the game world, plus some other stuff like the chatlog. All bricks exist in ServerGroup->MainBrickGroup->Brickgroup_<BL_ID> where BL_ID is obviously their owner's ID.
trace(1); - Shows you everything that happens (barring certain things Badspot doesn't like players seeing) until you use trace(0);. To cut down on bullstuff happening around it, I recommend typing trace(0); into the console right after you start, so you can just open the console as soon as you've done the thing you want to deconstruct and hit enter. There could be a lot of other stuff going on in the background, which will be more you have to dig through to find what you want.

Start the game. Start a server. dumpConsoleFunctions(); and exit the game immediately. Now save that console.log, maybe trim all the game's startup crap - it contains tons of functions, and you can Ctrl+F through it to find stuff if you have a vague idea of what you're looking for.
Start the game again. export("$*", "config/globals.cs"); to get all global variables defined at menu time, if you're making stuff dealing with the menu. Start a server, do the same again to get all global variables defined while running a server. There's a lot of junk data in this but it's potentially quite useful if you need to find certain things. Save those globals files and that log of console functions - they might not be valuable all the time but they're quicker than asking the forums.
Ideally, you should do these with a clean Blockland installation to minimize chaff - you might end up using something only to find it doesn't work for users missing some other add-on.

The tutorials for anything associated with TorqueScript will be at best useless and at worst entirely misleading, since Blockland has its own functions you really need to know about and there's been tons of different versions of TGE (plus TGEA, T3D, T2D... there's often no way to actually tell what version of Torque a tutorial is directed at without just trying it). Knowing how to pull the game apart and get at its bits is a lot more valuable than Google for something as obscure as Blockland.

G O O D  L U C K

Quote
The tutorials for anything associated with TorqueScript will be at best useless and at worst entirely misleading, since Blockland has its own functions you really need to know about and there's been tons of different versions of TGE (plus TGEA, T3D, T2D... there's often no way to actually tell what version of Torque a tutorial is directed at without just trying it). Knowing how to pull the game apart and get at its bits is a lot more valuable than Google for something as obscure as Blockland.
I can't say I agree with this. This forum is the meka for Torquescript help. And if you put Blockland Forums in front of your coding help search on google, you will find Blockland related coding help. With the merging of Mod. Discussion, that has been my search method of choice.

if you want basic string functions you can also look here http://docs.garagegames.com/tge/official/content/documentation/Reference/Console%20Functions/TorqueScript_Console_Functions_3.html

useful when creating formatted strings, or reformatting input. better than using scriptobjects in terms of speed if what you are doing doesn't actually require OOP.

I don't suggest the above. Use BlockDoc posted (and started) by Pecon.

Actually that particular resource is pretty good.

Oh. I have found them to be less related to BL than the resources we have as a rule.