Game Development Community

Has anyone seperated parts of the MG Kit by chance?

by Richard Preziosi · in Torque Game Engine · 10/17/2009 (4:55 am) · 7 replies

Stumbled upon the MG kit and was really intrigued by some of the features it had. Especially the admin system and the ability to choose map types, like DM, teamDM, and CTF that you could select from the startmission gui.

Been trying to seperate some of the features, but him building it onto the common directory is making it a bit hard. So was wondering if anyone had stripped any of the MG kit features out successfully.

#1
10/17/2009 (5:25 am)
I've actually built entirely upon it, its feature set is amazing considering it was all done through script.

I've noticed that the merging of the scripts actually cuts the loading time in half, mainly because it is only half of the standard starter.fps scripts.

There are many things that were done that would make merging things into and out of the MG Starter Kit difficult, but in my case I decided it was the perfect base for a good game setup.

Note: there are also optimizations that were done to compensate for older hardware when TGE 1.5 first came out.

Also the Light Editor is a seperate file in the MGSK thread, so you may not have the Light Editor.

#2
10/17/2009 (5:51 am)
Yeah, I was actually thinking in terms of porting to TGEA, just too many good features in that. I'm gonna keep hacking away and see if I can't get the two above features out of the kit, if I do, maybe the guy will let me post em as a resource. Cause as you said they are amazing features, just way too tied in to think about porting to TGEA.
#3
10/17/2009 (5:59 am)
Whenever I purchase TGEA I would have to port the MG Starter Kit as I see it as an essential part of my gaming environment at this point.

Btw: every feature in the kit started as a resource in the forums, so anything in there is already a resource, some were just modified for the MGSK's use, so you may be able to find the original to help port over with the extra features that the MGSK incorporated.
#4
10/17/2009 (6:08 am)
Hmm, didn't know that everything was a resource. saw the server admin stuff, just haven't had any success adding it. Gonna have to search a bit harder and find the map gametype selection, as I think that is crucial. Guess that could be remedied by just making multiple maps, but that's a bit redundant.
#5
10/17/2009 (8:21 am)
Anyone seen the resource for setting up multiple game types and then trying them to a selection. Zod may have coded that himself and it's not a resource, couldn't find anything myself.

Seems like the best way to do this would be to set up seperate game.cs and use a packages system. Anyone have any opinions on this?
#6
10/17/2009 (12:08 pm)
The Game Object resource (packages -- just as you surmised) and the mission type filter resource.
#7
10/17/2009 (1:10 pm)
I should probably create a new topic for this, and probably will if it doesn't get any traffic here, but I have a few questions about integrating the game object resource. Wanting to make sure i'm implementing this correctly, as I'm having to piece 2 resources together and write a bit of gui code on my own.

Here is what I have

startMissionGui.gui
//set the popup to select mission type
      new GuiPopUpMenuCtrl(MissionType) {
         canSaveDynamicFields = "0";
         Enabled = "1";
         isContainer = "0";
         Profile = "GuiPopUpMenuProfile";
         HorizSizing = "right";
         VertSizing = "bottom";
         position = "292 291";
         Extent = "64 20";
         MinExtent = "8 2";
         canSave = "1";
         Visible = "1";
         hovertime = "1000";
         Margin = "0 0 0 0";
         Padding = "0 0 0 0";
         AnchorTop = "1";
         AnchorBottom = "0";
         AnchorLeft = "1";
         AnchorRight = "0";
         text = "DM";
         maxLength = "1024";
         maxPopupHeight = "200";
         sbUsesNAColor = "0";
         reverseTextList = "0";
         bitmapBounds = "16 16";
      };



function startMissionGui::onWake()
{
   SM_missionList.clear();
   %i = 0;
   for(%file = findFirstFile($Server::MissionFileSpec); %file !$= ""; %file = findNextFile($Server::MissionFileSpec))  
      if (strStr(%file, "/CVS/") == -1)
      {
         %mi = getMissionDisplayName(%file);

	 %desc = %mi.desc[0];
	 for(%d = 1; %d < %mi.desclines; %d++)
		%desc = %desc @ "<br>" @ %mi.desc[%d];

         SM_missionList.addRow(%i++, %mi.name @ "t" @ %file @ "t" @ %mi.preview @ "t" @ %desc);
	 %mi.delete();
      }
   SM_missionList.sort(0);
   SM_missionList.setSelectedRow(0);
   SM_missionList.scrollVisible(0);
   
   MissionType.clear();

   for (%i=0; %i < $Server::MissionTypeCount; %i++)
   {
       MissionType.add( $Server::MissionType[%i], %i );
   }

   // You may want to store the last played game mode ID in a pref and set it here rather
   // than always defaulting back to 0
   MissionType.setSelected( 0 );
}  



$Server::MissionType[0] = "DM";
$Server::MissionType[1] = "TDM";
$Server::MissionType[2] = "CTF";
$Server::MissionTypeCount = 3;




function MissionType::onSelect( %this, %id, %text )
{
   %modeName = $Server::MissionType[%id]
   echo("Player has selected the game mode -" SPC  %modeName );
}

Then I'm using the MG kit gametype files, for game.cs, defaultgame.cs, etc. I feel like this will work, however I'm gonna be away from my code for a day or so, just excited to see if I'm finally understanding scripting, or if i'm just dellusional.