[HELP] Python script

01/01/2016 20:39 nick4ever#1
Hi all,

I used this python script
Quote:
[Only registered and activated users can see links. Click Here To Register...]
to unpack my *.SData, but there were some errors I could not know how to fix

Here the errors:
Quote:
Creating ./Output/SData/Item.complete.csv
Traceback (most recent call last):
File "src\SData.py", line 113, in <module>
main(sys.argv[1:])
File "src\SData.py", line 102, in main
result = SDataItems[SDataName](outFmt)
File "C:\Python27\src\Item.py", line 90, in MainItem
return ExtractItem(outFmt)
File "C:\Python27\src\Item.py", line 194, in ExtractItem
rec = unpack_fields(input, item_types, {})
File "C:\Python27\src\Utils.py", line 97, in unpack_fields
rec[ field[0]] = unpack_field(input, type)
File "C:\Python27\src\Utils.py", line 85, in unpack_field
len = struct.unpack('=I', input.read(4))[0]
struct.error: unpack requires a string argument of length 4
Press any key to continue . . .
This so far happened to Skill.SData, NPCQuest.SData, Item.SData, NPCKill.SData. I think the problem laid on the Utils.py script but I do not have much knowledge about Python. Anyone knows how to fix this, please help me. I did search but still a dead end. Please help.....
01/02/2016 18:17 snowofdragon#2
try another Python version. i use 2.6
01/04/2016 09:12 nick4ever#3
I believe that SDatas of EP 6.3 have a bit differrent to the old ones. Anybody successfully extract NPCQuest.SData to CSV then repack? Please help
01/04/2016 19:24 Rickicki77#4
If you use EP6 sdata, NpcQuest edit with sh studio 7.5.3 it's work, just in serverfile the format of Npc is ep5 and in client is ep6.
01/04/2016 20:33 nick4ever#5
Hi @Rick,

Thank you for your reply, so what if I need to export NPCQuest.SData to csv sir?
01/05/2016 13:28 Truth1010#6
The python scripts included with that release are old/outdated now. They work fine for Ep4/5 data's but anything higher has changes to the values/length etc.

You could edit the scripts to take into account the new data being found, but to do that you would probably need to have some understanding of reading the data in hex to see where it is skipping.