No announcement yet.

Getting Started Compiling a Mod

This is a sticky topic.
  • Filter
  • Time
  • Show
Clear All
new posts

    Specifying -nohomedir might work but I haven't tried it.


      After using it for about a week, I am starting to appreciate the My Games area... I didn't realize at first that you no longer need to put mutators and u files into the game installation area... everything stays in the custom folders.

      This is good cuz UT2004 had soo much **** in the system folder that I was never sure what it was and was afraid to delete things cuz i didn't want to remove any core files.

      I think tho, that the installer should at least ask you where you want to keep the custom stuff, rather than use the evil M$ laden provided space.

      Keep in mind tho that if you want to use things in a game you don't want to use the "useunpublished" switch... you need to create a "Published" folder under MyDocs\MyGames\UT3\UTGame\ and out the u files there. You could also make a new CookedPC folder under that but it doesn't appear to be necessary, just as long as it is under "Published" it seems to work.

      This new structure really needs to be more well defined.


        For released mods the MyGames folder is fine, but for development i find it a bit inconvenient.


          More help getting started? Specific questions...

          Is there a simple tut somewhere that would explain how to do something basic with the new system? I am watching all the editor videos, but these really don't talk about coding structure, etc.

          Say, I wanted to take the rocket launcher, do something simple like change the color of it's skin, and then play with some of it's projectile coding. I would like to make a remake of the OMFG from UT2K4 just to use as a learning experience and to get used to the new program.

          So...I would have to start by making a OMFG directory....but where? Do I put it here:

          My Documents\My Games\Unreal Tournament 3\UTGame\Unpublished\CookedPC

          or here:

          C:\Program Files\Unreal Tournament 3\UTGame\CookedPC

          Then I create a subdirectory of that named Classes. I would then put the .u files that I am modifying in this directory correct? So for making changes to the rocket launcher I would use the file UTWeap_RocketLauncher.uc as reference.

          Now...because it is a new weapon, should I rename UTWeap_RocketLauncher.uc to OMFG.uc and change all the class references inside the file to

          class OMFG extends weapon

          or is just extending from UTWeap_RocketLauncher.uc better????

          Now for changing the fire mode or something with the projectiles I would have to add more .uc files that make the changes to those...I think I can figure out that stuff.

          For changing the color, is it as simple as the statement I found in the default properties:


          In the past I would have looked for which texture was called out, then went into the editor and exported the texture, photo-shopped it, and then reimported it into the package. Now...with the way materials are being used, that is all different I believe. I don't even see a texture called out in the code. I'm used to seeing redskin=texture('blah').

          So...lets say I have my changes made and I am ready to try and compile them. What is the directory I need to be in and what exactly do I type to compile the scripts? Are there switches to use with the compile command?

          When I compile, I suppose it gives me a .u file and a .ini file?? Where do I place them then to be able to test them in game?

          If I can get help on these questions, I will start to put together a tutorial for future coders that need help getting started like myself. I want to do this first and then look at doing a real simple vehicle to get working with vehicles down.

          Oh... one more question. If I downloaded a mod that someone else compiled. How can I decompile that .u file to .uc files? This would be a way to see how other people are structuring their scripts, so I have some frame of reference.

          Thanks for any help!



            Oh... one more question. If I downloaded a mod that someone else compiled. How can I decompile that .u file to .uc files? This would be a way to see how other people are structuring their scripts, so I have some frame of reference.
            I don't think that has ever been possible, you'd just have to ask for it at the creators.

            And you have to put the files in here: My Documents\My Games\Unreal Tournament 3\UTGame\Src

            So that would be My Documents\My Games\Unreal Tournament 3\UTGame\Src\MyMutator\Classes

            The other things are good questions.


              I don't think that has ever been possible
              I figured out most of it...look here:



                As it seems I'm not the only one that was lost in the structure... I will try to put up some tutorial of the structure, as best as I know it so far.

                Step 1:
                Never Touch the Game Install folder!

                Step 2:
                Assume for this tutorial that the Game install directory is:
                C:\Program Files\Unreal Tournament 3\
                and the user path is:
                C:\My Documents\My Games\Unreal Tournament 3\UTGame

                Step 3:
                Open UED for UT3. Goto View->Browser Windows->Actor Classes

                Step 4:
                From the Actor Class Browser, goto File->Export All Scripts
                This will take about 3-5 minutes and UED may seem frozen during this time.
                Check your "user path" for a folder named "ExportedScript", that should start updating with script files for each of the games U files.

                Step 5:
                While waiting for Step 4 to complete, or even after it is done, create the following folders (if they don't already exist):
                C:\My Documents\My Games\Unreal Tournament 3\UTGame\Src
                C:\My Documents\My Games\Unreal Tournament 3\UTGame\UnPublished
                C:\My Documents\My Games\Unreal Tournament 3\UTGame\Published

                The Src directory is where you make mutators. Similar to the previous games, you create a folder named the same as you want the U file to have. Lets say "MyMut"
                So create the following structures:
                C:\My Documents\My Games\Unreal Tournament 3\UTGame\Src\MyMut\
                C:\My Documents\My Games\Unreal Tournament 3\UTGame\Src\MyMut\Classes\

                The Unpublished directory is where compiled code goes. When you run "Make" it will compile the script files and output a U file inside a "CookedPC" directory. This is the "temporary" area for keeping your test versions and stuff.

                The Published directory is where you put final stuff to play normally. Whenever you download a mutator from the internet, you would put that U file here. The mutator will likely come with a UTMyMut.ini file. You would put that file here:
                C:\My Documents\My Games\Unreal Tournament 3\UTGame\Config\

                The Config file is the equivalent of the .int file from the other games. It has the information that the game needs to see it in the mutator list, the description, as well as find its In-game configuration menu (if any).

                Step 6:
                By now, UED for UT3 should be done exporting all scripts and you should see all the files in your C:\My Documents\My Games\Unreal Tournament 3\UTGame\ExportedScript folder.

                Step 7:
                If you want to export other U files that weren't in the game directory, like other mutators, etc. You would open a Cmd prompt and run this command:
                "C:\Program Files\Unreal Tournament 3\Binaries\UT3.exe" BatchExport path\to\u\file.u class .uc path\to\destination\folder
                For example:
                "C:\Program Files\Unreal Tournament 3\Binaries\UT3.exe" batchexport C:\MyMut.U class .uc "D:\My Documents\My Games\Unreal Tournament 3\UTGame\ExportedScript\MyMut\Classes\"
                Or you can make a batch file like this:
                "C:\Program Files\Unreal Tournament 3\Binaries\UT3.exe" batchexport %1 class .uc "D:\My Documents\My Games\Unreal Tournament 3\UTGame\ExportedScript\~$n1\Classes\"
                and just drag and drop the u file on top of the batch file. It will put all extracted files in the "Custom" folder. Modify this file to export other things besides class (images, smesh, etc)

                Step 8:
                When you are ready to compile your mutator using "Make" you need to perform the following steps:
                1. Open your C:\My Documents\My Games\Unreal Tournament 3\UTGame\Config\UTEditor.ini file and look for [ModPackages]
                2. Add a line under that header (the name matches the mutator folder name):
                3. Open a cmd prompt and run (including quotes):
                  "C:\Program Files\Unreal Tournament 3\Binaries\UT3.exe" Make

                That may take about 10-20 secs before it starts but then it will compile just like ucc did in the older games.

                Remember "Make" isn't folder specific, you can't tell the game to only "MAKE" one folder, it needs to run all the packages to understand it all. So make doesn't need anything passed into it.

                You can also make a shortcut of the UT3.exe file and edit the command line to add make at the end (outside of the existing quotes)

                Also note that "Make" will auto-create a UTMyMut.ini file. This file automatically goes into your user path "Config" folder. Be sure to include this file along with the U file when creating a zip package to share your mutator on the web.


                  Thank you, Thank you, Thank you!!!!!!!!!!!!

         are kool!! This is exactly what I was looking for. I'm eating Turkey at a family get together, but when I get back home I will set up my directory structure and start doing some modding!!

                  Excellent Tutorial on the directory structure!


                    Now that we have mutators? How do we make them work on our servers? Is there a "ServerPackages" area? I haven't found one.


                      It should just work on a server. You don't need to do anything to make it download, etc.


                        Fantastic! That was UT99 and UT200x greatest annoyance.. So now if a mutator is running the client will auto-download it? UT3 is indeed great!


                          can some one tell me the correct directory setup for a mod eg for maps and custom packages and how to link them all up cheers


                            Read my tutorial about 5 posts back for packages..
                            Read this tutorial for maps


                              yep the same mud as on udn, lets see if i can make it clearer, our mod will have maps, characters, weapons, vehicles, pickups, Environments, effects basically its a TC but expanding on UT3 code. in the unpublished/cookedpc folder there are only folders for CustomChars + CustomMaps, do i have to follow this example and make the folders CustomEnvir CustomEffe etc...
                              according to udn you have to make a extra folder
                              For your level to be visible in the game menus, it needs to be saved in a subdirectory of CustomMaps?. Anything saved directly in the CustomMaps? directory itself will be ignored. So, you’ll want create a directory that is appropriate to your mod name
                              so would that then be for me CustomMaps/UT40k or CustomMaps/UT40kmaps, i take it that this should apply to the other folders as well


                                Good question. Can you export anything else other than uc files from UED? maybe try that and follow the directory structure that it uses.