Cleaning out the "tool shed"
by Richard Ranft · in Torque 3D Beginner · 10/13/2014 (8:24 am) · 8 replies
With some of the discussions that have been going on I thought I'd share a few things.
First, Project 13 is a test project for making a NWN2 style d20 Modern rules game with Torque 3D. It uses Charlie Patterson's Twillex system to add roll-out panels to the edges of PlayGui, in addition to a few other systems I'm testing out. Kevin Mitchell's kit beats the snot out of this hands down, but this shows one way to do some of those things. Controls are still clunky, UI is ugly, buttons just emit identifying info to the console, needs tons of work, but there are some interesting things already. I'm going to incorporate trigger-based mission switching shortly (there is already a tutorial, but hey).
Because of all of the tables of data that Project 13 uses (and the hours involved in manually copying them) I sketched out an C# tool called RulePad to handle scraping the tables from the RTF files directly to Torquescript. It could use a few more features, but it does the heavy lifting - still have to do some manual cleanup in some cases but it still beats doing it all by hand. I am working on a way to do the same from PDF files.
First, Project 13 is a test project for making a NWN2 style d20 Modern rules game with Torque 3D. It uses Charlie Patterson's Twillex system to add roll-out panels to the edges of PlayGui, in addition to a few other systems I'm testing out. Kevin Mitchell's kit beats the snot out of this hands down, but this shows one way to do some of those things. Controls are still clunky, UI is ugly, buttons just emit identifying info to the console, needs tons of work, but there are some interesting things already. I'm going to incorporate trigger-based mission switching shortly (there is already a tutorial, but hey).
Because of all of the tables of data that Project 13 uses (and the hours involved in manually copying them) I sketched out an C# tool called RulePad to handle scraping the tables from the RTF files directly to Torquescript. It could use a few more features, but it does the heavy lifting - still have to do some manual cleanup in some cases but it still beats doing it all by hand. I am working on a way to do the same from PDF files.
About the author
I was a soldier, then a computer technician, an electrician, a technical writer, game programmer, and now software test/tools developer. I've been a hobbyist programmer since the age of 13.
#2
EDIT: also thank you for putting just the project directory into the repo, instead of cloning the whole of T3D like everyone else does :P.
10/13/2014 (3:25 pm)
Mmmmm Twillex. I love me some Twillex. Never could get it working with GUIs properly though, so I'm very interested to have a look. Thanks, Richard!EDIT: also thank you for putting just the project directory into the repo, instead of cloning the whole of T3D like everyone else does :P.
#3
@Jesse - no prob, it was sitting there anyway. My next step was to be able to drag-drop buttons to/from the rollouts - I'm sure you'll have that working in no time!
Something to note - I had forgotten that I had added a callback to tell me when PlayGui is resized. Resizing won't work quite right without that; I'll leave that as an exercise for the reader - or maybe I'll drop that here, too....
10/13/2014 (3:55 pm)
@Daniel - lol - I have formed that habit from externing my projects into various versions of T3D from SVN.@Jesse - no prob, it was sitting there anyway. My next step was to be able to drag-drop buttons to/from the rollouts - I'm sure you'll have that working in no time!
Something to note - I had forgotten that I had added a callback to tell me when PlayGui is resized. Resizing won't work quite right without that; I'll leave that as an exercise for the reader - or maybe I'll drop that here, too....
#4
@Richard - While you're dropping, may as well drop...lol!
10/13/2014 (4:04 pm)
@Daniel - That's the same idea I had when I dropped the GUI Template. I feel like it's easier to just drop in the /game folder myself. @Richard - While you're dropping, may as well drop...lol!
#5
10/13/2014 (4:16 pm)
The reason it's good to have the whole project directory is the the buildFiles folder, which contains your project generator config. So theoretically someone could reproduce your build with the same PG configuration if they had your buildFiles directory. At the moment there aren't really enough options for that to be worthwhile, but it might be helpful in the future...
#6
And, I have a fair start for d20 Modern character generation in there....
10/13/2014 (4:57 pm)
See, my config was just base T3D - no extras. I debated adding it but since it was just the standard "Full Template" with no changes (except the name) I figured you could simply drop the one from the template in and fire away....And, I have a fair start for d20 Modern character generation in there....
#7
10/13/2014 (6:12 pm)
/// engine/T3D/gameTSCtrl.cpp around line 48 insert IMPLEMENT_CALLBACK( GameTSCtrl, onResize, void, ( const Point2I& position, const Point2I& extent ), ( position, extent ), "Called when a resize occurs.nn" "@param position The new top/left of the control.n" "@param extent The new extent of the control." );
/// engine/T3D/gameTSCtrl.h around line 54 insert
protected:
DECLARE_CALLBACK( void, onResize, ( const Point2I& position, const Point2I& extent ) );
#8
@Danny:
Pretty much what Richard said. The GUI Template with XML Saving resource all just builds onto the Full Template without changing source. As I recommended at the bottom of my resource posting, though, I think the best solution would end up being implemented in source. So then, lol, I'd be uploading the whole blasted thing as is the popular vote! It serves the purpose for now, I'm sure down the line as I advance with the application of said resource it will be updated :D
10/13/2014 (6:47 pm)
@Richard: Nice, thanks. @Danny:
Quote:See, my config was just base T3D - no extras.
Pretty much what Richard said. The GUI Template with XML Saving resource all just builds onto the Full Template without changing source. As I recommended at the bottom of my resource posting, though, I think the best solution would end up being implemented in source. So then, lol, I'd be uploading the whole blasted thing as is the popular vote! It serves the purpose for now, I'm sure down the line as I advance with the application of said resource it will be updated :D
Torque Owner Jesse Allen
I'm going to dig deep into this one, it means a lot to me that you've shared this! Thank you so much! It was your initial introduction to GUI in T2D that started me on my mad quest of GUI mastering. If you hadn't seen it yet, check out the new GUI Template resource I put up yesterday. If there were a 'special thanks' you'd be first on the list Richard :) ...hmm, come to think of it, I think there 'should' be a special thanks section, I'm going to add one :P