Difference between revisions of "Resources"

From Tomb Raider Mod Launcher Wiki
Jump to navigation Jump to search
(Created page with "== What is a resource? == A resource is a folder that contains a file to identify information about the resource and the files associated with the resource, such as the scrip...")
 
 
(One intermediate revision by the same user not shown)
Line 5: Line 5:
 
A resource is very similar to an executable. You can start or stop resources, you can have more than 1 resource running at the same time. Resources would usually contain a script for game modes or other tasks to help control the server like add commands or manage the server.  
 
A resource is very similar to an executable. You can start or stop resources, you can have more than 1 resource running at the same time. Resources would usually contain a script for game modes or other tasks to help control the server like add commands or manage the server.  
  
The scripting language of the resources is done through the squirrel programming language.  
+
The scripting language of the resources is done through the Squirrel programming language.  
  
The server is compiled with support for squirrel 3.0 you can see the documentation for squirrel [http://www.squirrel-lang.org/doc/squirrel3.html here].
+
The server is compiled with support for Squirrel 3.0 you can see the documentation for Squirrel [http://www.squirrel-lang.org/doc/squirrel3.html here].
  
 
== Creating a resource ==
 
== Creating a resource ==
Line 32: Line 32:
  
 
The type attribute refers to where the script will run, for now you should only specify "server" as client scripts are unsupported.
 
The type attribute refers to where the script will run, for now you should only specify "server" as client scripts are unsupported.
 +
 +
== Default resources ==
 +
 +
You can checkout the default resources for the server [http://code.google.com/p/trmultiplayerresources/ here].

Latest revision as of 13:09, 9 August 2014

What is a resource?

A resource is a folder that contains a file to identify information about the resource and the files associated with the resource, such as the script files. The meta file tells the game how to interpret the resource like for example what scripts the server runs and which scripts the client will have to download and run.

A resource is very similar to an executable. You can start or stop resources, you can have more than 1 resource running at the same time. Resources would usually contain a script for game modes or other tasks to help control the server like add commands or manage the server.

The scripting language of the resources is done through the Squirrel programming language.

The server is compiled with support for Squirrel 3.0 you can see the documentation for Squirrel here.

Creating a resource

To create a resource for the server you would simply create a new folder with the name of the resource.

Once you created the new folder go inside it.

To configure the resource you will need to create a file named "meta.xml" without the quotes and then open it in Notepad or Notepad++.

Here is an example for the contents of the meta file:

<meta>
	<info author="jack9267" type="script" version="1.0.0" />

	<script src="server.nut" type="server" />
</meta>

The info element would contain who made the script, the type of script and the version of the script.

You would have a script element for each script file you wish to load.

The type attribute refers to where the script will run, for now you should only specify "server" as client scripts are unsupported.

Default resources

You can checkout the default resources for the server here.