Newbie Problems
#1

alright so i wrote an itemall editor that opens the new files but reads _usa instead of Itemall.lod  im aware that id description and index are not in the new itemall structure but istead are in strItem_usa.lod  so im trying to ask how to write my editor hey  open itemall.lod and then after that open the stritem_usa and sort the listbox by index once loaded . and also i know i have to pull a_castle_war from Itemall.lod 
if somebody could answer how this would be done  that would be helpful 

code looks like this 

ItemALL_Structure.ItemList.Clear();
using (BinaryReader reader = new BinaryReader(File.Open(openFileDialog1.FileName, FileMode.Open)))
{
reader.ReadInt32();
while (reader.BaseStream.Position < reader.BaseStream.Length - 8)
{
ItemALL_Structure item = new ItemALL_Structure();
item.ItemID = reader.ReadInt32();
item.Name = iso.GetString(reader.ReadBytes(reader.ReadInt32()));
item.JobFlag = reader.ReadInt32();
item.Weight = reader.ReadInt32();
item.MaxUse = reader.ReadInt32();
item.Level = reader.ReadInt32();
item.Flag = reader.ReadInt32();
item.Position = reader.ReadInt32();
item.Type = reader.ReadInt32();
item.SubType = reader.ReadInt32();
int[] temp1 = new int[10]; int[] temp2 = new int[10];
for (int i = 0; i < 10; i++)
{
temp1[i] = reader.ReadInt32();
temp2[i] = reader.ReadInt32();
}
item.CraftItemID = temp1;
item.CraftItemAmount = temp2;
item.Need_SSkill1_Id = reader.ReadInt32();
item.Need_SSkill1_Level = reader.ReadInt32();
item.Need_SSkill2_Id = reader.ReadInt32();
item.Need_SSkill2_Level = reader.ReadInt32();
item.Num0 = reader.ReadInt32();
item.Num1 = reader.ReadInt32();
item.Num2 = reader.ReadInt32();
item.Num3 = reader.ReadInt32();
item.a_num_4 = reader.ReadInt32();
item.Price = reader.ReadInt32();
item.Smc = iso.GetString(reader.ReadBytes(reader.ReadInt32()));
item.TexID = reader.ReadInt32();
item.TexRow = reader.ReadInt32();
item.TexCol = reader.ReadInt32();
item.Description = iso.GetString(reader.ReadBytes(reader.ReadInt32()));
item.Effect1 = iso.GetString(reader.ReadBytes(reader.ReadInt32()));
item.Effect2 = iso.GetString(reader.ReadBytes(reader.ReadInt32()));
item.Effect3 = iso.GetString(reader.ReadBytes(reader.ReadInt32()));
item.Set1 = reader.ReadInt32();
item.Set2 = reader.ReadInt32();
item.Set3 = reader.ReadInt32();
item.Set4 = reader.ReadInt32();
item.Set5 = reader.ReadInt32();
item.RareOption = reader.ReadInt32();
item.RareChance = reader.ReadInt32();
item.FortuneDataCount = reader.ReadInt32();
if (item.FortuneDataCount == 0)
{
item.SkillID = null;
item.SkillLevel = null;
item.StringID = null;
item.Prob = null;
}
else if (item.FortuneDataCount != 1)
{
int[] tmp1 = new int[item.FortuneDataCount]; int[] tmp2 = new int[item.FortuneDataCount];
int[] tmp3 = new int[item.FortuneDataCount]; int[] tmp4 = new int[item.FortuneDataCount];
for (int y = 0; y < item.FortuneDataCount; y++)
{
tmp1[y] = reader.ReadInt32();
tmp2[y] = reader.ReadInt32();
tmp3[y] = reader.ReadInt32();
tmp4[y] = reader.ReadInt32();
}
item.SkillID = tmp1;
item.SkillLevel = tmp2;
item.StringID = tmp3;
item.Prob = tmp4;
}
item.a_enable = 1;
item.a_num_4 = 0;
item.a_level2 = 999;
item.a_zone_flag = 1023;
item.a_set = -1;
item.a_grade = 0;
item.a_fame = -1;
item.a_rare_index_x = null;
item.a_rare_prob_x = null;
item.a_quest_trigger_count = 0;
item.a_quest_trigger_ids = "";
item.a_origin_variationx = null;
ItemALL_Structure.ItemList.Add(item);
}
reader.Close();
OpenedFile = openFileDialog1.FileName;
}
MessageBox.Show(openFileDialog1.FileName + " Opened Successfully .");



Messages In This Thread
[No subject] - by dethunter12 - 03-27-2015, 03:30 AM
[No subject] - by Nikolee - 03-27-2015, 07:40 AM
[No subject] - by Wizatek - 03-27-2015, 10:19 AM
[No subject] - by dethunter12 - 03-27-2015, 11:57 AM
[No subject] - by Nikolee - 03-27-2015, 01:04 PM
[No subject] - by Tarissuis - 03-27-2015, 05:40 PM
[No subject] - by Wizatek - 03-27-2015, 05:54 PM
[No subject] - by Wahrheit - 03-28-2015, 05:26 PM
[No subject] - by DamonA - 03-28-2015, 05:44 PM
[No subject] - by Nikolee - 03-28-2015, 09:30 PM
[No subject] - by Wahrheit - 03-28-2015, 10:22 PM
[No subject] - by Nikolee - 03-29-2015, 09:03 AM
[No subject] - by CDWriter - 04-14-2015, 02:36 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)