Kent Butler Posted October 15, 2023 Share Posted October 15, 2023 (edited) Super-excited to announce an update for the TorqueDev Torquescript IDE to provide better support for post-2007 Torque versions. Project types supported: TGE TSE/TGA TGB T3D-3.10 T3D-4.0* T2D-3.5 T2D-4.0 Update Overview The biggest changes involve creating updated parsers to read defined class/function information directly from the documentation files output from the Torque engine and making the system play nicely with these dynamically loaded function sets. TorqueDev also now supports project-level class/function definition files. This can be used to integrate a dump of project-specific engine console class/functions and/or script-side definitions. The other big change is updating the token lexer/parser to handle a full range of modern Torquescript syntax. The parser has been tuned against T3D3.10, T3D4.0.3, T2D3.5, and T2D4.0 script releases and will syntax-check the full codebase cleanly without parse errors. Also did some UI stuff notably: Fixed/disabled most of the broken links, better type-as-you go integration with defined classes/datablocks, along with various minor quality of life UI tweaks. Known Issues As of this writing, the function documentation dump from Torque3D 4.0 indicates return values for script functions as raw C classes. I did a manual search/replace for the obvious case of changing "const char *" to "string" (which is quite parser-breaking across the board). To my knowledge function names generally load correctly, but I have no idea if any other C-style semantic quirks might be in the definitions that could throw something off. More importantly, issues could arise with creating T3D4 game-specific function definitions depending on what gets dumped, so project-specific function dumps from 4.0 might require manual clean-up to work correctly. It might be more stable to use a T3D/3.10 project type. Project type can be changed by right-clicking on the project in the file explorer to bring up a properties window. Features Documentation for Torquedev is pretty hard to come by. The following is a run-down of primary features along with a very brief description of how to activate/use them. I will try to put together slightly more extensive documentation in the future. Type-as-you-go: provides a pop-up of functions/objects for auto-completion. Generally, the auto-complete list provides access to all parsed engine-defined and script-level entries. The datablock keyword brings up a list of engine-defined datablock classes. The new keyword brings up a list of engine-defined non-datablock classes. The singleton keyword brings up a list of all engine-defined classes (datablock and non). Code Snippets: Type-as-you-go integrates pre-defined code snippit templates. These can be activated in two ways: Type-as-you-go - The <TAB> key will activate a snippet during typing if the current text (immediately before the cursor) represents a snippet shortcut. For example typing "for" and then hitting <TAB> will insert a for loop prototype. Select - Torquedev can automatically insert blocks of code into snippet prototypes. With a block of code selected, pressing <F3> will bring up a snippet list (<TAB> quickly opens the "general" category). When a snippet is chosen from the list, the selected lines of code will be moved inside the template structure (as defined by the template.) Snippet templates are found in the \snippets subdirectory of the application folder (e.g. C:\Program Files (x86)\NetMercs Group LLC\TorqueDev\snippets). These can be adjusted as desired, and new templates can be created and added to the directory (use existing templates as an example). Defined Snippets: name (typing shortcut) - Description (behavior description) : for (for) - Simple for loop. (selected text placed in main loop.) foreach (foreach) - Simple foreach loop. (selected text placed in main loop.) if (if) - Basic if structure (selected text placed in structure.) if/else (ife) - Basic if/else structure. (selected text placed in "if" section) switch (switch) - Switch structure (one value plus default, selected text placed under "case value1:") while (while) - While structure (selected text placed in main loop.) Variable Type Hinting: Torquedev includes a directive to explicitly assign types to local variables similar to other non-typed language scripting IDEs. The directive form is: //# DECLARE %var as Type Object Browser: Torquedev includes an object browser to provide a list of defined class objects. This can be used to explore and insert class names/properties/methods into code and also integrates with the variable type hinting system. Pressing <F4> will bring up the browser. Use <TAB> and arrow keys to navigate and <ENTER> to make a selection. Auto Type Hint: The object browser can also automatically create variable type-hint directives. With the cursor on a defined variable, bring up the object browser and select the desired type. Hitting enter will result in a directive comment being added with the defined variable and type already filled in. Given the following variable declaration, the type directive would be generated automatically: //# DECLARE %var as Type %var = new Type() Intellicode: By default, TorqueDev will actively check the currently edited document and report code errors (it will scan ~3 seconds after typing stops if doc has changed). The Intellicode option under the Project menu can be used to check the code in every file and report script errors across the project. Debugger: Implements breakpoint and step debugging during script execution. Macros: Record and save custom text macros that can be accessed via ALT[1-0] Project-Level Class/Function Definitions: Custom function/class definitions can be created for any project. Torquedev will look for the files: [project name]_functions.txt [project name]_classes.txt These files are placed in the game/project directory and should be in standard Torque documentation dump format. If the files are found, any classes and functions defined in the files will be added to the engine-defined functions/classes (engine classes/functions are loaded based on TSDev project type). Installation To install, download the TSDev_Setup_1.3.0.zip, extract to a temporary directory, and run setup.exe. --------------------------------------------------- TSDev_Setup_1.3.0.zip Edited November 8, 2023 by Kent Butler Quote Link to comment Share on other sites More sharing options...
Kent Butler Posted October 30, 2023 Author Share Posted October 30, 2023 [Original Post] From the department of old Torquescript editors department. I tracked down a Windows install for the old Freeware version of Codeweaver/Torquedev. This is an older Torquescript IDE with many features in common with Torsion. Notes: The first time the program runs, it throws a license error; this fixes itself just by clicking on OK. Then it will try to download an update manifest ... which fails because the update servers have been offline for years. When that times out, the program exits. It will run fine after that. In project preferences, deselect the "check for updates daily" option to avoid the update time-outs. And that's it. The program is a bit slow to launch, but other than that seems to still work pretty well. NOTE: At one point there was a source release for this software, but the repo doesn't seem to be around anymore. If anyone has a copy of the source or link to a still-active repo, please let me know. Quote Link to comment Share on other sites More sharing options...
Kent Butler Posted November 8, 2023 Author Share Posted November 8, 2023 [update] tracked down old source repos with an installation release that has the license/update stuff disabled. The most recent version needed a few missing .dlls from the original project and source now builds and runs as of this post. See the source repo for more information about TorqueDev/Codeweaver. To install, download tdev_final.zip, extract to a temporary directory, and run setup.exe. Source Repo: https://github.com/kb-games/TorqueDev Quote Link to comment Share on other sites More sharing options...
Kent Butler Posted November 8, 2023 Author Share Posted November 8, 2023 Does anyone want to test my installer? It seems to work fine on my system. Quote Link to comment Share on other sites More sharing options...
fLUnKnhaXYU Posted November 19, 2023 Share Posted November 19, 2023 So , why does this go on with no response ? I have a crap old potato but I'm highly intrigued and dont understand the apparent lack of interest . I just use notepad++ for scripting and that color coded code words sounds so sweeet . TY Kent Butler . Quote Link to comment Share on other sites More sharing options...
Kent Butler Posted November 19, 2023 Author Share Posted November 19, 2023 (edited) 12 hours ago, fLUnKnhaXYU said: So , why does this go on with no response ? I have a crap old potato but I'm highly intrigued and dont understand the apparent lack of interest . I just use notepad++ for scripting and that color coded code words sounds so sweeet . TY Kent Butler . I dunno. Thing are pretty quiet around here these days. I really did this for myself, so I'm super-happy regardless. If you install it, try to pop back in and let me know how it goes. Edited November 19, 2023 by Kent Butler Quote Link to comment Share on other sites More sharing options...
fLUnKnhaXYU Posted November 19, 2023 Share Posted November 19, 2023 1. Ken Butler , Im using windows 7 . Do you still suggest that I give it a try . 2 .And may I ask your own personal review (summarized or otherwise) of the program , as applied to Torque3D thus far and , I would be more interested in the T3D - 4.xx yea question 2 is optional if your too busy , 1 is required if at all possible . TY Quote Link to comment Share on other sites More sharing options...
Kent Butler Posted November 20, 2023 Author Share Posted November 20, 2023 The program itself is all 2005-era code assets, so it should run without issue. If there are problems they will probably be with the installer, which I did in VisualStudio2022. The installer works fine on my Win10 machine, but that's the only machine it's been tested on that I know of. Try it. If it gives you trouble I'll see if there is something that can be tweaked. I haven't gotten to use it too much yet, but overall it has been very nice. The program has pretty much always been out of date, so I'd never really seen it fully working before. I'm liking it. I pick it over Torsion now. There are a few quirks I'll probably address now that I am somewhat familiar with the code. The biggest actual bug I've found is some of the menu commands (like adding files to the project) either crash or don't work right if there is nothing selected in the project explorer. So make sure the folder you want to work in is highlighted before doing folder-level operations. Also, it works like Visual Studio for adding files to the project - so it doesn't detect files added manually to the directories after project creation unless you specifically choose the "rescan directories" menu option or add each file to the project manually. I'd prefer if it auto-scanned. T3D 4.xx has some issues with the documentation output that messes with the auto-fill for functions/methods (it also messes up script-side documentation generally). Auto-fill will work better using the T3D/3.10 project type which pulls from the clean 3.10 class/function defs. Other than that, it should be fine in 4.1.x. I worked through syntax checking on the 4.1.3 codebase and all the script it ships with is parsed properly. I ultimately plan to update Torsion (another legacy TS editor) to also handle modern Torque class/function defs and then do a deep-dive comparison between the two. Quote Link to comment Share on other sites More sharing options...
fLUnKnhaXYU Posted November 20, 2023 Share Posted November 20, 2023 downloaded . lets have at those tscripts . . Kent Butler , If things dont work out too smoothly it could be all my fault . So youll need a more experienced tester guy . THX . Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.