Once I get that upgrade to 36-hour days, I will tackle that. – Mychaeel

Legacy:UPL File

From Unreal Wiki, The Unreal Engine Documentation Site
Revision as of 13:49, 19 May 2008 by SuperApe (Talk | contribs) (this is a wiki, attributions and credits are inappropriate.)

Jump to: navigation, search

Basics

The .upl File Format contains information about player characters. The files define the characters available in player selection menus (e.g. Settings -> Player -> Change Character). .upl files are located in the {Base Directory}/System directory. They look like this:

[Public]
Player=(DefaultName="Malcolm",Race="ThunderCrash",Mesh=HumanMaleA.MercMaleD,species=xGame.SPECIES_Merc,BodySkin=PlayerSkins.MercMaleDBodyA,FaceSkin=PlayerSkins.MercMaleDHeadA,Portrait=PlayerPictures.cMercMaleAD,Text=XPlayers.MercMaleDA,Sex=Male,Menu="MALCOLM",Tactics=2.0,StrafingAbility=+2.0,Accuracy=0.5,BotUse=1)
Player=(DefaultName="Brock",Race="Mercenary",Mesh=HumanMaleA.MercMaleC,species=xGame.SPECIES_Merc,BodySkin=PlayerSkins.MercMaleCBodyA,FaceSkin=PlayerSkins.MercMaleCHeadA,Portrait=PlayerPictures.cMercMaleAC,Text=XPlayers.MercMaleCA,Sex=Male,Menu="",Tactics=2.0,StrafingAbility=+1.0,Accuracy=0.5,BotUse=1)
...

Tarquin: Is this the same format as config files?

Elements

DefaultName 
The name that appears in the Player menu. The name given in 'Character=' in UT2004.ini and User.ini, used to set a default player, maps to this value.
Race 
The Race this model gets grouped with from the Races dropdown list. You can make a new one or use an existing one (ie. Hellions).
Mesh 
Mesh this character uses (Packagename.Meshname)
Species 
Determines SpeciesType
BodySkin 
Skin this character uses for body (Packagename.Skinname)
FaceSkin 
Skin this character uses for head
Portrait 
Portrait appearing in the character menu
Text 
Links to the descriptive text seen in Player menu. The entry is written as IntFile.DecoTextEntry.
For example "XPlayers.MercMaleDA" means the MercMaleDA=... entry of the [DecoText] section in XPlayers.int/.det/.frt/... (depending on configured language)
Sex 
"Male" or "Female".
Menu 
Which menu(s) the character shows up in. 'SP' = Single Player game menu, '' = default character menu. 'DUP' specifies Bot-only characters that don't appear in the list of characters a player can select for him/herself.
Tactics, Strafing Ability, etc. 
 ? Not sure but probably tweaks character abilities from standard values
BotUse 
This means whether you can use the character in Single Player or Choose him for your team e.g. BotUse="SP" means that you can select this char when you play Single Player BotUse="3" means to hire the bot for your team but a strange bug occurs (well atleast for me) the acctual bot doesent turn up for a retarted reason still finding the values for 1 and 2

Notes

  • You can add player characters to the game by adding your own MyFileName.upl to the System directory. No need to edit the original files.
  • For mods using the -mod setup, if any *.upl file is added to MyMod\System, UT2004 assumes you don't want the default UT2004 models to be displayed. To re-enable them, copy the default .upl's from UT2004\System into MyMod\System.
  • UT2004 does not exactly check for the extension "upl". If your editor happens to make backups named "upl~" or similar UT2004 will also try to load those. Mostly this leads to an immediate crash when UT2004 is run - without a very useful error.

How to remove the need for using .UPL files

People, please bear with me. This will be the first time I have contributed to the Unreal Wiki. I am a programmer, but not a web designer. Feel free, in fact I insist, that you change, adjust and reformat anything I write here.

Also, if this is in the 'wrong place' please move it(if you can...)

The Unreal Engine was created to be very open to expansion and modification. One thing the engine uses to make adding new player models and characters was the .UPL file. UPL files store simple information telling the engine what models to load, and it links to them profiles and species(2003). I am not going to go into detail about what the UPL contains or does, because this is a tutorial on how to NOT use them.

The problem with UPL files is that they are ALWAYS loaded, and must reside within the default SYSTEM directory of the game. Although this is not an issue when playing the regular retail game, it can quickly become an issue for people developing mods.

The biggest problem is directory structure. Most mods being developed that are of any significant scale place their files into their own subdirectory. Like /UT2003/MyMod/Animations/ . So, by storing the files there, they will not get in the way of any other mods or the classic game. When you run your mod, you give the engine a path to the new animations directory and all is well. However, observe what happens when you run the classic game again. The engine will try to load the characters you have put in the .UPL file. This can cause errors or glitches. What happens when the player goes into the Player tab of options to try and select a character? In the list of characters there will be a lot of question marked options. Those are there as a side effect of the UPL system.

UPL's are the easiest way to get a new player model into the game, and are often used by mods that have 'Player Classes' as an easy way to put the player classes in(this is linked to the species class). Although this technique works, it does not work well and leaves the system open for alterations. The core game is meant to be easily modified, however mods usually are not. Therefore, for my projects I have coded out the use of .UPL files. I have also done this with .INT files and will write a page on that accordingly.

(THIS IS WIP I HAVE TO GO TO WORK NOW AND WILL DO MORE WITH IT WHEN I GET BACK)


TOjo39: Man alive...you talk about the upl and promise how to not load them. And all you say is that you hardcode them out!!!! Please, Please, More info.