I don't need to test my programs. I have an error-correcting modem.

Difference between revisions of "UnrealScript source code"

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
(Created page with '{{stub}} The UnrealScript source code is available for several games. ==Downloads== ===Unreal Tournament=== * [http://unrealtournament2004.filefront.com/file/Unreal_Tourname…')
 
(improved descriptions and added more info about exported sources)
Line 4: Line 4:
 
==Downloads==
 
==Downloads==
 
===Unreal Tournament===
 
===Unreal Tournament===
* [http://unrealtournament2004.filefront.com/file/Unreal_Tournament_Source_Code;50393 FileFront - Build 432]
+
The UnrealScript sources must be extracted through UnrealEd. (see [[#Exporting source code|Exporting source code]])
 +
* [http://unrealtournament2004.filefront.com/file/Unreal_Tournament_Source_Code;50393 Build 432 native headers]
  
 
===Unreal Tournament 2003===
 
===Unreal Tournament 2003===
* [http://download.beyondunreal.com/fileworks.php/official/ut2003/ut2003-2225-source.zip BeyondUnreal - Build 2225]
+
* [http://download.beyondunreal.com/fileworks.php/official/ut2003/ut2003-2225-source.zip Build 2225 UnrealScript sources] (includes source code for the Epic Bonuspack and the ProUI package that provides the limited GUI for a special competition version of UT2003)
  
 
===Unreal Tournament 2004===
 
===Unreal Tournament 2004===
* [http://download.beyondunreal.com/fileworks.php/official/ut2004/ut2004scripts3369.zip BeyondUnreal - Build 3369]
+
* [http://download.beyondunreal.com/fileworks.php/official/ut2004/ut2004scripts3369.zip Build 3369 UnrealScript sources] (contains the complete native source code for [[:Category:Classes in UT2004 package Onslaught|Onslaught classes]] and native code snippets from some Engine classes)
  
 
===Unreal Tournament 3===
 
===Unreal Tournament 3===
* [http://udn.epicgames.com/Files/UT3/Mods/UT3ScriptSource_1.5.rar UDN - Version 1.5]
+
* [http://udn.epicgames.com/Files/UT3/Mods/UT3ScriptSource_1.5.rar Version 2.1 UnrealScript sources]
* [http://udn.epicgames.com/Files/UT3/Mods/UT3ScriptSource_1.4.rar UDN - Version 1.4]
+
* [http://udn.epicgames.com/Files/UT3/Mods/UT3ScriptSource_1.4.rar Version 2.0 UnrealScript sources]
* [http://udn.epicgames.com/Files/UT3/Mods/UT3ScriptSource_1.3.rar UDN - Version 1.3]
+
* [http://udn.epicgames.com/Files/UT3/Mods/UT3ScriptSource_1.3.rar Version 1.3 UnrealScript sources]
* [http://udn.epicgames.com/Files/UT3/Mods/UT3ScriptSource_1.2.rar UDN - Version 1.2]
+
* [http://udn.epicgames.com/Files/UT3/Mods/UT3ScriptSource_1.2.rar Version 1.2 UnrealScript sources]
* [http://udn.epicgames.com/Files/UT3/Mods/UT3ScriptSource_1.1.rar UDN - Version 1.1]
+
* [http://udn.epicgames.com/Files/UT3/Mods/UT3ScriptSource_1.1.rar Version 1.1 UnrealScript sources]
* [http://udn.epicgames.com/Files/UT3/Mods/UT3ScriptSource_1.0.rar UDN - Version 1.0]
+
* [http://udn.epicgames.com/Files/UT3/Mods/UT3ScriptSource_1.0.rar Version 1.0 UnrealScript sources]
  
 
===Unreal Development Kit===
 
===Unreal Development Kit===
* [http://www.udk.com/download.html UDK - Latest]
+
The source code is included in the UDK download.
 +
* [http://www.udk.com/download.html Latest UDK download]
  
 
==Exporting source code==
 
==Exporting source code==
The source code can be exported with the [[UnrealEd]] ''Actor Classes Browser'' by clicking the ''Export All Scripts'' in the ''File'' context menu.
+
The source code can be exported in many Unreal Engine games with the [[UnrealEd]] ''Actor Classes Browser'' by clicking the ''Export All Scripts'' in the ''File'' context menu.
  
'''Note:''' Exporting scripts is not recommend because they are not 100% identical as those you can download above.
+
'''Note:''' Exporting scripts is not recommend if original scripts are available because they are not 100% identical as those you can download above. The compiler removes [[defaultproperties]] and [[cpptext]] sections from source files during import. Cpptext lines will be replaced by the comment <code>// (cpptext)</code> to prevent line number changes, the defaultproperties block is removed without replacement, which is why it should always be placed at the end of the file after all other code. This does not apply to C++ and defaults blocks for [[structs]].
 +
 
 +
When exporting sources, the exporter generates a new defaultproperties block from the class properties at export time. Only properties that differ from the parent class are exported, localized and configurable properties are read from the corresponding [[localization]] or [[configuration file]]s. [[Subobjects]] are only exported if they are assigned to a variable declared with the modifier ''export'' (UE2) or if they are a subclass of the Component class (UE3). Note that defaultproperties and subobjects exported from UE3 include the Name and ObjectArchetype properties (which you should never specify in your own code - Name must be specified on the Begin Object line and ObjectArchetype is implied through the class or inherited subobject definition) and various invalid parameters in the Begin Object line.
  
 
==Browsing source code==
 
==Browsing source code==
You can view the [[UC File|.uc files]] with any [[Text Editor]], we recommend you to use [[UnCodeX]] to browse through the source code.
+
You can view the [[UC File|.uc files]] with any [[text editor]]. To browse the source code, a special tool like [[UnCodeX]] is recommended.
  
 
[[Category:Programming articles]]
 
[[Category:Programming articles]]

Revision as of 06:12, 1 July 2010

The UnrealScript source code is available for several games.

Downloads

Unreal Tournament

The UnrealScript sources must be extracted through UnrealEd. (see Exporting source code)

Unreal Tournament 2003

  • Build 2225 UnrealScript sources (includes source code for the Epic Bonuspack and the ProUI package that provides the limited GUI for a special competition version of UT2003)

Unreal Tournament 2004

Unreal Tournament 3

Unreal Development Kit

The source code is included in the UDK download.

Exporting source code

The source code can be exported in many Unreal Engine games with the UnrealEd Actor Classes Browser by clicking the Export All Scripts in the File context menu.

Note: Exporting scripts is not recommend if original scripts are available because they are not 100% identical as those you can download above. The compiler removes defaultproperties and cpptext sections from source files during import. Cpptext lines will be replaced by the comment // (cpptext) to prevent line number changes, the defaultproperties block is removed without replacement, which is why it should always be placed at the end of the file after all other code. This does not apply to C++ and defaults blocks for structs.

When exporting sources, the exporter generates a new defaultproperties block from the class properties at export time. Only properties that differ from the parent class are exported, localized and configurable properties are read from the corresponding localization or configuration files. Subobjects are only exported if they are assigned to a variable declared with the modifier export (UE2) or if they are a subclass of the Component class (UE3). Note that defaultproperties and subobjects exported from UE3 include the Name and ObjectArchetype properties (which you should never specify in your own code - Name must be specified on the Begin Object line and ObjectArchetype is implied through the class or inherited subobject definition) and various invalid parameters in the Begin Object line.

Browsing source code

You can view the .uc files with any text editor. To browse the source code, a special tool like UnCodeX is recommended.