User:Chipsnapper2/HL2 Xbox Research/Project HL2XMod Readme Archived

From Valve Developer Community
Jump to navigation Jump to search

Archived from https://www.dropbox.com/s/468wgvursjf8ywx/readme.txt

                                                                    ---Project HL2XMod---
                                                                         v0.3 Alpha
                                                                        By CrysisLTU
                                                                            2013


                                        ***********************THE README IS STILL WORK IN PROGRESS******************


Dictionary:
.xzp - a type of .gcf file. This is cache, and it is stored in the cache partition on the hard drive (X:). This file contains most of the game content (models, etc.)
.xz_ - a type of .xzp. This is a permanent file, and it is stored in the DVD. When the game is caching, this file is converted to .xzp and installed to the cache partition.
Lynx - a tool for .xzp files. It let's you extract and inject files from and to the .xzp file.





1. How the game works?
   The whole game content is on the DVD, of course. There are two executables: default.xbe and hl2_xbox.xbe. Normally, default.xbe is launched. Once it's
   launched, intro, copyright stuff is shown. Then, we get to the loading screen. At this point, a proccess called caching starts. A file called zip0_xbox.xz_
   is being extracted to the cache partition on the Xbox hard drive. This is being done to have faster read speeds, because DVD drive is slow and the Xbox
   only has 64MB of RAM and that's too little. zip0_xbox.xz_ is converted to zip0_xbox.xzp. This file contains your regular Source engine content: cfg, models
   materials, scripts and so on. It does not include maps or saves. Maps are stored on the DVD, in a folder, not the .xz_ file, however they are too copied to
   the cache partition for faster read speeds and less RAM usage. After caching is done, the game goes to the menu screen and the game can be played. Then, some
   content, like music, is being streamed from the DVD disc. This way the console has most speed for maps, models, etc. and we need most speed there. Sounds don't
   require a lot of speed so they can be streamed from the DVD disc.

   The other way of launching HL2 Xbox is to execute hl2_xbox.xbe instead of default.xbe. Using this method, caching is skipped, as well as the intro and text.
   If there is no cache in the cache partition, the game will not launch. This is the only way of using Project HL2XMod as of right now, because default.xbe checks 
   the cache, and makes sure that the files in the cache are the same as in the DVD. If the files are diffrent, caching is done once again and stock files are replaced. 
   Some modifications work by running the game with caching. I believe those would be some config files that can be set in the actual game, when playing it. So it's best 
   to modify the cache (we will get to that in a minute) and skip caching. This way you will be sure the mod is intact and it's safe to test it.

   Now, this isn't a really good way of doing it. In the final release, we should run the game with default.xbe and have caching. If we play another game, cache
   will be deleted, because it's temporary and so we need a way to permenantly store the files in the DVD. To do that, we need to inject modifications to the
   zip0_xbox.xz_ file. This is not possible at this point of time.

2. How to modify the game?
   We use a piece of sofware called Lynx. Lynx is a tool that let's you extract .xzp files and inject files in to it. Launch the tool (Lynxb8.exe) as an administrator.
   Click File, then Open. Select the .xzp file and then you can view the contents of it, extract or inject files. Simple as that. For editing I recommend Notepad++.
   It supports a variaty of different file formats, so just find a file, open it in Notepad++ and see what you can modify!

3. How to install the mod?
   Go to the 'Modified DVD' folder. If there's nothing there, use your own copy of Half-Life 2 for the Xbox. I recommend to install the game to your hard drive. This
   will allow to edit the content of the DVD in the future and you will have faster load times. If there is something in the folder, it's the game, so to make it legal
   you should still own a legit copy of the game. Install it to your hard drive. If you see a iso file, burn it to a DVD or extract the contents to the hard drive.
   Go to the 'Modified Cache', take the contents and put it to the X partition of the Xbox hard drive. Launch the hl2_xbox.xbe so we can skip the cache check. The mod
   will launch!
   'Cache' and 'DVD' folders contain original cache and DVD content, so you can save some time and use those. REMEMBER - OWN A LEGIT COPY OF HL2 OR THIS IS ILLEGAL.

4. What is possible at this point in time?
   We can run custom maps (it's still being worked on, some maps work, some don't). We can edit graphics settings, edit key bindings, change configuration settings,
   change the intro (by converting a WMV video to XMV). I'm mainly working on graphics right now and we are quite limited by that. Changing the dxsupport_xbox.cfg file
   a lot of times causes weird pixelated textures. A demo of a custom map running is here: http://www.youtube.com/watch?v=3YYzpBY4Cf