Worst-case scenario: the UEd Goblin wipes the map and burns down your house.

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

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
m
 
(24 intermediate revisions 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 [[Unreal_Wiki:Basic_procedures|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 separate from [[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|packages]].
  
 
==Basic Setup==
 
==Basic Setup==
 +
For all of the following we will assume your [[Legacy:Base Directory|Base Directory]] is '''C:\ut2004\'''
  
 
===Mod System Directory Structure===
 
===Mod System Directory Structure===
:[[Legacy:Engine_Directory_Structure|Engine_Directory_Structure]] - First we'll start with a rundown of the unreal engines directory structure.
+
:[[Legacy:Engine_Directory_Structure|Engine Directory Structure]] - First we'll start with a rundown of the unreal engines directory structure.
  
:Assuming your [[Legacy:Base Directory|Base Directory]] is C:\ut2004\
+
:'''your mod''' being the name of the modification, '''your mods''' directory structure would look like this:<br>
::'''your mod's''' directory structure would look like this:<br>
+
::C:\ut2004\'''YourMod'''\<br>
:::C:\ut2004\'''YourMod'''\<br>
+
::C:\ut2004\'''YourMod\System'''<br>
:::C:\ut2004\'''YourMod\System'''<br>
+
::C:\ut2004\'''YourMod\Help'''<br>
:::C:\ut2004\'''YourMod\Help'''<br>
+
::C:\ut2004\'''YourMod\Maps'''<br>
:::C:\ut2004\'''YourMod\Maps'''<br>
+
::C:\ut2004\'''YourMod\Textures'''<br>
:::C:\ut2004\'''YourMod\Textures'''<br>
+
::C:\ut2004\'''YourMod\Sounds'''<br>
:::C:\ut2004\'''YourMod\Sounds'''<br>
+
::C:\ut2004\'''YourMod\Music'''<br>
:::C:\ut2004\'''YourMod\Music'''<br><br>
+
 
 +
====Running the game using YourMod====
 +
:The mod system is accessed through the use of '''-mod=''' commandline switch<br>
 +
::C:\ut2004\ut2004.exe -mod='''YourMod'''<br>
 +
::C:\ut2004\unrealed.exe -mod='''YourMod'''<br>
 +
 +
{{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>
  
 
===Setting Up Package Folders===
 
===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.
+
:[[Legacy:Set_Up_Package_Folders|Set Up Package Folders]] - Then we examine how to setup [[Legacy:Package|package's]] so you can compile.
  
::For Unreal Script [[Legacy:Class|Classes]] you will need to first make the [[Legacy:Package|package]]'s folder and then the [[Legacy:Class|Classes]] folder. The following eg shows the package folders being '''YourModCode''' and '''YourModGUI''':<br>
+
:For Unreal Script [[Legacy:Class|Classes]] you will need to first make the [[Legacy:Package|package's]] folder and then the [[Legacy:Class|Classes]] folder. The following eg shows the package folders being '''YourModPackage''':<br>
:::C:\ut2004\'''YourMod\YourModCode\'''          <&ndash; a UnrealScript package for your mod<br>
+
::C:\ut2004\'''YourMod\YourModPackage\'''          '''<&ndash;''' ''UnrealScript package for your mod''
:::C:\ut2004\'''YourMod\YourModCode\Classes'''  <&ndash; put you source code here<br>
+
::C:\ut2004\'''YourMod\YourModPackage\Classes'''  '''<&ndash;''' ''put you source code here''<br>
:::C:\ut2004\'''YourMod\YourModGUI\'''          <&ndash; another UnrealScript Package<br>
+
:::C:\ut2004\'''YourMod\YourModGUI\Classes'''<br><br>
+
  
 
===EXEC Directive===
 
===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>
+
: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\YourModPackage\Models'''  <&ndash; put the models 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>
+
::C:\ut2004\'''YourMod\YourModPackage\Sounds'''  <&ndash; put the sounds you wish to import into the package here <br>
 +
::C:\ut2004\'''YourMod\YourModPackage\Textures'''  <&ndash; put the textures you wish to import into the package here <br>
 +
 
 +
:The [[Legacy:Exec_Directive|Exec Directive]] is not only used when you want to import assets with your script into your *.u files it is also useful when working with a large number 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 can free up valuable memory that can be used to get the process done quicker without the overhead of the full editor open.<br>
  
 
===INI Files===
 
===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]].
+
:[[UE2: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>
+
:This file should be place in the following directory:<br>
 +
::C:\ut2004\'''YourMod'''
 +
:[[UE2:UT2004 Default.ini|UT2004 Default.ini]] - This will show you how to setup '''your mod's default.ini''' file so you can use it to compile.
 +
:This file should be place in the following directory:<br>
 +
::C:\ut2004\'''YourMod\System'''<br>
 +
:[[UE2:UT2004 DefaultUser.ini|DefaultUser.ini]] - Functions very similarly to [[UE2:UT2004 Default.ini|UT2004 Default.ini]].
 +
:This file should be place in the following directory:<br>
 +
::C:\ut2004\'''YourMod\System'''<br>
 +
 
 +
{{ambox|type=notice|text=For '''*.upl''' files Ive found if you have your mods system directory before your ut2004 one it will not use the files located in the ut2004\system directory, it instead uses only the ones found in the ''mod system directory''.}}
  
 
===LOG Files===
 
===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:Log_Warnings|Log Warnings]]<BR>
 +
:[[Legacy:Log_File|Log File]]<BR>
  
===Running the game with the mod system===
+
:When running with the '''-mod=''' commandline switch .log files will be place in the following directory:<br>
{{ambox|type=notice|text=The mod system is accessed through the use of '''-mod=''' commandline switch
+
::C:\ut2004\'''YourMod\System'''<br>
C:\ut2004\ut2004.exe -mod='''your mod'''
+
:All other secondary log files (such as ucc.log) will still be created in:<br>
 
+
::C:\ut2004\System<br><br>
C:\ut2004\ucc.exe -mod='''your mod'''
+
 
+
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>
+
  
 
==Commandlet's==
 
==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'''
+
[[Legacy:Commandlet|Commandlet]]s can be very useful to UScripters, providing automated tasks so you dont have to repetativly do things by hand.
  
{{ambox|type=notice|text=The mod system is accessed through the use of '''-mod=''' commandline switch
+
{{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.}}
C:\ut2004\ucc.exe -mod='''your mod'''}}
+
  
:*[[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.
+
===Make===
 +
:[[Legacy:Compiling_With_UCC|Compiling With UCC]] - Lastly to round things off we take a look at how to compile using '''ucc.exe'''
  
{{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>
+
====Compiling YourMod====
 +
:The mod system is accessed through the use of '''-mod=''' commandline switch<br>
 +
::C:\ut2004\ucc.exe ''make'' -mod='''YourMod'''
 +
:This will Compile all *.UC files found in your Package directories to:
 +
::C:\ut2004\'''YourMod\System'''<br>
  
 
===DumpInt===
 
===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>  
+
:[[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.
 +
 
 +
:[[Legacy:INT_File|INT Files]] are used for [[Legacy:Localization|Localization]], '''INT''' being an acronym for international english.<br>
 +
 
 +
====Dumping an int file for YourModPackage====
 +
:The mod system is accessed through the use of '''-mod=''' commandline switch<br>
 +
::C:\ut2004\ucc.exe ''dumpint'' -mod='''YourMod''' C:\ut2004\'''YourMod\System\YourModPackage.u'''<br>
 +
 
 +
{{ambox|type=serious|text=
 +
ucc.exe dumpint Pkg.u -mod=ModName exports to UT2004 System dir.<br>
 +
ucc.exe dumpint Pkg.u -MOD=ModName says "No packages found matching -MOD=ModName!" then exports to UT2004 System dir.}}<br>
  
 
===ExportCache===
 
===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>  
+
:[[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.
 +
 
 +
====Exporting Cache for YourModPackage====
 +
:The mod system is accessed through the use of '''-mod=''' commandline switch<br>
 +
::C:\ut2004\ucc.exe ''exportcache'' -v -mod='''YourMod''' C:\ut2004\'''YourMod\System\YourPackage.u'''<br><br>
  
 
==Custom Characters==
 
==Custom Characters==
Line 82: Line 113:
 
:*[[Legacy:Defining_SpeciesTypes|Defining_SpeciesTypes]]<br><br>
 
:*[[Legacy:Defining_SpeciesTypes|Defining_SpeciesTypes]]<br><br>
  
==Advanced Importing==
+
{{ambox|type=notice|text=Ut2k4 will find karma(*.ka) and deafult player(*.upl) Files automatically when using the '''-mod=''' Switch.}}
 
+
[[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>
+
  
 
==See Also==
 
==See Also==
Line 92: Line 120:
 
:*[[Legacy:Making_Mods|Making Mods]]
 
:*[[Legacy:Making_Mods|Making Mods]]
 
:*[[Legacy:Mod_Authoring|Mod Authoring]]
 
:*[[Legacy:Mod_Authoring|Mod Authoring]]
 +
 +
[[Category:Programming tutorials]]

Latest revision as of 00:53, 17 June 2009

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 separate from 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 packages.

Basic Setup[edit]

For all of the following we will assume your Base Directory is C:\ut2004\

Mod System Directory Structure[edit]

Engine Directory Structure - First we'll start with a rundown of the unreal engines directory structure.
your mod being the name of the modification, your mods 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

Running the game using YourMod[edit]

The mod system is accessed through the use of -mod= commandline switch
C:\ut2004\ut2004.exe -mod=YourMod
C:\ut2004\unrealed.exe -mod=YourMod


Setting Up Package Folders[edit]

Set Up Package Folders - Then we examine how to setup package's so you can compile.
For Unreal Script Classes you will need to first make the package's folder and then the Classes folder. The following eg shows the package folders being YourModPackage:
C:\ut2004\YourMod\YourModPackage\ <– UnrealScript package for your mod
C:\ut2004\YourMod\YourModPackage\Classes <– put you source code here

EXEC Directive[edit]

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\YourModPackage\Models <– put the models you wish to import into the package here
C:\ut2004\YourMod\YourModPackage\Sounds <– put the sounds you wish to import into the package here
C:\ut2004\YourMod\YourModPackage\Textures <– put the textures you wish to import into the package here
The Exec Directive is not only used when you want to import assets with your script into your *.u files it is also useful when working with a large number 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 can free up valuable memory that can be used to get the process done quicker without the overhead of the full editor open.

INI Files[edit]

UT2k4Mod.Ini - We start to get into how to setup your mod to be accessed from the community panel in UT2004.
This file should be place in the following directory:
C:\ut2004\YourMod
UT2004 Default.ini - This will show you how to setup your mod's default.ini file so you can use it to compile.
This file should be place in the following directory:
C:\ut2004\YourMod\System
DefaultUser.ini - Functions very similarly to UT2004 Default.ini.
This file should be place in the following directory:
C:\ut2004\YourMod\System

LOG Files[edit]

Log Warnings
Log File
When running with the -mod= commandline switch .log files will be place in the following directory:
C:\ut2004\YourMod\System
All other secondary log files (such as ucc.log) will still be created in:
C:\ut2004\System

Commandlet's[edit]

Commandlets can be very useful to UScripters, providing automated tasks so you dont have to repetativly do things by hand.

Make[edit]

Compiling With UCC - Lastly to round things off we take a look at how to compile using ucc.exe

Compiling YourMod[edit]

The mod system is accessed through the use of -mod= commandline switch
C:\ut2004\ucc.exe make -mod=YourMod
This will Compile all *.UC files found in your Package directories to:
C:\ut2004\YourMod\System

DumpInt[edit]

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.
INT Files are used for Localization, INT being an acronym for international english.

Dumping an int file for YourModPackage[edit]

The mod system is accessed through the use of -mod= commandline switch
C:\ut2004\ucc.exe dumpint -mod=YourMod C:\ut2004\YourMod\System\YourModPackage.u


ExportCache[edit]

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.

Exporting Cache for YourModPackage[edit]

The mod system is accessed through the use of -mod= commandline switch
C:\ut2004\ucc.exe exportcache -v -mod=YourMod C:\ut2004\YourMod\System\YourPackage.u

Custom Characters[edit]

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.

See Also[edit]