THPS HD - Community Project: Let's make the game GOOD!

THPS HD discussions can go here, about modding, or what ever you want
skejt23
VIP
Posts: 18
Joined: Wed Mar 17, 2010 5:57 pm
Location: Poland

Re: THPS HD - Community Project: Let's make the game GOOD!

Postby skejt23 » Tue Sep 25, 2012 3:56 am

Anteara wrote:
skejt23 wrote:
KaMeR wrote:@Anteara he use his sdk in c++ and all you have to do is set bAllowRevertLandings to true.

@coolsnake what did you edit to fix manuals ? so we could add it to the mod project


bAllowRevertLandings to true always after loading level.


Yeah, that's what I thought; but how did you actually do it? I can't figure out how to actually edit .upk files through UE Explorer. Did you edit the hex? Or did you set it to true in your proxy dll?


I'm not even messing with the scripts, just DLL and the SDK i've posted on forum. Tho it might be a little hard for someone that is new to reverse engineering and stuff like that.

Anteara
VIP
Posts: 27
Joined: Wed Oct 13, 2010 3:32 pm

Re: THPS HD - Community Project: Let's make the game GOOD!

Postby Anteara » Tue Sep 25, 2012 4:40 am

Yeah it would be hard. Since a lot of us here have contributions that we could make to the game, why don't you do something like a tutorial? Perhaps just a video tutorial of enabling revert, or changing physics, etc.
Also, included in that could be a blank dll, OR, a google code page could be set up, in which you supply your dll along with source, and revisions can be made upon it. This would allow us as a community to continuously update the game, and post revisions as we update it.

I think it's worth it.

skejt23
VIP
Posts: 18
Joined: Wed Mar 17, 2010 5:57 pm
Location: Poland

Re: THPS HD - Community Project: Let's make the game GOOD!

Postby skejt23 » Tue Sep 25, 2012 5:12 am

I'll think about it.

coolsnake
VIP
Posts: 54
Joined: Mon Dec 12, 2011 11:36 am

Re: THPS HD - Community Project: Let's make the game GOOD!

Postby coolsnake » Tue Sep 25, 2012 6:13 am

Anteara wrote:
skejt23 wrote:
KaMeR wrote:@Anteara he use his sdk in c++ and all you have to do is set bAllowRevertLandings to true.

@coolsnake what did you edit to fix manuals ? so we could add it to the mod project


bAllowRevertLandings to true always after loading level.


Yeah, that's what I thought; but how did you actually do it? I can't figure out how to actually edit .upk files through UE Explorer. Did you edit the hex? Or did you set it to true in your proxy dll?


For my manual fix, I opened THHDGame.upk in ue explorer, went to THHD Balance Data and messed with the following code.

Code: Select all

      if(prevManual == 0 && (PlayerP.ManualType == 1) || (prevManual == 1 && (PlayerP.ManualType == 0)))
      {
         InputValue = LastInputValue * float(-1);
         InputVel = LastInputVel * float(-1);
         InputAccScalar = LastInputAccScalar * float(-1);
      }
      // End:0x1c7
      else
      {
         InputValue = LastInputValue;
         InputVel = LastInputVel;
         InputAccScalar = LastInputAccScalar;
      }
      prevManual = PlayerP.ManualType;
   }


You can see the corresponding code by right clicking on THHDBalanceData and select view buffer. This shows you the hex code you need to edit, you can then open the file with a hex editor and then edit it. How to read it is the huge pain in the ass part.

I changed it to something like
if(prevManual == 0 && (PlayerP.ManualType ==2) || (prevManual == 1 && (PlayerP.ManualType == 2)))
{
InputValue = LastInputValue * float(-1);
InputVel = LastInputVel * float(-1);
InputAccScalar = LastInputAccScalar * float(-1);
}
// End:0x1c7
else
{
InputValue = LastInputValue;
InputVel = LastInputVel;
InputAccScalar = LastInputAccScalar;
}
prevManual = PlayerP.ManualType;
}

so that the first statement is never true. Hex code for 1 was 80 3F and needed to be replaced with 00 40 which is 2.

To allow revertlandings you need to go to THHDPlayerPawn, then go to the function "client restart" and edit the following code

Code: Select all

               if(levelData != none && (GRI == none || (levelData.MapId == GRI.SelectedLevelId)))
               {
                  bAllowRevertLandings = levelData.bIsexpansiondata;
               }
               ++ I;
               // This is an implied JumpToken; Continue!
               goto J0x2e9;


The problem is that I can't just delete the corresponding hex code for levelData.bIsexpansiondata and replace it with "true", I need something that has the same length in hexcode, it should be a statement that is always true while loading the level, which I haven't been able to find.

Any chance you'll release the mod with just the manual fix and revert fix skejt? I'm guessing you haven't released it yet because you still need to tinker with the online part.

Also, where is this magical SDK?

EDIT: also, if someone has experience with bnk files, please take a look at the file format for me. I think a common wanted fix for people would be the removal of school bell sounds in School II. For me personally, I'd also like to remove the glass breaking sounds or change it to something less ear shattering. Haven't been able to edit it with the current bnk editors that are available (for the NFS games).
My converterted THUG2 PS2 parks to PC
Thanks to THPSX twitter account for converting. Contains tons of parks from Evil God, A couple from me (Beryllium, Belgian Prison), KSK Rooftops 2 and 3, Vex-Middle East, Verty Hollow from Mike, Ruin Cap etc...

skejt23
VIP
Posts: 18
Joined: Wed Mar 17, 2010 5:57 pm
Location: Poland

Re: THPS HD - Community Project: Let's make the game GOOD!

Postby skejt23 » Tue Sep 25, 2012 6:32 am


bAstimc
VIP
Posts: 132
Joined: Thu Jun 10, 2010 2:33 pm

Re: THPS HD - Community Project: Let's make the game GOOD!

Postby bAstimc » Tue Sep 25, 2012 6:58 am

ok i just got my launcher to work with dll injection :D

Anteara
VIP
Posts: 27
Joined: Wed Oct 13, 2010 3:32 pm

Re: THPS HD - Community Project: Let's make the game GOOD!

Postby Anteara » Tue Sep 25, 2012 9:56 am

Another problem with the sticky keys is reverts.

Evidently it's not skejt23's fault; it's the game engine. This can be known since it's also difficult to pull special tricks.
In THUG2 - I can spam LEFTLRIGHTLEFTRIGHTLEFTRIGHT GRAB, and it will grab.
However, in THHD, I need to do LEFT - RIGHT - GRAB. Precisely.

Same thing with manual, I like to go UPDOWNUPDOWNUPDOWNUPDOWN until it manuals. Basically I spam up and down.
You can't do that with THHD either, it needs to be precise.

Do you guys think there is any way to get around this? I' think it's a problem with the engine though, unless we can define 'preciseness'.

bAstimc
VIP
Posts: 132
Joined: Thu Jun 10, 2010 2:33 pm

Re: THPS HD - Community Project: Let's make the game GOOD!

Postby bAstimc » Tue Sep 25, 2012 10:15 am

;D thats what i hated on ps3 even i played on kb :roll: and yeah its on pc too :roll:

%.gone.
Global Moderator
Posts: 373
Joined: Sun Mar 07, 2010 5:12 pm

Re: THPS HD - Community Project: Let's make the game GOOD!

Postby %.gone. » Tue Sep 25, 2012 12:28 pm

@coolsnake
The sounds are in the .wem files. In SoundBanks.xml you'll find all audio association, for each <SoundBank > code block you'll find <ReferencedStreamedFiles> that hex name matches the name of a .wem. Now if i had to guess it's even easier than deleting the entire file and losing all sounds you should be able to simply remove that sounds reference through this .xml file.
Find <ShortName>WwiseDefaultBank_Audio_School2</ShortName> in the xml file then look for

<Event Id="3658007041" Name="Play_OBJ_SchoolBell_Ring_Loop" /> and I think below are the bells sound
<File Id="789467377" Language="SFX">
<ShortName>School_Bell_03.wav</ShortName>
<Path>sfx\school_bell_03_a58f39a0.wem</Path>
</File>
<File Id="281955031" Language="SFX">
<ShortName>School_Bell_04.wav</ShortName>
<Path>sfx\school_bell_04_a58f39a0.wem</Path>
</File>

And remove them, however, keep in mind 1)I haven't tried this and 2) removing the loop event reference might do the trick without removing the .wav reference. If not, remove the .wav reference too.

coolsnake
VIP
Posts: 54
Joined: Mon Dec 12, 2011 11:36 am

Re: THPS HD - Community Project: Let's make the game GOOD!

Postby coolsnake » Tue Sep 25, 2012 2:25 pm

%.gone. wrote:@coolsnake
The sounds are in the .wem files. In SoundBanks.xml you'll find all audio association, for each <SoundBank > code block you'll find <ReferencedStreamedFiles> that hex name matches the name of a .wem. Now if i had to guess it's even easier than deleting the entire file and losing all sounds you should be able to simply remove that sounds reference through this .xml file.
Find <ShortName>WwiseDefaultBank_Audio_School2</ShortName> in the xml file then look for

<Event Id="3658007041" Name="Play_OBJ_SchoolBell_Ring_Loop" /> and I think below are the bells sound
<File Id="789467377" Language="SFX">
<ShortName>School_Bell_03.wav</ShortName>
<Path>sfx\school_bell_03_a58f39a0.wem</Path>
</File>
<File Id="281955031" Language="SFX">
<ShortName>School_Bell_04.wav</ShortName>
<Path>sfx\school_bell_04_a58f39a0.wem</Path>
</File>

And remove them, however, keep in mind 1)I haven't tried this and 2) removing the loop event reference might do the trick without removing the .wav reference. If not, remove the .wav reference too.


It's unfortunately not that easy. The game doesn't read or use the xml file/txt files and the bnk file is a container for wem files in this case, it contains around 80 sounds.

Actually it is that easy, I just found out the bnk is basically the wem files spliced together with no encryption so yeah, no bells anymore.

Please backup your WwiseDefaultBank_Audio_School2.bnk file just in case.

Also feel I should mention there is replaymode stuff in the scripts. It seems the intention was to upload it with your score on the leaderboard and that people could watch it and stuff.
My converterted THUG2 PS2 parks to PC
Thanks to THPSX twitter account for converting. Contains tons of parks from Evil God, A couple from me (Beryllium, Belgian Prison), KSK Rooftops 2 and 3, Vex-Middle East, Verty Hollow from Mike, Ruin Cap etc...


Return to “THPS HD”

Who is online

Users browsing this forum: No registered users and 3 guests