UDK Game Pack

Source: Internet
Author: User

Transferred from: http://blog.sina.com.cn/s/blog_944177030100ycki.html

There are 4 main folders under the UDK directory installed.

    • Binaries -This folder contains game EXE programs, Unrealfrontend (compilers), and other programs. Try not to move this folder.
    • Development -contains the source code for the UnrealScript file. A very important directory. The game will use the source code (. uc file) for this directory and compile the. u file from here.
    • Engine-the required files for the engines, do not move these files.
    • Utgame -All the files of your game. You will often only use this directory.

The following important folders are included in the Utgame folder

    • Config -place the INI configuration file.
    • Content – It is also important to include the actual resources needed for games such as levels, models, sounds, and more.
    • Localization – Place all the text of the conversation, the menu text, and so on.
    • Movies – Placement of introductory video, scene animations. to the Bink format.
    • Script – Used to put the compiled UnrealScript code.
    • Splash – a local Splash picture, which is the image used to load the game.

In addition to the folders above, other folders in the Utgame file are not very important.

There is a large amount of UT3 content in the Utgame\content folder (in U3, art and other resources are called content. UT is the Unreal Arena, a game for epic). It's a good idea to put all the content in this folder. When you pack the game, it will automatically remove the UT3 content without having to manually delete the extra files. I usually create a file under a content file to place my game content. Such as:

    • Utgame\content\examplegame\levels
    • Utgame\content\examplegame\upk

As long as two directories: A storage level, a storage UPK file. You don't need to set up thousands of content files like UT3. Most of the games do not require many folders. For example, our game, the ball, has 1.5 GB of data capacity, but only 20 UPK files.

· UnrealScript ( Unreal script)

Enter the Development\src\ directory to create a new folder. such as "Mygame". This folder name will be the name of the compiled. u file. If your game is called "Bobby", you'd better change this folder to "Bobby". All the UnrealScript files in this folder will be compiled into a single. u file used by the game.

Create the "Classes" folder under the "mygame" folder. In this folder add 3 files extracted from This zip , Mygameinfo.uc, Mypawn.uc, Myplayercontroller.uc.

Next, compile. Let's first make sure the game reads our compiled. u file code. Enter utgame\config\ directory and open defaultengine.ini. Find the "[Unrealed.editorengine]" section and add "+editpackages=mygame" in the last line of this section. As below:

+editpackages=utgame
+editpackages=uteditor
+editpackages=utgamecontent
+editpackages=mygame

order is important . Because this order determines the order in which they are imported and compiled.
This line of code enables the editor to always import the mygame.u file when it is started. Close the read-only attribute of the file (otherwise it cannot be saved), save and close. Of course Delete utengine.ini is OK. Doing so forces the engine to create a new utengine.ini based on Defaultengine.ini, which saves you from modifying the corresponding information in Utengine.ini.


Next, go to the Binaries directory and run UnrealFrontEnd.exe. Frontend can allow you to handle a lot of things (code?) ) is an important tool. In the present case we will use it to compile our code. At the top of the toolbar, click the lower triangular key number to the right of the "make" tab, then click "Full Recompile" (compile All).

If all the actions are correct, a prompt will appear in the console. The "mygame.u" file will be generated in Utgame\script\ when the compilation is complete.

· Ini Files ( INI files)

Next, we let the game use our own defined gametype (game type) and pawn (birth) as the default value for the game to start.

Open Utgame\config\defaultgame.ini. Removes the read-only property of the file. Find the "[Engine.gameinfo]" section.

    • Replace "Defaultgame=utgame.utdeathmatch" with "Defaultgame=mygame.mygameinfo".
    • Replace "Playercontrollerclassname=utgame.utplayercontroller" with "playercontrollerclassname= Mygame.myplayercontroller "

Save. Delete Utgame.ini , it will create a new INI with your modified Defaultgame.ini.

· Level (level)

Enter Binaries\win32 , create A shortcut to the UDK.exe. This adds "editor-log" at the end. Example-"G:\UDK\UDKExampleGame\Binaries\Win32\UDK.exe editor-log". Run.

Create a very simple level. Right-click BSP Cube button to enter the dimensions in the dialog box that pops up. X, Y, Z input 1024x768, Tick "Hollow?". Click "Build".

Next, click the "CSG Add" button in the left-hand toolbar.

push into the cube, right-click on the ground (inside the cube) and select it from the popup menu . -Add Actor-add Playerstart, adding the place where the player was born .

Repeat the last step, the difference is that we add a light this time. Then move the created light to the middle of the room.

Save the level. I named this level "Mg-examplegamelevel", note that the prefix is important. in Mygameinfo.uc, "MG" is the prefix specified. Without this prefix, the game will not know what kind of gametype (game type) to use for it.

Then, rebuild the level (refactoring levels). Select on the top menu -Build-buildall.

Again to the top menu. Select View-world Properties. Find the Game Type for PIEin the pop-up worldinfo window and change it to mygameinfo. PIE replaces Play-in-editor, which determines what kind of gametype (game type) is used to play the game in the editor.

Right-click on the floor now Choose Play from here. Watch your level and game become the 3rd person game!

Menu (Menus)

As for the menu, it's actually a level. Is the level that is loaded when you start the game. This level is a simple script editor that contains the Kismet (Unreal Engine).
Save your existing levels as "examplegamefrontend".
Next, create a UI scene (UI scenario). We also want to create our first UI package. Go to content browser and click "New" in the lower left corner. Fill in the name of the package and UI scene. Make sure to select the UI Scene in the Factory (Type) tab .

Right-click anywhere in the window to select-Place Widget(placement control) -button [standard](button) to create a button . Rescale the button until the entire screen is covered (the green edge is the edge of the screen, notice that the default is to cover the entire screen).

In order for the button to implement certain functions we are ready to use UI Kismet. But it's not really the most appropriate way to do this. The most appropriate way is to use UnrealScript for the button, because UnrealScript is more concise and does not have as much information as the UI Kismet. But Kismet is easy to understand and easier to implement for artists.

Right-click on the button to select -Unreal Kismet Editor.

In the global sequence (sequence), add the new event -ui-on Click, and then new Action (new behavior) -level (levels) -Activatelevel event (activates levels events).

and connect them together.

Select the Activate level Event, find eventname in its property bar, enter a name (name cannot have duplicate names), I am named "Openyourlevel", for example. When someone taps a button, it causes the level to trigger an event. The level then uses this event and accesses its kismet. Now all we have to do is use the console command to load the next level.

The last thing to do before we finish this uiscene. Click in the blank of the UI editor, and find the Flags in the property bar in the upper-right corner -pauseGame while active (pause when active), and uncheck.

Save your Package (Package) . Packages must be saved manually! Save it in the directory you created, and in this case save it in UTGAME\CONTENT\EXAMPLEGAMECONTENT\UPK.

    now connects this event to your level. Open the Level Kismet   (the green K icon on the top toolbar), add a new Action (behavior)   in white space; - UI SceneS ( UI scene)   -Open Scene (open Scene) . &NBSP Connect it to level Startup   (new Event-level startup). In the Content browser, select the UI you just created, then select the Openscene node in Kismet, find scene in its property bar, add the UI you just created, as shown in.

Add a new Event-remote event (remote Invoke event) and a new Action-misc- Console command (console commands) . In the remote event property bar, EventName is assigned the same event (event) name as the button you want to invoke   In my example, called " Openyourlevel ". console Command (console commands)   Add new information "open Mg-examplegamelevel "  – or call the level you can play. This event will be executed when the button is pressed and will be loaded into your level via the console command.
now   add Action (behavior)   -Toggle (switch)   -Toggle Cinematic Mode ( Cinematic mode switches) and Variable   (variable) -player   (player) and connect them together . This will freeze the player when the level is activated. The connection diagram looks like this:

You can use matinee to play the story animation at the beginning of the level. You can find a tutorial on editing the plot in hourences.com. You can create any type of 3D background in this level, or you can use a 2D image to easily cover the entire screen.

Complete! Note that this is not functional in the editor. The editor is not allowed to use an "Open" console command.

· Localization (localized)

The local file contains all the text needed for the game. To change the language version of the game, you only need to specify a different language file.

I usually delete all the INI files in the Localization folder and start from scratch. But doing so will abort the UT3 demo (the game that comes with the udk), so don't delete it if you still want to use the original demo.

First, close the editor . The editor detects the INI file only when it is started. Unless you restart it, it will not detect other INI files that you have created yourself. Determine which levels and package are saved.

Create a TXT file , Rename to "Mygame.int" . And then add

[Exampleofasection] 01=most Awesome Title ever 02=to Play click the button

The text inside the brackets is a section (part) that is used to mark the content. 01 and 02 Only specify the number of rows in the section. Of course you don't always use numbers.
Open the editor again and open your level and interface package. Open the UI scene you made (interface scenes). Right-click - Select Place Widget (place control) -Label [standard] (Standard label), create a label (label). Then use the same action to create another one. Select one, find data in the property bar in the upper- right corner -datasource - Mark up String

Add "<strings:mygame. Exampleofasection.01>" to Mark up String.

The format is NameOfIntFile.NameOfSection.NameOfLine. (INI file name. section name. Line name)

You can use the same method to set a different label.

If you change this line in the INI file, it will be loaded with the game or editor.

· Ini Files-more Fun ( INI files, more fun)

Let's go back to the INI file to modify more configurations. Close the editor. You cannot modify the INI file while the editor is running.

Open defaultengine.ini-section [URL]

    • MAPEXT=UDK – you don't have to modify this place unless you want to change your level range.
    • map=utfrontend.udkchange to examplegamefrontend . This will change the load default menu level.
    • localmap=utfrontend.udkIbid .

In the [Engine.packagestoalwayscook] section, add "+package=examplegamefrontend". This will make Unrealfrontend cook this file.

In the [engine.startuppackages] section, add "+package=mygameinterface". This will allow the game to always load the package. You don't have to do the same for each package. The special interface element package basically conforms to this condition, so the rest does not have to repeat the operation.

In the [Engine.packagestoforcecookpermap] section, add ". Map=examplegamefrontend ",immediatelyfollowed by". Package=mygameinterface. " This forces the package to use the information above when it enters the level, and only for that level. The packages of the interface element is also forced to load. Sometimes the level will be unexpected when loading a resource, and you can force cooking them to solve the problem.

In the [Fullscreenmovie] section, you can use to specify where you want to play the specified video.

OK, it's done! Delete again Utengine.ini , then it will be replaced with the configuration set by Defaultengine.ini.
Start the game and detect your level.

· Cooking

Then, cooking. Cooking is basically the final compilation. It will prepare the content you have made.
Cooking is a process of packaging all your content packs into a small number of protected files. It is impossible for your content pack to be extracted at least.

To complete this link, open UnrealFrontEnd.exe again (in the binaries folder), notice the "Cooking" tab (not the button) in the upper-left corner, click on it and find "Maps To cook "(Cook map), enter your individual level name. You don't need to enter the "Examplegamefrontend" level here. Remember that you have set it to "Alwayscook" (Always execute Cook) in the INI file.

Next, click Cook on the top toolbar

When you are finished, it creates the UTGAME\COOKEDPC folder. The contents of the folder are the content of the game that will be published to the player.

· Packaging (packaged)

Run UnrealFrontEnd.exe, Click "Package Game" , enter the name of your game in the dialog box that pops up. after packaging, you will find the game installation package after you pack it in the home directory. This completes the game packing!

· Troubleshooting (Trouble-shooting)

      • Check to see if you have typographical errors.
      • You cannot modify the INI file while the game is in progress or when the editor is running. If you do this, it will most likely ignore the changes you have made.
      • Check to see if you have compiled a. u file in utgame\script\.
      • You have to understand that unreal is using a file name that is not identical and simple . It is not allowed to use spaces, non-standard letters, and duplicate names in filenames. Unreal the difference between the level "DOGHOUSE.UDK" and the content package "DOGHOUSE.UPK" because it does not recognize the file name extension. All files are not allowed with duplicate names!
      • Use "-log" to run the game or check for Utgame\logs\launch.log. If the game is stuck in the loading, try looking for clues to start the loading (loading) section.
      • Your level must be named "Mg-nameofyourlevel" (in the format: the prefix specified by the script-your level name). It is important that prefixes are mentioned earlier.
      • If you are compiling a. uc file, pop up "superclass Errors" (Super class error. The Super class is the parent of the parent class) because you put "+editpackages=mygame" in the wrong place. The order of this line of statements is important. It must be at the bottom of the section of the INI. You can view the related tutorials below

UDK Game Pack

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.