There is no spoon

Difference between revisions of "UE2:Using the UT2004 mod system"

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
m
(Still very WIP, will get on this some time later. Comments more than welcome :))
(One intermediate revision by one other user not shown)
Line 1: Line 1:
 
These [[Legacy:Basic Procedure|basic procedure]]s will show you how the unreal engine works with directories and how to setup your modification so it will use the '''mod system'''. This will keep your modification seperate to [[Legacy:UT2004|UT2004]] and allow you to work with greater ease and effiency on bigger mods. Personally I always use this as it keeps my base directory free from clutter although if you are working on something smaller like a mutator or gametype you may not need to use this. The best use for this is in '''total conversion''' situations where you modification will take up alot of room and have many [[Legacy:Package|package]]'s.
 
These [[Legacy:Basic Procedure|basic procedure]]s will show you how the unreal engine works with directories and how to setup your modification so it will use the '''mod system'''. This will keep your modification seperate to [[Legacy:UT2004|UT2004]] and allow you to work with greater ease and effiency on bigger mods. Personally I always use this as it keeps my base directory free from clutter although if you are working on something smaller like a mutator or gametype you may not need to use this. The best use for this is in '''total conversion''' situations where you modification will take up alot of room and have many [[Legacy:Package|package]]'s.
  
The mod system is accessed through the use of
+
==Basic Setup==
  
'''ut2004.exe -mod="your mod"'''
+
===Mod System Directory Structure===
 +
:[[Legacy:Engine_Directory_Structure|Engine_Directory_Structure]] - First we'll start with a rundown of the unreal engines directory structure.
  
'''ucc.exe -mod="your mod"'''
+
:Assuming your [[Legacy:Base Directory|Base Directory]] is C:\ut2004\
 +
::'''your mod's''' directory structure would look like this:<br>
 +
:::C:\ut2004\'''YourMod'''\<br>
 +
:::C:\ut2004\'''YourMod\System'''<br>
 +
:::C:\ut2004\'''YourMod\Help'''<br>
 +
:::C:\ut2004\'''YourMod\Maps'''<br>
 +
:::C:\ut2004\'''YourMod\Textures'''<br>
 +
:::C:\ut2004\'''YourMod\Sounds'''<br>
 +
:::C:\ut2004\'''YourMod\Music'''<br><br>
  
'''unrealed.exe -mod="your mod"'''  
+
===Setting Up Package Folders===
 +
:[[Legacy:Set_Up_Package_Folders|Set_Up_Package_Folders]] - Then we examine how to setup [[Legacy:Package|package]]'s so you can compile, '''Not really related to mod system'''
  
I have found that in unreal ed it does not default to '''your mod's''' directories, so keep an eye on that when saving anything from maps or packages. If there is a way to fix this please let me know.
+
::For Unreal Script [[Legacy:Class|Classes]] you will need to first make the [[Legacy:Package|package]]'s folder and then then the [[Legacy:Class|Classes]] folder. The following eg shows the package folders being '''YourModCode''' and '''YourModGUI''':<br>
 +
:::C:\ut2004\'''YourMod\YourModCode\'''          <&ndash; a UnrealScript package for your mod<br>
 +
:::C:\ut2004\'''YourMod\YourModCode\Classes'''  <&ndash; put you source code here<br>
 +
:::C:\ut2004\'''YourMod\YourModGUI\'''          <&ndash; another UnrealScript Package<br>
 +
:::C:\ut2004\'''YourMod\YourModGUI\Classes'''<br><br>
  
===Basic Setup===
+
===EXEC Directive===
 +
:Using the [[Legacy:Exec_Directive|Exec Directive]] you can also import assets such as [[Legacy:Sounds|sounds]] and [[Legacy:Texture|textures]] into a package file. You do this using both the [[Legacy:Exec_Directive|Exec Directive]] and the appropriate directories.<br>
 +
::C:\ut2004\'''YourMod\YourModCode\Sounds'''  <&ndash; put the sounds you wish to import into the package here <br>
 +
::C:\ut2004\'''YourMod\YourModCode\Textures'''  <&ndash; put the textures you wish to import into the package here <br><br>
  
[[Legacy:Engine_Directory_Structure|Engine_Directory_Structure]] - First we'll start with a rundown of the unreal engines directory structure.
+
===INI Files===
 +
:*[[Legacy:UT2k4Mod.Ini|UT2k4Mod.Ini]] - We start to get into how to setup '''your mod''' to be accessed from the community panel in [[Legacy:UT2004|UT2004]].
 +
:*[[Legacy:UT2k4 Default.Ini|UT2k4 Default.Ini]] - This will show you how to setup '''your mod's default.ini''' file so you can use it to compile. <br><br>
  
[[Legacy:Set_Up_Package_Folders|Set_Up_Package_Folders]] - Then we examine how to setup [[Legacy:Package|package]]'s so you can compile.
+
===LOG Files===
 +
{{ambox|type=notice|text=When running with mod support, the main .log files will be placed in your mod's System directory by default and be called <ModNamer>.Log (ie: MyMod.log). All other secondary log files (such as ucc.log) will still be created in the game's System directory.}} <br><br>
  
[[Legacy:UT2k4Mod.Ini|UT2k4Mod.Ini]] - We start to get into how to setup '''your mod''' to be accessed from the community panel in [[Legacy:UT2004|UT2004]].
+
===Running the game with the mod system===
 +
{{ambox|type=notice|text=The mod system is accessed through the use of '''-mod=''' commandline switch
 +
C:\ut2004\ut2004.exe -mod='''your mod'''
  
[[Legacy:UT2k4 Default.Ini|UT2k4 Default.Ini]] - This will show you how to setup '''your mod's default.ini''' file so you can use it to compile. 
+
C:\ut2004\ucc.exe -mod='''your mod'''
  
[[Legacy:Compiling_With_UCC|Compiling_With_UCC]] - Lastly to round things off we take a look at how to compile using '''ucc.exe'''
+
C:\ut2004\unrealed.exe -mod='''your mod'''}}
 +
 +
{{ambox|type=notice|text=I have found that in unreal ed it does not default to '''your mod's''' directories, so keep an eye on that when saving anything from maps or packages. If there is a way to fix this please let me know.}}<br><br>
  
===Intermediate===
+
==Commandlet's==
 +
:*[[Legacy:Compiling_With_UCC|Compiling_With_UCC]] - Lastly to round things off we take a look at how to compile using '''ucc.exe'''
  
Commandlets can be very useful to UScripters, providing automated tasks so you dont have to repetativly do things by hand, The Export Cache commandlet is one example of this. These can also be used to provide language support for various nations.
+
{{ambox|type=notice|text=The mod system is accessed through the use of '''-mod=''' commandline switch
 +
C:\ut2004\ucc.exe -mod='''your mod'''}}
  
[[Legacy:DumpIntCommandlet|DumpIntCommandlet]]
+
:*[[Legacy:Commandlet|Commandlet]]s can be very useful to UScripters, providing automated tasks so you dont have to repetativly do things by hand, The Export Cache [[Legacy:Commandlet|commandlet]] is one example of this. These can also be used to provide language support for various nations.
  
[[Legacy:ExportCacheCommandlet|ExportCacheCommandlet]]
+
{{ambox|type=notice|text=Starting with the latest patch, UT2004 can correctly locate and use .int and .ucl files stored in your mod's System directory (or in the case of .ucl whichever directory is specified by the CacheRecordPath array). But, it does require some work on your part.}}<br><br>
  
===Custom Characters===
+
===DumpInt===
 +
:*[[Legacy:DumpIntCommandlet|DumpIntCommandlet]] - will always create the new .int files in the game's System directory. This is an unfortunate outcome, but changing it would have proven difficult at this time.<br><br>
  
You may want to add custom characters or even custom species type to your total conversion, lucky there is a simple way to set it up. Its called the Unreal Player List.
+
===ExportCache===
 +
:*[[Legacy:ExportCacheCommandlet|ExportCacheCommandlet]] - will create the .ucl files in the first directory found in the CacheRecordPath array. Using the trick above, you can force it to use your directory, but that’s un supported. As a general rule, you will have to hand copy these files in to their proper place. Sorry.<br><br>
  
There is special logic built in to the latest patch to make UPL files mod friendly. It works as follows:
+
==Custom Characters==
  
When the cache manager searches for UPL files, it traverses the Paths array in reverse (bottom to top) and it checks either directory for .UPL files adding any it finds to it’s cache. When it reaches the game's System, the following occurs:
+
You may want to add custom characters or even custom species type to your total conversion, lucky there is a simple way to set it up. Its called the Unreal Player List.
  
If you are not running with a mod, it will scan the directory as normal.  
+
{{ambox|type=notice|text=There is special logic built in to the latest patch to make UPL files mod friendly. It works as follows:
  
If you are running a mod, no .upl files have been found already, it will scan the directory as normal.  
+
When the cache manager searches for UPL files, it traverses the Paths array in reverse (bottom to top) and it checks either directory for .UPL files >adding any it finds to it’s cache. When it reaches the game's System, the following occurs:
 +
 +
'''1.''' If you are not running with a mod, it will scan the directory as normal.
 +
 +
'''2.''' If you are running a mod, no .upl files have been found already, it will scan the directory as normal.
  
If you are running a mod, and the game has already found even a single .upl file, it will skip the default System directory.  
+
'''3.''' If you are running a mod, and the game has already found even a single .upl file, it will skip the default System directory.
 +
 +
In a nutshell, this means that if you have a mod that uses both your own custom .upl files and you want to allow them to use the default characters, you will need to include a copy of the original .upl files with your mod.}}
  
In a nutshell, this means that if you have a mod that uses both your own custom .upl files and you want to allow them to use the default characters, you will need to include a copy of the original .upl files with your mod.
+
:*[[Legacy:UPL_File|UPL_File]]
 +
:*[[Legacy:Defining_SpeciesTypes|Defining_SpeciesTypes]]<br><br>
  
[[Legacy:UPL_File|UPL_File]]
+
==Advanced Importing==
 
+
[[Legacy:Defining_SpeciesTypes|Defining_SpeciesTypes]]
+
 
+
===Advanced Importing===
+
 
+
When working with large amounts of assets it might be alittle overwhelming to do this by hand through unrealed. Now alot of the time unrealed will let you import multiple files at once but sometimes it is much easier done on the command line. It free's up valuable memory that can be used to get the process done quicker without the overhead of the full editor open.
+
  
 
[[Legacy:Exec_Directive|Exec_Directive]]
 
[[Legacy:Exec_Directive|Exec_Directive]]
 +
When working with large amounts of assets it might be alittle overwhelming to do this by hand through unrealed. Now alot of the time unrealed will let you import multiple files at once but sometimes it is much easier done on the command line. It free's up valuable memory that can be used to get the process done quicker without the overhead of the full editor open.<br><br>
  
===External Links and Other useful Links===
+
==External Links and Other useful Links==
 
+
[[udn2:ImprovedModSupport]]
+
 
+
http://geeks.beyondunreal.com/ut2004/docs-modsystem.php
+
 
+
[[Legacy:Making_Mods|Making_Mods]]
+
 
+
[[Legacy:Mod_Authoring|Mod_Authoring]]
+
 
+
==Discussion==
+
  
'''OlympusMons:'''Ok so I created this page to pull all the mod system stuff together into a format I can use to make a tutorial. Alot of it is in basic prodecure type pages but I think it'll work very well like that. Im going to work a bit more on this page dont worry, if there is another page on this topic and I missed it please let me know and I'll give this a deleteme. Im hoping to add it to the [[Legacy:UnrealScript_Lessons|UnrealScript_Lessons]] page when Im finsihed.
+
:*[[udn2:ImprovedModSupport|Improved Mod Support]]
 +
:*[[Legacy:Making_Mods|Making Mods]]
 +
:*[[Legacy:Mod_Authoring|Mod Authoring]]

Revision as of 17:29, 25 April 2008

These basic procedures will show you how the unreal engine works with directories and how to setup your modification so it will use the mod system. This will keep your modification seperate to UT2004 and allow you to work with greater ease and effiency on bigger mods. Personally I always use this as it keeps my base directory free from clutter although if you are working on something smaller like a mutator or gametype you may not need to use this. The best use for this is in total conversion situations where you modification will take up alot of room and have many package's.

Basic Setup

Mod System Directory Structure

Engine_Directory_Structure - First we'll start with a rundown of the unreal engines directory structure.
Assuming your Base Directory is C:\ut2004\
your mod's directory structure would look like this:
C:\ut2004\YourMod\
C:\ut2004\YourMod\System
C:\ut2004\YourMod\Help
C:\ut2004\YourMod\Maps
C:\ut2004\YourMod\Textures
C:\ut2004\YourMod\Sounds
C:\ut2004\YourMod\Music

Setting Up Package Folders

Set_Up_Package_Folders - Then we examine how to setup package's so you can compile, Not really related to mod system
For Unreal Script Classes you will need to first make the package's folder and then then the Classes folder. The following eg shows the package folders being YourModCode and YourModGUI:
C:\ut2004\YourMod\YourModCode\ <– a UnrealScript package for your mod
C:\ut2004\YourMod\YourModCode\Classes <– put you source code here
C:\ut2004\YourMod\YourModGUI\ <– another UnrealScript Package
C:\ut2004\YourMod\YourModGUI\Classes

EXEC Directive

Using the Exec Directive you can also import assets such as sounds and textures into a package file. You do this using both the Exec Directive and the appropriate directories.
C:\ut2004\YourMod\YourModCode\Sounds <– put the sounds you wish to import into the package here
C:\ut2004\YourMod\YourModCode\Textures <– put the textures you wish to import into the package here

INI Files

  • UT2k4Mod.Ini - We start to get into how to setup your mod to be accessed from the community panel in UT2004.
  • UT2k4 Default.Ini - This will show you how to setup your mod's default.ini file so you can use it to compile.

LOG Files



Running the game with the mod system



Commandlet's

  • Compiling_With_UCC - Lastly to round things off we take a look at how to compile using ucc.exe
  • Commandlets can be very useful to UScripters, providing automated tasks so you dont have to repetativly do things by hand, The Export Cache commandlet is one example of this. These can also be used to provide language support for various nations.



DumpInt

  • DumpIntCommandlet - will always create the new .int files in the game's System directory. This is an unfortunate outcome, but changing it would have proven difficult at this time.

ExportCache

  • ExportCacheCommandlet - will create the .ucl files in the first directory found in the CacheRecordPath array. Using the trick above, you can force it to use your directory, but that’s un supported. As a general rule, you will have to hand copy these files in to their proper place. Sorry.

Custom Characters

You may want to add custom characters or even custom species type to your total conversion, lucky there is a simple way to set it up. Its called the Unreal Player List.

Advanced Importing

Exec_Directive When working with large amounts of assets it might be alittle overwhelming to do this by hand through unrealed. Now alot of the time unrealed will let you import multiple files at once but sometimes it is much easier done on the command line. It free's up valuable memory that can be used to get the process done quicker without the overhead of the full editor open.

External Links and Other useful Links