Welcome to the Builder Academy

Question Custom Character Appearance

More
20 Jun 2012 23:44 #124 by Halenbane
I have seen this on a few MUDs before , but I do not recall which codebase. I'm tossing around an idea to implement custom character appearance. The questions is the best way to go about it.

You could either write it so the values are temporarily stored and then written into the players description that they would normally type in themselves.

Or the more interesting way I think, is to store the values like you store a stat, able to change , and also able to display in other areas.

Example.

After Pick your race , pick your class...

----

What is your eye color?
What is your body type?
What is your height?
What is your hair color?

Now, once a player makes their choice it is stored in their pfile just as a str stat or their name, or anything else about them. This way it can also be modified with the wizard set command, or changed by a player with a scripted mob/obj/room.

Also doing it this way, you can incorporate it into their score card.

Score


Name: Halenbane
Title: the Pimplementor
Class: Paladin
Race: Elf
Eye Color: Blue
Hair Color: White
Skin Color: White
Body Type: Athletic


Also a person could go a step further, and make the creation process even more advanced and make calls against their race type.

So if you were a pixie race type, you may receive an additional question during creation ,

What is your primary wing color, what is your secondary wing color.

Basically this would result in everything being stored in score, being settable by an admin, and also possibly generate a desc for the character when looked at, based on the data received.

You see Halenbane the Pimplementor. He appears to be an Elf. He stands at 73 inches tall with an athletic build. His hair is long and blonde.

Of course this could be written much more creatively but the above is just to get the idea across.

Also implementing this you could do even more with scripts.

Write a mob script after this is implemented to where an npc might look at you, and then say "My what beautiful blue eyes you have" or "Your hair sure is blonde!" just by reading player.haircolor or player.eyecolor etc.

I know this is jumbled and all over the place, but its just how my brainstorms go :) I'll be working on trying to figure out the most efficient way to write this. But responses are welcome.

Please Log in or Create an account to join the conversation.

More
20 Jun 2012 23:52 #126 by Liko

Halenbane wrote: I have seen this on a few MUDs before , but I do not recall which codebase. I'm tossing around an idea to implement custom character appearance. The questions is the best way to go about it.

You could either write it so the values are temporarily stored and then written into the players description that they would normally type in themselves.

Or the more interesting way I think, is to store the values like you store a stat, able to change , and also able to display in other areas.

Example.

After Pick your race , pick your class...

----

What is your eye color?
What is your body type?
What is your height?
What is your hair color?

Now, once a player makes their choice it is stored in their pfile just as a str stat or their name, or anything else about them. This way it can also be modified with the wizard set command, or changed by a player with a scripted mob/obj/room.

Also doing it this way, you can incorporate it into their score card.

Score


Name: Halenbane
Title: the Pimplementor
Class: Paladin
Race: Elf
Eye Color: Blue
Hair Color: White
Skin Color: White
Body Type: Athletic


Also a person could go a step further, and make the creation process even more advanced and make calls against their race type.

So if you were a pixie race type, you may receive an additional question during creation ,

What is your primary wing color, what is your secondary wing color.

Basically this would result in everything being stored in score, being settable by an admin, and also possibly generate a desc for the character when looked at, based on the data received.

You see Halenbane the Pimplementor. He appears to be an Elf. He stands at 73 inches tall with an athletic build. His hair is long and blonde.

Of course this could be written much more creatively but the above is just to get the idea across.

Also implementing this you could do even more with scripts.

Write a mob script after this is implemented to where an npc might look at you, and then say "My what beautiful blue eyes you have" or "Your hair sure is blonde!" just by reading player.haircolor or player.eyecolor etc.

I know this is jumbled and all over the place, but its just how my brainstorms go :) I'll be working on trying to figure out the most efficient way to write this. But responses are welcome.


I believe height is programmed already just unused. I think your best bet for hair color, hair style, and eye color would be to make a menu like the class menu. If you let them type then you have no idea what they would enter and would have to implement a system to check what they enter or constantly have your staff checking what they put for hair color, hair style, and eye color. What if someone said they their hair color was bitch? I agree with you on race affecting creation options. It can be easily done. You could make it check to see if the player is a certain race it would send them to that option if not send them somewhere else.

I hope this helps.

Randian(0.0.0)
Owner/Developer

Please Log in or Create an account to join the conversation.

More
21 Jun 2012 01:11 #127 by Vatiken

Liko wrote: I believe height is programmed already just unused. I think your best bet for hair color, hair style, and eye color would be to make a menu like the class menu. If you let them type then you have no idea what they would enter and would have to implement a system to check what they enter or constantly have your staff checking what they put for hair color, hair style, and eye color. What if someone said they their hair color was bitch? I agree with you on race affecting creation options. It can be easily done. You could make it check to see if the player is a certain race it would send them to that option if not send them somewhere else.

I hope this helps.

+1

The best place for this would probably be within the player_specials, unless you wanted NPC's to be assigned similar data, and then follow through with Liko's suggestion of class menu style of parsing.

With regards to the races vs colour, a simple boolean array in your race file would probably work well.
Code:
bool race_vs_eye_colour[NUM_RACES][NUM_EYE_COLOURS] = { /* BLUE, BRWN, GREN, HAZL, RED /*HUMAN*/ { TRUE, TRUE, TRUE, TRUE, FALSE }, /*ORC */ { FALSE,TRUE, TRUE, FALSE,TRUE } };
And so on, and so on, and so on....

tbaMUD developer/programmer

Please Log in or Create an account to join the conversation.

More
21 Jun 2012 09:41 #130 by KaVir

Halenbane wrote: Basically this would result in everything being stored in score, being settable by an admin, and also possibly generate a desc for the character when looked at, based on the data received.

Yup, dynamic descriptions are one of my favourite topics, and I handle them much like you've described here - players select options for attractiveness, skin colour, eye colour, etc, and the mud uses those attributes (along with other factors) to generate a description on the fly.

This is particularly nice if you have shapechanging, as you can share common features between forms. For example this is my human form:

He is reasonably attractive, with pale white skin, glowing red eyes and long curly black hair which reaches his bare shoulders, held away from his face with a bandanna. Thin lines of dark runes cover his cheeks and naked upper body, tracing the muscles of his chest, coiling around his bare arms and twisting across his flat stomach. He has a pair of trousers tucked into his boots, with a black sash tied around his waist and greaves strapped over his shins. He is nearly six and a half feet tall, and seems quite agile on his feet. A katana, a wakizashi and a tanto are strapped to his black sash, while a quiver and a longbow are slung across his back. A pair of knives are strapped to his forearms and a pair of stilettos are tucked into his boots.

And this is my wolf form:

He looks very fearsome, with curly black fur, wickedly sharp claws and long, pointed fangs. His eyes glow an ominous red, and he moves with the easy confidence of a natural predator. He is currently crouching as if ready to spring, his tail pointing straight out and parallel to the ground.

As you can see, I have the same eyes in both forms, and my fur is the same as my hair - and it's all handled automatically, so the forms will always be described consistently.

If you're still trying to decide how to generate the descriptions, you might find this thread of interest: www.mudbytes.net/index.php?a=topic&t=1890&p=30316

Please Log in or Create an account to join the conversation.

More
21 Jun 2012 20:55 #158 by Halenbane
It is to my understanding that If I define new PFDEF's such as PFDEF_EYECOLOR, PFDEF_BODYTYPE, it will corrupt my ascii pfiles. Is there a way to avoid it doing this, and have it just default for existing players?

Please Log in or Create an account to join the conversation.

More
21 Jun 2012 21:07 #159 by thomas

Halenbane wrote: It is to my understanding that If I define new PFDEF's such as PFDEF_EYECOLOR, PFDEF_BODYTYPE, it will corrupt my ascii pfiles. Is there a way to avoid it doing this, and have it just default for existing players?

The whole idea with ASCII playerfiles is that adding new stuff doesn't mess with the old. You decide what your default value should be (that's the PFDEF_) and make sure you save the value if it's not the default.

This way your pfile will work in all cases.

Please Log in or Create an account to join the conversation.

Time to create page: 0.614 seconds