Newbie Spellweaver
- Joined
- Jan 4, 2006
- Messages
- 46
- Reaction score
- 8
This guide will be a little more advanced as the title proposes. It will include a lot of hexing, copying and renaming so if you're not familiar with basic file manipulation don't come running with HELP PLZ.
So in a former guide I showed you how to create an item. But this time we're going to create an item that has a model and a texture - armor or a weapon. For a nice example we'll create mage g70 armor hehe (thnx to DGXXX for the textures and idea, original thread http://forum.ragezone.com/kal-online/my-new-g-70-armor-179018.html - look for some stuff there too ;>)
Step 1 : Serverside setup
First let's make our items in InitItem.txt. A weapon and armor has a slightly different structure as a nonmodel item such as a talisman. So we'll enter this in our config:
- name : index for message-e.dat
- Index : unique item index
- Image : name of the .bmp that is stored in data/Hypertext and is used as the icon for the item
- Action : this here is used to find the .gb model files for the given item. I'll explain this later in clientside setup.
- class : type of the item, just take references from existing items and you'll see.
- code : here are some things defined, every type of item has it different so watch other items for references too
- country : version of the client the item is supposed to exist in
- level : grade of the item
- wear : if it is wearable
- limit : creates a class and level limit for the item - <class> <level>
- buy : NPC buying price
- sell : NPC selling price
- endurance : max endurance
- speciality : now here you define the stats of the weapon/armor. Just use other weapons/armors as references.
Well that was pretty easy. Now on to the client.
Step 2 : Clientside setup
First thing is the obligatory InitItem.dat and message-e.dat editing. So we'll insert the rows we inserted in InitItem.txt into InitItem.dat (decrypt->insert->encrypt ofc). And we'll insert the items names into message-e.dat. You should know how to do that from the last guide ;>
And now for the tough part (well it's not so difficult but some people have problems even copying files because they use windows explorer rofl). Models of these 5 armors are in data/Model/Clothes. Since we can't make custom models yet, we'll use models that are already in the game and edit only textures (which can be done using some tools that can be found elsewhere, search for them).
Models for g50 mage armor are Cr_7_a01.gb Cr_7_g01.gb Cr_7_h01.gb Cr_7_p01.gb Cr_7_s01.gb. Since we defined in our inititem that (Action 9 2), we need to copy these files and rename them properly. Why did I use 9 when 9 is g60 armor btw? Well, after I used 10, it was very very problematic to edit the model files correctly. And since it works like this, why shouldn't we use it ;> So we get:
Cr_9_a02.gb Cr_9_g02.gb Cr_9_h02.gb Cr_9_p02.gb Cr_9_s02.gb
Now we're still not done yet. Decrypt Cr_9_a02.gb with swordcrypt and open it with a hex editor. Check the first line: you will see the filename there. It's a filechanging protection hehe. Change the name correctly to Cr_9_a02 - but don't delete any bytes! This is important, the file must be the same size and same structure as the default one.
Next, encrypt the file back with swordcrypt and open it in a hex editor again. Go to the end of the file. Here you see names again.
So in a former guide I showed you how to create an item. But this time we're going to create an item that has a model and a texture - armor or a weapon. For a nice example we'll create mage g70 armor hehe (thnx to DGXXX for the textures and idea, original thread http://forum.ragezone.com/kal-online/my-new-g-70-armor-179018.html - look for some stuff there too ;>)
Step 1 : Serverside setup
First let's make our items in InitItem.txt. A weapon and armor has a slightly different structure as a nonmodel item such as a talisman. So we'll enter this in our config:
Code:
(item (name 3000) (Index 960) (Image "Def126") (Action 9 2) (class defense upperarmor) (code 2 3 3 0) (country 252) (level 70) (wear 1) (limit mage 65) (buy 10) (sell 129000) (endurance 34) (specialty (Hth 10) (Int 10) (defense 40) (dodge 23) (resistfire 6) (resistice 6) (resistlitning 6) (resistcurse 3) (resistpalsy 3) ) )
(item (name 3001) (Index 961) (Image "Def127") (Action 9 2) (class defense helmet) (code 2 3 4 0) (country 252) (level 70) (wear 1) (limit mage 64) (buy 10) (sell 70950) (endurance 24) (specialty (Hth 10) (defense 30) (dodge 12) (resistfire 5) (resistice 5) (resistlitning 5) (resistcurse 2) (resistpalsy 2) ) )
(item (name 3002) (Index 962) (Image "Def128") (Action 9 2) (class defense gauntlet) (code 2 3 5 0) (country 252) (level 70) (wear 1) (limit mage 63) (buy 10) (sell 52890) (endurance 20) (specialty (Wis 10) (defense 35) (dodge 10) (resistfire 4) (resistice 4) (resistlitning 4) (resistcurse 3) (resistpalsy 3) ) )
(item (name 3003) (Index 963) (Image "Def129") (Action 9 2) (class defense boots) (code 2 3 6 0) (country 252) (level 70) (wear 1) (limit mage 62) (buy 10) (sell 61920) (endurance 22) (specialty (Wis 10) (defense 36) (dodge 21) (resistfire 3) (resistice 3) (resistlitning 3) (resistcurse 3) (resistpalsy 3) ) )
(item (name 3004) (Index 964) (Image "Def130") (Action 9 2) (class defense lowerarmor) (code 2 3 7 0) (country 252) (level 70) (wear 1) (limit mage 61) (buy 10) (sell 108360) (endurance 30) (specialty (Hth 10) (defense 34) (dodge 25) (resistfire 3) (resistice 3) (resistlitning 3) (resistcurse 2) (resistpalsy 2) ) )
- Index : unique item index
- Image : name of the .bmp that is stored in data/Hypertext and is used as the icon for the item
- Action : this here is used to find the .gb model files for the given item. I'll explain this later in clientside setup.
- class : type of the item, just take references from existing items and you'll see.
- code : here are some things defined, every type of item has it different so watch other items for references too
- country : version of the client the item is supposed to exist in
- level : grade of the item
- wear : if it is wearable
- limit : creates a class and level limit for the item - <class> <level>
- buy : NPC buying price
- sell : NPC selling price
- endurance : max endurance
- speciality : now here you define the stats of the weapon/armor. Just use other weapons/armors as references.
Well that was pretty easy. Now on to the client.
Step 2 : Clientside setup
First thing is the obligatory InitItem.dat and message-e.dat editing. So we'll insert the rows we inserted in InitItem.txt into InitItem.dat (decrypt->insert->encrypt ofc). And we'll insert the items names into message-e.dat. You should know how to do that from the last guide ;>
And now for the tough part (well it's not so difficult but some people have problems even copying files because they use windows explorer rofl). Models of these 5 armors are in data/Model/Clothes. Since we can't make custom models yet, we'll use models that are already in the game and edit only textures (which can be done using some tools that can be found elsewhere, search for them).
Models for g50 mage armor are Cr_7_a01.gb Cr_7_g01.gb Cr_7_h01.gb Cr_7_p01.gb Cr_7_s01.gb. Since we defined in our inititem that (Action 9 2), we need to copy these files and rename them properly. Why did I use 9 when 9 is g60 armor btw? Well, after I used 10, it was very very problematic to edit the model files correctly. And since it works like this, why shouldn't we use it ;> So we get:
Cr_9_a02.gb Cr_9_g02.gb Cr_9_h02.gb Cr_9_p02.gb Cr_9_s02.gb
Now we're still not done yet. Decrypt Cr_9_a02.gb with swordcrypt and open it with a hex editor. Check the first line: you will see the filename there. It's a filechanging protection hehe. Change the name correctly to Cr_9_a02 - but don't delete any bytes! This is important, the file must be the same size and same structure as the default one.
Next, encrypt the file back with swordcrypt and open it in a hex editor again. Go to the end of the file. Here you see names again.
Code:
Cr_7_a01.gb CR_7_A03 CR_7_A01 CR_7_A05 CR_7_A07 CR_7_A08 CR_7_A06 cr_7_a01.dds
Last edited: