Bridge Commander Central
BC Forums => BC Bridge Modding => Topic started by: vonfrank on November 12, 2018, 11:28:20 PM
-
I'm modding the single player campaign and I want to add a bit of variety to the bridges of the AI captains that talk to the player throughout the story.
For example, I'm attempting to move Captain Haley of the USS Berkeley from sitting in a Galaxy Class bridge set to an Intrepid class bridge. I have the intrepid bridge already installed in my game and it works perfectly. I have also figured out how to change the actual set when you hail the Berkeley and the intrepid bridge now fills the background. However, Captain Haley is not sitting in the captains chair. I can hear her talk, but the camera focuses on the empty seat.
How do I 'position' Haley's body in the captain's chair? Also, can the angle of the camera be modified?
-
Check with Lurok - he did this for BCSP for all of the backgrounds of characters displayed on the viewscreen.
BCSP will be released soon, I found an old backup and just the last few missions to play through (everything has been working perfectly so far) and then just a couple quick things to add in, and then it is finally done. (i mean it this time! lol)
-
Don't ask me (but do :D)
I was inspired/fired up when did all that...
now...
not so much sadly.
-
it is all scripted in, Lurok - as soon as BCSP is out, everyone can look into how you were able to achieve the amazing things you did for SP on every minor to major level :)
-
Check with Lurok - he did this for BCSP for all of the backgrounds of characters displayed on the viewscreen.
I suppose I'll wait then? Assuming I can figure out how Lurok did it by sifting through the files.
Don't ask me (but do :D)
Does that mean you can tell me? :P
I feel like I'm already really close to making it work. There's probably just one little thing that I'm unaware of that will fix my issue.
-
First things first: original BC scripted characters against 3D backgrounds. I needed to work out how to script against 2D (nif) backgrounds. MissionLib.py was the key...
-
MissionLib.py was the key...
No luck there.
In my mind, the issue Im having is what to put in this line of the Character's file:
pHaley.SetLocation("GalaxySeated")
This obviously relates to the location of the character and identifies them on the Galaxy Class bridge captains chair. Commander Willis (who does not sit in the captains chair) has his location listed as 'DBGuest" (D-Bridge Guest seat) which correctly corresponds to where he is seated when he hails the player.
So the bridge where I intend to place Captain Haley (along with other bridges) must have an identifier to locate the 'Captains Chair' somewhere. The question is, what is it called and where are these 'waypoints' listed? I cant even find the ones for the stock bridges anywhere.
-
If your Intrepid bridge is showing up as background, in MissionLib.py - SetupBridgeSet(), try and add a new config:
elif (pcModelName == "data/Models/Sets/bridgename/bridgename.nif"):
pCamera = App.CameraObjectClass_Create(0, 95, 64, -1.55, 0, 0, 1, "maincamera")
-
If your Intrepid bridge is showing up as background, in MissionLib.py - SetupBridgeSet(), try and add a new config:
elif (pcModelName == "data/Models/Sets/bridgename/bridgename.nif"):
pCamera = App.CameraObjectClass_Create(0, 95, 64, -1.55, 0, 0, 1, "maincamera")
I actually have this already:
if (pNiCamera is None):
pSet.SetBackgroundModel(pcModelName, fMX, fMY, fMZ)
# Do special checks for the D and E bridges, we know what numbers we want for them...
if (pcModelName == "data/Models/Sets/DBridge/DBridge.nif"):
pCamera = App.CameraObjectClass_Create(0, 30, 47, -1.55, 0, 0, 1, "maincamera")
elif (pcModelName == "data/Models/Sets/EBridge/EBridge.nif"):
pCamera = App.CameraObjectClass_Create(0, 75, 64, -1.55, 0, 0, 1, "maincamera")
elif (pcModelName == "data/Models/Sets/intrepidbridgev3/intrepidbridge.nif"):
pCamera = App.CameraObjectClass_Create(-32, 10, 47, -1.55, 0, 0, 1, "maincamera")
elif (pcModelName == "data/Models/Sets/defiantbridge/defiantbridge.nif"):
pCamera = App.CameraObjectClass_Create(0, -50, 0, -1.55, 0, 0, 1, "maincamera")
else:
pCamera = App.CameraObjectClass_Create(fX, fY, fZ, 0, 0, 0, 1, "maincamera")
This is how the game knows where to position the camera on the set, correct?
-
:thumbsup:
Notice your intrepidbridge numbers are different? Try adjusting them, and hopefully Haley will appear on screen :)
The numbers I cited will generally place/'film' any character centre-stage even if background is just a nif-screen (which was trick I used for getting around original BC nif-model issues)
-
:thumbsup:
Notice your intrepidbridge numbers are different? Try adjusting them, and hopefully Haley will appear on screen :)
The numbers I cited will generally place/'film' any character centre-stage even if background is just a nif-screen (which was trick I used for getting around original BC nif-model issues)
She does appear on screen now, but since the only thing that moved was the camera, this is the rather humorous result:
(https://i.imgur.com/HIsLJZf.jpg)
The problem is how to move Haley to the captains chair.
In her character file, changing
pHaley.SetLocation("GalaxySeated")to
pHaley.SetLocation("SovereignSeated")slightly alters her location, so this line of code is the secret as far as I have been able to determine. The problem is, what are the names for the 'seats' on custom bridges?
-
Result! :D
I'd just keep playing with the x, y, z axis until you have Haley where want her
-
Result! :D
I'd just keep playing with the x, y, z axis until you have Haley where want her
But Haley doesn't move.
The camera moves around the bridge depending on the values I input, but Haley remains seated in the same place no matter what.
-
All I can suggest is keep experimenting with SetLocation parameters.
Or do what I did: create 2D nif version of bridge and add to MissionLib.py.
Works perfectly
-
Ok. So I've solved the problem by approaching it from a completely different direction.
Instead of trying to move the characters to a new 'hardpoint' in the bridge set, I've simply created a new animation file for the seated locations of every modded bridge I want to include.
By copying the existing "GalaxySeated01.nif" animation file and offseting the body of the chatacter, I can match it up with the captains chair of any set I want.
(https://i.imgur.com/5xctdWD.jpg)
Next, I added a new reference to this animation in the "commonanimations.py" file.
(https://i.imgur.com/LT3RfyY.jpg)
After that, I just change the character's .py file to represent the new animation ID under the "SetLocation()" function, and thats it!
(https://i.imgur.com/88NUfGe.jpg)
Works for any character that I modify the files of. The hardest part was tweaking the offset values to actually get them sitting in the chairs properly, but it was just a matter of trial and error. The great thing is that the same procedure can be used to replace the crappy 'background bridges' that many of the alien races use as well. Makes the NPC dislodge much more immersive.
(https://i.imgur.com/YefSawP.jpg)
Thanks to everyone for the help, especially Lurok91! :Metal:
Hopefully this can help others who want to do something similar in their installs.
-
Cookies :D
That's actually a far more elegant solution than mine :thumbsup:
(it's a sign of age/times that such a breakthrough gets so little response :D)
-
(it's a sign of age/times that such a breakthrough gets so little response :D)
Yeah, our little community seems to be getting smaller and smaller as the days go by...
-
Just out of curiosity, when you call up the bridge on screen do you get all the bridge animations? Animated LCARS. NPCs walking on and off the bridge. Or just a static bridge background?
-
Dude this is excellent work! Thanks for posting this!
-
Holy shit - that is awesome! :thumbsup:
Nicely done!
-
Just out of curiosity, when you call up the bridge on screen do you get all the bridge animations? Animated LCARS. NPCs walking on and off the bridge. Or just a static bridge background?
Good question.
The bridges I used don't have a lot of animations visible in the cameras field of view, but from the looks of it, it's just a static bridge. No console animations and no extras walking in the background.
I didn't even think about that till you mentioned it. Although it is a minor detail IMO.