It is currently 16 Apr 2024, 07:43
   
Text Size

DotP 2013 - Tools & WAD signature check disabling

Moderator: CCGHQ Admins

DotP 2013 - Tools & WAD signature check disabling

Postby Rick » 24 Jun 2012, 03:42

Tools (code & binaries):

http://svn.gib.me/public/duels/
http://svn.gib.me/builds/duels/

Note that the usage of Gibbed.Duels.Unpack.exe and Gibbed.Duels.Pack.exe has changed, they offer more functionality, I suggest you read their new usage.

Pack now defaults to version 0x202, so if you are using my tools for earlier versions of the game (2012 and 2010), you will need to specify --wv 0x201 (or --wad-version=0x202).

WAD files with version 0x202 have special data in the header now -- which is typically a copy of HEADER.XML found deeper in the file tree, When unpacking with Unpack, this is stored in the root directory of an unpacked WAD in @header.xml, and Pack will automatically read this file too.

WAD signature check disabling:

You have two options,

Patch memory address 0x0060C630 to B0 01 C3 (original is 55 8B EC) to disable the check.

Or you can use my dynamic patcher wrapper DLL which will handle this for you automatically. Drop the DLL into the game directory alongside DotP_D13.exe. Do not overwrite d3dx9_43.dll in any system directories!

As a side effect, the game will now boot up much faster since it doesn't have to hash every WAD with SHA256 on startup.

If you have any comments, questions, etc for my tools or the wrapper DLL, feel free to ask here (that's why I made a new thread, anyway).
gibbed
Rick
Programmer
 
Posts: 40
Joined: 18 Jun 2011, 03:39
Has thanked: 0 time
Been thanked: 56 times

Re: DotP 2013 - Tools & WAD signature check disabling

Postby MisterBenn » 24 Jun 2012, 05:10

What is that, 4 days all in? That's good going Rick.
MisterBenn
 
Posts: 97
Joined: 19 Mar 2011, 16:19
Has thanked: 24 times
Been thanked: 11 times

Re: DotP 2013 - Tools & WAD signature check disabling

Postby Rick » 24 Jun 2012, 05:32

MisterBenn wrote:What is that, 4 days all in? That's good going Rick.
There were minimal changes in 0x202, I just wanted to do a code cleanup and have something to disable the WAD signature check before I released anything, and I've been busy lately, if I hadn't this would have been up on the same day as the game. :)
gibbed
Rick
Programmer
 
Posts: 40
Joined: 18 Jun 2011, 03:39
Has thanked: 0 time
Been thanked: 56 times

Re: DotP 2013 - Tools & WAD signature check disabling

Postby pcastellazzi » 24 Jun 2012, 08:08

Compression is not working properly.

Code: Select all
Unhandled Exception: System.IO.EndOfStreamException: Attempted to read past the end of the stream.
   at Gibbed.IO.StreamHelpers.WriteFromStream(Stream stream, Stream input, Int64 size, Int32 buffer)
   at Gibbed.Duels.Pack.Program.Main(String[] args)
The lights then came up and the crowd erupted in applause, because that's what the crowd does after it watches destruction on a large screen.
— Ben Kuchera, Mordern Warfare 3 review.
User avatar
pcastellazzi
 
Posts: 184
Joined: 25 Apr 2012, 00:40
Location: Montevideo, Uruguay
Has thanked: 11 times
Been thanked: 30 times

Re: DotP 2013 - Tools & WAD signature check disabling

Postby pcastellazzi » 24 Jun 2012, 08:14

Another bug. --wad-header never found HEADER.XML, not matter what path i use. It only works with @header.xml in the default location.
The lights then came up and the crowd erupted in applause, because that's what the crowd does after it watches destruction on a large screen.
— Ben Kuchera, Mordern Warfare 3 review.
User avatar
pcastellazzi
 
Posts: 184
Joined: 25 Apr 2012, 00:40
Location: Montevideo, Uruguay
Has thanked: 11 times
Been thanked: 30 times

Re: DotP 2013 - Tools & WAD signature check disabling

Postby thefiremind » 24 Jun 2012, 08:55

I tried unpacking and repacking of the same WAD by dropping the WAD on the unpacker and the resulting directory on the packer, and it seems it did all right. The final WAD is bigger than the original, maybe because you are still not using any compression, but that's not a problem.

I think you want to know that your DLL is not compatible with the THETA version of the game: the game doesn't start and a message says "Failed to hook steam_api.dll". :P
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
User avatar
thefiremind
Programmer
 
Posts: 3515
Joined: 07 Nov 2011, 10:55
Has thanked: 118 times
Been thanked: 721 times

Re: DotP 2013 - Tools & WAD signature check disabling

Postby Rick » 24 Jun 2012, 09:09

pcastellazzi wrote:Compression is not working properly.

Code: Select all
Unhandled Exception: System.IO.EndOfStreamException: Attempted to read past the end of the stream.
   at Gibbed.IO.StreamHelpers.WriteFromStream(Stream stream, Stream input, Int64 size, Int32 buffer)
   at Gibbed.Duels.Pack.Program.Main(String[] args)
Oops. I had rewritten some code there and forgot to test compression, it's fixed in r5.

pcastellazzi wrote:Another bug. --wad-header never found HEADER.XML, not matter what path i use. It only works with @header.xml in the default location.
What path were you giving? If it's a relative path, it's relative to the base directory you gave to pack, not the current directory.

IE:

Gibbed.Duels.Pack.exe --wad-header=myheader.xml Deck_Test_ST Deck_Test_ST.wad

Will make it look for .\Deck_Test_ST\myheader.xml, not .\myheader.xml
gibbed
Rick
Programmer
 
Posts: 40
Joined: 18 Jun 2011, 03:39
Has thanked: 0 time
Been thanked: 56 times

Re: DotP 2013 - Tools & WAD signature check disabling

Postby pcastellazzi » 24 Jun 2012, 16:24

Rick wrote:What path were you giving? If it's a relative path, it's relative to the base directory you gave to pack, not the current directory.
My bad.
The lights then came up and the crowd erupted in applause, because that's what the crowd does after it watches destruction on a large screen.
— Ben Kuchera, Mordern Warfare 3 review.
User avatar
pcastellazzi
 
Posts: 184
Joined: 25 Apr 2012, 00:40
Location: Montevideo, Uruguay
Has thanked: 11 times
Been thanked: 30 times

Re: DotP 2013 - Tools & WAD signature check disabling

Postby GamerXYZ0 » 24 Jun 2012, 17:31

Great :D

Since I barely ever touch the command prompt, do I use it right like this? I open CMD, drag the pack program in it, then I press space and type (without quotation marks) "--wad-header=HEADER.xml", then another space, then I drag the unpacked wad in it, then a space, then I drag the unpacked wad once again in it and add .wad behind it.
GamerXYZ0
 
Posts: 102
Joined: 17 Jun 2011, 19:29
Has thanked: 10 times
Been thanked: 7 times

Re: DotP 2013 - Tools & WAD signature check disabling

Postby sumomole » 24 Jun 2012, 17:46

THX!
Successfully transplanted the deck of D12, And then make the new cards.
User avatar
sumomole
Programmer
 
Posts: 611
Joined: 07 Jun 2011, 08:34
Has thanked: 51 times
Been thanked: 234 times

Re: DotP 2013 - Tools & WAD signature check disabling

Postby GamerXYZ0 » 24 Jun 2012, 20:15

An edited Data_Core.WAD appears to cause the game to crash on startup. I've tried without compression, and with compression.
GamerXYZ0
 
Posts: 102
Joined: 17 Jun 2011, 19:29
Has thanked: 10 times
Been thanked: 7 times

Re: DotP 2013 - Tools & WAD signature check disabling

Postby kevlahnota » 25 Jun 2012, 01:35

thanks for the tools rick :D

additional info if you have theta version(for dynamic patcher wrapper DLL to work).

1) hexedit dotp_13.exe and find/search storm_api, rename it to steam_api

2) rename storm_api.dll to steam_api.dll (theta uses storm_api)

3) put rick's d3dx9_43.dll to the game directory.
User avatar
kevlahnota
Programmer
 
Posts: 825
Joined: 19 Jul 2010, 17:45
Location: Philippines
Has thanked: 14 times
Been thanked: 264 times

Re: DotP 2013 - Tools & WAD signature check disabling

Postby Rick » 25 Jun 2012, 02:20

GamerXYZ0 wrote:An edited Data_Core.WAD appears to cause the game to crash on startup. I've tried without compression, and with compression.
Can you tell me exactly how you're repacking? I explicitly tried this and it worked fine.
gibbed
Rick
Programmer
 
Posts: 40
Joined: 18 Jun 2011, 03:39
Has thanked: 0 time
Been thanked: 56 times

Re: DotP 2013 - Tools & WAD signature check disabling

Postby GamerXYZ0 » 25 Jun 2012, 03:49

I still do it the same way: "I open CMD, drag the pack program in it, then I press space and type (without quotation marks) "--wad-header=HEADER.XML", then another space, then I drag the unpacked wad in it, then a space, then I drag the unpacked wad once again in it and add .WAD behind it."

Only with compression, I first press space and type (without quotation marks) "--compress" (and then space, --wad-header etcetera). It produces a file of (almost) the same file size (without compression much bigger of course).

I only changed 1 thing in the file: in the CONFIGS folder I edited DIFFICULTY_SETTINGS.XML, setting everything to as good as lvl 10 has (I did this in the previous DotP games as well). I always do that because there are many signs of the AI having rigged draws on Planeswalker difficulty: like this, I can play on Planeswalkers difficulty without rigged draws, as lower difficulties won't suffer from misplays on purpose.

Oh, and I just tried dragging HEADER.XML instead of typing it, to ensure it uses the right one, but the result was the same: crash on startup.

P.s. I don't know if it's part of the problem, but before, I edited Deck_0011_ST to make Nicol Bolas's deck available by changing never_available="true" in always_available="true", which according to Firemind worked fine for the DLC decks. But Bolas's deck wasn't unlocked. Perhaps because that .wad got corrupted or anything as well? Unfortunately, I can't test with the DLC decks, as I stupidly had overwritten the original Data_Core.WAD when I had dragged and dropped the new version (so: no copy in garbage bin), and I don't have the download saved on my PC.
GamerXYZ0
 
Posts: 102
Joined: 17 Jun 2011, 19:29
Has thanked: 10 times
Been thanked: 7 times

Re: DotP 2013 - Tools & WAD signature check disabling

Postby n00854180t » 25 Jun 2012, 04:15

As part of an effort to enable the Nicol Bolas deck in my game I removed the 'never_available="true"' line from the Nicol Bolas deck and repacked it, which causes it to show up in the Deck Manager. However, it appears locked. To see if I could fix this I decided to add an unlock line for the deck to one of the Campaign battles.

Unfortunately something really weird happens when I use the repacked Data_Core.WAD file. To be sure the issue can be reproduced, here's the line I added in the file Data_Core_unpacked\DATA_CORE\DATA_ALL_PLATFORMS\CAMPAIGN\CAMPAIGN1.XML:

Code: Select all
<unlock deck="DECK_NICOL_BOLAS" />
Right after this line for the Nicol Bolas fight:

Code: Select all
<unlock promo="nicol_bolas_one" gamer_pic="2"/>
(Bah I can't get a screenshot of it apparently, it just grabs the stuff behind the game.)

In any case, normally the campaign menu is like this (with \/ denoting which is selected):

\/
Campaign | Revenge | Planechase | Challenges


After launching the game with the modified and repacked .WAD, the layout looks like this:

\/
Challenges | Planechase | Revenge | Campaign


The actual planes are listed in the normal order, but I can't actually start any games (I can get to the deck menu with the Start Game button, but it just boots me back to the plane menu where you select an encounter/opponent).

It doesn't seem to matter which campaign I put the unlock line in. I'm not sure if just straight repacking it causes the issue.

Here's the command I used to repack it:

Code: Select all
Gibbed.Duels.Pack.exe -c -wv=0x202 Data_Core_unpacked Data_Core.WAD
The issue also occurred regardless of using compression.
n00854180t
 
Posts: 19
Joined: 09 Oct 2010, 05:41
Has thanked: 0 time
Been thanked: 0 time

Next

Return to Utilities

Who is online

Users browsing this forum: No registered users and 11 guests


Who is online

In total there are 11 users online :: 0 registered, 0 hidden and 11 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 11 guests

Login Form