elite*gold: 0
Join Date: May 2012
Posts: 34
Received Thanks: 11
|
Quote:
Originally Posted by [Alcatraz]
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
'''
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) / 3))
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 == 3):
break
return True
now what you need to do to fix it you will need to change 2 numbers in this file from 3 to 9
first edit
Code:
# Write Total.
record_total = struct.pack('I', (len(recs) / 3))
fout.write(record_total)
second edit
Code:
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
|
Brother, y to EP 6.3 where 15 level per 11 ablities?
I am edit python, to bug 7 skillID = 0 not 15
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'],
# ['AbilityType4', 'tinyint'],
# ['AbilityValue4', 'short'],
# ['AbilityType5', 'tinyint'],
# ['AbilityValue5', 'short'],
# ['AbilityType6', 'tinyint'],
# ['AbilityValue6', 'short'],
# ['AbilityType7', 'tinyint'],
# ['AbilityValue7', 'short'],
# ['AbilityType8', 'tinyint'],
# ['AbilityValue8', 'short'],
# ['AbilityType9', 'tinyint'],
# ['AbilityValue9', '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) / 15))
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 == 15):
break
return True
|