[Tutorial] Extra hair/faces

Submit code for osProse project.

Moderators: osRose dev team, ospRose dev team, osiRose dev team, Moderators

[Tutorial] Extra hair/faces

Postby Drakia on Sun May 11, 2008 6:10 am

To add the ability for users to use additional hair and faces, without needing to allow access to /hair and /face, you can edit the LUA files in the client (You'll need to extract them from the VFS, don't worry about deleting them as the client seems to prefer extracted over the files in the VFS).
The particular LUA we'll need to edit is "SYSTEMFUNC.LUA" This LUA contains a lot of things, from login screen camera movements, to creating the avatar displayed when you create a new character.
What we'll want to edit is the list of items in "EnterCreateAvater" to add the extra 2 hairs and faces. You'll want to look for the line (Under --face)
  1. SC_AddSelectItem4CreateAvatar( 1 , "7", 43);   

And after it add two more lines for the extra two faces
  1.  SC_AddSelectItem4CreateAvatar( 1 , "8", 50);
  2.   SC_AddSelectItem4CreateAvatar( 1 , "9", 57);


Now you have two more faces to choose from, now let's add two more hair styles. Find the following (Under --hair)
  1. SC_AddSelectItem4CreateAvatar( 2 , "5", 20);

And below it, add the following two lines
  1.  SC_AddSelectItem4CreateAvatar( 2 , "6", 25);
  2.   SC_AddSelectItem4CreateAvatar( 2 , "7", 30);


Now you have two additional hair and faces to select from. While you're in the file, you can change the default selected option for any of the options by editing the
  1. SC_SelectItem4CreateAvatar( #, #)

The first number is the item ID (0 for Male/Female, 1 for face, 2 for hair, 3 for StartPoint, 4 for Birth Stone) and the second number is which item to make the default.
My favorite skill is scaring new users away.
If you haven't SEARCHED expect me to yell at you.
Image
Drakia
ospRose dev team
ospRose dev team
 
Posts: 1614
Joined: Tue Sep 18, 2007 6:53 am
Location: Nanaimo, BC, Canada

Return to Submit Code

Who is online

Users browsing this forum: No registered users and 7 guests