Bridge Commander Central

BC Forums => BC Modding => Topic started by: CAPT joseph white on November 12, 2008, 04:51:01 PM

Title: head swap
Post by: CAPT joseph white on November 12, 2008, 04:51:01 PM
i was wondering, could i take the heads of the extra's and swich them with one of my officers?
Title: Re: head swap
Post by: Kirk on November 12, 2008, 04:58:00 PM
Yes, have a look at the character scripts in scripts/Bridge/characters
Title: Re: head swap
Post by: ACES_HIGH on November 12, 2008, 05:08:45 PM
These lines in the character's script file found in Bridge/Characters (ex. Saffi.py) control the base model and textures used by the character:
Code: [Select]
# Create the character
App.g_kModelManager.LoadModel(CharacterPaths.g_pcBodyNIFPath + "BodyFemM/BodyFemM.nif", "Bip01")
App.g_kModelManager.LoadModel(CharacterPaths.g_pcHeadNIFPath + "HeadSaffi/saffi_head.nif", None)
pSaffi = App.CharacterClass_Create(CharacterPaths.g_pcBodyNIFPath + "BodyFemM/BodyFemM.nif", CharacterPaths.g_pcHeadNIFPath + "HeadSaffi/saffi_head.nif", 1)
pSaffi.ReplaceBodyAndHead(CharacterPaths.g_pcBodyTexPath + "BodyFemS/FedFemRed_body.tga", CharacterPaths.g_pcHeadTexPath + "HeadSaffi/saffi_head.tga")

these control the textures used by the face when the character uses an animated facial movement such as speaking or blinking:
Code: [Select]
# Load Saffi's general dialogue lines.
LoadSounds()

pSaffi.AddFacialImage("Blink0", CharacterPaths.g_pcHeadTexPath + "HeadSaffi/Saffi_head_blink1.tga")
pSaffi.AddFacialImage("Blink1", CharacterPaths.g_pcHeadTexPath + "HeadSaffi/Saffi_head_blink2.tga")
pSaffi.AddFacialImage("Blink2", CharacterPaths.g_pcHeadTexPath + "HeadSaffi/Saffi_head_eyesclosed.tga")
pSaffi.SetBlinkStages(3)

pSaffi.AddFacialImage("SpeakA", CharacterPaths.g_pcHeadTexPath + "HeadSaffi/saffi_head_a.tga")
pSaffi.AddFacialImage("SpeakE", CharacterPaths.g_pcHeadTexPath + "HeadSaffi/saffi_head_e.tga")
pSaffi.AddFacialImage("SpeakU", CharacterPaths.g_pcHeadTexPath + "HeadSaffi/saffi_head_u.tga")
pSaffi.SetAnimatedSpeaking(1)

just change the .nif and .tga files to those of whatever character you want.? keep in mind that the extras do not have any facial animations so you will have to create those textures.
Title: Re: head swap
Post by: MLeo on November 12, 2008, 05:18:14 PM
If this is for an uniform, consider BPUniforms in the near future.