Barber Shop?

Discussion in 'The Temple of Elemental Evil' started by emo_ome, Jun 18, 2011.

Remove all ads!
  1. emo_ome

    emo_ome Butcher Of Hommlet

    Joined:
    Oct 18, 2008
    Messages:
    140
    Likes Received:
    0
    Hello Guys!
    I'm wondering if it is possible to change your hair while your in-game.
    Well, I always use my old save characters when playing the latest Co8 Mods, and never tried to create new ones. So I always ends up with the same characters with the same hair. I was thinking of something like this should happen.

    New NPC ---> Conversation ---> List of Hair

    (PC) Can I change my hair please?
    (NPC) It may cost you some copper/silver/gold.
    (PC) Here.
    (NPC) What hair would you like to have?

    (Male)

    1. Bald
    2. Long Hair
    3. Short Hair
    4. Mohawk
    5. Longback

    (Female)

    1. Pony-Tail
    2. Short Hair
    3. Long Hair
    4. Bald

    Possible?
     
  2. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    3,613
    Likes Received:
    537
    Seems possible, via the script command:

    (obj).obj_set_int(obj_f_critter_hair_style, #)

    Where:
    (obj) is the object's handle (e.g. game.party[0] )
    # - the new hairstyle number.

    The hairstyle number apparently encodes the hair type (mohawk, pony, etc.), race (e.g. half orcs need a bigger hair mesh), and hair color.

    Still trying to decode the numbering system, but in the meanwhile you can use
    (obj).obj_get(obj_f_critter_hair_style)
    to find out the hair # for existing PCs, and change the hair of another PC to that number.

    The hair change will take effect when you change maps.
     
  3. emo_ome

    emo_ome Butcher Of Hommlet

    Joined:
    Oct 18, 2008
    Messages:
    140
    Likes Received:
    0
    Sitra I've tried the script (obj).obj_get(obj_f_critter_hair_style #) via console and switched maps, I also tried selecting only one of my characters and do the script but still my characters hair still the same.

    # - The numbers I've used so far is from 1 - 10
     
  4. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    3,613
    Likes Received:
    537
    Have you substituted (obj) for one of your party members?

    e.g.
    Code:
    game.party[0].obj_set_int(...)
    ?

    Also, you can find out what hair number a PC has with the command

    game.party[x].obj_get_int( obj_f_critter_hair_style)


    Also, not sure 1-10 are valid numbers - the best way is to check what existing characters have.
     
  5. emo_ome

    emo_ome Butcher Of Hommlet

    Joined:
    Oct 18, 2008
    Messages:
    140
    Likes Received:
    0
    Nope. I thought using this (obj).obj_get(obj_f_critter_hair_style #) would do. So if I want to know the current hair of my character #3, then I'd use game.party[3].obj_get(...), then I'd use game.party[3].obj_set_int(...) to set a new hair? What if my current male characters share the same hair like my human fighter, elf rogue and elf ranger (they all have the short hair), by using the "get script" do I get the same result.
     
  6. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    3,613
    Likes Received:
    537
    Yes.

    Also note that if you have 5 characters their index goes from 0-4, e.g.

    game.party[0] is the leftmost portrait character,
    game.party[4] is the 5th character.


    If they all have the same hair, you can create a new character with a desired hair type and see what number it is, and then change to it.
     
  7. emo_ome

    emo_ome Butcher Of Hommlet

    Joined:
    Oct 18, 2008
    Messages:
    140
    Likes Received:
    0
    Sitra! Finally it works, thanks for the help and sorry for the bother. :thumbsup:
     
Our Host!