No announcement yet.

referencing files in your mod Package...

  • Filter
  • Time
  • Show
Clear All
new posts

    referencing files in your mod Package...

    Hi, I've always had this problem that is starting to really bother me. I don't seem to know the correct syntax for referencing files in a specific location. ie.

    #exec obj load file= .\Textures\myTexurtes.utx

    The question is what is this referencing? The mod's Textures folder or ut2004's? For some reason, Unreal always wants my Animations in ut2004's Animations folder, and sometimes it wants my map in the ut2004 maps folder. As I am writing this I'm even getting more angry as I see inconsistencies in referencing syntax. For example I reference a .psk file by using:

    #exec MESH MODELIMPORT MESH=myMesh MODELFILE=models\myMesh.psk

    this syntax finds the .psk in my Mod's models folder. However, when I want to load an animation or texture package I use the same syntax:

    #exec OBJ LOAD FILE= animations\myAnim.ukx
    #exec OBJ LOAD FILE= textures\myTex.utx

    The problem is that these two look for the packages in ut2004's folders(animations and textures respectively) instead of my Mod's folders.

    HELP!!!!!! I've gotten myself more annoyed trying to explain this problem.

    basically, I would like all my assets in my Mod's folder. even the .u file if possible, but UT2004 doesn't seem to let me. I don't know what I've been doing wrong, and up until now I've compromised and just went along with this ****.


      Are you using UT2004's TC mod architecture?

      If so, keep in mind that the -mod= parameter can (and should) be applied to ucc and unrealed.


        hi, yes I am using ut2004's TC architcecture as described at the UDN Mod Support Page.

        I'm not following the second part of your post. I have a shortcut to my mod which uses the mod switch. ie. c:\ut2004\system\ut2004.exe -mod=myMod.
        Except I use the URL option as well, where I target my map directly before the switch. I don't know how I would apply this to ucc and unrealed. (?)


          Have you added your mod's paths to your folder's MyMod.ini file?


            yes, my Default.ini looks like what is on that page. However, when I open up myMod.ini it looks simply like this


            Is this bad? I though Unreal was supposed to use the default.ini in order to make the myMod.ini at first run?

            Also, I now understand what Slinky730 was saying about using the switch for ucc and UnrealEd. However, when I use it, it doesn't recognize myMod as a package. It doesn't "release", it doesn't show up at all.

            ucc.exe make -mod=myMod


              Make sure you have everything set up per that page, especially the UT2K4Mod.ini file in your mod's root folder. In your mod's default.ini you should have something like this:


              Don't forget the +


                yes, everything is the same...with plus signs.

                But is it important that those entries in default.ini later appear in myMod.ini? Because they don't on mine. They look like this under [Core.System]:


                as you can see, it doesn't reference myMod, then at the bottom, after Supress=Timer, it has an entry:


                that is the only one, which ironically the last entry in the default.ini:



                  How you apply this to ucc is simple- don't worry about it. When you're compiling your mod with UCC, you have to give it -mod=MyMod as an argument, so that it knows where to look for your art resources. when you originally open unrealEd, you have to give it -mod=MyMod for the same reason.


                    Hi, yes Slinky, I've tried that and the compiler seems to always ignore my mod when I use the switch. it just skips right over it (not even a "release")as if it was not put into the editpackages in the default .ini. which it is. I refer to the script package. ie.


                    I even just reinstalled ut2004 and then installed the v3339 patch, still doesn't work.


                      ok...i figured out one part. For some reason, the default.ini and the ut2004.ini weren't being merged correctly, and the :


                      was not being added to the myMod.ini at first run. So I had to type it in manually.

                      However, I'm still getting "unresolved references" when I compile. I guess what I don't understand is where the origin is. If I say "../textures/myTextures.utx" in my code , from where is this coming from? and is it referencing ut2004's Texture folder, or myMod's Texture folder? and so on "./Textures/myTextures.utx" or "/Textures/myTextures.utx" ????? I've tested them all, and none seem to work.


                        No, you're missing it. Still. Erase everything you know, and pay attention.

                        In your MOD, you have a System folder. It has a Default.ini and DefUser.ini in it. When you fire up the game with the -Mod= switch, the game loads the ini file from this folder. If one does not exist, it uses the settings from the UT2004.ini and merges the default.ini in your mods system folder with it. You add your editpackages with the + so that the merge adds yours to the end, and not just adds the last one. This does NOT modify the UT2004.ini AT ALL, it is used to create the ini file for your mod.

                        It only does this when the ini file does NOT exist. If you delete the ini file, and start the game with the -Mod= switch, a new one will be created for you. If you add something to your Default.ini and dont delete your mods ini file, it will NOT merge those changes. If your editpackages are not added, you are doing something wrong. Dont type it in yourself, fix the problem or anyone who installs your mod later on wont be able to get it to work, and they wont want to type anything anywhere, and they will delete your mod because it sucks.

                        When you do a #Exec OBJ LOAD FIle= you only need to add the file name, not the path. For example: #EXEC OBJ LOAD FILE=LastManStanding.utx. If your ini file is correct, ucc will find the file. However, ucc checks the UT2004 directories first, so make sure to add your packages in your mod subfolders ONLY, otherwise ucc uses the file in the UT2004 directories.

                        When you do an Import is when you want to have a path. You dont want raw data included with your packages, so you put them in a folder alongside your .uc classes, and import them with relative paths. For example: #exec Texture Import File=Textures\S_Actor.pcx Name=S_Actor Mips=Off MASKED=1. The path starts in the current package directory, and is relative to it.

                        This way, when you compile with the -Mod= switch, ucc loads your ini file and NOT the UT2004 ini file (which your ini file inherits from). Therefore, any resource folders NOT in your ini file (and not inherited from the UT2004 ini), arent loaded.


                          Bonehead, thanks a lot for your thorough response. It turns out that I'm just a moron. My default.ini and the ut2004.ini was being merged correctly to produce a myMod.ini. However, instead of looking all the way at the end of the entire list for the EditPackages=MyMod, I was just looking at the end of the list of EditPackages. so it was most likely there all along and it was just my targeting code that was screwy.

                          As far as targeting files, thanks, I had never seen that explained before. So should I put raw data(.bmp,.psk,etc.) in a folder(s) inside of my 'classes' folder? Like I could make a folder called 'RawData' and refer to it in code as:

                          Import File=RawData\myTEX.bmp

                          When you say "current" package directory, I'm not sure if you mean the script package or the myMod package. if It's the myMod package then I guess the correct way would be:

                          Import File=Classes\RawData\myTEX.bmp


                            I figured out my last question about targeting. It compiles correctly, but the .u file still compiles to ut2004/system instead of myMod/system. slight annoyance, but much better.


                              No, put the raw data in a folder next to your classes folder. So you have MyMod, and then MyPackage, and you have Classes (.uc), Textures (.bmp, .tga), Models (.lwo), Cows (.moo?), Chickens (.cluck?), etc. in your MyPackage directory.

                              If your .u files are going to your UT2004/System directory, you are doing something wrong. Either your mod is in your UT2004 edit packages as well (likely the case), or your mod doesnt have a System folder defined (maybe?), or you are not compiling with the -Mod= extension.