Forums Index >> Modding >> How do you bring in scripts from other games?
Page : <1> :
Probably you wont be able to... Why? TGE basic code that TT is missing :(
Only small scripts usually work, or lines of code, nothing much useful
Damn - so that is why TGE's SpeedoMeter (Racing) doesn't work in TT :'(
Arggghhh....
Loading compiled script game/client/ui/NetGraphGui.gui.
game/client/ui/NetGraphGui.gui (0): Unable to instantiate non-conobject class Gu iGraphCtrl.
The.cs does reference/create GuiGraphCtrl? -->New GuiGraphCtrl(NetGraph) {
TT should have all of this data, but will it allow me to create that NetGraph window?
can get it to compile just the function portion. Now its just a matter of getting that info.
Compiling game/client/scripts/netGraph.cs...
Loading compiled script game/client/scripts/netGraph.cs.
Last edited: Saturday, July 01, 2006 at 8:02:11 AM
I've tried to host the Orc Village this from the TGE on TT and it shows up as a cloudy sky and a blank cloud im standing on. But if you want to host it there is a good thing to do. Take everything in the Data and creator and copy it into The TT root file in contents/resources/game/data/ and if you would like to use scripts on say TT1_3.mis just copy the racing script -
//-----------------------------------------------------------------------------
// Torque Engine
// Copyright (c) GarageGames.Com
//-----------------------------------------------------------------------------
// Writes out all script functions to a file
function writeOutFunctions()
{
new ConsoleLogger( logger, "scriptFunctions.txt", false );
dumpConsoleFunctions();
logger.delete();
}
// Writes out all script classes to a file
function writeOutClasses()
{
new ConsoleLogger( logger, "scriptClasses.txt", false );
dumpConsoleClasses();
logger.delete();
}
My Web Site- GameForums.com
On Sunday, August 34 2006 become a member of my forums with many game topics!
-Gort
Last edited: Saturday, July 01, 2006 at 9:59:52 AM
Getting a little closer
Not sure if its a case of TT not having the capabilty, but whether they "turned it on". Case in point, I took the binds.cs from torque and replaced it with the TT one. Was able to drive around, could shoot, but not move my turret. "esc" didn't work either, but when I hit "g" I would jump out of the server then back in as a different tank. The same file structure is used between Torque and TT, so you can kinda see what is there and what isn't.
Ahh now I see what you guys are talking about. Trying to bring that into TT would be one heck a task but you could break it up individually and do it. To bad would have been cool.
Clark stripped a lot of stuff out of TT for performance reasons. My guess is that the C++ code required to support the graph is no longer in TT.
Yes thats what it looks like. I was adding in stuff from what console said was missing (from my torquecvs folder) and was trying to execute from the main in there respective folders. After about adding the 15.cs or.gui file I asked myself if its really worth it.
Clark stripped a lot of stuff out of TT for performance reasons. My guess is that the C++ code required to support the graph is no longer in TT.
Shame on him! How could he remove triggers? What about water? In game editor for modding?
Tsk Tsk :P
Triggers? Just make a powerup with a huge bounding box. (Visible mesh optional.)
Yeah well we have done that :P
But what about the others eh? XD
Heh heh... If I knew how to put them back in for ya, I would.
See how I use my 'artist' title as a cop out.. Mwahahaha.
^Shouldnt be that hard if you have TGE's source (some 1337 skillz and you have yourself a copy of ThinkTanks.exe TGE-style) but then for people to use it too, they also needed the new ThinkTanks.exe, and even then, it'd be illegal to use the file ;)
Now that I think of it... Would it be illegal if the makers of the game made a new.exe including the stuff we are missing?
Like, they MADE the game, is it not within their right to release a new aspect to their creation?
^That wouldnt, but I think the "leader" of the company has to aggree with it (aka GarageGames currently)... But we can't... What a pity :(
Wonder if people offered some cash for versions of TT with more source included if they would be interested.
If you ever do it, gimme :P
But thats not what we meant... Getting the current TSL source isnt THAT needed. To add this stuff we need to edit the C++ code, that means the code the EXECUTABLE file is based in. To be able to use new stuff, everyone that wants it has to use a modified exe with the changed code... I would also like to have all the.cs :P, even though I can understand whats going on in.cs.dso (having all the.cs would be a major help though :P)
Page : <1> :
I am very interested to see if I could bring the NetGraphGUi.gui from legends into TT for monitoring packets. It looks like this in TGE (just hit alt-n).
The.gui looks like.
// Profiles
New GuiControlProfile (NetGraphGhostsActiveProfile)
{
FontColor = "255 255 255";
};
New GuiControlProfile (NetGraphGhostUpdatesProfile)
{
FontColor = "255 0 0";
};
New GuiControlProfile (NetGraphBitsSentProfile)
{
FontColor = "0 255 0";
};
New GuiControlProfile (NetGraphBitsReceivedProfile)
{
FontColor = "0 0 255";
};
New GuiControlProfile (NetGraphLatencyProfile)
{
FontColor = "0 255 255";
};
New GuiControlProfile (NetGraphPacketLossProfile)
{
FontColor = "0 0 0";
};
//--- OBJECT WRITE BEGIN ---
New GuiControl(NetGraphGui) {
Profile = "GuiDefaultProfile";
HorizSizing = "left";
VertSizing = "bottom";
Position = "0 0";
Extent = "640 480";
MinExtent = "8 2";
Visible = "1";
NoCursor = "1";
New GuiGraphCtrl(NetGraph) {
Profile = "GuiDefaultProfile";
HorizSizing = "left";
VertSizing = "bottom";
Position = "432 5";
Extent = "200 200";
MinExtent = "8 2";
Visible = "1";
};
New GuiTextCtrl(Latency) {
Profile = "NetGraphLatencyProfile";
HorizSizing = "left";
VertSizing = "bottom";
Position = "436 184";
Extent = "100 18";
MinExtent = "8 2";
Visible = "1";
Text = "Latency";
MaxLength = "255";
};
New GuiTextCtrl(PacketLoss) {
Profile = "GuiTextProfile";
HorizSizing = "left";
VertSizing = "bottom";
Position = "536 184";
Extent = "59 18";
MinExtent = "8 2";
Visible = "1";
Text = "Packet Loss";
MaxLength = "255";
};
New GuiTextCtrl(BitsReceived) {
Profile = "NetGraphBitsReceivedProfile";
HorizSizing = "left";
VertSizing = "bottom";
Position = "536 170";
Extent = "100 18";
MinExtent = "8 2";
Visible = "1";
Text = "Bits Received";
MaxLength = "255";
};
New GuiTextCtrl(GhostsActive) {
Profile = "NetGraphGhostsActiveProfile";
HorizSizing = "left";
VertSizing = "bottom";
Position = "436 156";
Extent = "100 18";
MinExtent = "8 2";
Visible = "1";
Text = "Ghosts Active";
MaxLength = "255";
};
New GuiTextCtrl(GhostUpdates) {
Profile = "NetGraphGhostUpdatesProfile";
HorizSizing = "left";
VertSizing = "bottom";
Position = "536 156";
Extent = "100 18";
MinExtent = "8 2";
Visible = "1";
Text = "Ghost Updates";
MaxLength = "255";
};
New GuiTextCtrl(BitsSent) {
Profile = "NetGraphBitsSentProfile";
HorizSizing = "left";
VertSizing = "bottom";
Position = "436 170";
Extent = "100 18";
MinExtent = "8 2";
Visible = "1";
Text = "Bits Sent";
MaxLength = "255";
};
};
//--- OBJECT WRITE END ---
// Functions
Function NetGraph::toggleNetGraph()
{
If(!$NetGraph::isInitialized)
{
$Stats::netGhostUpdates = 0;
NetGraph::updateStats();
$NetGraph::isInitialized = true;
}
If(!Canvas.isMember(NetGraphGui))
{
Canvas.add(NetGraphGui);
}
Else
Canvas.remove(NetGraphGui);
}
Function NetGraph::updateStats()
{
$NetGraphThread = NetGraph.schedule(32, "updateStats");
If(!$Stats::netGhostUpdates)
Return;
If(isobject(NetGraph))
{
If(isobject(ServerConnection))
NetGraph.addDatum(0,ServerConnection.getGhostsActive());
GhostsActive.setText("Ghosts Active: " @ ServerConnection.getGhostsActive());
NetGraph.addDatum(1,$Stats::netGhostUpdates);
GhostUpdates.setText("Ghost Updates: " @ $Stats::netGhostUpdates);
$Stats::netGhostUpdates = 0;
NetGraph.addDatum(2,$Stats::netBitsSent);
BitsSent.setText("Bits Sent: " @ $Stats::netBitsSent);
NetGraph.addDatum(3,$Stats::netBitsReceived);
BitsReceived.setText("Bits Received: " @ $Stats::netBitsReceived);
NetGraph.matchScale(2,3);
NetGraph.addDatum(4,ServerConnection.getPing());
Latency.setText("Latency: " @ ServerConnection.getPing());
NetGraph.addDatum(5,ServerConnection.getPacketLoss());
PacketLoss.setText("Packet Loss: " @ ServerConnection.getPacketLoss());
}
}
Function NetGraph::toggleKey()
{
If(!GhostsActive.visible)
{
GhostsActive.visible = 1;
GhostUpdates.visible = 1;
BitsSent.visible = 1;
BitsReceived.visible = 1;
Latency.visible = 1;
PacketLoss.visible = 1;
}
Else
{
GhostsActive.visible = 0;
GhostUpdates.visible = 0;
BitsSent.visible = 0;
BitsReceived.visible = 0;
Latency.visible = 0;
PacketLoss.visible = 0;
}
}
Last edited: Friday, June 30, 2006 at 10:38:22 PM