Developer Store
Support
Member Forums

Screenshots
FAQ
Documentation
License
Known Issues
Downloads

MMOWorkshop.com Store Opened!
Torque MMO Kit - Open Sourced!
Torque MMO Kit - 1.5.2 Port Alpha Test
Torque MMO Kit - OSX Status

GarageGames.com irc.prairiegames.com
#mmoworkshop

PyTorque
TGB Web Browser


Zortek

hallsofvalhalla - After a long epiphany
Leathel - FoHO pre-Alpha 2.42
OldRod - More Musings on the MMO Industry
xapken - nice
J.C. Smith - 0.0.4.1 Build Notes
Wolf Dreamer - Pointless blog of pointless things
AthlonJedi2 - Server Nuked !!!!!
gamer_goof - New character model GIRL1 available only $4
... MORE BLOGS!

Lets talk skills.
Mob chase range?
Auction House + Internal Mail Sy...
Crafting Wiki
Every Day a new question... :)
Web Host
Seeking experienced programmer
Integrating Green-Ear SDK (paid)
where character information is s...
Spells Problem...

This Information is Old

Please note this information is old and might not be relevant. For the purpose of making sure not to remove any useful information this article is remaining intact. Please visit the Tutorial section listed below for TGEA Alpha tutorials and walk throughs.

http://www.mmoworkshop.com/trac/mom/wiki/Tutorials

--Xerves July 2008

Getting Started With TGEA


Before reading any further, please make sure you have downloaded Torque MMO Kit IDE (previous version, outdated) that is also available in the archive section. The Torque MMO Kit (Recommended Version) or the Torque MMO Kit IDE (TGE 1.5.2) from the downloads section don't include the required files to use the TGEA version of the kit.

PART ONE: SETTING IT UP

Creating a TGEA Game

Setup wise, getting a game running in the TGEA version of the MMO Kit is quite simple. With the IDE, the only step that differs from creating a new TGE game is to check the ‘Torque Game Engine Advanced’ box. For non-IDE users, the proccess is identical to the TGE setup, except that in gamesettings.py ‘Use TGEA’ must be flagged as ‘True’.

Testing the TGEA Game

Once the start game is setup, launch the client by using either the IDE or Client.pyw to make sure that everything is working as it should. If you wish to be on the safe side, create a new single player world and login to the default mission and check that basic controls and hotkeys are functional. After doing so, exit out of the game and prepare for some Python coding

PART TWO: MUD MODIFICATIONS

The TGEA version that ships with the MMO Kit has some critical issues that need to be addressed before any game development can occur.

The first, and possibly most important issue addressed in this section is the spawn/dialog trigger conflict. In the TGEA version of the Kit, static shapes don’t have the ‘dialogTrigger’ field. MUD, more specifically Simulation, assumes this field is present and attempts to pull information from it. Obviously, this causes a few problems to arise; the biggest is that prevents spawns from being picked up during the world creation and update. The only real way to fix the issue is to cause dialog triggers to be ignored. In ~/mud/simulation/simmind.py, replace:

    def remote_getSpawnPoints(self): 
        #we'll initialize the waypoints here too 
        self.getWayPoints() 
        self.getDialogTriggers() 
        
        spoints = [] 
        mg = TGEObject("MissionGroup") 
        self.getSpawnPoints_r(mg,spoints) 
        thepoints = [] 
        for sp in spoints: 
            #x y z AngAxis 
            transform = sp.getGroundTransform() 
            transform = tuple(float(x) for x in transform.split(" ")) 
            
            spoint = SpawnpointInfo() 
            spoint.transform = transform 
            spoint.group = sp.spawngroup.upper() 
            spoint.wanderGroup = sp.wandergroup 
            thepoints.append(spoint) 
        
        try: 
            if int(TGEGetGlobal("$Server::Dedicated")) or int(TGEGetGlobal("$pref::gameplay::SPpopulators")): 
                from populator import Populate 
                ppoints,ppaths,pwaypoints = Populate(thepoints,self.paths) 
                thepoints.extend(ppoints) 
                
                for wgroup,ppoints in pwaypoints.iteritems(): 
                    self.waypoints[wgroup] = ppoints 
                
                for wgroup,paths in ppaths.iteritems(): 
                    self.paths[wgroup] = paths 
        except: 
            print_exc() 
        
        return thepoints

with this:

    def remote_getSpawnPoints(self): 
        #we'll initialize the waypoints here too 
        self.getWayPoints() 
        
        # TGE Object's dialogTrigger is raising an exception, so ignore dialog 
        # triggers until this is resolved in 1.5.x. 
        # self.getDialogTriggers() 
        
        spoints = [] 
        mg = TGEObject("MissionGroup") 
        self.getSpawnPoints_r(mg,spoints) 
        thepoints = [] 
        for sp in spoints: 
            #x y z AngAxis 
            transform = sp.getGroundTransform() 
            transform = tuple(float(x) for x in transform.split(" ")) 
            
            spoint = SpawnpointInfo() 
            spoint.transform = transform 
            spoint.group = sp.spawngroup.upper() 
            spoint.wanderGroup = sp.wandergroup 
            thepoints.append(spoint) 
        
        try: 
            if int(TGEGetGlobal("$Server::Dedicated")) or int(TGEGetGlobal("$pref::gameplay::SPpopulators")): 
                from populator import Populate 
                ppoints,ppaths,pwaypoints = Populate(thepoints,self.paths) 
                thepoints.extend(ppoints) 
                
                for wgroup,ppoints in pwaypoints.iteritems(): 
                    self.waypoints[wgroup] = ppoints 
                
                for wgroup,paths in ppaths.iteritems(): 
                    self.paths[wgroup] = paths 
        except: 
            print_exc() 
        
        return thepoints 

The changes to the code were made by Gylan, and his original post can be found here

Another issue with the TGEA version of the kit is the vendor UI. Vendors work exactly the same in the TGEA version as they do in the TGE version, except that the one small change must be made to ~/mud/client/gui/npcWnd.py. Find the line that says:

        index = int(self.itemList.getMouseOverId())

and change it to say:

        # This is added to get the vendor UI working
        index = int(self.itemList.getSelectedId()) 

Again, this code was suggested by Gylan. The code was given over IRC, and therefore there is no post containing background details on it. The basic cause for adding this code is that the MouseOverID function was not ported to the TGEA version of the kit, meaning the Vendor GUI will not display what it is supposed to.

PART THREE: THINGS TO REMEMBER

When you use TGEA, there are a few minor technicalities you myst keep in mind.

First off, when exporting .dif interiors you must use the TGEA format, not the TGE format. Most programs like 3D World Studio can only export to the TGE format, so you will have to fire up Constructor and use the "Legacy TGEA DIF" option during export.

Secondly, when creating objects with alpha texture or other special rendering flags, a material.cs script must be placed in the model directory. Here is an example script for alpha textures:

new Material(aut_orange_plain)
{
baseTex = "adv.test/shapes/trees/aut_orange_plain";
translucent = true;
};

The value of 'new Material()' should be the name of the material, which is defined in your 3d modeling program. The 'baseTex' line should point to the lcoation of your texutre. The 'translucent' flag tells the engine to look for an alpha chanel in the base texture

Here is a sample material script for bump maps:

new Material(body1) 
{
baseTex = "adv.test/data/shapes/character/textures/body/body1";
bumpTex = "adv.test/data/shapes/character/textures/body/body_bump1";
};

'bumpTex' should point to the location of a normal map texture.

Well, thats about all for now. When more changes are made to MUD, and more questions arise in the forum about TGEA, I may add some additional sections to this page. If anyone finds any mistakes, typos, or wants to add something, feel free to do so.