Author Topic: Replacement Bridge Crew!  (Read 7707 times)

Offline JB2005

  • Scripter, Lawyer, Soldier, Spy
  • Posts: 197
  • Cookies: 58
    • Captain's Orders Blog
Replacement Bridge Crew!
« on: September 19, 2012, 12:48:10 PM »
I had a few days free recently, so I thought I'd have a play around with BC Scripting - the result of which is this:



(The Armoury Officer is Lt Halliwell, but I haven't got his Tooltip working yet!

To be clear, these characters are entirely seperate from the Standard Bridge Crew - I altered the LoadBridge Script so that it now loads the stock 5 bridge crew and my custom NX-Crew as well, then altered the NXBridge Script so that as soon as the Stock Crew are loaded, they are then removed!

The problem I always hit upon when trying to do something like this, is that it means editing stock scripts, so for the moment this probably won't ever be seeing a public release (plus I am abusing several peoples' mods here!) though if a couple of ideas I have pay out, then a work-around version might!

For the moment I just thought it made a slightly interesting project!

As you may also have noticed, the Bridge Crew have the Enterprise Era Stations - Engineer, Armoury, Helmswoman, XO/Science and Communications! I'm playing around with switching out different officer functions (Another reason why it's easier to work with my own characters rather than the BC Stock Crew!)
http://captainsordersdevelopmentblog.blogspot.com/2011/12/preview-no-1.html- Captains Orders Development Blog - Last Updated 10/12/2011

Offline tiqhud

  • BCFiles File Poster
  • Posts: 1763
  • Cookies: 1067
  • San Francisco Shipyards (HPer) file manuiplater
Re: Replacement Bridge Crew!
« Reply #1 on: September 19, 2012, 04:26:45 PM »
You know if you make it Mutator controlled, you would not be limited in your selection.
:: Stock Bridge crew or Your Replacement Bridge crew::
Then Mutator off to check, then on agian
TiqHud
you sir, are unable to strike, the port or starboard parts of hull , of a bovine storage facility.
Canon , what people argue exists, that doesn't really  exist.
It is all the little details, that cause headaches.
"Never judge wealth with Money"
'Intelligence has Nothing to do with Politics'
it is Late, Do you know where your Towel is?

Offline JimmyB76

  • Posts: 6423
  • Cookies: 421
Re: Replacement Bridge Crew!
« Reply #2 on: September 19, 2012, 06:53:51 PM »
there are various mutator-controlled bridge crew replacement mods at bcfiles, you may want to consider looking at how they are scripted so you dont have to touch any stock scripts...
or, talk to Blackrook32 or Lurok...

Offline JB2005

  • Scripter, Lawyer, Soldier, Spy
  • Posts: 197
  • Cookies: 58
    • Captain's Orders Blog
Re: Replacement Bridge Crew!
« Reply #3 on: September 19, 2012, 06:59:49 PM »
The problem I keep coming up against is that I can't always get the mutator controlled scripts to work in Single Player Missions!
http://captainsordersdevelopmentblog.blogspot.com/2011/12/preview-no-1.html- Captains Orders Development Blog - Last Updated 10/12/2011

Offline JimmyB76

  • Posts: 6423
  • Cookies: 421
Re: Replacement Bridge Crew!
« Reply #4 on: September 19, 2012, 07:01:57 PM »
aaah it is for SP...  i see how you mean...
you may want to talk with Lurok all the same...

Offline Lurok91

  • Posts: 1309
  • Cookies: 2062
  • SPMod Developer (Retired)
    • Lurok91 Mods
Re: Replacement Bridge Crew!
« Reply #5 on: September 20, 2012, 04:50:28 AM »
Although mutator crew should work ok, the major problem with SP missions (I assume you mean the Maelstrom Campaign ones) is all the scripting calls for the stock crew (Kiska, etc) so we'd need to find a workaround for that.   That aside, this would just be a nice standalone mod for any ENT fans (like me and BR32) and be interested to try out.  Using BR's Kiska-To-Male mod, and combining stuff from your CO mod with Rob Archer's AddCrew script tweak, I already have a working NX crew with Hoshi as added Comms orders, though I haven't been able to combine XO and science functions yet.  Plus they all have canon voices  :)

Offline JB2005

  • Scripter, Lawyer, Soldier, Spy
  • Posts: 197
  • Cookies: 58
    • Captain's Orders Blog
Re: Replacement Bridge Crew!
« Reply #6 on: September 20, 2012, 08:42:16 AM »
I'll have another look at it and see if I can work out what I was doing wrong!
http://captainsordersdevelopmentblog.blogspot.com/2011/12/preview-no-1.html- Captains Orders Development Blog - Last Updated 10/12/2011

Offline Blackrook32

  • BC Files Admin
  • Vice Administrator
  • Posts: 564
  • Cookies: 1078
    • Blackrook32's YouTube Channel
Re: Replacement Bridge Crew!
« Reply #7 on: October 09, 2012, 07:52:12 PM »
I'll have another look at it and see if I can work out what I was doing wrong!

Sorry I missed this posting, been busy with College and all...

I'm guessing there is a conflict with your custom crewbot.py script and the "Bridge Crew General.tgl". You will have to make a custom mutator & .TGL to accommodate Bridge Tiptool modification, like I have in my BC: Generations mod. Generations works in Quickbattle as a total conversion. Because the custom mutator in Generations calls for not only the custom bridge crew to the assigned bridge slots, with related Tiptools. Also the mutators in my mod calls a specific custom Bridge Crew General.TGL. That has the related information and directed modifications I made for the specific bridge crews.

My crews are gender specific, meaning I can place any gender with name & voice, to any bridge slot of my choosing. ;)
BR32


" Fortune Favors the Bold "

Offline JB2005

  • Scripter, Lawyer, Soldier, Spy
  • Posts: 197
  • Cookies: 58
    • Captain's Orders Blog
Re: Replacement Bridge Crew!
« Reply #8 on: October 13, 2012, 12:59:39 AM »
Thanks for the advice about mutators and overrides! It suddenly made me think and I've been able to come up with a rather rough, but nonetheless workable, solution to something I was playing around with this time last year:



Basically, Tiqhud asked last year if it would be possible to have the crew uniforms change according to the bridge. At the time I played around with a few things and was able to change the uniform texture, but not the head texture. In the end that fell by the way side when exams arose and second semester kicked in. Then tonight a lightbulb flashed in my head and I wrote a script which overrides the Bridge.py files and loads entirely new characters.

As far as I can tell, even though every custom bridge comes with its own character files (ambassadorbrex.py - for example) these are only necessary for the small piece of code which says "ConfigureFor[Bridge]" and you can pretty much write whatever you want in the rest of the file and it doesn't make a difference.

What the code I've written now does is when the Bridge loads it deletes the stock characters and simultaneously loads bridge specific character.py files. (so far the only bridges I have on this install are the Stock Galaxy and Sovereign so there are Sovereign[Character] Files and Galaxy[Character] files. Since the crewmembers are being reloaded every time the Bridge switches, and each character for each Bridge has its own seperate file, this means I can specify a ship-specific uniform!

The main bug at the moment is that because the script actively ignores the stock characters, every bridge in a BC install has to be made compatible with it, otherwise switching to a non-compatible bridge causes the characters to retain their spatial position from the previous bridge! I've got a couple of ideas on how this might be resolved but so far I can't get them to work!

In the past I've been advised to steer clear of modifying stock scripts and encouraged to implement overrides! Thanks to the people who gave me that advice because it's now paying off in dividends!
http://captainsordersdevelopmentblog.blogspot.com/2011/12/preview-no-1.html- Captains Orders Development Blog - Last Updated 10/12/2011

Offline Lurok91

  • Posts: 1309
  • Cookies: 2062
  • SPMod Developer (Retired)
    • Lurok91 Mods
Re: Replacement Bridge Crew!
« Reply #9 on: October 13, 2012, 04:59:41 AM »
*cookie*   Makes me almost nostalgic watching that vid  :)  Looking forward to seeing script for this; that's the one missing thing I've always wanted on install.  Presumably, once you have sorted out any final details, you will be able to,  say, transport from Galaxy/TNG crew to Bird of Prey with Klingon crew?

Offline Lurok91

  • Posts: 1309
  • Cookies: 2062
  • SPMod Developer (Retired)
    • Lurok91 Mods
Re: Replacement Bridge Crew!
« Reply #10 on: October 15, 2012, 08:59:53 AM »
Sorry to double-post but wanted to ask JB advice.  Tried your Intrepid Bridge Crew script change idea: if you remember, the one where you incorporate all the new character anims in the bridge.py file  rather than as separate character scripts in Characters folder.  Works fine for changing bridge, but the crew are still stuck in the stock position, i.e. haven't switched to new positions.  Posted code below; any advice on what may be wrong welcome  :)

Code: [Select]
def ConfigureCharacters(pBridgeSet):
# Configure bridge characters to our bridge

import Bridge.Characters.Felix
import Bridge.Characters.Kiska
import Bridge.Characters.Saffi
import Bridge.Characters.Brex
import Bridge.Characters.Miguel

import Bridge.Characters.FemaleExtra1
import Bridge.Characters.FemaleExtra2
import Bridge.Characters.FemaleExtra3
import Bridge.Characters.MaleExtra1
import Bridge.Characters.MaleExtra2
import Bridge.Characters.MaleExtra3

pFelix = App.CharacterClass_Cast(pBridgeSet.GetObject("Tactical"))
pKiska = App.CharacterClass_Cast(pBridgeSet.GetObject("Helm"))
pSaffi = App.CharacterClass_Cast(pBridgeSet.GetObject("XO"))
pMiguel = App.CharacterClass_Cast(pBridgeSet.GetObject("Science"))
pBrex = App.CharacterClass_Cast(pBridgeSet.GetObject("Engineer"))

pFemaleExtra1 = App.CharacterClass_Cast(pBridgeSet.GetObject("FemaleExtra1"))
pFemaleExtra2 = App.CharacterClass_Cast(pBridgeSet.GetObject("FemaleExtra2"))
pFemaleExtra3 = App.CharacterClass_Cast(pBridgeSet.GetObject("FemaleExtra3"))

pMaleExtra1 = App.CharacterClass_Cast(pBridgeSet.GetObject("MaleExtra1"))
pMaleExtra2 = App.CharacterClass_Cast(pBridgeSet.GetObject("MaleExtra2"))
pMaleExtra3 = App.CharacterClass_Cast(pBridgeSet.GetObject("MaleExtra3"))

Bridge.Characters.Felix.ConfigureForGalaxy(pFelix)
Bridge.Characters.Kiska.ConfigureForGalaxy(pKiska)
Bridge.Characters.Saffi.ConfigureForGalaxy(pSaffi)
Bridge.Characters.Miguel.ConfigureForGalaxy(pMiguel)
Bridge.Characters.Brex.ConfigureForGalaxy(pBrex)

if (pFemaleExtra1):
Bridge.Characters.FemaleExtra1.ConfigureForGalaxy(pFemaleExtra1)
if (pFemaleExtra2):
Bridge.Characters.FemaleExtra2.ConfigureForGalaxy(pFemaleExtra2)
if (pFemaleExtra3):
Bridge.Characters.FemaleExtra3.ConfigureForGalaxy(pFemaleExtra3)
if (pMaleExtra1):
Bridge.Characters.MaleExtra1.ConfigureForGalaxy(pMaleExtra1)
if (pMaleExtra2):
Bridge.Characters.MaleExtra2.ConfigureForGalaxy(pMaleExtra2)
if (pMaleExtra3):
Bridge.Characters.MaleExtra3.ConfigureForGalaxy(pMaleExtra3)

pCamera = App.ZoomCameraObjectClass_GetObject(pBridgeSet, "maincamera")
pCamera.SetTranslateXYZ(-35, 75, 40)


        Kiska()
        Felix()
        Brex()
        Saffi()
        Miguel()
        MaleExtra1(pMaleExtra1)
        MaleExtra2(pMaleExtra2)
        MaleExtra3(pMaleExtra3)
        FemaleExtra1(pFemaleExtra1)
        FemaleExtra2(pFemaleExtra2)
        FemaleExtra3(pFemaleExtra3)

def Kiska():
pBridgeSet = App.g_kSetManager.GetSet("bridge")
pKiska = App.CharacterClass_Cast(pBridgeSet.GetObject("Helm"))
pKiska.ClearAnimations()

pKiska.AddAnimation("akHelmTurnCaptain", "Bridge.Characters.akMediumAnimations.akTurnAtHTowardsCaptain")
pKiska.AddAnimation("akHelmBackCaptain", "Bridge.Characters.akMediumAnimations.akTurnBackAtHFromCaptain")
pKiska.AddAnimation("galHelmGlanceCaptain", "Bridge.Characters.CommonAnimations.GlanceRight")
pKiska.AddAnimation("galHelmGlanceAwayCaptain", "Bridge.Characters.CommonAnimations.SeatedM")
pKiska.AddAnimation("EBHelmBreathe", "Bridge.Characters.CommonAnimations.SeatedM")
pKiska.AddRandomAnimation("Bridge.Characters.SmallAnimations.EBEConsoleInteraction", App.CharacterClass.SITTING_ONLY, 25, 1)
pKiska.AddAnimation("PushingButtons", "Bridge.Characters.SmallAnimations.EBEConsoleInteraction")
#pKiska.AddAnimation("galHelmHit", "Bridge.Characters.akMediumAnimations.galHHit")
#pKiska.AddAnimation("galHelmHitHard", "Bridge.Characters.akMediumAnimations.galHHitHard")
pKiska.AddAnimation("galHelmReactLeft", "Bridge.Characters.CommonAnimations.ReactLeft")
pKiska.AddAnimation("galHelmReactRight", "Bridge.Characters.CommonAnimations.ReactRight")
pKiska.SetLocation("akHelm")
pKiska.SetLookAtAdj(2.9137, -268.734, 38.715797)
pKiska.AddPositionZoom("akHelm", 0.65, "Helm")
pKiska.AddRandomAnimation("Bridge.Characters.CommonAnimations.TiltHeadLeft")
pKiska.AddRandomAnimation("Bridge.Characters.CommonAnimations.TiltHeadRight")
pKiska.AddRandomAnimation("Bridge.Characters.CommonAnimations.LookUp")
pKiska.AddRandomAnimation("Bridge.Characters.CommonAnimations.LookDown")

Offline JB2005

  • Scripter, Lawyer, Soldier, Spy
  • Posts: 197
  • Cookies: 58
    • Captain's Orders Blog
Re: Replacement Bridge Crew!
« Reply #11 on: October 15, 2012, 12:11:19 PM »
*thinks*

if i remember correctly, the problem I found was that doing it like that, it tended to ignore the files in the Autoload folder? So unless you physically modify Common Animations to accept the new positions it didn't work?
http://captainsordersdevelopmentblog.blogspot.com/2011/12/preview-no-1.html- Captains Orders Development Blog - Last Updated 10/12/2011

Offline JimmyB76

  • Posts: 6423
  • Cookies: 421
Re: Replacement Bridge Crew!
« Reply #12 on: October 15, 2012, 04:16:48 PM »
do you have something like this in the script for the bridge in Autoload folder?
Code: [Select]
oundation.BridgeDef('Intrepid', 'intrepidbridge', dict = {
'modes': [ Foundation.MutatorDef.Stock ],
'locations': {
# Intrepid-Bridge Locations
'IntHelm': [ 'data/animations/Int_stand_h_m.nif', 'Int_stand_h_m' ],
'IntTactical': [ 'data/animations/Int_stand_t_l.nif', 'Int_stand_t_l' ],
'IntCommander': [ 'data/animations/Int_stand_c_m.nif', 'Int_stand_c_m' ],
'IntScience': [ 'data/animations/Int_stand_S_S.nif', 'Int_stand_s_s' ],
'IntEngineer': [ 'data/animations/Int_seated_e_s.nif', 'Int_seated_e_s' ],
'EBCommander1': [ 'data/animations/EB_C1toC_M.nif', 'EB_C1toC_M' ],
'IntGuest': [ 'data/animations/Int_stand_X_m.nif', 'Int_stand_X_m' ],
'IntL1S': [ 'data/animations/Int_L1toG3_S.nif', 'Int_L1toG3_s', 'pCharacter.SetHidden(1)' ],
'IntL1M': [ 'data/animations/Int_L1toG3_M.nif', 'Int_L1toG3_M', 'pCharacter.SetHidden(0)' ],
'IntL1L': [ 'data/animations/Int_L1toG3_L.nif', 'Int_L1toG3_L', 'pCharacter.SetHidden(1)' ],
'IntL2M': [ 'data/animations/Int_L2toG2_M.nif', 'Int_L2toG2_M', 'pCharacter.SetHidden(1)' ],
'IntG1M': [ 'data/animations/Int_G1toL2_M.nif', 'Int_G1toL2_M' ],
'IntG2M': [ 'data/animations/Int_G2toL2_M.nif', 'Int_G2toL2_M' ],
'IntG3M': [ 'data/animations/Int_G3toL1_M.nif', 'Int_G3toL1_M' ],

Offline JB2005

  • Scripter, Lawyer, Soldier, Spy
  • Posts: 197
  • Cookies: 58
    • Captain's Orders Blog
Re: Replacement Bridge Crew!
« Reply #13 on: October 15, 2012, 05:36:28 PM »
The script you've done for Kiska has what I think is a reference to the Akira Bridge Positions? Where it says "pKiska.setlocation("akhelm")"

it should read pKiska.setlocation("inthelm") or something similar?
http://captainsordersdevelopmentblog.blogspot.com/2011/12/preview-no-1.html- Captains Orders Development Blog - Last Updated 10/12/2011

Offline Lurok91

  • Posts: 1309
  • Cookies: 2062
  • SPMod Developer (Retired)
    • Lurok91 Mods
Re: Replacement Bridge Crew!
« Reply #14 on: October 16, 2012, 04:56:05 AM »
Aah. I think I see now what you might have done.  I'll play around and let you know results.  :)

Offline JB2005

  • Scripter, Lawyer, Soldier, Spy
  • Posts: 197
  • Cookies: 58
    • Captain's Orders Blog
Re: Replacement Bridge Crew!
« Reply #15 on: October 16, 2012, 10:58:02 AM »
:)

I've got my mod working now, and I'm hoping to do a preliminary release soon, but before I can, I'm using a uniform mod from BC Files http://bridgecommander.filefront.com/file/Star_Trek_The_next_Generation_Uniform_Mod_v10;26195

Now it's from 2004 and it was the last mod "Lorik" released...and obviously there's been so much intervening time it's doubtful I'd be able to get in touch with him...but if anyone has any contact details I'd appreciate it, otherwise do you think it would be ok if I just credited him with the uniforms?



In case anyone's interested!
http://captainsordersdevelopmentblog.blogspot.com/2011/12/preview-no-1.html- Captains Orders Development Blog - Last Updated 10/12/2011

Offline JimmyB76

  • Posts: 6423
  • Cookies: 421
Re: Replacement Bridge Crew!
« Reply #16 on: October 16, 2012, 03:07:27 PM »
im sure that would be ok to just credit him...
also, BR has been working on some really good looking uniforms, but they would be for the EF2 crew...

i have a script that allows for bridge-switching in QB (without having to end the battle and set it up again) which works along the same lines as what you have here, tho the script i have calls for a window of all the installed bridges rather than having them listed one by one in the XO menu...  it might actually be one of yours? lol  i dont recall where i got it...  in either event, lemme know if you would like to have it :)

Offline JB2005

  • Scripter, Lawyer, Soldier, Spy
  • Posts: 197
  • Cookies: 58
    • Captain's Orders Blog
Re: Replacement Bridge Crew!
« Reply #17 on: October 16, 2012, 03:23:28 PM »
im sure that would be ok to just credit him...
also, BR has been working on some really good looking uniforms, but they would be for the EF2 crew...

i have a script that allows for bridge-switching in QB (without having to end the battle and set it up again) which works along the same lines as what you have here, tho the script i have calls for a window of all the installed bridges rather than having them listed one by one in the XO menu...  it might actually be one of yours? lol  i dont recall where i got it...  in either event, lemme know if you would like to have it :)

I think that is one of mine! And the switching bridge buttons here are just so I could see for myself if it was working! It works just as well by starting up a new QuickBattle and I'm going to test it on my Kobayashi Maru install in a bit, but it should work with that as well!
http://captainsordersdevelopmentblog.blogspot.com/2011/12/preview-no-1.html- Captains Orders Development Blog - Last Updated 10/12/2011

Offline Lurok91

  • Posts: 1309
  • Cookies: 2062
  • SPMod Developer (Retired)
    • Lurok91 Mods
Re: Replacement Bridge Crew!
« Reply #18 on: October 17, 2012, 05:48:06 AM »
Nice work on mod  :thumbsup:  Interesting you say in vid only compatibility with stock bridges, but you use non-stock Defiant and TOS.

On earlier Intrepid script question, I thought problem might have been I missed off the BridgeName: 'Int'  bit at top of script.  But that doesn't seem to have made any difference.  I'll carry on tinkering but if you have any other thoughts...

Offline JimmyB76

  • Posts: 6423
  • Cookies: 421
Re: Replacement Bridge Crew!
« Reply #19 on: October 17, 2012, 06:18:27 AM »
On earlier Intrepid script question, I thought problem might have been I missed off the BridgeName: 'Int'  bit at top of script.  But that doesn't seem to have made any difference.  I'll carry on tinkering but if you have any other thoughts...
if you wanted to send me over that which youre kinda stuck on, ill be happy to take a look as well as see if i can come up with anything...  lemme know if i can help in any way :)