09-09-18, 06:32 | #891 | ||
Member
Joined: Feb 2015
Posts: 874
|
Quote:
Quote:
|
||
09-09-18, 09:22 | #892 |
Member
Joined: Feb 2015
Posts: 874
|
How to fix missing audio in Parisian Backstreets
The aim of this guide is to restore missing audio instructions in Parisian Backstreets level.
As far as I know only the spanish version has this issue (italian version used to have it too but I fixed it 3 years ago). We will replace missing PC audios with PS2 ones which, for unknown reasons, survived into the PC version. Basically each audio track is associated with an event ID which is used as a trigger. We're going to overwrite the event IDs of the PS2 audio tracks with the event IDs of the PC audio tracks. TOOLS REQUIRED: - AoDxpand - awd2wav - spanish paris1.awd.clz - english paris1.awd.clz - an hex editor with search function and ASCII view - a sheet of paper - a pencil PRELIMINARY STEPS: 1) Create a folder wherever you want on your computer 2) Rename spanish paris1.awd.clz to spanish.awd.clz 3) Rename english paris1.awd.clz to english.awd.clz 4) Move spanish.awd.clz, english.awd.clz, AoDxpand and awd2wav in the working folder you've created in step 1 5) With AoDxpand extract both clz files (select CLZ to GMX). At the end of this step you should have english.awd and spanish.awd 6) Drag and drop spanish.awd onto awd2wav.exe 7) Drag and drop english.awd onto awd2wav.exe 8) You should have 6 folders. You can delete srd and scd folders, you'll need only std ones. You can delete clz files too THE BORING PART: 1) Take the sheet of paper and draw 4 columns and name them as follow:
3) Open the \english_streams_std folder and listen to only PC audio tracks (those beginning with 00031). When you hear something that matches one of the track descriptions you wrote previously, note down the filename of the track in the "English PC filename" column of the corresponding spanish audio 4) Once you have filled all the first three columns open english.awd with the hex editor 5) Let's now use "that bin looks climbable" as example. You should have:
7) Once your sheet is completed open spanish.awd with the hex editor. You can close english.awd 8) Search for the spanish PS2 filename "0001ADCB" inside spanish.awd. Like before, you'll find multiple results and what you'll need is the one next to "EVNT" string. Find the Event ID right before "00 45 58 04" (it should be 07 CB) and overwrite it with the PC Event ID you picked from english.awd (08 C4). Repeat this step for each audio track "RUN. YOUR NEARLY THERE. DON'T QUIT!!": 1) Once you have overwritten all the spanish event IDs you can save and close the file 2) Rename spanish.awd to spanish.gmx 3) Open AoDxpand, choose "GMX to CLZ" and select spanish.gmx 4) Rename spanish.gmx.clz to paris1.awd.clz and copy it back to \TRAOD\Data\Audio folder 5) Run the game and enjoy your hard work p.s. If you listen to mute spanish tracks and turn up the volume a lot you can hear Half-Life 3 release date. p.p.s. Just kidding. But listen to them anyway, you might find something interesting. Last edited by nakamichi680; 11-10-18 at 09:10. |
10-09-18, 03:31 | #893 |
Member
Joined: May 2014
Posts: 7
|
Perfect, I will try to do it! What is the hex editor you used to repair the Italian version?
|
10-09-18, 09:24 | #894 |
Member
Joined: Feb 2015
Posts: 874
|
|
12-09-18, 08:34 | #895 |
Member
Joined: Sep 2010
Posts: 306
|
@nakamichi680 Will you help me exporting the COL files to skp? I've seen you were able to export the col from the first level to demonstrate the invisible slope so maybe you have some info somewhere.
Ideally I would like to import/export the collision to Google Sketchup. |
12-09-18, 12:40 | #896 |
Member
Joined: Feb 2015
Posts: 874
|
Hi! Maybe you meant CLN files? Sure, even though I haven't reverse engineered the entire file yet.
The first portion of the file contains octrees. This is the structure of each octree: Code:
struct CLN_OCTREE // Size: 80 bytes { uint32_t PtrToParent; // Pointer to the address of the parent octree. First element is always FFFFFFFFh uint32_t Unknown1; // Maybe a pointer to something inside CLN_TRIANGLE block? uint32_t Unknown2; // Always 00000000h? uint16_t nChildren; // Number of children uint16_t Unknown3; // 0000h if the octree has no children, otherwise variable float Xmin; // Multiply by 1024 to match world coordinates float Ymin; // Multiply by 1024 to match world coordinates float Zmin; // Multiply by 1024 to match world coordinates uint32_t nDescendants; // Total number of descendants (children, grandchildren, great-grandchildren...) float Xmax; // Multiply by 1024 to match world coordinates float Ymax; // Multiply by 1024 to match world coordinates float Zmax; // Multiply by 1024 to match world coordinates uint32_t Unknown4; // Size of something. If the octree has descendants, the value is the sum of all descendants' Unknown4 uint32_t Ptr_Child1; // Pointer to the address of the child inside CLN_OCTREE block. FFFFFFFFh if the octant has no child uint32_t Ptr_Child2; // Pointer to the address of the child inside CLN_OCTREE block. FFFFFFFFh if the octant has no child uint32_t Ptr_Child3; // Pointer to the address of the child inside CLN_OCTREE block. FFFFFFFFh if the octant has no child uint32_t Ptr_Child4; // Pointer to the address of the child inside CLN_OCTREE block. FFFFFFFFh if the octant has no child uint32_t Ptr_Child5; // Pointer to the address of the child inside CLN_OCTREE block. FFFFFFFFh if the octant has no child uint32_t Ptr_Child6; // Pointer to the address of the child inside CLN_OCTREE block. FFFFFFFFh if the octant has no child uint32_t Ptr_Child7; // Pointer to the address of the child inside CLN_OCTREE block. FFFFFFFFh if the octant has no child uint32_t Ptr_Child8; // Pointer to the address of the child inside CLN_OCTREE block. FFFFFFFFh if the octant has no child }; Xmax, Ymax and Zmax refer to vertex 3 of the picture. If you want to extract collisions geometry this first portion is completely useless. To skip this portion you need its lenght. You can calculate it in this way: 80 * (nDescendants of the first octree + 1). Soon after the octrees portion we have the triangle list. Here's the structure of each triangle: Code:
struct CLN_TRIANGLE // Size: 48 bytes { float vecX; // A value between -1 and 1 float vecY; // A value between -1 and 1 float vecZ; // A value between -1 and 1 float ConstValue; // Multiply by 1024 to match world coordinates float v1a; // Can be either X or Y or Z depending on MissingAxis value. Multiply by 1024 to match world coordinates float v2a; // Can be either X or Y or Z depending on MissingAxis value. Multiply by 1024 to match world coordinates float v3a; // Can be either X or Y or Z depending on MissingAxis value. Multiply by 1024 to match world coordinates uint32_t MissingAxis; // 1 = X, 2 = Y, 3 = Z float v1b; // Can be either X or Y or Z depending on MissingAxis value. Multiply by 1024 to match world coordinates float v2b; // Can be either X or Y or Z depending on MissingAxis value. Multiply by 1024 to match world coordinates float v3b; // Can be either X or Y or Z depending on MissingAxis value. Multiply by 1024 to match world coordinates uint32_t Unknown; }; Code:
float X1, X2, X3, Y1, Y2, Y3, Z1, Z2, Z3; // Output vertices coordinates if (MissingAxis == 1) { X1 = (v1a * vecY + v1b * vecZ + ConstValue) / -vecX; X2 = (v2a * vecY + v2b * vecZ + ConstValue) / -vecX; X3 = (v3a * vecY + v3b * vecZ + ConstValue) / -vecX; Y1 = v1a; Y2 = v2a; Y3 = v3a; Z1 = v1b; Z2 = v2b; Z3 = v3b; } if (MissingAxis == 2) { X1 = v1a; X2 = v2a; X3 = v3a; Y1 = (v1a * vecX + v1b * vecZ + ConstValue) / -vecY; Y2 = (v2a * vecX + v2b * vecZ + ConstValue) / -vecY; Y3 = (v3a * vecX + v3b * vecZ + ConstValue) / -vecY; Z1 = v1b; Z2 = v2b; Z3 = v3b; } if (MissingAxis == 3) { X1 = v1a; X2 = v2a; X3 = v3a; Y1 = v1b; Y2 = v2b; Y3 = v3b; Z1 = (v1a * vecX + v1b * vecY + ConstValue) / -vecZ; Z2 = (v2a * vecX + v2b * vecY + ConstValue) / -vecZ; Z3 = (v3a * vecX + v3b * vecY + ConstValue) / -vecZ; } |
12-09-18, 13:07 | #897 |
Member
Joined: Sep 2010
Posts: 306
|
Thank you very much for the info - woah - how did you figure that s*it out - I mean by looking into the disassembly at least.
Btw I have recreated the CONFIG.INI file - it was actually quite tricky since every little mistake caused the game to crash - you just put this file into your root TRAOD directory and launch the game - no SCU needed - currently - it will load you on the second roof of the third level. I edit this file with notepad and only the text or numbers - keep the formatting exact. I have set all the DebugFlags so it'll currently load a custom position specified in the file so if you change the level it may spawn you out of bounds - don't be surprised - you can easily found current position of lara using the debugkeys and the f3 key. Last edited by sasho648; 12-09-18 at 13:35. |
12-09-18, 13:32 | #898 | ||
Member
Joined: Feb 2015
Posts: 874
|
Quote:
The triangle list gave me some headaches. In the end I decided to locate the function accessing those bytes with Cheat Engine and then it was just a matter of decompiling the function instruction by instruction. Quote:
Last edited by nakamichi680; 12-09-18 at 13:36. |
||
12-09-18, 13:54 | #899 |
Member
Joined: Apr 2015
Posts: 610
|
@Sasho648. It's amazing, I tried it out myself and it works
|
14-09-18, 16:37 | #900 |
Member
Joined: Sep 2010
Posts: 306
|
I'll put this here- I think that the wade controls are the perfect any-game 3d controller, Mario controls. The problem I'm facing is that it extends the movement a bit since it's blending to stance and this is a bit annoying.
Last edited by sasho648; 14-09-18 at 20:29. |
Thread Tools | |
|
|