• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

WZ [Tutorial]Adding char creation options (SpoodFed!)

Initiate Mage
Joined
Jan 6, 2012
Messages
4
Reaction score
2
Well,it is not that hard but whatever :) .

This tut works for v62 perfectly,I can not say the same for other versions but you're free to check!

So what you're about to learn?
-Adding all hair colors
-Adding weapons
-Adding as many hair kinds as you want

necessary :
-Harepacker
-Compiler
-WZ Files

Lets start ..
1)Open your harepacker,go to your client's folder and open Etc.wz
You see the image 'MakeCharInfo.img' ? Double-click it .
Now you have 2 properties : Info & Name
First of all lets add all hair colors .
So double-click the 'Name' one,now you have CharMale & CharFemale: we'll focus on
CharMale atm but you have to do the same in CharFemale only in this case!(Of adding hair colors)

So after we opened CharMale choose 2 and you'll have 3 WzStringProperties if you click
them you'll see color names at the right box : 0 - Black , 2 - Orange , 3 - Blonde , 7 - Brown
Now we'll add 4 - Green,5 - Blue,6 - Purple & 1 - Red .

so we are at CharMale ,press the 2 under it and go to property->add property
you have :
Name
Content
Type

fill it for each color in this way :
Code:
Name: Color number (for example 1 for red)
Content: Color Name (write Red for the Name 1 above)
Type : choose the 4th - WzStringProperty

Full example:
Name:4
Content:Green
Type:WzStringProperty
Press submit ----> you've added a color NAME. Now do it for each of the other colors .

Wait,we just began .
Now we added a color name only for CharMale .
Go back to MakeCharInfo and now go to 'Info' SubProperty .
Choose CharMale and open the 2 under it . You see 4 numbers 0-3 which contain a color compressed int id in thier content .
So if you mark each number you'll see the numbers 0 2 3 & 7 in the right box which means we have to add 1 4 5 & 6 like we did in the 'Name' Sub .
mark the 2 under CharMale and click property->add property
You'll have :
Code:
Name
Content
Type

fill it this way :
Name:(A sequential number to the last this case 4 afterwards 5 and so on)
Content:(1=Red or 4=Green or 5=Blue or 6=Purple we have to add each of them,choose which one you want to add first)
Type:WzCompressedIntProperty (1st)

Example:
Name:4
Content:1
Type:WzCompressedIntProperty

Now we've added the color to the selection but we haven't done yet!
Save your Etc.wz (after you did those 2 steps Name+Info for all the colors)

Open you compiler and go to net.sf.odinms.net.login.handler and open CreateCharHandler.java .
Search this (Ctrl+F):
Code:
if (hairColor

you'll see something like this :
Code:
if (hairColor!=0 && hairColor!=2 && hairColor!=3 && hairColor!=7)
after you've added all the colors in wz files(0-7)
change this line to:
Code:
if (hairColor<0 || hairColor>7)
Save,compile and put in your java folders & dist inside your repack .

Added - All hair colors .

After you realiezed abit lets move to weapons but now faster .
Open your harepacker->Etz.wz go to MakeCharInfo.img .
Go to 'Info',then CharMale(same way for CharFemale) go to 7 .
you have now 0-2 if you mark them you notice a weapons code in the right box .
Lets add a weapon for example Old Gladius - 1302048
mark the 7 then property->add property

Name :A sequential number to the last(in this case 3)
Content :Weapon ID
Type:WzCompressedIntProperty

Example:
Name:3
Content:1302048
Type:WzCompressedIntProperty

save your wz .

Go to your compiler again and go to the CreateCharHandler.java which we added before .

Now search for this line
Code:
if (weapon
you'll see
Code:
if (weapon != 1302000 && weapon != 1322005 && weapon != 1312004)
we have to add our new weapon (1302048) so we'll add this:
Code:
if (weapon != 1302000 && weapon != 1322005 && weapon != 1312004 [B][COLOR="red"]&& weapon!=1302048[/COLOR][/B])

Save,compile and put the jar in your java folders and dist inside the repack folder .

Added - Weapon for char creation .

Last is adding hair kinds .
Faster then the other - open the harepacker->Etc.wz->MakeCharInfo.img
We are about to add 'Metro'(ID 30050) hair to Male's creation .
First go to Name->CharMale (Do not added Male's hair to Female's creation-your client would probably crash)
1->You'll see hair codes (30020,30000,30030)
Mark the 1 , click property->add property

Name:Hair ID
Content:Hair name
Type:WzStringProperty

Example:
Name:30050
Content:Metro
Type:WzStringProperty

press submit

now go to the Info->CharMale->1,mark it and press property->add property

Name:A sequential number to the last
Content:Hair ID
Type:WzCompressedIntProperty

Example:
Name:3
Content:30050
Type:WzCompressedIntProperty

save your wz .
Back to the compiler ->CreateCharHandler.java .
Search this script :
Code:
if (gender == 0)
[code]
0 = Male 1 = Female
Because we added a male one we should look [U][B]under this line[/B][/U] for the following line:
[code]
if (hair
you'll see this one:
Code:
if (hair != 30000 && hair != 30020 && hair != 30030)
add this to the line
Code:
if (hair != 30000 && hair != 30020 && hair != 30030 && [B][COLOR="Red"]hair!=30050[/COLOR][/B])

Save,compile and put in your java folders & dist inside your repack .

Added - Hair style char creation .

Picture :
BluRain - [Tutorial]Adding char creation options (SpoodFed!) - RaGEZONE Forums
 
Custom Title Activated
Loyal Member
Joined
Nov 14, 2008
Messages
1,025
Reaction score
641
I believe you can just open the xml in your server folder and it'll work. I never personally tried it though.
 
Initiate Mage
Joined
Jan 6, 2012
Messages
4
Reaction score
2
I believe you can just open the xml in your server folder and it'll work. I never personally tried it though.

You cannot ,you have to add the lines in the source otherwise
you won't be able to create the character .
 
Newbie Spellweaver
Joined
Dec 21, 2012
Messages
7
Reaction score
0
i cant find the string for the hair color in the creatcharhandler.java ....? any help? my server is v83
 
Junior Spellweaver
Joined
Oct 12, 2012
Messages
137
Reaction score
6
No offense but isn't the common hair/eyes/skin NPC be better? Nonetheless, very cool release sir.
 
Back
Top