Author Topic: Ship specific bridge with MVAM?  (Read 1478 times)

Offline ACES_HIGH

  • BCC Roleplay Game Narrator
  • Moderator
  • Posts: 1678
  • Cookies: 54
  • while(!(succeed=try()));
    • BCC Roleplay Games
Ship specific bridge with MVAM?
« on: January 06, 2009, 11:47:13 PM »
I was trying to make DJ's Galaxy's Stardrive switch to the Early TNG bridge when I MVAM, but I can't get the ship specific bridge plugin to work, the bridge just stays the same one I started on.  I've don't stuff like this a couple times before, but I can't seem to get this one to work
Code: [Select]
import Foundation
import App

Foundation.SoundDef("sfx/Weapons/PPhaser.wav", "PPhaser", 0.7)

abbrev = 'DJEnterpriseSeason1DriveSection'
iconName = 'DJGalaxyDriveSection'
longName = 'Season 1 Drive'
shipFile = 'DJEnterpriseSeason1DriveSection'
menuGroup = 'Fed Ships'
playerMenuGroup = 'Fed Ships'
species = App.SPECIES_MARAUDER
SubMenu = "DJ Galaxy Class"
SubSubMenu = "U.S.S. Enterprise *"

Foundation.ShipDef.DJEnterpriseSeason1DriveSection = Foundation.FedShipDef(abbrev, species, { 'name': longName, 'iconName': iconName, 'shipFile': shipFile, 'SubMenu': SubMenu, 'SubSubMenu': SubSubMenu })
Foundation.ShipDef.DJEnterpriseSeason1DriveSection.dTechs = { 'Fed Ablative Armor': {
"Plates": ["Forward Ablative Armor", "Aft Ablative Armor", "Dorsal Ablative Armor", "Ventral Ablative Armor"]
}}
Foundation.ShipDef.DJEnterpriseSeason1DriveSection.desc = 'Drive section of the USS Enterprise.'
Foundation.ShipDef.DJEnterpriseSeason1DriveSection.sBridge = 'galaxybridge'
Foundation.ShipDef.DJEnterpriseSeason1DriveSection.fMaxWarp = 9.6
Foundation.ShipDef.DJEnterpriseSeason1DriveSection.fWarpEntryDelayTime = 3.5
Foundation.ShipDef.DJEnterpriseSeason1DriveSection.sBridge = 'ETNGGeneric'

if menuGroup:           Foundation.ShipDef.DJEnterpriseSeason1DriveSection.RegisterQBShipMenu(menuGroup)
if playerMenuGroup:     Foundation.ShipDef.DJEnterpriseSeason1DriveSection.RegisterQBPlayerShipMenu(playerMenuGroup)


Offline Kirk

  • Posts: 1438
  • Cookies: 139
    • My Released Mods
Re: Ship specific bridge with MVAM?
« Reply #1 on: January 06, 2009, 11:48:14 PM »
I don't think it will swap during MVAM, only when beaming.

Offline ACES_HIGH

  • BCC Roleplay Game Narrator
  • Moderator
  • Posts: 1678
  • Cookies: 54
  • while(!(succeed=try()));
    • BCC Roleplay Games
Re: Ship specific bridge with MVAM?
« Reply #2 on: January 06, 2009, 11:49:16 PM »
oh, ok

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: Ship specific bridge with MVAM?
« Reply #3 on: January 07, 2009, 02:56:43 PM »
I don't believe it will work with the BPCore version of this either.
I still can't read peoples minds, nor can I read peoples computers, even worse, I can't combine the two to read what is going wrong with your BC install...

"It was filed under 'B' for blackmail." - Morse, Inspector Morse - The dead of Jericho.

Offline Alucard

  • Posts: 4
  • Cookies: 0
Re: Ship specific bridge with MVAM?
« Reply #4 on: May 29, 2012, 02:44:03 PM »
Hello.  Is there now a solution to this issue? I'm currently playing with the Prometheus and I would like to set up a battle bridge that loads automatically when you separate the Prometheus.

Offline Phoenix Bondi

  • REMEMBER YOUR ORIGIN
  • Posts: 1294
  • Cookies: 575
  • Never Forget Your Origins
    • CHRIS JONES GAMING
Re: Ship specific bridge with MVAM?
« Reply #5 on: May 29, 2012, 07:19:27 PM »
its not wise to re-wake a topic this old, can normally get you into trouble with the admins, but as far as i know this has never been finished

Offline JimmyB76

  • Posts: 6423
  • Cookies: 421
Re: Ship specific bridge with MVAM?
« Reply #6 on: May 29, 2012, 08:33:13 PM »
well, as far as this plugin, one thing i notice right off the bat is that drive section calls for both the galaxybridge and the ETNGGeneric so that could be a reason it doesnt work...

it could also be that bridge switching may not work with MVAM...  i personally dont know, as ive never tried...

Offline Alucard

  • Posts: 4
  • Cookies: 0
Re: Ship specific bridge with MVAM?
« Reply #7 on: May 30, 2012, 12:48:21 PM »
Too bad. But thanks anyway.

Offline JB2005

  • Scripter, Lawyer, Soldier, Spy
  • Posts: 197
  • Cookies: 58
    • Captain's Orders Blog
Re: Ship specific bridge with MVAM?
« Reply #8 on: September 17, 2012, 08:53:05 AM »
Apologies for bumping this thread, but I had a thought this morning and I've come up with a somewhat crude workaround which makes what's been discussed above possible:



I was going to use the Generic TNG Bridge, but I couldn't get it working so I substituted in the NX Pathfinder to demonstrate the concept!

This was made possible by making 4 alterations to the GalaxyMVAM Plugin Script from the "Stock" MVAMinfinity mod:

First of all, I added an import for LoadBridge - which is a file from Stock BC which is meant to be used to choose the Ship's Bridge at the beginning of a mission in the campaign, but fans of my work will know I use and abuse this script every chance I get!

Next I made the following changes:

Code: [Select]
def MvamGalaxySaucer(pObject, pEvent):


# get the player
pGame = App.Game_GetCurrentGame()
pPlayer = pGame.GetPlayer()
snkMvamModule = __import__ (__name__)
# check if its our full ship
if (pPlayer.GetScript() == "ships." + snkMvamModule.ReturnMvamShips()[0]):
import Custom.Sneaker.Mvam.Seperation
LoadBridge.Load("GalaxyBridge")

###TO CHANGE: change the last word in quotes in the next line to the name of the def. (ie: "MvamGalaxySaucer")
Custom.Sneaker.Mvam.Seperation.Seperation(snkMvamModule, "MvamGalaxySaucer")


pObject.CallNextHandler(pEvent)


###TO CHANGE: dont forget to change this name too.
def MvamGalaxyStardrive(pObject, pEvent):


# get the base variables
pGame = App.Game_GetCurrentGame()
pPlayer = pGame.GetPlayer()
snkMvamModule = __import__ (__name__)
# check if its our full ship
if (pPlayer.GetScript() == "ships." + snkMvamModule.ReturnMvamShips()[0]):
import Custom.Sneaker.Mvam.Seperation
LoadBridge.Load("nxpathfinder")


###TO CHANGE: change the last word in quotes in the next line to the name of the def
Custom.Sneaker.Mvam.Seperation.Seperation(snkMvamModule, "MvamGalaxyStardrive")


pObject.CallNextHandler(pEvent)


###OPTIONAL CHANGE: This is the reintegrate sequence. You really don't need to touch this
def Reintegrate(pObject, pEvent):
#get the base variables
pGame = App.Game_GetCurrentGame()
pPlayer = pGame.GetPlayer()
pSet = pPlayer.GetContainingSet()
snkMvamModule = __import__ (__name__)
#check to see if all the ships are still around in the set. start a counter
intCounter = 0
for i in range((len(snkMvamModule.ReturnMvamShips())) - 1):
if (App.ShipClass_GetObject(pSet, snkMvamModule.ReturnMvamShips()[i + 1]) == None):
#make sure we're not skipping the player ship
if (pPlayer.GetScript() != "ships." + snkMvamModule.ReturnMvamShips()[i + 1]):
#NOW it's bad. something isnt right, so notify the counter
intCounter = intCounter + 1
#alright, if this is a legit reintegrate, intCounter will equal 0
if (intCounter == 0):
import Custom.Sneaker.Mvam.Reintegration
Custom.Sneaker.Mvam.Reintegration.Reintegration(snkMvamModule)
LoadBridge.Load("GalaxyBridge")
pObject.CallNextHandler(pEvent))

The addition of the
Code: [Select]
LoadBridge.Load("BRIDGENAME") means that when the plugin runs to either seperate or reintegrate, at the same time it switches the bridge.

Obviously as a practical solution this has its drawbacks - ie that it requires altering the plugin (though the plugin isn't otherwise affected by the alteration) but it shows that it is at least possible!
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: Ship specific bridge with MVAM?
« Reply #9 on: September 17, 2012, 12:38:24 PM »
Welcome back, JB  :yay:  Good to see you come up with solution.  :thumbsup:   Yeah, that LoadBridge script is a real little goldmine. I abused it to make Baz's TWOK bridge/crew work with a TMP Kobayashi Maru mission I scripted.  The other JB and I been continuing work on the SP Game Mod.  PM Jimmy and if you've got time, get access to hidden forum and add any thoughts  :thumbsup:

Offline Mario

  • Senior Software Developer
  • Administrator
  • Posts: 2186
  • Cookies: 1706
  • Life is life
Re: Ship specific bridge with MVAM?
« Reply #10 on: September 17, 2012, 01:02:04 PM »
Correct implementation would be something like I did in Xtended. Check 000-Expansion-MVAMEvents.py and you'll see that without touching the mvam source code we can attach an event onto MVAM. Which I used and exposed for others in my scenario:
Code: [Select]
ET_MVAM_SEP
ET_MVAM_REIN
Acta, non verba.
aka USS Sovereign

Offline JB2005

  • Scripter, Lawyer, Soldier, Spy
  • Posts: 197
  • Cookies: 58
    • Captain's Orders Blog
Re: Ship specific bridge with MVAM?
« Reply #11 on: September 17, 2012, 01:06:03 PM »
http://www.gamefront.com/files/22272576/GalaxyMvam.rar

Is a copy of the modified script I did, this is set to alternate between the Sovereign and Galaxy Bridges, since they're the  Stock ones it should work for anyone and provides an example!

But like I said it's a terrible way of going about it!
http://captainsordersdevelopmentblog.blogspot.com/2011/12/preview-no-1.html- Captains Orders Development Blog - Last Updated 10/12/2011

Offline CyAn1d3

  • MacDill Shipyards Design Team
  • Posts: 1656
  • Cookies: 420
  • RETIRED
Re: Ship specific bridge with MVAM?
« Reply #12 on: September 17, 2012, 07:11:11 PM »
http://www.gamefront.com/files/22272576/GalaxyMvam.rar

Is a copy of the modified script I did, this is set to alternate between the Sovereign and Galaxy Bridges, since they're the  Stock ones it should work for anyone and provides an example!

But like I said it's a terrible way of going about it!

terrible, but still effective none the less. this may come in handy for me soon.....

have a pat on the back and a cookie for cracking this one JB!
I came, i saw, i added a Sig.
Later gents, i have Youtube to take over.
Cy - 1-12-15

Offline Lurok91

  • Posts: 1309
  • Cookies: 2062
  • SPMod Developer (Retired)
    • Lurok91 Mods
Re: Ship specific bridge with MVAM?
« Reply #13 on: September 19, 2012, 05:09:30 AM »
yeah, forgot *cookie*  :)

Offline Alucard

  • Posts: 4
  • Cookies: 0
Re: Ship specific bridge with MVAM?
« Reply #14 on: May 23, 2013, 07:31:01 AM »
Hello people,

At first: you're doing a great work  :thumbsup:. there is almost no problem that you can?t solve.
as I read yesterday, that it would have worked, I almost danced for joy. but after I changes the script, the bridge changes not automatically.

is that really the right script?
\ scripts \ Custom \ AutoLoad \ Mvam \ GalaxyMvam

if I replace the script code with the scpit code from JB the complete script no longer works. when I press the MVAM button in game, nothing happens.  :idk: What
What did I miss?

Offline hobbs

  • Posts: 1373
  • Cookies: 77
Re: Ship specific bridge with MVAM?
« Reply #15 on: May 23, 2013, 08:45:08 AM »
did you use note pad?
if you did dont "save as" just save only thing i can think of... but im no scripter lol i cant even get a button to activate a sound file lol
"We are dreamers, shapers, singers and makers..." Michael Ansara, "Elric" Babylon 5 "The Geometry of Shadows,"


Offline Alucard

  • Posts: 4
  • Cookies: 0
Re: Ship specific bridge with MVAM?
« Reply #16 on: May 23, 2013, 01:50:23 PM »
I don?t think that is a problem with "save as". that was in previous modding never a problem.

yes I use the notepad.