Once I get that upgrade to 36-hour days, I will tackle that. – Mychaeel

Difference between revisions of "UE2:UT2004 Default.ini"

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
m
 
(4 intermediate revisions by one other user not shown)
Line 1: Line 1:
==Default.ini File in your UT2004\System Dir==
+
==Default.ini File in your UT2004\System Directory==
 
+
 
Contains settings which are used for creating the '''UT2004.ini''' on your first run of the game. Thats why you'll find this file is very similar to [[Legacy:UT2004.Ini|UT2004.ini]]].  
 
Contains settings which are used for creating the '''UT2004.ini''' on your first run of the game. Thats why you'll find this file is very similar to [[Legacy:UT2004.Ini|UT2004.ini]]].  
  
Line 6: Line 5:
  
 
==Using Default.ini to Compile with mod Support.==
 
==Using Default.ini to Compile with mod Support.==
 +
To compile your mod using the '''-mod=''' commandline switch you must first create a '''Default.ini''' in your '''UT2k4Dir\ModRootDir\System'''.
  
'''Recommended reading:''' Before getting started.
+
===Template===
 +
:I have provided this template below as a guide, to use it simply replace '''YourMod''' with your modification's directory, please be consistant. Also replace the mod '''ModServerPackage''' and the '''ModEditPackage''' packages with your own, you do not need to replace server packages if you arn't going to use your mod online. You can use more than one package in this file just replicate the '''ServerPackages=''' and/or '''EditPackages=''' as many times is needed.
  
[[Legacy:Set Up Package Folders|Set Up Package Folders]]
+
::[Core.System]
 +
::+MusicPath=../'''YourMod'''/Music
 +
::-CacheRecordPath=../System/*.ucl
 +
::+CacheRecordPath=../'''YourMod'''/System/*.ucl
 +
::+CacheRecordPath=../System/*.ucl
 +
::+Paths=../'''YourMod'''/System/*.u
 +
::+Paths=../'''YourMod'''/Maps/*.ut2
 +
::+Paths=../'''YourMod'''/Textures/*.utx
 +
::+Paths=../'''YourMod'''/StaticMeshes/*.usx
  
[[Legacy:Compiling With UCC|Compiling With UCC]]
+
::[Engine.GameEngine]
 +
::+ServerPackages='''YourModPackage'''
  
A few things before we start:
+
::[Editor.EditorEngine]
*'''UT2k4Dir''' = The Directory where your copy of Unreal Tournament 2004 exists. for eg ''C:\ut2004\''
+
::+EditPackages='''YourModPackage'''
*'''ModRootDir''' = Your Modification Directory, This will be located in your '''UT2k4Dir'''.
+
  
To compile your mod using the '''-mod=''' switch you must first create a ''Default.ini'' in your '''UT2k4Dir\ModRootDir\System'''.
+
===Merging and Operators===
 +
:When you compile or run with the '''-mod=''' commandline switch '''YourMod\System\Default.ini''' file will be merged with the current '''UT2004.ini''' in your ''UT2004\System'' directory and a new ini file will be created in your '''YourMod\System''' and will have the same name as the '''YourMod'''. If no '''UT2004.ini''' is present the resultant ini file will be created from merging '''Default.ini''' in the in your ''UT2004\System'' directory and the one from '''YourMod\System'''.<br><br>
  
===Template===
+
:The '''+''' and '''-''' are operators (Reffered to on UDN as modifiers) these are used to add and subtract Keys ([[Types#Dynamic_array|Dynamic Arrays]]) like Paths, ServerPackages, EditPackages from the current '''UT2004.ini'''.
  
I have provided this template below as a guide, to use it simply replace '''YourMod''' with your modification's directory, please be consistant. Also replace the mod '''ModServerPackage''' and the '''ModEditPackage''' packages with your own, you do not need to replace server packages if you arn't going to use your mod online. You can use more than one package in this file just replicate the '''ServerPackages=''' and/or '''EditPackages=''' as many times is needed.
+
::'''-Paths=../Textures/.utx''' &ndash; This for example, would remove the original texture package directory from the resultant '''Mod.ini''' File.<br><br>
  
:[Core.System]
+
:If no operator exists, one of two things will happen:
:+MusicPath=../'''YourMod'''/Music
+
:#If the key already exists the value of the key will be overwritten by the new value.
:-CacheRecordPath=../System/*.ucl
+
:#If the key does not exist, the key and value will be added.<br><br>
:+CacheRecordPath=../'''YourMod'''/System/*.ucl
+
:+CacheRecordPath=../System/*.ucl
+
:+Paths=../'''YourMod'''/System/*.u
+
:+Paths=../'''YourMod'''/Maps/*.ut2
+
:+Paths=../'''YourMod'''/Textures/*.utx
+
:+Paths=../'''YourMod'''/StaticMeshes/*.usx
+
  
:[Engine.GameEngine]
+
:Using the ''';''' before a key or operator will add the key to the ini but it will be commented out. So you can add values that you may use but dont use often etc and remove the ''';''' from your '''YourMod.ini'''<br>
:+ServerPackages='''YourPackage'''
+
  
:[Editor.EditorEngine]
+
:Another good technique for speeding compile times is to use and for supressing packages in the '''YourMod.ini'''.
:+EditPackages='''YourPackage'''
+
:+EditPackages='''YourModCode'''
+
  
{{ambox|type=notice|text=When you compile or run with the '''-mod=''' commandline switch this '''Default.ini''' file will be merged with the current '''UT2004.ini''' in your '''UT2k4Dir''' and a new ini file will be created in your '''YourMod\System''' and will have the same name as the '''YourMod'''.}}
+
::''';EditPackages=YourModPackage'''
*The '''+''' and '''-''' are operators (Reffered to on UDN as modifiers) these are used to add and subtract Keys ([[Legacy:Dynamic Array|Dynamic Array]]'s) like Paths,ServerPackages,EditPackages from the current '''ut2004.ini'''.
+
*If no operator exists, one of two things will happen. If the key already exists the value of the key will be overwritten by the new value. If the key does not exist, the key and value will be added.
+
*Using the ''';''' before a key or operator will add the key to the ini but it will be commented out. So you can add values that you may use but dont use often etc and remove the ''';''' from your '''Mod.ini'''
+
*If no '''ut2004.ini''' is present the resultant ini file will be created from merging '''default.ini''' in the '''UT2k4Dir''' and the one from '''ModRootDir'''.
+
*'''-Paths=../Textures/.utx''' &ndash; This for example, would remove the original texture package directory from the resultant '''Mod.ini''' File.
+
*Keys get processed in the order they appear, This can be useful as in the following:
+
  
{{ambox|type=notice|text=
+
:This technique can also be used for the '''Default.ini''':
'''-CacheRecordPath=../System/*.ucl'''
+
  
'''+CacheRecordPath=../TestMod/System/*.ucl'''
+
::'''-EditPackages=YourModPackage'''
 +
::'''+;EditPackages=YourModPackage''' or ''';EditPackages=YourModPackage'''<br>
  
'''+CacheRecordPath=../System/*.ucl'''
+
{{ambox|type=notice|text=Using: ''';+EditPackages=YourModPackage''' will add this exact line to the ini, I recommend using ''';EditPackages=YourModPackage''' instead.}}<br>
  
}}
+
:Keys get processed in the order they appear, This can be useful as in the following:
*This is actually recommended because all cache files will be placed in the first '''CacheRecordPath''' found. Since this removes the '''CacheRecordPath''' used by UT2k4 then inserts the mods '''CacheRecordPath''' followed by the UT2k4 one this means the mods Path will appear before UT2k4's in our '''Mod.ini'''.
+
::'''-CacheRecordPath=../System/*.ucl'''
 +
::'''+CacheRecordPath=../TestMod/System/*.ucl'''
 +
::'''+CacheRecordPath=../System/*.ucl'''
  
*Another good technique for speeding compile times is to use and for supressing packages in the '''Mod.ini'''. This technique can be used for any key.
+
:This is actually recommended because all cache files will be placed in the first '''CacheRecordPath''' found. Since this removes the '''CacheRecordPath''' used by UT2k4 then inserts the mods '''CacheRecordPath''' followed by the UT2k4 one this means the mods Path will appear before UT2k4's in '''YourMod.ini'''.
 
+
{{ambox|type=notice|text=
+
'''-EditPackages=UT2k4Package'''  
+
 
+
'''+;EditPackages=UT2k4Package"'''
+
 
+
''';+EditPackages=UT2k4Package"'''
+
 
+
}}
+
*;Notes
+
**When running with '''-mod=''' switch, the main *.log file will by default be placed in your "ModRootDir\System" directory and be called '''Mod.log'''. All other secondary log files (such as ucc.log) will still be created in the UT2k4's system directory.
+
**Ut2k4 will find karma(*.ka) and deafult player(*.upl) Files automatically when using the '''-mod=''' Switch.
+
**Trying to modify the '''UT2k4\SaveDir'''will make the game crash instead you can set UT2K4SP_Main.default.ProfilePrefix="Mod_" and it will keep you save games seperate from in the '''ModRootDir\Saves''' dir.'''-Paths=../Saves/*.uvx'''
+
**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''.  
+
  
 +
===Notes===
 +
*Trying to modify the '''UT2k4\SaveDir'''will make the game crash instead you can set UT2K4SP_Main.default.ProfilePrefix="Mod_" and it will keep you save games seperate from in the '''ModRootDir\Saves''' dir.'''-Paths=../Saves/*.uvx'''
 
*Things not to do when creating a '''deafult.ini'''
 
*Things not to do when creating a '''deafult.ini'''
 
**You have been able to change the MusicPath since 3204. Since Beta 3229+ MusicPath has become an Array and you can set it up like:  
 
**You have been able to change the MusicPath since 3204. Since Beta 3229+ MusicPath has become an Array and you can set it up like:  
Line 79: Line 64:
 
{{ambox|type=notice|text=
 
{{ambox|type=notice|text=
 
'''+MusicPath=../Mod/Music'''
 
'''+MusicPath=../Mod/Music'''
 
 
  "not"  
 
  "not"  
 
 
'''+Paths=../Mod/Music/*.ogg'''.
 
'''+Paths=../Mod/Music/*.ogg'''.
 
 
}}<br><br>
 
}}<br><br>
  
Line 89: Line 71:
 
*[[Legacy:Game Ini File|Game Ini File]]
 
*[[Legacy:Game Ini File|Game Ini File]]
 
**[[Legacy:UT2004.Ini|UT2004.ini]]
 
**[[Legacy:UT2004.Ini|UT2004.ini]]
***[[UE2:UT2k4Mod.Ini|UT2k4Mod.ini]]  &ndash; For Epics Mod system
+
***[[UE2:UT2k4Mod.ini|UT2k4Mod.ini]]  &ndash; For Epics Mod system
 
***UT2k4 Default.ini &ndash; Used for generating UT2004.ini's
 
***UT2k4 Default.ini &ndash; Used for generating UT2004.ini's
 
***[[Legacy:UT2k4 DefaultUser.Ini|UT2k4 DefaultUser.ini]] &ndash; Used for generating UT2004.ini's<br><br>
 
***[[Legacy:UT2k4 DefaultUser.Ini|UT2k4 DefaultUser.ini]] &ndash; Used for generating UT2004.ini's<br><br>

Latest revision as of 21:30, 28 April 2008

Default.ini File in your UT2004\System Directory[edit]

Contains settings which are used for creating the UT2004.ini on your first run of the game. Thats why you'll find this file is very similar to UT2004.ini].

The Default.ini is also used when creating a mod using the mod system included with UT2k4.This file will contains all links required to run custom content in your modification using the -mod= switch. Although use of the mod system is not required it is recommended.

Using Default.ini to Compile with mod Support.[edit]

To compile your mod using the -mod= commandline switch you must first create a Default.ini in your UT2k4Dir\ModRootDir\System.

Template[edit]

I have provided this template below as a guide, to use it simply replace YourMod with your modification's directory, please be consistant. Also replace the mod ModServerPackage and the ModEditPackage packages with your own, you do not need to replace server packages if you arn't going to use your mod online. You can use more than one package in this file just replicate the ServerPackages= and/or EditPackages= as many times is needed.
[Core.System]
+MusicPath=../YourMod/Music
-CacheRecordPath=../System/*.ucl
+CacheRecordPath=../YourMod/System/*.ucl
+CacheRecordPath=../System/*.ucl
+Paths=../YourMod/System/*.u
+Paths=../YourMod/Maps/*.ut2
+Paths=../YourMod/Textures/*.utx
+Paths=../YourMod/StaticMeshes/*.usx
[Engine.GameEngine]
+ServerPackages=YourModPackage
[Editor.EditorEngine]
+EditPackages=YourModPackage

Merging and Operators[edit]

When you compile or run with the -mod= commandline switch YourMod\System\Default.ini file will be merged with the current UT2004.ini in your UT2004\System directory and a new ini file will be created in your YourMod\System and will have the same name as the YourMod. If no UT2004.ini is present the resultant ini file will be created from merging Default.ini in the in your UT2004\System directory and the one from YourMod\System.

The + and - are operators (Reffered to on UDN as modifiers) these are used to add and subtract Keys (Dynamic Arrays) like Paths, ServerPackages, EditPackages from the current UT2004.ini.
-Paths=../Textures/.utx – This for example, would remove the original texture package directory from the resultant Mod.ini File.

If no operator exists, one of two things will happen:
  1. If the key already exists the value of the key will be overwritten by the new value.
  2. If the key does not exist, the key and value will be added.

Using the ; before a key or operator will add the key to the ini but it will be commented out. So you can add values that you may use but dont use often etc and remove the ; from your YourMod.ini
Another good technique for speeding compile times is to use and for supressing packages in the YourMod.ini.
;EditPackages=YourModPackage
This technique can also be used for the Default.ini:
-EditPackages=YourModPackage
+;EditPackages=YourModPackage or ;EditPackages=YourModPackage


Keys get processed in the order they appear, This can be useful as in the following:
-CacheRecordPath=../System/*.ucl
+CacheRecordPath=../TestMod/System/*.ucl
+CacheRecordPath=../System/*.ucl
This is actually recommended because all cache files will be placed in the first CacheRecordPath found. Since this removes the CacheRecordPath used by UT2k4 then inserts the mods CacheRecordPath followed by the UT2k4 one this means the mods Path will appear before UT2k4's in YourMod.ini.

Notes[edit]

  • Trying to modify the UT2k4\SaveDirwill make the game crash instead you can set UT2K4SP_Main.default.ProfilePrefix="Mod_" and it will keep you save games seperate from in the ModRootDir\Saves dir.-Paths=../Saves/*.uvx
  • Things not to do when creating a deafult.ini
    • You have been able to change the MusicPath since 3204. Since Beta 3229+ MusicPath has become an Array and you can set it up like:



Links[edit]

External Links[edit]