Hi, this guide is extremely useful, but I keep getting this error when I open NPCQuest.csv, I have the decrypted NpcQuest.SData file in the input folder, but I've tried different things and I do not know how to fix/ solve, can someone help me? tnx :P
input The name of the SData file. It must be within the same folder.
-o The output format of the file.
outformat csv_import (def) Creates CSV File suitable for DB Importing.
csv_complete Creates complete CSV File for Editing.
export_complete Creates SData File suitable for Recombining.
That mean you didnt restarted your computer after installed MSSQL. Try to restart your Computer and it will work fine.
Other problems: I wont answer you guys becouse those questions are already has been answered by developers... try to search -.-
Ohh lol, I got this to work a while ago, problem was when I used Python32- it didnt like it and when I used Python27, it worked like a star. But tnx for the reply
hello i have problem converting an sdata into a .csv file is decrypted no firewall issues anyone have any ideas?
Code:
Creating ./Output/SData/Skill.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:\Users\JARED\Desktop\New SH studio\shay_data_edit_0-1c\src\Skill.py",
line 123, in MainSkill
return ExtractSkill("Skill", outFmt)
File "C:\Users\JARED\Desktop\New SH studio\shay_data_edit_0-1c\src\Skill.py",
line 193, in ExtractSkill
rec = unpack_fields(input, skill_types, {})
File "C:\Users\JARED\Desktop\New SH studio\shay_data_edit_0-1c\src\Utils.py",
line 97, in unpack_fields
rec[ field[0]] = unpack_field(input, type)
File "C:\Users\JARED\Desktop\New SH studio\shay_data_edit_0-1c\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 . . .
hello i have problem converting an sdata into a .csv file is decrypted no firewall issues anyone have any ideas?
Code:
Creating ./Output/SData/Skill.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:\Users\JARED\Desktop\New SH studio\shay_data_edit_0-1c\src\Skill.py",
line 123, in MainSkill
return ExtractSkill("Skill", outFmt)
File "C:\Users\JARED\Desktop\New SH studio\shay_data_edit_0-1c\src\Skill.py",
line 193, in ExtractSkill
rec = unpack_fields(input, skill_types, {})
File "C:\Users\JARED\Desktop\New SH studio\shay_data_edit_0-1c\src\Utils.py",
line 97, in unpack_fields
rec[ field[0]] = unpack_field(input, type)
File "C:\Users\JARED\Desktop\New SH studio\shay_data_edit_0-1c\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 . . .
fixed... changed (j=9 back to j=3)
Hello I have the same error I see you managed to fix it could tell us how you thank you
Fixing the skill.py file to work with 9 skill levels
if your only using ep4.5 you want to leave the 3s to 3s if ep5 change the 3s listed below to 9s
first you need to open the skills.py file what is in your python27 folder and then src folder open this file with notepad or notepad++ and it will look something like this
Shay_data_edit is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Shay_data_edit is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Shay_data_edit. If not, see <http://www.gnu.org/licenses/>.
def MainSkill(outFmt):
if (outFmt.export_complete):
return CombineSkill("Skill")
if (outFmt.csv_import or outFmt.csv_complete):
return ExtractSkill("Skill", outFmt)
def MainNPCSkill(outFmt):
if (outFmt.export_complete):
return CombineSkill("NpcSkill")
if (outFmt.csv_import or outFmt.csv_complete):
return ExtractSkill("NpcSkill", outFmt)
cs_rec = copyKeys(rec, header)
fout_csv.writerow(cs_rec)
if (i == record_total and j == 3):
break
return True
when done correctly it will look like this
Code:
'''
This file is part of Shay_data_edit.
Shay_data_edit is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Shay_data_edit is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Shay_data_edit. If not, see <http://www.gnu.org/licenses/>.
Copyright ZeroSignal 2009, 2010
'''
from Utils import *
skill_types = [
['SkillName', 'string'],
['SkillDesc', 'string'],
['SkillLevel', 'tinyint'],
['SkillID', 'short'],
['SkillAnim', 'tinyint'],
['SkillIcon', 'int'],
['ReqLevel', 'short'],
['Country', 'tinyint'],
['AttackFighter', 'tinyint'],
['DefenseFighter', 'tinyint'],
['Patrolrogue', 'tinyint'],
['Shootrogue', 'tinyint'],
['AttackMage', 'tinyint'],
['DefenseMage', 'tinyint'],
['Grow', 'tinyint'],
['SkillPoint', 'tinyint'],
['TypeShow', 'tinyint'],
['TypeAttack', 'tinyint'],
['TypeEffect', 'tinyint'],
['TypeDetail', 'short'],
['NeedWeapon1', 'tinyint'],
['NeedWeapon2', 'tinyint'],
['NeedWeapon3', 'tinyint'],
['NeedWeapon4', 'tinyint'],
['NeedWeapon5', 'tinyint'],
['NeedWeapon6', 'tinyint'],
['NeedWeapon7', 'tinyint'],
['NeedWeapon8', 'tinyint'],
['NeedWeapon9', 'tinyint'],
['NeedWeapon10', 'tinyint'],
['NeedWeapon11', 'tinyint'],
['NeedWeapon12', 'tinyint'],
['NeedWeapon13', 'tinyint'],
['NeedWeapon14', 'tinyint'],
['NeedWeapon15', 'tinyint'],
['Shield', 'tinyint'],
['SP', 'short'],
['MP', 'short'],
['ReadyTime', 'tinyint'],
['ResetTime', 'short'],
['AttackRange', 'tinyint'],
['StateType', 'tinyint'],
['AttrType', 'tinyint'],
['Disable', 'short'],
['PrevSkillID', 'short'],
['SuccessType', 'tinyint'],
['SuccessValue', 'tinyint'],
['TargetType', 'tinyint'],
['ApplyRange', 'tinyint'],
['MultiAttack', 'tinyint'],
['KeepTime', 'short'],
['Weapon1', 'tinyint'],
['Weapon2', 'tinyint'],
['Weaponvalue', 'tinyint'],
['Bag', 'tinyint'],
['Arrow', 'short'],
['DamageType', 'tinyint'],
['DamageHP', 'short'],
['DamageSP', 'short'],
['DamageMP', 'short'],
['TimeDamageType', 'tinyint'],
['TimeDamageHP', 'short'],
['TimeDamageSP', 'short'],
['TimeDamageMP', 'short'],
['AddDamageHP', 'short'],
['AddDamageSP', 'short'],
['AddDamageMP', 'short'],
['AbilityType1', 'tinyint'],
['AbilityValue1', 'short'],
['AbilityType2', 'tinyint'],
['AbilityValue2', 'short'],
['AbilityType3', 'tinyint'],
['AbilityValue3', 'short'],
['HealHP', 'short'],
['HealSP', 'short'],
['HealMP', 'short'],
['TimeHealHP', 'short'],
['TimeHealSP', 'short'],
['TimeHealMP', 'short'],
['DefenseType', 'tinyint'],
['DefenseValue', 'tinyint'],
['LimitHP', 'tinyint'],
['FixRange', 'tinyint'],
['ChangeType', 'short'],
['ChangeLevel', 'short'],
]
def MainSkill(outFmt):
if (outFmt.export_complete):
return CombineSkill("Skill")
if (outFmt.csv_import or outFmt.csv_complete):
return ExtractSkill("Skill", outFmt)
def MainNPCSkill(outFmt):
if (outFmt.export_complete):
return CombineSkill("NpcSkill")
if (outFmt.csv_import or outFmt.csv_complete):
return ExtractSkill("NpcSkill", outFmt)
def CombineSkill(type):
csvIn = work_dir + type + ".complete.csv"
try:
csvf = csv.DictReader(open(csvIn))
except IOError:
sys.exit(MsgFileReadError % csvIn)
foutName = work_dir + type + ".SData"
try:
fout = open(foutName, mode='wb')
except IOError:
sys.exit(MsgFileWriteError % foutName)
recs = []
for row in csvf:
recs.append(row)
print "skill_rows: " + str(len(recs))
# Write Total.
record_total = struct.pack('I', (len(recs) / 9))
fout.write(record_total)
for i in recs:
pack_fields(fout, skill_types, i)
return True
def ExtractSkill(type, outFmt):
# Open SData File.
skillSData = feed_dir + type + ".SData"
try:
input = open(skillSData, mode='rb')
except IOError:
sys.exit(MsgFileReadError % skillSData)
header = get_data_headers(skill_types)
if (outFmt.csv_import):
filename = work_dir + type + ".import.csv"
header.pop(1) # Remove SkillDesc
header.pop(3) # Remove SkillAnim
header.pop(3) # Remove SkillIcon
if (outFmt.csv_complete):
filename = work_dir + type + ".complete.csv"
print("Creating " + filename)
# Open File for output.
try:
fout = open(filename, mode='wb')
except IOError:
sys.exit(MsgFileWriteError % filename)
fout_csv = csv.writer(fout)
fout_csv.writerow(header)
fout_csv = csv.DictWriter(fout, header)
record_total = unpack_field(input, 'int')
i = 0
j = 0
while True:
rec = unpack_fields(input, skill_types, {})
if (rec["SkillLevel"] == 1):
i += 1
j = 0
j += 1
if (outFmt.csv_import):
rec["SkillID"] = i
cs_rec = copyKeys(rec, header)
fout_csv.writerow(cs_rec)
if (i == record_total and j == 9):
break
return True
once completed save your changes and do your skills to cvs process and your done.
note: this will not work for ep6 with 15 skill levels im not very good with python but my best guess as to why is the file is formatted differently or the coding of the file isn't the same as ep5 or lower
[PK2] Skill edit data.pk2 11/15/2012 - Silkroad Online - 2 Replies looking for a professional who knows
how to edit/add skills in the data.pk2 (.ban files)
if you can help me please write here or pm me.
thanks!!
how do i edit data.pk2 skills 02/08/2010 - Silkroad Online - 1 Replies Hey guys im wondering how i pk2 edit my skills in silkroad. i have the pk2 codes but i dont get how to change it.. it always says string not found.
can anyone help me plz?
[PK]All Servers+Data.pk2 Edit. 11/17/2009 - SRO PServer Guides & Releases - 12 Replies This is my new edit :)Thx for all will using player
Log-in screen Edit
140lw Skill Edit
140lw Skill İcon Edit
9D items changed to 10D items
85Lw Weapons changed SUN.
Loading Screen Edit
Launcher Edit
Horse edit
How to edit Data.pk2? 04/06/2009 - Silkroad Online - 14 Replies Could anyone tell whats the best program to do it? I want to edit Data.pk2, not Media.pk2 Thnx :)