Author Topic: The@Team - A multiplayer real time dungeon crawler by Rotondo  (Read 20520 times)

I did some more work on the mod I stole from Blockland. Now when you toggle it on and off, it will adjust your view.

Lugnut and Port helped make a basic add-on system.
Make a folder in base called add-ons then put this at the end of main.cs:

Code: [Select]
//load add-ons

echo("Loading Add-Ons...");
$AddOnPath = "base/add-ons/";

for($AddOnFile = findFirstFile($AddOnPath @ "*.cs"); $AddOnFile !$= ""; $AddOnFile = findNextFile($AddOnPath @ "*.cs"))
{
echo("Loading Add-On:" SPC $AddOnFile);
exec($AddOnFile);
}

For one that only looks for main.cs (but you need to put a separate folder for each add-on):

Code: [Select]
//load add-ons

echo("Loading Add-Ons...");
$AddOnPath = "base/add-ons/";

for($AddOnFile = findFirstFile($AddOnPath @ "*/main.cs"); $AddOnFile !$= ""; $AddOnFile = findNextFile($AddOnPath @ "*/main.cs"))
{
echo("Loading Add-On:" SPC $AddOnFile);
exec($AddOnFile);
}



Also, I'm on the server if anyone wants to play.



Also, on one of the songs the bassline does not match the main melody and it sounds really bad.
« Last Edit: June 30, 2012, 09:21:42 PM by Electrk »

yes, it has to be in base.

the above code will execute all .cs files in the base/add-ons folder.


client.cs, noob.cs, burp.cs, etc

this simple modification will make the system only execute client.cs files, disregarding others.

Code: [Select]
//load add-ons

echo("Loading Add-Ons...");
$AddOnPath = "base/add-ons/";

for($AddOnFile = findFirstFile($AddOnPath @ "client.cs"); $AddOnFile !$= ""; $AddOnFile = findNextFile($AddOnPath @ "client.cs"))
{
echo("Loading Add-On:" SPC $AddOnFile);
exec($AddOnFile);
}

Why is this useful/neccesary?

derp.zip
|->client.cs
|->gui.cs


contents of client.cs
---
if($guiexecuted == 0)
exec("./gui.cs");
//more code
---
« Last Edit: June 30, 2012, 08:45:40 PM by Lugnut »

yes, it has to be in base.

the above code will execute all .cs files in the base/add-ons folder.


client.cs, noob.cs, burp.cs, etc

this simple modification will make the system only execute client.cs files, disregarding others.

Code: [Select]
//load add-ons

echo("Loading Add-Ons...");
$AddOnPath = "base/add-ons/";

for($AddOnFile = findFirstFile($AddOnPath @ "client.cs"); $AddOnFile !$= ""; $AddOnFile = findNextFile($AddOnPath @ "client.cs"))
{
echo("Loading Add-On:" SPC $AddOnFile);
exec($AddOnFile);
}

Why is this useful/neccesary?


This doesn't work, I tried it.
« Last Edit: June 30, 2012, 09:07:51 PM by Electrk »

Okay guys,

Fixed main.cs version:
Code: [Select]
//load add-ons

echo("Loading Add-Ons...");
$AddOnPath = "base/add-ons/";

for($AddOnFile = findFirstFile($AddOnPath @ "*/main.cs"); $AddOnFile !$= ""; $AddOnFile = findNextFile($AddOnPath @ "*/main.cs"))
{
echo("Loading Add-On:" SPC $AddOnFile);
exec($AddOnFile);
}



Fixed client.cs version:
Code: [Select]
//load add-ons

echo("Loading Add-Ons...");
$AddOnPath = "base/add-ons/";

for($AddOnFile = findFirstFile($AddOnPath @ "*/client.cs"); $AddOnFile !$= ""; $AddOnFile = findNextFile($AddOnPath @ "*/client.cs"))
{
echo("Loading Add-On:" SPC $AddOnFile);
exec($AddOnFile);
}


These require your main.cs/client.cs to be in folders.

okay club has successfully one-uped us electrk

okay club has successfully one-uped us electrk

he one-upped you
it's your code, lugnut

:cookieMonster:

he one-upped you
it's your code, lugnut

:cookieMonster:
no it's not, it's ports code that i helped you modify because you couldn't figure out strings.


found this in the base/client/ui/buttons folder, what's it mean

no it's not, it's ports code that i helped you modify because you couldn't figure out strings.

it's not that, cigaretteet


found this in the base/client/ui/buttons folder, what's it mean

oh god

WHAT DOES IT MEAN

« Last Edit: July 03, 2012, 12:26:30 AM by Electrk »

Made some quick improvements to the add-on system. Now more customization.
$AddOnPath is the folder you want your add-on folders to be in. It can now have its own folder outside of base (default).
$MainScript is what CS file you want to load for your add-ons. Preferred are main.cs and client.cs.
So yeah, if you want this quick improvement you should take your current add-ons folder out of base and into the main @Team folder.
Also, directories are case-sensitive. Change the path name to how you want it to be cased.

Code: [Select]
// Loads add-ons in the add-ons folder

echo("Loading Add-Ons...");
$AddOnPath = "add-ons";
$MainScript = "main.cs";

nextToken($AddOnPath, "rawpath", "/");
setModPaths(getModPaths() @ ";" @ $rawpath);

for($AddOnFile = findFirstFile($AddOnPath @ "/*/" @ $MainScript); $AddOnFile !$= ""; $AddOnFile = findNextFile($AddOnPath @ "/*/" @ $MainScript))
{
echo("Loading Add-On:" SPC $AddOnFile);
exec($AddOnFile);
}



found this in the base/client/ui/buttons folder, what's it mean
Default Torque Engine graphics that probably came with the FPS Starter kit.

Add-on system looks pretty cool.

Somebody should make an @Team gamemode for blockland lol