JMD
Forum Noob
I wanted to share a few things I've come across while researching and tinkering with how to mod Portal 2/The OrangeBox on PS3. I have many years experience modding the Source Engine on PC, and am applying that knowledge here, explaining everything I can along the way.
Let's start by saying, the dream of running proper Source Engine mods on PS3 is still that, a dream.
There are some minor mods you can do that extend the gameplay and can enhance the fun, but porting full blown mods, or any kind of mod that uses its own Client and Server DLLs is completely out of the question, even with access to the illegal SDKs, so don't even ask.
Now that's out of the way. What can we mod? Lots, actually, but as I said before, there are certain things that are just not possible, so whatever your mod idea is, it needs to be based on what is already available.
It is possible to replace sounds, but textures, models and maps are where the real challenge lies.
We'll start by Extracting the contents of the disc. Do Valve a favor and go and buy them, they're great games, totally worth having in your collection, and is the only way to ensure you have the original files.
Once you have done this, you will need to then extract the contents of the game archives.
For Portal 2, they are located in;
PS3_GAME\USRDIR\portal2
We'll get to The OrangeBox later.
Extract zip0.ps3.zip, zip1.ps3.zip and zip2.ps3.zip using something like 7zip. These are just regular zip files. They can also be safely extracted to the same folder, as they don't contain any duplicates except for __preload_section.pre which is most likely an encrypted table of preload file locations (possibly akin to PC Source's 'reslist' functionality).
Now you will see a familiar set of files and folders
I won't go heavily into how to mod the Source engine. You should already be familiar with that, otherwise, what are you even doing here? Go learn to make mods for the PC versions, and then come back to this at a later date.
https://developer.valvesoftware.com/wiki/Main_Page is the best place to start.
Let's go through some interesting things:
gameinfo.txt
This file is directly copied from the PC game. This tells the Source engine which content folders to prime for the game's launch, and other things like the drop down box in Source SDK, and Steam's library entries, etc.
The interesting part of this file, is the parameter "SupportsXbox360". This indicates (to us, and the Source engine) that the game binaries are built for Xbox360.
I'm sure there is a separate compile project in VS that Valve use for PS3 compared to Xbox360, but a lot of the file formats are shared between the two, and it appears Valve managed to find shortcuts and the most efficient way to port the game to PS3 was to port the Xbox360 version instead of writing a whole new port for PS3 individually.
gameinfo.xtx is the Xbox format version of this same file (unencrypted).
kvpool.ps3.image
This is an encrypted KeyValues file that contains a table/pool of values relating to specific files per level. A lot of the values appear to come from VMT material config files, such as;
Which is taken from Line 292-295 of kvpool.ps3.image
There is no known decryption method for this file.
makereslists.txt and makereslists_xbox.txt
This file is used when building reslists for the game from the buildreslists.bat file in the SDK. A PS3 supported SDK is not known to exist, therefore these files are virtually useless to us or the final build of the game.
mapcycle.txt
This is the default progression of maps used in multiplayer/coop. Can be edited, but all players in the server will need the same copies of each modified file for it to have any affect.
matchmodes.txt
Settings relating to each MP/coop map . This is where max players and "modes" are set for what mode the map supports (only known 'mode' is "coop" "1")
splitscreen_config.txt
Rudimentary splitscreen settings, like FOV and aspect ratio.
stats.txt
Empty file leftover from a much older version of the Source engine. This file might be used in the compile process, but from memory, it's as old as HL1/GoldSrc and relates to MP statistics.
steam.inf
Interesting file. Might be leftovers from a PC build of the game, but could also point to an internal emulated PS3 build that is run on Valve PC's through Steam using the PS3 SDK (speculating here).
unusedcontent.cfg
This is still a bit of a mystery, but I believe it was introduced with CS:GO and contains locations of directories to (scan?) for unused content, and which ones to ignore.
This file relates to the next file;
whitelist.cfg
This file is supposed to be loaded on each launch of the game, and is self explanatory. It whitelists files/folders to be loaded into the game engine, but also acts as a blacklist for items that are designed to be excluded.
This file also seems to relate to MP only, as it only appears in MP Source Engine games (specifically Orangebox based MP games like TF2, L4D, CSGO etc).
Editing this file may not have any affect on the game whatsoever. Results are mixed. (erased all, added all back, "remove" all, etc, no change)
Main directory: bin
This is the game code itself. I don't think there will ever be a way to compile our own, nor will we be able to decompile anything useful from these files that we don't already know. It might be possible to HEX edit these to change values, but that's a little beyond the scope of this novel.
Main directory: cfg
This is a juicy folder. A lot of these files can be directly edited and do directly change things ingame. Think of them as 'batch console commands' in one file. These are also known as console scripts.
Depending on what version of the engine is running, and what Valve did/didn't include in the pool of available console commands, it might be possible to significantly modify the game just from these files alone.
Whether or not these modifications would be any fun, or useful, is a different story. For example, you could use these config scripts to build your own Trainer with hotkeys for various cheat functions. Such as binding one of the buttons to spawn weapons, ammo, props, etc.
Some mystery files in this folder;
*.ekv
These are encrypted files and are believed to stand for "Engine KeyValues" and contains KV's for engine specific commands that are protected.
Main directory: media
Folder containing all of the game's movie .BIK files.
This also contains 5 config scripts relating to the videos;
Main directory: particles
PS3 specific compiled particle files (PCF). It may be possible to reverse engineer them using the Source Particle Editor, but untested.
More info: https://developer.valvesoftware.com/wiki/Category:Particle_System
Main directory: ps3
PS3 exclusive animated SAVE icons for each chapter (PNG and PAM).
Main directory: reslists_xbox
All of the reslists (Resource Lists) for the PS3 version of the game (disregarding the "Xbox" in the folder name).
These are unencrypted text files that contain file lists (for caching purposes) of every file in the game.
What's interesting here is, even though each file has the extension *.ps3.lst, these are in fact, direct clones from PC, and do not correspond to the PS3 specific files spread throughout the game data. (maps, models, materials, etc).
An example from mp_coop_start.ps3.lst; (First line)
Main directory: resource
Amazingly, this entire directory, with the exception of the compiled binary Closed Caption files (*.DAT), is totally unencrypted and moddable.
This is the entire VGUI setup in one folder, but has a steep learning curve, and even changing seemingly simple things like the position of items in the main menu, or sizes of dialogue boxes, can be difficult.
A lot of useful information can be found at https://developer.valvesoftware.com/wiki/Category:VGUI, however, a lot of the information is outdated, or, is specific to building your own mod on PC (with Visual Studio).
Main directory: scenes
Contains 2x encrypted files:
Unknown what the difference is, and the _1 indicates a patch/revision but is unknown.
Useful resources:
Main directory: scripts
Like the resource directory, this folder is also largely unencrypted, and is open to considerable amounts of modding.
There are far too many things to go into here, but some files of interest:
Tons here.
See https://developer.valvesoftware.com/wiki/VScript
but more specifically: https://developer.valvesoftware.com/wiki/List_of_Portal_2_Script_Functions
HUD/VGUI scripts:
These files are for telling the Source Engine how many channels a wav has, its relative volume, and supports "operators" that are like runtime macros that I don't fully comprehend, but are likely related to 3D mixing.
The following have the same format as above, but are level specific.
Again, same format as above, but this time for NPCs (Non-player characters)
talker (folder)
All of the game's sound data. All appear to be in a proprietary Valve .WAV format known as XWV (Xbox Wave).
See https://developer.valvesoftware.com/wiki/XWV_File_Format for more info about the format.
The format used was used for the Xbox 360 version of the Source Engine, and is a complicated format to reverse engineer.
Thankfully there are some Xbox specific tools floating around that are able to decode some of the files, but not all.
You will need:
This script that I wrote will crawl through the 'sound' folder and attempt to convert them all. Most fail.
Save it as something like convert_xma.bat
There is also no known way to re-encode a wav to the PS3 Valve XWV style format.
TODO: Test whether or not the game can load unencrypted MP3 files renamed as .WAV (the files that successfully decode with XMA tools, look a lot like MPEG3 files, even as .ps3.wav).
Main directory: maps
PS3 (and Xbox?) specific BSP map files.
TODO: Find out their version, and whether or not these can be decompiled with VMEX.
Main directory: materials
VTF and VMT textures, compiled again for PS3 (and Xbox?).
VTF360 tools do not work on these files, so they must be differently compiled to their Xbox equivalents, and not much further information can be found regarding this format on the PS3 platform.
Main directory: models
Similar to above, PS3 specific compiled model files.
TODO: Test various decompilers and see if they can get anywhere with these models. Even if we could, decompiled versions of Source Engine models usually have the smoothing groups destroyed and vertex normals are all messed up, and that's from decompiling a PC model, I'd imagine decompiling console specific models would result in worse files.
--------------------------------------------------------------------------------
That concludes this very in-depth look at modding the Portal 2 (and by extension, the Source Engine) on the PS3 (and parts of this even cover Xbox360 reverse engineering!)
I'll be adding more as I discover more, and I'll cover The Orange Box modding in the next post, which I'll reserve for the time being.
Happy modding and good luck!
Let's start by saying, the dream of running proper Source Engine mods on PS3 is still that, a dream.
There are some minor mods you can do that extend the gameplay and can enhance the fun, but porting full blown mods, or any kind of mod that uses its own Client and Server DLLs is completely out of the question, even with access to the illegal SDKs, so don't even ask.
Now that's out of the way. What can we mod? Lots, actually, but as I said before, there are certain things that are just not possible, so whatever your mod idea is, it needs to be based on what is already available.
It is possible to replace sounds, but textures, models and maps are where the real challenge lies.
We'll start by Extracting the contents of the disc. Do Valve a favor and go and buy them, they're great games, totally worth having in your collection, and is the only way to ensure you have the original files.
Once you have done this, you will need to then extract the contents of the game archives.
For Portal 2, they are located in;
PS3_GAME\USRDIR\portal2
We'll get to The OrangeBox later.
Extract zip0.ps3.zip, zip1.ps3.zip and zip2.ps3.zip using something like 7zip. These are just regular zip files. They can also be safely extracted to the same folder, as they don't contain any duplicates except for __preload_section.pre which is most likely an encrypted table of preload file locations (possibly akin to PC Source's 'reslist' functionality).
Now you will see a familiar set of files and folders
I won't go heavily into how to mod the Source engine. You should already be familiar with that, otherwise, what are you even doing here? Go learn to make mods for the PC versions, and then come back to this at a later date.
https://developer.valvesoftware.com/wiki/Main_Page is the best place to start.
Let's go through some interesting things:
gameinfo.txt
This file is directly copied from the PC game. This tells the Source engine which content folders to prime for the game's launch, and other things like the drop down box in Source SDK, and Steam's library entries, etc.
The interesting part of this file, is the parameter "SupportsXbox360". This indicates (to us, and the Source engine) that the game binaries are built for Xbox360.
I'm sure there is a separate compile project in VS that Valve use for PS3 compared to Xbox360, but a lot of the file formats are shared between the two, and it appears Valve managed to find shortcuts and the most efficient way to port the game to PS3 was to port the Xbox360 version instead of writing a whole new port for PS3 individually.
gameinfo.xtx is the Xbox format version of this same file (unencrypted).
kvpool.ps3.image
This is an encrypted KeyValues file that contains a table/pool of values relating to specific files per level. A lot of the values appear to come from VMT material config files, such as;
Code:
paintblobs\blob_surface_normal
$interiorcolor [0.1 0.6 0.9]
There is no known decryption method for this file.
makereslists.txt and makereslists_xbox.txt
This file is used when building reslists for the game from the buildreslists.bat file in the SDK. A PS3 supported SDK is not known to exist, therefore these files are virtually useless to us or the final build of the game.
mapcycle.txt
This is the default progression of maps used in multiplayer/coop. Can be edited, but all players in the server will need the same copies of each modified file for it to have any affect.
matchmodes.txt
Settings relating to each MP/coop map . This is where max players and "modes" are set for what mode the map supports (only known 'mode' is "coop" "1")
splitscreen_config.txt
Rudimentary splitscreen settings, like FOV and aspect ratio.
stats.txt
Empty file leftover from a much older version of the Source engine. This file might be used in the compile process, but from memory, it's as old as HL1/GoldSrc and relates to MP statistics.
steam.inf
Interesting file. Might be leftovers from a PC build of the game, but could also point to an internal emulated PS3 build that is run on Valve PC's through Steam using the PS3 SDK (speculating here).
unusedcontent.cfg
This is still a bit of a mystery, but I believe it was introduced with CS:GO and contains locations of directories to (scan?) for unused content, and which ones to ignore.
This file relates to the next file;
whitelist.cfg
This file is supposed to be loaded on each launch of the game, and is self explanatory. It whitelists files/folders to be loaded into the game engine, but also acts as a blacklist for items that are designed to be excluded.
This file also seems to relate to MP only, as it only appears in MP Source Engine games (specifically Orangebox based MP games like TF2, L4D, CSGO etc).
Editing this file may not have any affect on the game whatsoever. Results are mixed. (erased all, added all back, "remove" all, etc, no change)
Main directory: bin
This is the game code itself. I don't think there will ever be a way to compile our own, nor will we be able to decompile anything useful from these files that we don't already know. It might be possible to HEX edit these to change values, but that's a little beyond the scope of this novel.
Main directory: cfg
This is a juicy folder. A lot of these files can be directly edited and do directly change things ingame. Think of them as 'batch console commands' in one file. These are also known as console scripts.
Depending on what version of the engine is running, and what Valve did/didn't include in the pool of available console commands, it might be possible to significantly modify the game just from these files alone.
Whether or not these modifications would be any fun, or useful, is a different story. For example, you could use these config scripts to build your own Trainer with hotkeys for various cheat functions. Such as binding one of the buttons to spawn weapons, ammo, props, etc.
Some mystery files in this folder;
*.ekv
These are encrypted files and are believed to stand for "Engine KeyValues" and contains KV's for engine specific commands that are protected.
- cpu_level_ps3.ekv = PPU specific values
- cpu_level_ps3_ss.ekv = SplitScreen PPU specific values.
- gpu_level_ps3.ekv = SPU specific values. This file is larger than the cpu_level files, and contains a few more lines of values.
- mem_level_ps3.ekv = Meant for NOR/NAND Flash specific values(?) File is only 92bytes and is believed to be empty/dummy.
- config_default.cfg - PC keyboard bindings script
- cpu_level_0_pc.ekv
- cpu_level_0_pc_ss.ekv
- cpu_level_1_pc.ekv
- cpu_level_1_pc_ss.ekv
- cpu_level_2_pc.ekv
- cpu_level_2_pc_ss.ekv
- gpu_level_0_pc.ekv
- gpu_level_1_pc.ekv
- gpu_level_2_pc.ekv
- gpu_level_3_pc.ekv
- gpu_mem_level_0_pc.ekv
- gpu_mem_level_1_pc.ekv
- gpu_mem_level_2_pc.ekv
- joy_preset_1.cfg - These are PC joypad controller configs
- joy_preset_2.cfg - "
- joy_preset_3.cfg - "
- joy_preset_4.cfg - "
- mem_level_0_pc.ekv
- mem_level_1_pc.ekv
- mem_level_2_pc.ekv
- moddefaults.txt - PC (Windows) graphics card support file
- moddefaults_mac.txt - Mac OSX graphics card support file
- undo360controller.cfg - PC xbox360 controller unmap file
- valve.rc - This last file is most likely unused, but is treated like an "autoboot" file on PC that contains commands to prime the above config (.cfg) files for launch.
- chapter1.cfg - This is the first Chapter script that is loaded when starting a new game. An additional command is included in this file that isn't in the rest of the Chapter scripts;
rcon_password p2
This sets the password for the Remote Console access to the server running the current match. This enables server admins to access the game without needing access to the server machine itself, or having the game loaded at all. What's interesting is that I believe only Sony have access to the Portal2 dedicated servers on PS3, I'm not sure if they're run by Valve or not (confirmation needed).
It is more likely that this file is leftover from the PC build, but is still unknown.
- chapter<2-6>.cfg - These are your standard Chapter scripts. Syntax is map <mapname>
- config.global.ps3.cfg - PS3 global audio/video setup (gamma, volume, captions etc)
- config.ps3.cfg - Portal 2 PS3 joystick configuration (but the header comment says "Xbox 360 controller setup")
- joy_preset_<1-4>.ps3.cfg -
- modsettings.cfg - Taken from the header;
Code://------------------------------------------------------------------------------ // // Loaded by the engine on startup. If this file is not present in the mod's cfg // folder, will not fallback based on search path. // // So hl2\cfg\modsettings.cfg will be exec'ed by HL2 but not Episode One or Two. // //------------------------------------------------------------------------------ - paintgun_bindings.cfg - PC mouse & keyboard specific Paintgun bindings.
- playtest.ps3.cfg - PS3 Playtest Configuration script. Loads developer mode, Filesystem (FS) monitors, etc.
- playtest_off.ps3.cfg - Disables performance monitoring. Used in conjunction with the above to enable a developer mode without performance monitoring. (Useful for designers)
- skill_manifest.cfg - Macro to load the below file;
- skill_portal2.cfg - Player damage adjusters. Has leftovers from HL2 (Combine ball values -- possibly still used in P2). Header reads;
Code://Merged on 6/10/2008 from hl2/cfg/skill.cfg and ep2/cfg/skill_episodic.cfg with unknown convars removed.
Main directory: media
Folder containing all of the game's movie .BIK files.
This also contains 5 config scripts relating to the videos;
- attractvids.txt
The "attract" videos that are played are: attract01.bik (Coop intro) and attract02.bik (SP intro) - coop_outro_captions.txt - Captions config for coop_outro.bik. Syntax is;
#<stringname>
Color HEX string (RGBA) [E.G. 0xA3C1ADFF = (0x) 163 193 173 255 - Pastel 'old school Steam' green]
<timecode IN> (SS.ms)
<timecode OUT> (SS.ms) - sp_ending_callback_captions.txt - Captions config for sp_ending_callback.bik Syntax as above.
- startupvids.ps3.txt - One line for launching the valve_ps3_legals.bik video when game boots (The Valve in the back of the head guy).
- startupvids.txt - Legacy file for the above (from PC)
Main directory: particles
PS3 specific compiled particle files (PCF). It may be possible to reverse engineer them using the Source Particle Editor, but untested.
More info: https://developer.valvesoftware.com/wiki/Category:Particle_System
Main directory: ps3
PS3 exclusive animated SAVE icons for each chapter (PNG and PAM).
Main directory: reslists_xbox
All of the reslists (Resource Lists) for the PS3 version of the game (disregarding the "Xbox" in the folder name).
These are unencrypted text files that contain file lists (for caching purposes) of every file in the game.
What's interesting here is, even though each file has the extension *.ps3.lst, these are in fact, direct clones from PC, and do not correspond to the PS3 specific files spread throughout the game data. (maps, models, materials, etc).
An example from mp_coop_start.ps3.lst; (First line)
- "maps\mp_coop_start.bsp"
Main directory: resource
Amazingly, this entire directory, with the exception of the compiled binary Closed Caption files (*.DAT), is totally unencrypted and moddable.
This is the entire VGUI setup in one folder, but has a steep learning curve, and even changing seemingly simple things like the position of items in the main menu, or sizes of dialogue boxes, can be difficult.
A lot of useful information can be found at https://developer.valvesoftware.com/wiki/Category:VGUI, however, a lot of the information is outdated, or, is specific to building your own mod on PC (with Visual Studio).
Main directory: scenes
Contains 2x encrypted files:
- scenes.ps3.image
- scenes.ps3_1.image
Unknown what the difference is, and the _1 indicates a patch/revision but is unknown.
Useful resources:
- https://developer.valvesoftware.com/wiki/Faceposer
- https://developer.valvesoftware.com/wiki/Choreography_creation#Definitions
- https://developer.valvesoftware.com/wiki/Scenes.image
- https://developer.valvesoftware.com/wiki/VSIF2VCD
Main directory: scripts
Like the resource directory, this folder is also largely unencrypted, and is open to considerable amounts of modding.
There are far too many things to go into here, but some files of interest:
- bugreport_mapnumber.txt - Assigns a INT to a map for bug reporting purposes.
- bugreporter_defaults.txt - Simply one word in the file "medium".
- chapterbackgrounds.txt - This file is used to set the "background" map level that loads behind the main menu.
- cheatcodes.txt - Contains button input codes for some interesting cheats.
- credits.txt - The actual credits AND config for how to display them.
- damageinfo_turret.txt - Helper script for the turret's damage gibs
- mapautocompile.txt - Windows CLI commands for compiling maps. VBSP line is interestingly blank. The VBSP section of the 3 stage compile process is the important PS3 specific stage that is needed to compile a PS3/Xbox compatible BSP. VVIS and VRAD seem largely unchanged from PC and likely use the same internal structure and parameters.
- mod_cheatcodes.txt - Same as cheatcodes.txt, but likely supercedes it.
- mod_lessons.txt
- instructor_lessons.txt
- instructor_texturemanifest.txt
- instructor_textures.txt
- signifier_textures.txt
Tons here.
See https://developer.valvesoftware.com/wiki/VScript
but more specifically: https://developer.valvesoftware.com/wiki/List_of_Portal_2_Script_Functions
HUD/VGUI scripts:
- screens (folder) - VGUI overlay panels
- surveys (folder) - Ingame survery configs
- decals_subrect.txt - Decal definitions, their weight, and entries to map material types to "impact.xxx"
- gameuianimations.txt - Keyframe data for UI animations while ingame.
- hud_textures.txt - Weapon icons, crosshairs
- hudanimations.txt - Similar to gameuianimations.txt, but primarily used for Hints and Commentary icon animation.
- hudanimations_manifest.txt - macro to load the above
- hudlayout.res - Actual XY coords data for UI elements, colors, etc.
- mod_textures.txt - Portal Crosshairs config
- radialmenu.txt - Commands and icons relating to the radial menu.
- radialmenutaunt.txt - Used in Coop only. Taunt commands and icons for the radial menu.
- vgui_screens.txt - VGUI config that points to the VGUI panel files (.res) in scripts/screens/
- dsp_presets.txt
WARNING: do not edit this file!- Very complicated audio engineering knowledge required.
- Digital Signal Processors (DSP) take real-world signals like voice, audio, video, temperature, pressure, or position that have been digitized and then mathematically manipulate them. This file essentially tells the Source Engine how to manipulate the entire library of sounds (more specifically, their types)
- game_sounds_manifest.txt
Manifest for the below files- game_sounds.txt
- game_sounds_animation.txt
- game_sounds_announcer_auto_generated.txt
- game_sounds_auto_generated.txt
- game_sounds_ballbot.txt
- game_sounds_cave_auto_generated.txt
- game_sounds_cores_auto_generated.txt
- game_sounds_eggbot.txt
- game_sounds_music.txt
- game_sounds_music_a1.txt
- game_sounds_music_a2.txt
- game_sounds_music_a3.txt
- game_sounds_music_a4.txt
- game_sounds_music_mp.txt
- game_sounds_npc.txt
- game_sounds_nugget.txt
- game_sounds_paint.txt
- game_sounds_paint_player.txt
- game_sounds_physics.txt
- game_sounds_player.txt
- game_sounds_player_portal2.txt
- game_sounds_portal.txt
- game_sounds_props_aperture.txt
- game_sounds_scripted_sequence.txt
- game_sounds_sphere03_auto_generated.txt
- game_sounds_turret_auto_generated.txt
- game_sounds_ui.txt
- game_sounds_vfx.txt
- game_sounds_vo.txt
- game_sounds_weapons_episodic.txt
- game_sounds_weapons_paintgun.txt
- game_sounds_weapons_portal.txt
- game_sounds_world.txt
These files are for telling the Source Engine how many channels a wav has, its relative volume, and supports "operators" that are like runtime macros that I don't fully comprehend, but are likely related to 3D mixing.
The following have the same format as above, but are level specific.
- level_sounds_aperture.txt
- level_sounds_escape.txt
- level_sounds_music_portal.txt
- level_sounds_tempcontent.txt
- npc_sounds_android.txt
- npc_sounds_aperture_ai.txt
- npc_sounds_chicken.txt
- npc_sounds_combine_ball.txt
- npc_sounds_combine_ball_episodic.txt
- npc_sounds_energy_ball.txt
- npc_sounds_glados_cores.txt
- npc_sounds_hover_turret.txt
- npc_sounds_mannequin.txt
- npc_sounds_rocket_turret.txt
- npc_sounds_turret.txt
- npc_sounds_turret_portal.txt
- npc_sounds_zombie_aperture.txt
- sound_operator_stacks.txt
This is the master "operator stack" that is refereced in all of the game_sounds* files. I believe this was introduced in L4D2.
- soundmixers.txt
From the header:-
Code:
// Halflife 2 custom sound mixers. // These Sound Mixers are referenced by name from Soundscapes, and are used to provide // custom volume control over various sound categories, called 'mix groups'
-
- soundscapes_manifest.txt
Manifest for the below files- soundscapes_bts.txt
- soundscapes_chapter_4.txt
- soundscapes_destruction.txt
- soundscapes_escape_portal.txt
- soundscapes_industrial.txt
- soundscapes_mp_coop.txt
- soundscapes_paint.txt
- soundscapes_partial_destruction.txt
- soundscapes_pressdemo.txt
- soundscapes_reconstruction.txt
- soundscapes_sabotage.txt
- soundscapes_tempcontent.txt
- soundscapes_test_chambers.txt
- soundscapes_testchmb_portal.txt
- soundscapes_underground.txt
- soundscapes_vegetation.txt
- weapon_manifest.txt
This is the master manifest that tells the Source Engine which weapon_* scripts to load.
In the PS3 build of Portal 2, this file only loads the following;- weapon_paintgun.txt
- weapon_portalgun.txt
- weapon_alyxgun.txt - From HL2 Episode 1.
- weapon_annabelle.txt - From HL2 (Shotgun)
- weapon_crossbow.txt - From HL2
- weapon_hopwire.txt - CUT WEAPON From HL2.
2 versions of this weapon exist that are completely different to one another.- This is believed to be the highly unstable Episode 1 equivilent, aka "Vortex Hopwire" or a black hole grenade.
More info: - https://half-life.fandom.com/wiki/Vortex_Hopwire
- https://developer.valvesoftware.com/wiki/Weapon_hopwire
- TODO: Test this weapon on PS3!
- This is believed to be the highly unstable Episode 1 equivilent, aka "Vortex Hopwire" or a black hole grenade.
- weapon_paintgun.txt
- The above file is from the cut Paintgun weapon. Note from the wiki:
- The paint gun was originally planned to appear in Portal 2, but was cut due to the complexity of switching between weapons to use the gels. While leftover in the FGD, it was removed from the game and was not usable in maps. It has been reimplemented in P2CE (Portal 2: Community Edition, a mod built off the CS:GO branch with Portal 2 entities added back in, plus other enhancements).
- weapon_citizenpackage.txt
Dev tool weapon used for scripted sequences. - weapon_citizensuitcase.txt
Dev tool weapon used for scripted sequences.
- weapon_cubemap.txt
CUT WEAPON dev tool which was used for advanced level design in earlier Source Engine branches.- See: https://developer.valvesoftware.com/wiki/Weapon_cubemap
It's unknown why this was cut, as it is pretty useful for checking cubemaps inside an unfinished level, and there is no other way to do it in real-time inside the map itself.
Without this 'weapon', you can only check cubemaps by extracting the BSP or by capturing the temporary files the engine generates when you run 'buildcubemaps' command in a map, and they are split into 6 faces of a cube, 1 file for each face, max 256x256.
- See: https://developer.valvesoftware.com/wiki/Weapon_cubemap
- weapon_promo_antenna_ball.txt
- weapon_promo_antenna_egg.txt
- weapon_promo_helmet_ball.txt
- weapon_promo_helmet_egg.txt
talker (folder)
- Scripted sequence(?) responses for Eggbot & Ballbot coop models.
Could also be Phoneme related (lip sync).
- propdata.txt
Used by both models and materials (VMT files). Also contains "breakable" .mdl information (NOT prop data itself)
- surfaceproperties_manifest.txt - Manifest to load the below
- surfaceproperties.txt
Surface properties of all object and texture types. Mostly all used in VMT material files on a per-texture basis. - surfaceproperties_portal.txt
Portal 1 specific surface types and properties. Contains HL2 (surfaceproperties.txt) overrides as well. - surfaceproperties_portal2.txt
Portal 2 specific surface types and properties. Contains HL2 (surfaceproperties.txt) and Portal 1 (surfaceproperties_portal.txt) overrides as well.
- surfaceproperties.txt
- actbusy.txt - Used in HL2 level design on "hint" nodes for activity animations.
- actremap.txt
Related to above, this file 'remaps' activity function names to something else, think of it like macros for ACT_* activities. - bonus_maps_manifest.txt
Manifest for bonus map search directories. (Possibly unused as the files it points to are missing) - global_actors.txt - Stripped file originally from HL2.
- titles.txt (Possibly unused)
All of the game's sound data. All appear to be in a proprietary Valve .WAV format known as XWV (Xbox Wave).
See https://developer.valvesoftware.com/wiki/XWV_File_Format for more info about the format.
The format used was used for the Xbox 360 version of the Source Engine, and is a complicated format to reverse engineer.
Thankfully there are some Xbox specific tools floating around that are able to decode some of the files, but not all.
You will need:
- QuickBMS
- XMA_transform.bms by AlphaTwentyThree
- XboxADPCM
- ToWAV (RU)
- XMA Parser
This script that I wrote will crawl through the 'sound' folder and attempt to convert them all. Most fail.
Save it as something like convert_xma.bat
Code:
@ECHO OFF
REM QBMS example:
REM quickbms -F "*.dat" script.bms input_folder output_folder
SET QBMS=<CHANGE TO YOUR PATH TO quickbms.exe>
SET TOWAVDIR=<CHANGE TO YOUR PATH TO 'towav' folder>
SET TOWAV=%TOWAVDIR%\towav.exe
SET XMABMS=%TOWAVDIR%\XMA_transform_2016-01-28.bms
SET XMSH=%TOWAVDIR%\xmash.exe
SET XPCM=%TOWAVDIR%\XboxADPCM.exe
SET XMATST=%TOWAVDIR%\xma_test.exe
REM Our main folder SETs
SET INDIR=<path to your Portal2\sound folder>
SET INDIR2=<path to your Portal2 folder>
SET INDIR3=sound
SET OUTDIR=<OUTPUT folder path [must exist]>
SET OUTEXT=mp3
PUSHD "%INDIR2%"
"%QBMS%" -f "*.wav" "%XMABMS%" "%INDIR3%" "%OUTDIR%"
POPD
PAUSE
EXIT
There is also no known way to re-encode a wav to the PS3 Valve XWV style format.
TODO: Test whether or not the game can load unencrypted MP3 files renamed as .WAV (the files that successfully decode with XMA tools, look a lot like MPEG3 files, even as .ps3.wav).
Main directory: maps
PS3 (and Xbox?) specific BSP map files.
TODO: Find out their version, and whether or not these can be decompiled with VMEX.
Main directory: materials
VTF and VMT textures, compiled again for PS3 (and Xbox?).
VTF360 tools do not work on these files, so they must be differently compiled to their Xbox equivalents, and not much further information can be found regarding this format on the PS3 platform.
Main directory: models
Similar to above, PS3 specific compiled model files.
TODO: Test various decompilers and see if they can get anywhere with these models. Even if we could, decompiled versions of Source Engine models usually have the smoothing groups destroyed and vertex normals are all messed up, and that's from decompiling a PC model, I'd imagine decompiling console specific models would result in worse files.
--------------------------------------------------------------------------------
That concludes this very in-depth look at modding the Portal 2 (and by extension, the Source Engine) on the PS3 (and parts of this even cover Xbox360 reverse engineering!)
I'll be adding more as I discover more, and I'll cover The Orange Box modding in the next post, which I'll reserve for the time being.
Happy modding and good luck!

Last edited: