help with pk2 editing

01/06/2010 02:47 childthenite#1
sup guys^^

i need to know if anyone is familiar with diablo2oo2's dup2 patch maker. basically i want to know if it can be used to automatically search a string and delete it, instead of replacing. this is related to pk2 editing, more specifically with the media.pk2.

i have injected all 11th degree files into the data, particles and media .pk2's. i have also changed all of the chinese and euro weps to 11th degree. however gear wise, all i have been able to edit without deleting bytes out of
the itemdata_xxxxx.txt files is the chinese gear.

if you are unaware, 11th degree has 3 different sets, one of those sets are universally worn between the two races. i have used the universal set on the chinese, however on the euro's i would like to use one of the other sets. there names are as follows

universal set: clothes_11_ha.bsr
set a: clothes_11_set_a_ha.bsr
set b: clothes_11_set_b_ha.bsr


my dilemma is that i cannot change the european item name to set a or set b without manually searching through the text file for data to delete in order to keep the file the same size as the original. i would like to use dup2, to
make a patch which searches and replaces item\europe\man_item\clothes_10_ha.bsr with item\common\man_item\clothes_11_set_a_ha.bsr and also search for another string(which i have found to be the size which i need to delete), and delete it.

the purpose of the patch is simply long term. for example if there is an update and the file has been overwritten, i can simply use the patch, rather than having to do it manually again.

all and any help would be greatly appreciated :)

ps. if you have another method of doing this, please post it.

regards
child.
01/06/2010 02:53 Eckoro#2
you are making it seem more complicated than it is, all you have to do is open the itemdata_.txt.

[Only registered and activated users can see links. Click Here To Register...]

that is just one row I have taken from it as you can see there is directory reference names, these can just be edited.

1. Model
2. Model of Chest
3. Inventory Icon

are the 3 reference directories if you are wondering, tell me how it goes, just observe and compared, you do not need to change anything in data.pk2 un-necessary.

For a PK2 Extractor and Editor you could use this one which is a user modified version of Pushedx's. Enjoy,
01/06/2010 03:24 childthenite#3
thanx for your help m8, i should have been clearer. i'm not trying to edit anything in the data.pk2. what i was trying to say is that if i change the directory paths in itemdata_xxxxx.txt from item\europe\man_item\clothes_10_ha.bsr to item\common\man_item\clothes_11_set_a_ha.bsr, the file size increases. once i upload the file back into the media.pk2 and try to load the game and log in, the game crashes. however if i delete some data out of it to take it back to the original size and upload it once more and try to login, there is no crash. :S. so i wanted to find an automated way of replacing item\europe\man_item\clothes_10_ha.bsr with item\common\man_item\clothes_11_set_a_ha.bsr and delete the bytes required out of the file.
01/06/2010 03:29 Eckoro#4
Quote:
Originally Posted by childthenite View Post
thanx for your help m8, i should have been clearer. i'm not trying to edit anything in the data.pk2. what i was trying to say is that if i change the directory paths in itemdata_xxxxx.txt from item\europe\man_item\clothes_10_ha.bsr to item\common\man_item\clothes_11_set_a_ha.bsr, the file size increases. once i upload the file back into the media.pk2 and try to load the game and log in, the game crashes. however if i delete some data out of it to take it back to the original size and upload it once more and try to login, there is no crash. :S. so i wanted to find an automated way of replacing item\europe\man_item\clothes_10_ha.bsr with item\common\man_item\clothes_11_set_a_ha.bsr and delete the bytes required out of the file.
best way to do it is open it up in excel or some spreadsheet program from openoffice etc. Try not to edit it with notepad or wordpad, can mess up the columns and cause crashes like you had.
01/06/2010 03:34 childthenite#5
Quote:
Originally Posted by Eckoro View Post
best way to do it is open it up in excel or some spreadsheet program from openoffice etc. Try not to edit it with notepad or wordpad, can mess up the columns and cause crashes like you had.
oh i see, i didnt even think of opening it up in excel. also does that mean your saying that the size of the file does not matter?
01/06/2010 03:36 Eckoro#6
Quote:
Originally Posted by childthenite View Post
oh i see, i didnt even think of opening it up in excel. also does that mean your saying that the size of the file does not matter?
filesize does indeed not matter or effect it in anyway.
01/06/2010 03:38 childthenite#7
Quote:
Originally Posted by Eckoro View Post
filesize does indeed not matter or effect it in anyway.
thanx alot for your help mate, finally got an answer i've been looking for. :)
01/06/2010 03:48 Eckoro#8
Quote:
Originally Posted by childthenite View Post
thanx alot for your help mate, finally got an answer i've been looking for. :)
tell me if it works. Hopefully it should or contact me via my email for more detail.
01/10/2010 03:00 childthenite#9
Quote:
Originally Posted by Eckoro View Post
tell me if it works. Hopefully it should or contact me via my email for more detail.
well mate, i finally got around to doing it, been so busy lately, and you were right, file size does not matter and it works like a charm. I made a patch for the chinese gear to be changed into 11th degree with diablo2oo2's dup2 however i still cant seem to make a patch for the euro one, as you said the columns screw up when using that method, because of the replace string being longer than the search string :(.

thanx again for all your help

regards
child