[Tutorial] Using ZeroSignal's Python scripts for editing SData files and not only

09/08/2013 19:11 nubness#1
Hello everyone,

I see some posts from people that claim not to be able to edit the .SData files in .csv, which means using ZeroSignal's Python scripts for unpacking them and opening them in a .csv editor.

This tutorial is not rocket science, it is basic knowledge, and I hope that there won't be any questions for anybody after reading this whole post.

What can be edited in .csv ? With this method you can edit .SData files, .svmap files, .MLT files and .ITM files.

Let's begin. First of all, you need to download Python. There's newer versions, but I've been always using 2.6 and never had any problems with it. You can download any version from [Only registered and activated users can see links. Click Here To Register...].
The installation is pretty straight forward. The default installation root location is C:\, don't change it, you'll see later why.

Next you need to download the [Only registered and activated users can see links. Click Here To Register...] Python Scripts [Only registered and activated users can see links. Click Here To Register...].

Copy the contents of the .zip file in the Python folder, basically C:\Python<version>, in my case it's C:\Python26. Your Python folder must contain both Python default files and the files from the shay_data_edit_0-1c.zip file.

Before we proceed to the actual file unpacking, you should make sure you have downloaded and installed [Only registered and activated users can see links. Click Here To Register...], which is a great, freeware program that can safely open, edit and save .csv files.

You should also download the [Only registered and activated users can see links. Click Here To Register...], which can both encrypt and decrypt the ep5 and lower .SData files, by dragging the respective .SData file on them.
For an easier future, place both files in both Input\SData and Output\SData folders. This way you can encrypt/decrypt .SData files right before unpacking/right after packing them.

We're done with getting everything ready to work, now let's do the actual work.
Paste an Item.SData file in the Input\SData folder. If it's encrypted, simply drag it over ShaiyaSdataToolDecrypt.exe, delete the current Item.SData and rename the Item.SData.decrypted to Item.SData.
Open the Command Prompt(Win + R, cmd, Enter), and type in the command to move to the Python directory, as follows : CD "C:\Python26". Again, this is my case, it depends on where you installed Python. I recommended you use the default location so you don't have to type something like CD "C:\Hi\My\Name\Is\Python\Python26", this is useless.

On the following line, you type a next command, which calls the Python script responsible for unpacking the Item.SData, as follows : Item_csv.
You can go to Output\SData and find a new file, named Item.complete.csv. Open it in OpenOffice, and select the value delimiter as comma ONLY, no spaces, no semicolon, just comma.

After you're done editing the .csv file, you can pack it using the following command : Item_sdata.
You will see a new file in the Output\SData folder, named Item.SData, which is decrypted by default.

Below you have the explanation given by ZeroSignal in his release thread. There are people who didn't understand his explanation, but I hope after my detailed one, you will understand how simple it is by reading ZeroSignal's guide.

Enjoy !
11/23/2013 17:36 Shànks♠#2
Any help plz I can't convert the Item.SData to .csv file . I done everything step by step but nothing...
11/23/2013 19:47 nubness#3
Are you using an Item.SData that Shaiya Studio cannot read ?
11/24/2013 12:02 Shànks♠#4
yup [Only registered and activated users can see links. Click Here To Register...]
11/24/2013 14:36 nubness#5
Sorry to disappoint, you'd have to modify the scripts if you want this to work for you, there's new columns in the new Item.SData.
11/24/2013 15:55 Shànks♠#6
What should I modify on the scripts then?
11/24/2013 16:12 nubness#7
Relax, you cannot do it. Just stop trying to make ep6 servers, they'll never be fully functional anyway.
11/24/2013 16:43 Shànks♠#8
nah I'm not trying to make an ep6 just an test ep4.5
11/24/2013 16:56 nubness#9
Then use ep5.4 .SData's.
12/24/2013 15:05 AriezOMG#10
I read through this to try and find a bit of info, and I feel that the discouragement was unnecessary. Just because he doesn't know how doesn't mean he can't, just takes a bit of python research. This is actually a very useful tutorial, especially for someone trying to create files for future developers.
12/24/2013 15:16 Shànks♠#11
I found the problem why I couldnt open the SData(Encrypt,decrypt and somehow the file crashed). I used another .SData but I think my python has a problem. I tried again with another version of python but nothing.If anyone would like to help abit!
12/24/2013 15:38 AriezOMG#12
Well, from what I was told in the past, after shstudio has tampered with an sdata file, there's no going back to CSV. Perhaps that has something to do with it?
12/24/2013 19:31 nubness#13
Quote:
Originally Posted by AriezOMG View Post
Well, from what I was told in the past, after shstudio has tampered with an sdata file, there's no going back to CSV. Perhaps that has something to do with it?
Shaiya Studio works just fine with most files, except for those which are composed out of multiple files (my own observation), those being the NpcQuest.SData and the .svmap files. In rest, it never caused me any trouble with any other files.
02/20/2014 16:16 andya78#14
ok so ive followed a number of tutorials on how to set python up and all i ever get is python is not recognized as an internal or external command
03/03/2014 16:50 [Admin]ßІί†ž#15
You must create a path environment variable in windows first.