Bridge Commander Central
		BC Forums => BC Scripting => Topic started by: DJ Curtis on July 06, 2009, 06:49:17 PM
		
			
			- 
				My problem is this...
 
 On the Enterprise G, I have three spacecraft that can be operated independently.
 
 1. Saucer
 2. Drive
 3. Aeroshuttle
 
 Now, getting them to separate and act independently is easy with an MVAM script, however, it seems that currently the only option is to always split all three.  In other words, the only separation options look like so...
 
 1. Whole ship intact.
 2. Saucer, drive, and aeroshuttle independent.
 
 What I want to do is be able to give the player the option of just separating off one part, so that the following combinations are available.
 
 1. Whole ship intact.
 2. Saucer and drive connected with aeroshuttle independent.
 3. Saucer separated with aeroshuttle still connected.
 4. Saucer, drive, and aeroshuttle independent.
 
 Is it possible to modify the existing MVAM scripting to achieve this?  If not, perhaps some of you fellas have some thoughts on how this can be accomplished.
- 
				The following is all under the label of "in theory", since I'm afraid to say, I didn't create it, so I don't know any of the theoretical limits.
 
 What you could do is create 4 MVAM plugins.
 One that separates the saucer and drive.
 One that separates ship and shuttle.
 One that separates the saucer and shuttle.
 One that separates the ship without shuttle into the saucer and drive.
 
 But I am somewhat fearfull that it won't work.
 Before you invest time in doing the entire ship into this setup, just try it with the default positions and several (stock) ships that are easily distinguisable (in the various states).
 
 I'll look some more into this next Wednesday (probably the next day I'm infront of my computer).
- 
				I think your right MLeo, racking my brains to rememer a similar conversation I had with Sneaker several years ago, I did ask a similar question. MVAM should support nesting. But it was never tested.
 
 So;
 One that separates the saucer and drive -> One that separates the saucer and shuttle.
 
 However the reintegration sequence will be a reversal of this, not just;
 Integrate saucer, drive and shuttle.
 
- 
				Hmmm.  I might have to seek you guys out closer to release, because this sounds a bit beyond me.
			
- 
				@DJ Curtis: What El is saying is that you can't just first split into the saucer and drive, and then split the saucer into the new saucer and the shuttle, and then expect to reintegrate into the saucer and drive without the shuttle.
 
 @El: I've been toying over the months/years with the idea of doing a sort of "Foundation" MVAM. While it would first need a standardized way of addressing ship(plugin)s, it would be a way to designate within the plugin of a parent ship the subships it should split into (with positioning/orientation).
 Do you have any pain points in the current MVAM system?
- 
				Not sure if you are referring to everyone of just El and Curtis.
 
 but the Torpedo Ammo isn't saved from ship to ship, if you separate then reintegrate the Torpedo stock is set at 0.
- 
				Yep, I know about that too, you have to add a couple of lines to the MVAM plugin to port it. Have a look in the BlackElm Galaxy Class Mod Pack, I think it has the fix lines.
			
- 
				Well, everyone may make comments, of course. I just happen to know El has worked a lot with MVAM Infinite, so I consider him to be a reliable source of possible improvement points.
			
- 
				Well if you're going to do up a revised MVAM, I would certainly wait for it.
			
- 
				You should realise, I have absolutely no time-frame in mind for this.
 
 I'll probably include some form of event system, meaning it should be possible to do other stuff more easily, say, warping.
 And an "API", so that you can call MVAM on, say, warp.
 
 But I would first need a proper way of identifying ship(plugins).
- 
				To be honest MVAM is pretty good already. Apart from the bug Rob mentioned and the untested hierarchical thing mentioned above the only real improvement I can think of is adding additional triggers (such as Warp) like MLeo metioned.
 
 Other ones might be changing alert states, docking etc...
- 
				I do agree, MVAM Infinite is quite a good piece of work.
 
 I just find it has quite a lot of something "we" (my profession) call "accidental complexity". I mean, you need to keep all that stuff that 9 out of 10 times you don't need to change, but are confronted with.
 
 And testing for the possibility that a ship is part of a MVAM also takes quite some thinking, I had to copy part of the same structure as Sneaker did, looping over all files to see if the current ship I'm testing against is present.
- 
				Ah sorry I was looking at this from a functional standpoint, not a technical (coding) standpoint.
 
 I'm afraid I don't know much beyond the basic of how the coding works, and certain parts of the plugin script.
- 
				I was looking for both.
 
 For one, the plugins should be easier for the basic users, ie, given a list of integrated ship, and subships, here are their positions within the integrated ships, and the directions/speeds they should use to properly separate/integrate. The rest should be reasonable defaults.
 
 For example, music, is it a cutscene or not, should there be a different reintegration sequence? All those things are more or less "advanced" features.
 I'm still thinking on how to represent this, I would like it to be all in the ship plugin, but obviously, the more complex parts (say, user defined cutscenes) won't fit neatly in a ship plugin. And if you want the same ship to be allowed to split into some more types of ways, then just a single entry in the ship plugin won't do.
 So a new plugin is needed. Perhaps I can do both, the ship plugin for the most simple case, and MVAMDef (or something like that, maybe more MVAMConfigurationDef) for others, it would allow you to inherit from it and override functionality.
 
 But all this first requires some form of proper identification of ships, that won't interfere/has accidental overwrites.
- 
				A nice gui interface would be the best functional enhancement to keep it simple for people. Maybe Sov could have a look?
			
- 
				Just curious.  Now that this concept has had time to simmer, anybody have any ideas?
			
- 
				DJ, what you want should be possible bearing in mind the comments above about reintegration.
 My memory of the plugin is very rusty though so I may not be of much help setting anything up.
- 
				Ok how about this to prevent conflicts suppose you just make a copy of MVAM and name it MVAM-MODE2 or maybe must MVAM2 or something and change everything inside so it looks like its an entirely separate script..sort of like you do when you duplicate and tweak a torp.
 
 So your original MVAM still does the full split, whatever that is for your ship
 
 The MVAM-MODE2(MVAM2) button does whatever other split you want like say you split a Prometheus leaving the Saucer and Dorsal connected and just send the Ventral off by itself.
 
 Theoretically if this cloning method works you could literally have a REAL Infinite MVAM.
 
 What do you think guys?
 
- 
				It should do that already, as I said above, it was never tested though.
 
 So Ship 1 splits to Ship2 and Ship3 (Master MVAM Plugin)
 
 Ship 2 splits into Ship 4 and Ship 5 (Child MVAM plugin)
 
 Ship 1 (Master plugin)
 /\
 /    \
 (Child Plugin)   Ship 2   Ship 3
 /\
 /    \
 Ship 4  Ship 5
 
 You should be able to iterate this as many times as you want, beraing in mind that you will have to reverse this to fully integrate everything back.
 
 This 'should' work straight out of the box. You'd need to test it.
 
 
- 
				  when I read this it got me thinking, so i decided to test it out with the CGIVoyager which splits into the aeroshuttle and voyager, so i added a holographic aeroshuttle (With no viable weapons, just basicly an additional target) and it half works. You start out as Voyager and MVAM into the areoshuttle, and the areoshuttle MVAMs into the HoloAreoshuttle, and back to the areoshuttle, but no way back to Voyager, only option to release Hologram ship again, It still has some potential if you dont get aboard the A-Shuttle and let the MVAM script AI do its thing, MABEY!! Nice concept though!It should do that already, as I said above, it was never tested though.
 
 So Ship 1 splits to Ship2 and Ship3 (Master MVAM Plugin)
 
 Ship 2 splits into Ship 4 and Ship 5 (Child MVAM plugin)
 
 Ship 1 (Master plugin)
 /\
 /    \
 (Child Plugin)   Ship 2   Ship 3
 /\
 /    \
 Ship 4  Ship 5
 
 You should be able to iterate this as many times as you want, beraing in mind that you will have to reverse this to fully integrate everything back.
 
 This 'should' work straight out of the box. You'd need to test it.
 
 
 
 
- 
				Would Voyager be ship 1, though? With the Aeroshuttle as ship 2? So to reintegrate you'd have to transport to ship 1 to complete it? Or am I looking at this (your test) the wrong way?
			
- 
				if you guys have sorted this thats great but i was thinking if its still a major head ache couid this work:
 
 MVAM =
 
 1)whole ship
 2)Saucer and star-drive separated (aero shuttle docked) (player on saucer)
 3)Saucer and star-drive separated (aero shuttle docked) (player on Star-drive)
 
 i think thats standard right?
 
 then have shuttle frame work launching of aero shuttle but have it activate a model swap like MVAM does.
 
 eg: using shuttle launching aero shuttle leaves ship. at this time an extra bit of scripting activates the model swap so you have an empty slot in the saucer.
 
 
 hope i made sense... just trying to help
 
 would this work?
- 
				From what i have seen with my test, it may just not be possible due to the way MVAM sets itsself up for the ships, example, you start out as CGIVoyager, right, Open MVAM button, choices: Deploy Aeroshuttle, Get on board, or Recombine. If you deploy the aeroshuttle with out getting on it, then everything is reversable, but i have found that if you deploy the AS and the MVAM AI activates the Holoshuttle, then you cant put the areoshuttle back. Its kind of like using any MVAM ship, activating it, and then beaming/Transporting to the other part/s, then MVAM wont work until you beam back, the option is there in the MVAM button, but i just wont function. 
 
 on the other hand, lets say you "Get on Board" and take the aeroshuttle out, then in the MVAM option, the choices are: Aeroshuttle, Holoshuttle, or deactivate. There is just no option to redock to Voyager.
 At this point i just dont think its possible with out some minor script tweaking at the very least, though i admit that this was a hastily put together test, and im going to do another more comrihensive, but im not hopfull at this point. But still i plan to use CGIVoyager along with the areoshuttle to make a MVAM Voyager, with Holographic ships like in the episode "Basics, Part I" when Voyager fought the kazon!
 
 Im also going to try changing some of the names in the MVAM scripts to see if that helps, well see!