Jump to content

Custom Hair via Character Creation Screen[Download Now!]


Zelik

Recommended Posts

Either I need someone with more java experience than myself to give me a hand getting it to work with jabs model loader or I'll have to release a standalone version and then create a mod adding my hair styles to jabs model loader as wigs that can be found on the map.

 

One big hurdle to deal with is character creation. The creation menu uses sprites to show hair. This could be done in such a way that the character screen shows bald hair, but rather chooses custom options. Of course with some work, a 3D model can be shown.

 

Another thing to factor in is the potential issue of custom hair and multiplayer. If the data is sent as a String via C2S / S2C, then there is no issue with custom hair as long as the client can handle invalid hair types.

Link to comment
Share on other sites

Either I need someone with more java experience than myself to give me a hand getting it to work with jabs model loader or I'll have to release a standalone version and then create a mod adding my hair styles to jabs model loader as wigs that can be found on the map.

 

One big hurdle to deal with is character creation. The creation menu uses sprites to show hair. This could be done in such a way that the character screen shows bald hair, but rather chooses custom options. Of course with some work, a 3D model can be shown.

 

Another thing to factor in is the potential issue of custom hair and multiplayer. If the data is sent as a String via C2S / S2C, then there is no issue with custom hair as long as the client can handle invalid hair types.

The only problem that I'm having right now is getting my model loader integrated into yours. I had given up on trying to make the character creation screen show the 3d model of the character(its out of my skill range), so the character will unfortunately show as a bald character. And I've also done a few multiplayer tests, if the server has the mod and the client doesn't then the character is shown bald(the tests were done on v32.xx). I'm thinking though that I may be able to get them added to the game via your model loader running along side my survivorfactory and lua files. But I'm trying to limit downloads for players. I wouldn't want them to have to download your files, my files and then a mod, just to get hair working. I've been trying to hardcode my models into your loader with no luck. I always get errors. As of now I get 3 errors all on line 55. I literally just need to add my models to your loader to get to a release state, I could release a standalone but, most people use your loader and as of now they are not compatible. I dont want to do that, I feel it would toss a wrench into everything you've accomplished especially with your new release with clothing support.

Link to comment
Share on other sites

  • 1 month later...
  • 4 weeks later...

Okay, I think I figured out the problem of why my character remains bald. First off, my "graphics card" doesn't support 3D models, and as you said in an earlier post, the reason you couldn't change the character from being bald in the character creation menu was that those models were based on 2D sprites. Now, I'm assuming that since my card doesn't support 3D models, that my character in-game is actually a 2D sprite, and that your hair mods aren't going to touch those. 

Am I on the right page?

Edited by Omgwtfplz
Link to comment
Share on other sites

On 7/12/2016 at 0:15 AM, Omgwtfplz said:

Okay, I think I figured out the problem of why my character remains bald. First off, my "graphics card" doesn't support 3D models, and as you said in an earlier post, the reason you couldn't change the character from being bald in the character creation menu was that those models were based on 2D sprites. Now, I'm assuming that since my card doesn't support 3D models, that my character in-game is actually a 2D sprite, and that your hair mods aren't going to touch those. 

Am I on the right page?

As of right now, there is no way to edit the character 2d sprites as far as I know. They are all contained in the "Characters.pack" and if I understand correctly no one has been able to successfully unpack, modify and repack that particular file.

Link to comment
Share on other sites

  • 6 months later...
On 11/13/2015 at 6:20 PM, Zelik said:

There are 2 different versions, both included in the download. One is for players that use Jab's ModelLoader and the other is for players that don't. Either way the install instructions are included. Have fun!!!

You should include in the download description which is which.

 

On 11/13/2015 at 6:20 PM, Zelik said:

ALSO...Do not add my mod to any modpacks.

Is this aimed at any hydration-name-related mod/author?

Link to comment
Share on other sites

  • 2 weeks later...
On 1/24/2017 at 2:28 PM, Geras said:

 

Not that I care about a post from over a year ago, but type "female mohawk" into google :)

 

Yeah, but the game's set in the 90's, and those sure as hell weren't what mohawks looked like back in the day.

Edited by Johnny Fisher
Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...
  • 2 months later...
  • 6 months later...
On 1/4/2018 at 3:11 PM, Joe_Winko said:

just curious, how did you make custom hair styles for project zomboid?

i know you have to make the shape of it in blender (i've already done that)

but how do you attach/assign it to the head joint and then export it into the game? 

You need to add weights to the hair and export using Jab's model export script in blender. Then you need to edit the ModelManager.class file in the base game.

 

Link to comment
Share on other sites

1 hour ago, EnigmaGrey said:

Anything overly complex, or is all that needed is a getter/setter rather than string literals for the model name?

 

It would be super neat to have getter/setter, but this is how I've been doing it for the past decade. It is same way we used to do it with weapon models:

 

image.thumb.png.3ad86034b8d95feb0ecadc34515353be.png

 

We used to need to add similar highlighted text with the new model name for weapons.

 

No texture is needed for the hair, since all hair models use the same texture. I've been using this method to make custom clothes, too. The new "hairdo" would be body armor and helmet for example. We actually had it working on a server at one time. Kind of a hassle though.

 

I don't know how hard it would be to implement getter/setter for this, but it sure would be super neat.

Edited by tommysticks
Link to comment
Share on other sites

Soo . . . these then:

 

...
        loadModel("hair_baldspot",  null);
        loadModel("hair_messy",  null);
        loadModel("hair_picard",  null);
        loadModel("hair_recede",  null);
        loadModel("hair_short",  null);

 

in ModelManager create(), for adding the new model.

Not sure about needing a new slot (amor, helmet, hat?) . Looks like SurvivorFactory chooses the correct hair style. It's just a switch statement. Maybe setHairNoColor(String hairNoColor) in SurvivorDesc.

 

getPlayer():getDescriptor() and getPlayer():setDescriptor() might let you change it from Lua. 

Link to comment
Share on other sites

5 minutes ago, EnigmaGrey said:

Soo . . . these then:

 

...
        loadModel("hair_baldspot",  null);
        loadModel("hair_messy",  null);
        loadModel("hair_picard",  null);
        loadModel("hair_recede",  null);
        loadModel("hair_short",  null);

 

in ModelManager create(), for adding the new model.

Not sure about needing a new slot (amor, helmet, hat?) . Looks like SurvivorFactory chooses the correct hair style. It's just a switch statement. Maybe setHairNoColor(String hairNoColor) in SurvivorDesc.

 

getPlayer():getDescriptor() and getPlayer():setDescriptor() might let you change it from Lua. 

 

I've fucked around with this shit a whole lot. Does loadModel work now?

 

You can change hairstyle with this:

getPlayer():getDescriptor():setHair("F_Hair_Bob_White");

 

...but afaik there has never been a way to load weighted models with lua.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...