Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[Tutorial] Advanced item creation - custom textures

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:
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
 
Last edited:
Newbie Spellweaver
Joined
Sep 12, 2006
Messages
30
Reaction score
0
sorry to ask but what Key do i need to uncrypt the .gb files?

ps > Nice guide :D

oh nvm found it ....
 
Last edited:
Newbie Spellweaver
Joined
Jan 4, 2006
Messages
46
Reaction score
8
default key, just swordcrypt /d xxx.gb. only the first few bytes are encrypted so you won't see much anyway
 
Newbie Spellweaver
Joined
Jun 12, 2006
Messages
27
Reaction score
0
nice puppi .. ty :D

now i just have to go paint some armours lol
 
Affenzirkus
Loyal Member
Joined
Aug 10, 2006
Messages
269
Reaction score
52
its a nice guide.. i added it to the sticky links
 
Newbie Spellweaver
Joined
Sep 12, 2006
Messages
30
Reaction score
0
w00t w00t yey succeddit in makeing another g50 mage parts with new stats Tnx :D
 
Newbie Spellweaver
Joined
Sep 21, 2006
Messages
9
Reaction score
0
Any nice people willing to share armor they created for their character I would love to have please
 
Initiate Mage
Joined
Aug 29, 2006
Messages
1
Reaction score
0
only one thing to say but i'll say it a couple times
thank you thank you thank you thank you thank you thank you thank you thank you

i had a lot of problems with the knight armor, it didnt want to work, tried shitload of things but all the changing/testing/restarting kal made the hackshield crash so many times i gave up

super guide man *two thumbs up*
 
Newbie Spellweaver
Joined
Sep 3, 2006
Messages
7
Reaction score
0
how advanced zomg

and cud u have done that half a year ago without that apps? naw i doubt that
 
Newbie Spellweaver
Joined
Jan 4, 2006
Messages
46
Reaction score
8
it's advanced for 75% kids that come here, not for me lol...

and what I remember is I could change models without decrypting them, so I made screens of g55/g60 stuff a long time ago :> as for textures, I found out how to change them to .dds a long time before BakaBug released his handy tool. But that stuff is easy, there are lots of things I still can't do.
 
Newbie Spellweaver
Joined
Oct 13, 2006
Messages
7
Reaction score
0
i decrypt the gb file but i dont see a filename anywhere :S i mean the filename for the filechanging protection.. i use hex editor from HDD free software can it be that the editor is wrong or do i do something wrong?
 
Newbie Spellweaver
Joined
Jan 4, 2006
Messages
46
Reaction score
8
maybe you decrypt it wrong. the filename is on the first row of the file.

@shad0w3 what do you mean by that? oO I was playing around with kalonline since the first non-working server was released here (you can check my oldest posts =P) I'm not saying I did something useful, actually I'm a lame reverse engineer :>
 
Last edited:
Newbie Spellweaver
Joined
Sep 12, 2006
Messages
30
Reaction score
0
uhm decrypt it right with the default key?
 
Newbie Spellweaver
Joined
Oct 13, 2006
Messages
7
Reaction score
0
i dont see any filename when i decrypt the .gb file with swordcrypt and open it with hex editor :S

you know what is wrong?
 
Newbie Spellweaver
Joined
Sep 12, 2006
Messages
30
Reaction score
0
i dont see any filename when i decrypt the .gb file with swordcrypt and open it with hex editor :S

you know what is wrong?

like i said ... did you use the right Decrypt key...
 
Back
Top