Jump to content

Server Side Modifications with TTFS


moonsense715
 Share

Recommended Posts

Author: moonsense715

Skill level: 4

 

Introduction

This tutorial will show you how to allow players to play with custom content on your server, without affecting their core game files.

What does this mean? You can modify maps, preset settings, everything on your server (with the exception of client-side script updates). When players join your server, the custom content will be downloaded for them automatically on the "Joining Game" screen. If they hop on to other servers or you disable the custom content, then the clients will play normally, without the modifications.

This can be ideal if:

  1. You run a server and want to change lots of things, but have no means to update the core game files of clients (e.g. a C&C Renegade server).
  2. There is a special event (Halloween, Christmas, Game Night, etc.) and you want to put custom models, sounds, etc. on a server but only temporarily.
  3. You are a developer, want to change lots of balance settings, distribute the changes to testers VERY fast, then do it again 10 minutes later, etc.

 

For this tutorial we will distribute a custom objects.ddb file to players.

 

1. Prepare your files

After you're done with your changes in LevelEdit/Mammoth, save your objects. Then, create a totally empty level.
I named mine ObjectsMix.lvl and exported it to ObjectsMix.mix (try to avoid name conflicting, objects.mix and objects.ddb might not like eachother).

Now this is a completely empty level. If the level does not contain your new objects.ddb yet, use XCC mixer or RenegadeEx to put your modified objects.ddb into this mix file.

Your file is complete, named ObjectsMix.mix.

 

2. Create the package for players

To play your custom modifications, players will need to download special package files. For them (the players), these will NOT be downloaded to their game files (Data) folder nor their Documents folder, but rather to AppData\Roaming or somewhere else.

Copy your ObjectsMix.mix next to your FDS (the game server), next to the server executable file (e.g. server.exe). You should have serverside script files already if you run a server, along with PackageEditor.exe. If you don't, get them (ssgm files).

Stop your server and open a command line in this directory.
Enter these commands:

PackageEditor uninstall "ObjectsMix"
PackageEditor update "ObjectsMix.mix" 1.0 Westwood

The first line makes sure any previously installed packages with the same name are gone.
The second command installs your package. You can change the version and the author name if you want, but it's not necessary.

 

3. Upload your package to a server

You need a web server to upload your ttfs packages to. Your game server will tell the players' clients to go here and download any needed packages. 

Grab the generated ttfs folder from your game server directory (it will be next to the debug folder, search for it), and upload it to your web server. It should be reachable via http calls and the file lists must be viewable inside the ttfs folder.
For example, you could put them here: http://mysite.com/ttfs/

Go ahead and visit the link (well obviously not this one above, but YOUR server's ttfs link). If you can't see the file list, it's setup wrong. Ask your administrator to make it viewable, or add a .htaccess text file inside the ttfs folder and make it contain this single line:

Options +Indexes

Now you should be done.

 

4. Make your server use the package

You thought you were done? No! You only created the package so far, now you need to use it.
Open your tt.cfg file. Take a look at the example below.

gameDefinitions:
{
	FirstMap:
	{
		mapName = "RA_FirstMap";
		packages = ["ObjectsMix"];
	};
};

rotation:
[
"FirstMap",
"RA_SecondMap"
];

downloader:
{
	repositoryUrl = "http://mysite.com/ttfs/";
};

You need to define which maps use this new package (which is just a modified objects.ddb file essentially).
Do this in gameDefinitions. In the example, one map (RA2_FirstMap) uses it only. If you want all maps to use it, add them all to the gameDefinitions in a similar way.
The mapName is the full name, the packages can contain multiple packages, separated by commas. Remove the prefix from the rotation if you have a game definition for a map.
NOTE: If you are trying to just add a new MAP that players need to download, just make the mapName and packages the same (e.g. packages = ["RA_FirstMap"]), the map itself is the package in this case

In the repositoryUrl, define the URL where the players' clients will download your packages from. The link you have from Step 3 should go here.

Make sure to restart your server after you've modified tt.cfg!

 

Congratulations! Players who join your server will automatically download the packages you defined.

If you want to stop using the custom content on your server, just remove ObjectsMix from the packages in gameDefinitions.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...