UDN
Search public documentation:
PushingContentUT2003
Interested in the Unreal Engine?
Visit the Unreal Technology site.
Looking for jobs and company info?
Check out the Epic games site.
Questions about support via UDN?
Contact the UDN Staff
Pushing Skin and Model Content
Unreal Tournament 2003 TutorialJoseph M. Wilcox
Description:
At the request of several server admins, starting with 2186 we added the ability to push model and skin content from the server to all clients that connect. This tutorial will explain in a step by step method how to setup a model or skin to be pushed. For an example, I'm using the Beatrice model. This is a good example to start with as it has multiple skins. Let's begin by looking at an overview of the steps needed to push content. Step 1: Create a .U package that contains a single PlayerRecordClass? for each character defined in the skin or model's .UPL file. Step 2: Add each .U file to your server packages list. Step 3: Make sure all needed resources (.UTX and .UKX) files are referenced in your server packages list.Case Study: Beatrice
Ok, so now that we have an overview, let's look at converting the Beatrice model to be pushed. Install the Beatrice model on your server (or work machine). Open up BeatriceSkins?.upl to see the character descriptions for Beatrice. For our examples, you do not have to be concerned with the duplicate bot descriptions. Notice that this UPL file defines 3 characters, Beatrice, Flora and Florence. This means you will have to create a separate "push" .U package for each character you want to make available.. in this case, 3! There are two times in this process where naming is important, first is the name of the "push" .U package and second, is the name of the class defined in it. To understand why this is important, it helps to understand the process UT2K3 goes through when looking to see if it needs something. When a player connects to a server, that player sends his character information. This information is then forwarded to each client connected to the server. Each client then attempts to load skin/model data for the new player. What it does is first look in it's local player list to see if that character exists. If it does, it uses that character list to load the data. If it doesn't exist, it will attempt to load pushed data from the server. It does this by taking the character's name and trying to load a PlayerRecordClass? that matches it. Due to naming conventions, the package name should be different from the name of the PlayerRecordClass? so the suffix "MOD" is appended to the character name. If this package or class do not exist, the default model is then used.Settings up the package directories
So, for the Beatrice model, you need to create 3 subdirectories off of the main \UT2003\ directory. \BeatriceMod, \FloraMod, and \FlorenceMod. In each of these directories, you will need to create a subdirectory \Classes that will contain the unrealscript definition of the PlayerRecordClass? for each character. Now edit your UT2003.ini file and find the section [Editor.EditorEngine] and add these new packages to your EditPackages? list:EditPackages=BeatriceMod EditPackages=FloraMod EditPackages=FlorenceModFor those of you not familiar with UnrealScript?, you have now created the basic shell of what you need to generate a .U package. Now it's time to create the class definitions.
So you want to be a scripter
Inside the \Classes subdirectory of each package, you will need to create a .UC file that contains the script definition of the PlayerRecordClass? structure for each character. Begin by creating the PlayerRecordClass? for the Beatrice character. In \BeatriceMod\Classes create the file Beatrice.uc. In unrealscript, the name of the .UC source file must match the name of the class it defines, and in the case of pushing content, the name of the class must match the name of the character it represents. The PlayerRecordClass? contains variables that represent all of the data you can set via the UPL file. Let's look at Beatrice'sclass Beatrice extends PlayerRecordClass; defaultproperties { Species=class'XGame.SPECIES_Merc' MeshName="Beatrice.Beatrice_Female" BodySkinName="BeatriceSkins.Beatrice.BeatriceSkin" FaceSkinName="BeatriceSkins.Beatrice.Pulseline" Portrait=Material'BeatriceSkins.Beatrice.BeatricePortrait' TextName="XPlayers.Default" Sex="Female" Menu="SP" }See if you can match up each entry here to it's value in the UPL file. Once you have created the .UC playerRecordClasses for each character, you are set to compile. In your \System directory execute the command:
ucc makeThis will compile your new packages and create BeatriceMod.u, FloraMod.u and FlorenceMod.u. If for some reason you need to recompile or change settings, make sure to manually delete this files each time before compiling.
Setting up the Server
Once you have your packages compile, all that's left is setting up your server to push the content. Edit your server's .INI file and add all the necessaryServerPackages
references to the [Engine.GameEngine]
. For Beatrice, you should be adding the following lines:
ServerPackages=Beatrice ServerPackages=BeatriceSkins ServerPackages=BeatriceMod ServerPackages=FloraMod ServerPackages=FlorenceModAnd that's it. You are now pushing the Beatrice, Flora and Florence characters to every player who connects.