Announcement

Collapse
No announcement yet.

referencing files in your mod Package...

Collapse
X
 
  • 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.

    #2
    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 ****.

    Comment


      #3
      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.

      Comment


        #4
        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. (?)

        Comment


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

          http://udn.epicgames.com/Two/Improve...t#System_Files

          Comment


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

            [Core.System]
            Paths=../System/*.u
            Paths=../Maps/*.ut2
            etc.

            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

            Comment


              #7
              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:

              [Core.System]
              +Paths=../MyMod/System/*.u
              +Paths=../MyMod/Textures/*.utx
              +Paths=../MyMod/StaticMeshes/*.usx
              +Paths=../MyMod/Maps/*.ut2


              Don't forget the +

              Comment


                #8
                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]:

                Paths=../System/*.u
                Paths=../Animations/*.ukx
                Paths=../Textures/*.utx
                etc.

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

                +Paths=../MyMod/Animations/*.ukx

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

                +Paths=../MyMod/Animations/*.ukx

                Comment


                  #9
                  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.

                  Comment


                    #10
                    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.

                    [Editor.EditorEngine]
                    +EditPackages=myModCode


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

                    Comment


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

                      [Editor.EditorEngine]
                      +EditPackages=myModCode

                      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.

                      Comment


                        #12
                        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.

                        Comment


                          #13
                          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

                          Comment


                            #14
                            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.

                            Comment


                              #15
                              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.

                              Comment

                              Working...
                              X