Drakous79 Posted September 2, 2017 Share Posted September 2, 2017 (edited) I am creating this topic as centralized resource for everyone, who would like to mod XCOM with a help of UDK.May the Force be with you. --- Table of contents: 1. What release of UDK to use for XCOM modding and where to get it2. Install and initial setup- How to set install location- How to create working shortcuts3. Cooking XCOM mods- How to cook into CookedPCConsole folder- How to cook texture file cache files without additional bloat- Where to set what to cook4. Working with UDK --- Changelog:08-09-2017revised How to set install location under point 2 (added image, renamed path to location)revised How to create working shortcuts under point 2 (added image, removed -log switch from shortcut's target for its instability and added an advice how to view the log) Edited September 8, 2017 by Drakous79 Link to comment Share on other sites More sharing options...
Drakous79 Posted September 2, 2017 Author Share Posted September 2, 2017 (edited) 1. What release of UDK to use for XCOM modding and where to get it You will need September 2011 release (UDKInstall-2011-09-BETA.exe), because it matches XCOM's version 845 and engine version 8916. It can be downloaded from:nexusmods.comforums.unrealengine.com Edited September 2, 2017 by Drakous79 Link to comment Share on other sites More sharing options...
Drakous79 Posted September 2, 2017 Author Share Posted September 2, 2017 (edited) 2. Install and initial setup How to set install location This may be obvious, but I found myself reinstalling UDK just to get it right. If you set install location to:D:\UDK\XCOM_EW you will get:D:\UDK\XCOM_EW\BinariesD:\UDK\XCOM_EW\DevelopmentD:\UDK\XCOM_EW\EngineD:\UDK\XCOM_EW\UDKGame How to create working shortcuts In case of multiple UDK installations (for example XCOM EU and XCOM EW), it is good to have an order in shortcuts, so you can be sure you will be working on desired project. Each installation should have 2 shortcuts, editor and frontend. I placed both shortcuts on desktop next to each other. 1. UDK Editor shortcut The editor is run by Binaries\UDKLift.exe, which autodetects, whether to start 32 or 64 bit version of UDK.exe. My shortcut has this target: D:\UDK\XCOM_EW\Binaries\UDKLift.exe editorTo run Binaries\Win64\UDK.exe directly, I can change the target to: D:\UDK\XCOM_EW\Binaries\Win64\UDK.exe editorin new or existing shortcut. I tried to add -log switch to the target, but it doesn't work well in September 2011 release of UDK. No idea why, but log's window can't be viewed and the switch crashes 64 bit version of UDK.exe on Windows 8.1. Works fine in July 2013 release. Fortunately, the log can be viewed in the editor by clicking View > Browser Windows > Log, if needed. 2. Unreal Frontend shortcut Binaries\UnrealFrontend.exe is useful for compiling scripts and cooking. Better to have it at hand. Edited September 8, 2017 by Drakous79 Link to comment Share on other sites More sharing options...
Drakous79 Posted September 2, 2017 Author Share Posted September 2, 2017 (edited) 3. Cooking XCOM modsHow to cook into CookedPCConsole folder If you want to cook to PCConsole folder, edit build.properties file in Binaries folder and add a semicolon in front of this line: ;UDK=1This action will give you more options in Unreal Frontend. You can delete CookedPC folder anytime, if you are using CookedPCConsole. Also you can disable unnecessary steps (Launch, Prop) by clicking on them and unticking Step Enabled. How to cook texture file cache files without additional bloat When you run Unreal Frontend for the first time and run Cook Packages, your CookedPC or CookedPCConsole folder will be full of files. On top of that, texture file cache files in CookedPCConsole folder (like Textures.tfc) won't be empty, which is not good for mods distribution. I will list steps to produce clean *.tfc files. It is a preparation for cooking our own packages and maps without the bloat. 1. Rename any profile in Profiles panel on the left to XCOM.2. Click on Launch and Prop steps and unset Step Enabled.3. Remove any maps from Maps to Cook panel.4. Edit UDKGame\Config\DefaultEngine.ini and comment these lines with semicolon: [Engine.PackagesToAlwaysCook] ;+Package=EnvyEntry [Engine.StartupPackages] ;+Package=FX_HitEffects ;+Package=UDKFonts ;+Package=UTGame5. Edit UDKGame\Config\DefaultEngineUDK.ini and comment these lines with semicolon: [Engine.ScriptPackages] ;+NativePackages=UDKBase [Engine.PackagesToAlwaysCook] ;+Package=UDKFrontEndMap ;+Package=UDKFonts ;+Package=A_Interface [Engine.StartupPackages] ;+Package=UI_Fonts ;+Package=UI_Fonts_Final ;+Package=A_Interface6. Edit Engine\Config\BaseEngine.ini and comment these lines with semicolon: [Engine.ScriptPackages] ;EngineNativePackages=Core ;EngineNativePackages=Engine ;EngineNativePackages=GFxUI ;EngineNativePackages=GameFramework ;NetNativePackages=IpDrv [Engine.StartupPackages] ;Package=EngineMaterials ;Package=EngineDebugMaterials ;Package=EngineSounds ;Package=EngineFonts ;Package=SoundClassesAndModes ---Steps up to this point will produce empty CharTextures.tfc, Lighting.tfc and Textures.tfc of less than 10 kB size with 4 textures in it, when you run Clean and Full Recook. There is one annoyance though - a window with reminder about EngineDebugMaterials not being in StartupPackages and bAllowDebugViewmodesOnConsoles set to true. But it is set to false in BaseEngine.ini. Here are additional steps for empty Textures.tfc, but they don't feel necessarry: 7. Edit Engine\Config\BaseEngine.ini and comment this line with semicolon: [UnrealEd.EditorEngine] ;EditPackages=OnlineSubsystemSteamworks8. Rename UDKGame\Script\OnlineSubsystemSteamworks.u to something else, like OnlineSubsystemSteamworks.ux.9. Edit UDKGame\Config\DefaultEngine.ini and comment this line with semicolon: [Engine.ScriptPackages] ;+NonNativePackages=UTGame10. Rename UDKGame\Content\UT3\GFx\UDKFrontEnd.upk to something else, like UDKFrontEnd.upkx.11. Rename UDKGame\Content\Shared\UDKFonts.upk to something else, like UDKFonts.upkx. Where to set what to cook If you want to cook a map, just add it to Maps to Cook panel in Unreal Frontend. If you want to cook one or more standalone packages, edit UDKGame\Config\DefaultEngine.ini and add your package(s) to [Engine.PackagesToAlwaysCook] section: [Engine.PackagesToAlwaysCook] +SeekFreePackage=PackageNameThis creates one Lighting.tfc (maps), CharTextures.tfc or Textures.tfc file for all packages listed in the section. If you need separate *.tfc files for PackageA and PackageB, you will have to cook them separately. Meaning: // Edit ini [Engine.PackagesToAlwaysCook] +SeekFreePackage=PackageA // Save ini, cook // Edit ini [Engine.PackagesToAlwaysCook] +SeekFreePackage=PackageB // Save ini, cookLeave [Engine.PackagesToAlwaysCook] section empty, if you need *.tfc file for one or more maps only.--- Why extra legwork? Because we are cooking mods, not entire game, where all assets share the same *.tfc files. Edited September 8, 2017 by Drakous79 Link to comment Share on other sites More sharing options...
Recommended Posts