Jump to content

Modding Lego Harry Potter.


annullus
 Share

Recommended Posts

Been playing around with Lego Harry Potter years 1-4 on pc trying to see the limits of file extraction. I can get all the files extracted using the Quickbms Script however it seems to be very glitched in the content that i end up with. For Example in game the harry potter minifig is bugged and his legs wont move, and other minifigs have graphical corruptions. I just want to know if anyone else has tried playing around with this games extracted files and if they have gotten better results than I.

Link to comment
Share on other sites

IIRC the LEGO Harry Potter games were made after the most recent version of the script. So, all the files might get extracted, but you most likely will get that corruption. Quick question, did you actually change anything yet, or have you just extracted the files and removed the .dat files to see if it runs?

Link to comment
Share on other sites

I have tried both, btw i am using the v5.0 script which seems to get all the files out properly.


# Traveller's Tales games DAT files extractor (script 0.5)

# LEGO Harry Potter

# LEGO Star Wars III

# LEGO Pirates of the Caribbean

#

# this script is expansion to the original script from aluigi

# original script for QuickBMS http://aluigi.org/papers.htm#quickbms

comtype lz2k

get INFO_OFF long

if INFO_OFF & 0x80000000

math INFO_OFF ^= 0xffffffff

math INFO_OFF <<= 8

math INFO_OFF += 0x100

endif

get INFO_SIZE long

log MEMORY_FILE INFO_OFF INFO_SIZE

get TYPE_BOH long MEMORY_FILE

get FILES long MEMORY_FILE

savepos INFO_OFF MEMORY_FILE

math TMP = FILES

math TMP *= 16

math NAME_INFO = INFO_OFF

math NAME_INFO += TMP

goto NAME_INFO MEMORY_FILE

get NAMES long MEMORY_FILE

savepos NAME_INFO MEMORY_FILE

math TMP = NAMES

math TMP *= 8

math NAME_OFF = NAME_INFO

math NAME_OFF += TMP

goto NAME_OFF MEMORY_FILE

get NAMECRC_OFF long MEMORY_FILE

savepos NAME_OFF MEMORY_FILE

math NAMECRC_OFF += NAME_OFF

goto NAMECRC_OFF MEMORY_FILE

for i = 0 < FILES

get CRC long MEMORY_FILE

putarray 0 i CRC

next i

if TYPE_BOH <= -2

get DUMMY1 long MEMORY_FILE

get DUMMY2 long MEMORY_FILE

if DUMMY1 > 0

	 print "Error: not implemented yet"

	 cleanexit

endif

endif

# print "files:	 %FILES%"

# print "names:	 %NAMES%"

# print "info_off: %INFO_OFF%"

# print "info_size: %INFO_SIZE%"

# print "name_info: %NAME_INFO%"

# print "name_off: %NAME_OFF%"

# print "namecrc_off: %NAMECRC_OFF%"

set NAMEZ long 0

set FULLNAME string ""

set FULLPATH string ""

for i = 0 < FILES

do

	 goto NAME_INFO MEMORY_FILE

	 get NEXT short MEMORY_FILE

	 get PREV short MEMORY_FILE

	 get OFF long MEMORY_FILE

	 savepos NAME_INFO MEMORY_FILE

	 math OFF += NAME_OFF

	 goto OFF MEMORY_FILE

	 get NAME string MEMORY_FILE

	 if NEXT & 0x8000 # 16bit sign conversion

		 math NEXT |= 0xffff0000

	 endif

	 if PREV != 0

		 getarray FULLPATH 1 PREV

	 endif

	 putarray 1 NAMEZ FULLPATH

	 if NEXT > 0 # folder

		 if NAME != ""

			 string FULLPATH += NAME

			 string FULLPATH += \

		 endif

	 else #file

	 endif

	 math NAMEZ += 1

while NEXT > 0

set FULLNAME string FULLPATH

string FULLNAME += NAME

	 math CRC = 0x811c9dc5

	 strlen NAMESZ FULLNAME

	 for j = 0 < NAMESZ

		 getvarchr CHR FULLNAME j

		 if CHR >= 0x61

			 if CHR <= 0x7a

				 math CHR -= 0x20

			 endif

		 endif

		 math CRC ^= CHR

		 math CRC *= 0x199933

	 next j

	 for j = 0 < FILES

		 getarray TMP 0 j

		 if CRC == TMP

			 break

		 endif

	 next j

	 if j >= FILES

		 print "Alert: the crc of the file %FULLNAME% has not been found, it can't be extracted!"

		 #cleanexit

		 # all wrongs!

		 math j = i

		 #math TMP = NEXT

		 #math j = 0

		 #math j -= NEXT

		 #math j -= 1

	 endif

	 math TMP = j

	 math TMP *= 16

	 math TMP += INFO_OFF

	 goto TMP MEMORY_FILE

	 get OFFSET long MEMORY_FILE

	 math OFFSET <<= 8

	 get ZSIZE long MEMORY_FILE

	 get SIZE long MEMORY_FILE

	 get PACKED long MEMORY_FILE

	 goto OFFSET

	 getdstring SIGN 4

	 if SIGN == "LZ2K"

		 set PACKED long 2

	 else

		 set PACKED long 0

	 endif

	 if PACKED & 2

		 callfunction UNLZ2K

		 log FULLNAME 0 SIZE MEMORY_FILE2

	 else

		 if SIZE != 0

		 if ZSIZE != 0

		 if SIZE != ZSIZE

			 print "SIZE (%SIZE%) and ZSIZE (%ZSIZE%) differ, contact me"

			 cleanexit

		 endif

		 endif

		 endif

		 log FULLNAME OFFSET SIZE

	 endif

next i

startfunction UNLZ2K

putvarchr MEMORY_FILE2 SIZE 0

log MEMORY_FILE2 0 0

append

for TMPSZ = 0 < ZSIZE

	 goto OFFSET

	 getdstring SIGN 4

	 if SIGN != "LZ2K"

		 print "Error: the signature at offset %OFFSET% (%SIGN%) is not LZ2K, contact me"

		 cleanexit

	 endif

	 get LZ2K_SIZE long

	 get LZ2K_ZSIZE long

	 savepos OFFSET

	 if LZ2K_ZSIZE == LZ2K_SIZE

		 log MEMORY_FILE2 OFFSET LZ2K_SIZE

	 else

		 clog MEMORY_FILE2 OFFSET LZ2K_ZSIZE LZ2K_SIZE

	 endif

	 math OFFSET += LZ2K_ZSIZE

	 savepos TMP MEMORY_FILE2

	 math TMPSZ += 12

	 math TMPSZ += LZ2K_ZSIZE

next

append

endfunction

I have both taken all the files out to see if it runs, which indeed it does, however the graphical glitches seem to still be there..

Link to comment
Share on other sites

The v5 script is new to me. If you could contact the author and let him know he should be able to chase it up. For now, uninstall the game and delete all the extracted files, and try again. Also, watch out for any errors during extraction.

Link to comment
Share on other sites

None so far, but presumably one could just reverse the steps in that BMS Script and it would work...

Don't literally reverse it ;P

Link to comment
Share on other sites

I haven't seen that QuickBMS script either, but if you are having issues with extraction, take origimaiguy's extractor out for a spin:

As for recreating the DATs, didn't you say that LIJ2 could run without them, Extreme? If al the games are kinda alike, HP should be able to do the same thing.

Link to comment
Share on other sites

True, that is correct, although, I was thinking in the case of WAD files, if someone builds an entire overhaul they might like to repack the game files.

Link to comment
Share on other sites

I tried that extractor it doesnt bring any of the textfiles out properly, instead they all have bits of audio data stashed in them

Link to comment
Share on other sites

Because it was built before Harry Potter. Remember, they change the file formats with every game. Completely reinstall your game, make sure it runs, extract the files and delete the *.dat files, run again to check it's working.

Link to comment
Share on other sites

As i installed it using steam i wiped the .dats and am going to to try extracting it now, will post back my results. Also i had that same problem when using the extractor on starwars saga :(

Link to comment
Share on other sites

Ah, make sure you right click the item in Steam, select "Properties" and look around. You need to disable Steam from Automatically Downloading Updates.

EDIT: Can you please tell me your computers specs?

Link to comment
Share on other sites

Ah i merely have a Phenom II 1090T, with 16Gb ram, and an 7950. Also the steam updating is irrelevant to the extracted archives, as it patches into the archives, if they are not present it will then download the archived data again and seek to patch. As this is not happening all i can conclude is that it must be an error with the extracted file data. Btw you dont need to extract all the files to test, only the files containing common data as that also stores the Hub area

Link to comment
Share on other sites

No, that's not the problem. The problem is the same with KotOR II and that when you mod the game and change the files, Steam fails a checksum, and will download new files, which will likely corrupt them.

And yes, you need to extract EVERYTHING because some of the other important files are split right across the .dat files.

If I can run my modded copy of Star Wars Saga with no graphical errors, this is an issue with your setup. So, you're definately sure there is no graphic errors prior to extraction, and that the extracted files all have names and are in the correct folder layout?

Link to comment
Share on other sites

an update, Extracting all the files it still bugs, however in a wierd issue if i start a level in freeplay the character who is bugged changes. My only hypothesis at the moment is that the graphical errors are caused by a lack of optimization and that the compressed archives are able to be read faster. That is the crux of the issue at the moment, the corruption seems to be limited to animations, the legs and jumping are animated properly on some minifigs. I was thinking that maybe the model animation file had been corrupted but that doesnt seem to be the case due to the findings of freeplay

Link to comment
Share on other sites

  • 1 month later...
MinifigRenderer

Just thought I'd ask in this discussion but I don't know whether anyone here has the Wii version of the game but a level in the second year "Tom riddles diary" has disappeared from the level board and it's the last level before I finish the storyline. Can anyone help with this? Again I know this discussion is for the PC version mods but I thought it would be the best place to ask.

Link to comment
Share on other sites

The main problem you'd have is with getting mods to run on the Wii. Not to say that it's impossible, but it would likely be highly frowned upon as you'd be required to break the copyright protection of the console and you'd also need to figure out how to get the mod files to overwrite the files on the game disc (I'm not as familiar with the Wii as I wish I was; does it have an internal/external hard-drive that you can install games to and run off?).

 

Furthermore, I'm not quite sure mods *would* be able to fix this scenario. The Level Selection stuff is pretty complex to deal with, and while I know that Professor Brickkeeper has had some great luck experimenting with that area and that I've been able to load some test levels from The LEGO Movie Videogame, I'm not sure you can add new slots/repair missing slots.

Link to comment
Share on other sites

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.