http://panimals-server.com/admin/CustomTextures.txt
Code:
Use /swordcrypt /d filename.gb -for decrypting
[Guide]Advanced item creation - custom textures - 10-09-2006, 04:32 AM
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...or-179018.html (My New G 70 Armor for) - 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) ) )
- 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.
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 •••ÿ•••ÿåååÿ €? •••ÿ•••ÿ€€€ÿ €? cr_7_a02.dds •••ÿ•••ÿää ÿ €?
The first one is the name of your model, then there are some references (dunno what for) and then you see the name of the texture (cr_7_a01.dds).
Change everything to fit your filename, and change the texture names to be cr_9_a03.dds and cr_9_a04.dds (this is a mage armor, it uses 2 textures).
So we have something like this:
Code:
Cr_9_a02.gb CR_9_A03 CR_9_A01 CR_9_A05 CR_9_A07 CR_9_A08 CR_9_A06 cr_9_a03.dds •••ÿ•••ÿåååÿ €? •••ÿ•••ÿ€€€ÿ €? cr_9_a04.dds •••ÿ•••ÿää ÿ €?
So save and close it. Now let's look at the textures. They are in data/Model/Clothes/Tex. Textures for g50 mage armor are called
Cr_7_xxx.GTX ofc. Now we know we changed 2 texture names in the model file from a01 a02 to a03 a04 (and ofc 9). So copy and rename the 2 files to
Cr_7_a01.gtx -> Cr_9_a03.gtx
Cr_7_a02.gtx -> Cr_9_a04.gtx
Now we have g70 armor with the model and texture of a g50 armor :> you can edit the textures using BakaBug's converter and a graphic software, just search for it and you'll find it ;>
Repeat these steps for all 5 models (armor, gloves, hood, boots, shorts). Watch out for replacing bytes in hex and for correct renaming. If you get a problem, check everything you did, you will often find that you have mistyped or forgotten to edit something.