Unreal Tournament 3 marks the return of the world's première first-person shooter. It unleashes the full power of Unreal Engine 3, taking graphics, gameplay, and challenge to a whole new level. Players engage in intense battles with other human players online, or against Unreal artificial intelligence that sets the industry standard. With the most powerful futuristic weapons and vehicles available, this is FPS action at its best!

Post tutorial Report RSS FixupRedirects commandlet

When you Rename an object in the Editor it creates a 'Redirector' that points from the old object location to the new location. This is so that other existing content (maps and packages) can still locate the object at its original location forwarded through the redirector.

Posted by on - Intermediate Mapping/Technical

Tutorial created by DGUnreal for the UTForums. Mirrored here for archival purposes.

Using the FixupRedirects commandlet

When you Rename an object in the Editor it creates a 'Redirector' that points from the old object location to the new location. This is so that other existing content (maps and packages) can still locate the object at its original location forwarded through the redirector.

As an example, if we had a Texture located in a package called MyPackage.upk, in a Group called Textures, with the name of TX_RustMetal_D, it's full path would be:

MyPackage.Textures.TX_RustMetal_D

Any time this texture is used in any Material, this full path to the texture is specified in the Texture Sample's Texture property, such as Texture2D'MyPackage.Textures.TX_RustMetal_D'.

Renaming the TX_RustMetal_D texture to a new location such as DM-MyMap.Textures.TX_RustMetal_D does not fully delete the texture at the original path but instead it leaves behind a redirector at MyPackage.Textures.TX_RustMetal_D that simply points to DM-MyMap.Textures.TX_RustMetal_D.
So any other map or package that was referencing MyPackage.Textures.TX_RustMetal_D will still be referencing that same path. The engine just follows through the redirector located there to the new path at DM-MyMap.Textures.TX_RustMetal_D.

If you move objects from an external package to the map file itself, redirectors may be created which will still be referencing the external package. So even though the objects are seen in the map file in the Generic browser, they are still using redirectors to the original external package.

To fix this and remove the redirectors, the commandlet 'FixupRedirects' must be used.

The 'FixupRedirects' commandlet scans through all of the game packages and attempts to fix up or delete redirects that are no longer required.
There are a few issues with using this command in the current engine builds.

Note: You cannot have a redirector and a new object of the same name, so even if you Rename an object, you cannot create a new object of that original name.

Note: There appears to be some issues and discrepancies with this commandlet and the information on UDN, so if you do not want to have to go through all of the work outlined below, then simply re-import every object that you want directly into the map file itself instead of using any external packages.


Incorrect UDN Information

The UDN incorrectly lists the commandlet information options as of build 3543.
It lists the commandlet sytax as "gamename.exe fixupredirects <package.ext>" which is incorrect.
The optional package to fix is not supported or completed.


Getting Commandlet Help

To get help information on any commandlet, at a command prompt type "ut3.exe help <commandlet>".
For example "ut3.exe help fixupredirects" will display:

Name: Editor.FixupRedirects
Description: @todo
Usage: gamename.exe FixupRedirects
Options:


Getting FixupRedirects to work with UT3

There are some issues with getting the fixupredirects commandlet to work with UT3.


1. FixupRedirects does not scan the My Documents\My Games folders, which is where the custom maps are normally located. You will instead get red text errors stating that the map or package files that are in the My Documents folder are not found.

To get the FixupRedirects to actually scan your custom map or package, it will have to be moved into the actual installed game folder instead of My Documents.

Create a folder called "CustomMaps" under the C:\ <install path> \Unreal Tournament 3\UTGame\CookedPC folder, and copy your map and or packages to this location.

After the FixupRedirects has completed, the repaired packages should be found in the My Documents\...\Published\...\CustomMaps folder. And the original unchanged packages remain in the install path location you copied it to above. You will have to copy your map or package back to the My Documents\...\Unpublished\...CustomMaps folder to continue working or to cook it. I recommend keeping your original uncleaned packages until you are sure that the process completed successfully.

Note that any other custom content that you have in the My Documents\...\CustomMaps folder will still show as red text errors when running the FixupRedirects commandlet. These can be ignored since we are not concerned with fixing those files.


2. Since the optional package name to fixup is not currently supported, FixupRedirects will scan through every package in the Unreal Tournament 3 folders. This means all stock maps and packages will be scanned.

In order to prevent any issues, it is wise to go through all of the folders in the C:\ <install path> \Unreal Tournament 3\UTGame\CookedPC folder and set all of the .upk files to ReadOnly. This includes all of the files in all of the folders such as Characters, CTF_Flags, Effects, Environments, ... etc.

This will prevent the FixupRedirects commandlet from accidentally modifying any of the stock game packages.


3. The Bonus Pack 1 content has redirection and package errors. This will cause the fixupredirects commandlet to display a massive pile of redirect issues and may result in an application failure running the commandlet.

Create a temporary folder on your hard drive, such as C:\Temp\UT3\Maps\.

Move all of the files for C:\ <install path> \Unreal Tournament 3\UTGame\CookedPC\Maps\CTF-FacingWorlds*.* to the temporary folder.

Move all of the files for C:\ <install path> \Unreal Tournament 3\UTGame\CookedPC\Maps\CTF-SearchLight*.* to the temporary folder.

Create a temporary folder on your hard drive, such as C:\Temp\UT3\Packages\.

Move the following two files ASC_Face.upk and Envy_DLC_Effects.upk located in C:\ <install path> \Unreal Tournament 3\UTGame\CookedPC\Packages\ to the temporary folder.

These BonusPack1 maps and packages will have to be moved back to their original folders after you have successfully completed work with the FixupRedirects commandlet.


Running the Commandlet

After you have successfully moved your map or package to the <install path>\CustomMaps folder, set all of the UT3 packages to ReadOnly, and removed the BonusPack1 bad files, you can now run the FixupRedirects commandlet.

Start a command prompt, navigate to the C:\ <install path> \Unreal Tournament 3\Binaries\ folder and type in:

ut3.exe fixupredirects

After a few seconds a dialog window for the application will pop up. It will contains a bunch of status information on all of the packages that it is checking for redirects.
If your map or package is highlighted in green or yellow text, there will be various redirects to be fixed up.
If your map or package is displayed in standard white text, there are no redirects to be fixed.

When the commandlet has completed scanning and fixing up redirectors, it will display any success or failure information.
The repaired packages, if there were any, should have been placed in the My Documents\...\Published\...CustomMaps folder.
Be sure to keep your original packages that you copied to the <install path>\CustomMaps folder in case there were any problems in the fixup.

Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: