Author Topic: Relocating stock ships/stations to submenus  (Read 4598 times)

Offline 086gf

  • Location: United Socialist States of America!
  • Posts: 1357
  • Cookies: 32
Relocating stock ships/stations to submenus
« on: June 03, 2008, 02:27:45 AM »
Im gonna use the Space Facility as an example.

Here is the scripts/Custom/Ships file I created.

Quote
##### Created by:
##### Bridge Commander Ship Menu Creator v5.5



import App
import Foundation



abbrev = 'spacefacility'
iconName = 'SpaceFacility'
longName = 'Space Facility'
shipFile = 'spacefacility'
species = App.SPECIES_GALAXY
SubMenu = 'Other Stations'
menuGroup = 'Bases'
playerMenuGroup = ''


Foundation.ShipDef.spacefacility = Foundation.StarBaseDef(abbrev, species, { 'name': longName, 'iconName': iconName, 'shipFile': shipFile, 'SubMenu': SubMenu })


# Foundation.ShipDef.spacefacility.fMaxWarp
# Foundation.ShipDef.spacefacility.fCruiseWarp
Foundation.ShipDef.spacefacility.desc = ''


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


if Foundation.shipList._keyList.has_key(longName):
      Foundation.ShipDef.__dict__[longName].friendlyDetails[2] = Foundation.shipList[longName].friendlyDetails[2]
      Foundation.ShipDef.__dict__[longName].enemyDetails[2] = Foundation.shipList[longName].enemyDetails[2]

Specifically, I want this station to be with the Terran base.

All hail the messiah!

Offline JimmyB76

  • Posts: 6423
  • Cookies: 421
Re: Relocating stock ships/stations to submenus
« Reply #1 on: June 03, 2008, 07:42:26 AM »

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: Relocating stock ships/stations to submenus
« Reply #2 on: June 03, 2008, 09:31:21 AM »
I prefer Jimmies way, er, my way. :S


Simply because it doesn't overwrite anything (except for submenu placing of course).
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 086gf

  • Location: United Socialist States of America!
  • Posts: 1357
  • Cookies: 32
Re: Relocating stock ships/stations to submenus
« Reply #3 on: June 04, 2008, 03:05:07 PM »
I was gonna do a search but for some odd reason I had no idea what I was going to type. O_O

And yes I've already read that thread when it was new lol.

Thanks.
All hail the messiah!

Offline JimmyB76

  • Posts: 6423
  • Cookies: 421
Re: Relocating stock ships/stations to submenus
« Reply #4 on: June 04, 2008, 03:26:15 PM »
I was gonna do a search but for some odd reason I had no idea what I was going to type. O_O
lol thats ok :)

were you able to put your ship into a submenu?  if not, lemme know and i can work with ya on it...

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: Relocating stock ships/stations to submenus
« Reply #5 on: June 04, 2008, 03:31:50 PM »
I think we ought to be asking why you would want to do it the way you proposed we do it?

TBH, in this case, I view my way as superior since we don't make a big change.
Also, it's quite possible I might change things in the future regarding submenu's and storing ships meaning that doing it this way means you get a "duplicate" entry (not exactly duplicate, since for BC both are different).
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 086gf

  • Location: United Socialist States of America!
  • Posts: 1357
  • Cookies: 32
Re: Relocating stock ships/stations to submenus
« Reply #6 on: June 05, 2008, 03:24:04 PM »
@JB76

All stations are now right were I want them.

@MLeo

The only double enteries I get is in the F3 add ships menu but thats no big deal for me really.
All hail the messiah!

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: Relocating stock ships/stations to submenus
« Reply #7 on: June 05, 2008, 03:57:55 PM »
I'm just saying that's it's possible in the future that Foundation becomes more SubMenu aware, meaning no accidental overwriting ships. Which, basicly, you are doing right now.



So, I'll ask again:
I think we ought to be asking why you would want to do it the way you proposed we do it?

^_^
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 JimmyB76

  • Posts: 6423
  • Cookies: 421
Re: Relocating stock ships/stations to submenus
« Reply #8 on: June 05, 2008, 03:58:50 PM »
The only double enteries I get is in the F3 add ships menu but thats no big deal for me really.
same here - my Add Ships list is all screwed up lol   they are all there, but all in different menu spots...  i can find my ships, it just takes a little bit of hunting to locate exactly where they are...

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: Relocating stock ships/stations to submenus
« Reply #9 on: June 05, 2008, 04:03:46 PM »
I'll take a look, I think it's something simple. Like not using FoundationMenus (if it did, then it would automaticly get SubMenu improvements :)).
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 JimmyB76

  • Posts: 6423
  • Cookies: 421
Re: Relocating stock ships/stations to submenus
« Reply #10 on: June 06, 2008, 07:51:08 AM »
well, in my case, i have my Dominion, Cardassian, and Federation ships separated into submenus "Cruisers", "Warships", and "Battleships" (so far)...  and i think because different races share the same submenu name, it tends to confuse the Add Ships section and kinda groups things together in all sorts of mixed up ways lol
i can post a screenshot, if youd like...

Offline Kirk

  • Posts: 1438
  • Cookies: 139
    • My Released Mods
Re: Relocating stock ships/stations to submenus
« Reply #11 on: June 06, 2008, 09:34:58 AM »
Hey Jimmy, I'm having the problem. Only mine are sorted by era (TOS, TMP, etc.) Are we thread hijacking or has the current problem been solved? :?

Offline JimmyB76

  • Posts: 6423
  • Cookies: 421
Re: Relocating stock ships/stations to submenus
« Reply #12 on: June 06, 2008, 10:54:52 AM »
which problem do you mean?  moving stock ships/stations into submenus? or how the ships appear all over the place in the Add Ships section?

Offline Kirk

  • Posts: 1438
  • Cookies: 139
    • My Released Mods
Re: Relocating stock ships/stations to submenus
« Reply #13 on: June 06, 2008, 11:39:09 AM »
The Add Ships menu problem.

Offline JimmyB76

  • Posts: 6423
  • Cookies: 421
Re: Relocating stock ships/stations to submenus
« Reply #14 on: June 06, 2008, 11:53:35 AM »
aaah...  well there is no fix for that (as of yet)...

Offline 086gf

  • Location: United Socialist States of America!
  • Posts: 1357
  • Cookies: 32
Re: Relocating stock ships/stations to submenus
« Reply #15 on: June 06, 2008, 01:54:07 PM »
Considering I too will soon have era submenus for some races I don't mind one bit.
All hail the messiah!

Offline JimmyB76

  • Posts: 6423
  • Cookies: 421
Re: Relocating stock ships/stations to submenus
« Reply #16 on: June 06, 2008, 02:49:07 PM »
it's just when different races have the same submenu names within them...  that makes Add Ships all sorts of confused lol
the ships are all there in Add Ships, just kinda all over the place it seems; not as they should be tho...

Offline 086gf

  • Location: United Socialist States of America!
  • Posts: 1357
  • Cookies: 32
Re: Relocating stock ships/stations to submenus
« Reply #17 on: June 06, 2008, 08:34:48 PM »
Well, I could just do "Fed ENT", "Kling TOS", "Rom TMP" then to avoid said confuzzelment.
All hail the messiah!

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: Relocating stock ships/stations to submenus
« Reply #18 on: June 07, 2008, 08:05:48 AM »
I'll repeat my question another time, why choose the "destructive" way (sorry, don't know how to phrase it differently ATM) over the adapting way?


As for the AddShip problem (which wasn't obvious from the first question), AddShipGUI doesn't use FoundationMenu for it's menu thing, if it had, then it would have worked exactly as excepted.
What it does do, is look for the SubMenu attribute (so one layer) and if the ship is MVAM, I think that the AddShipGUI did the MVAM already by itself before I added that to SubMenu in V3.
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 086gf

  • Location: United Socialist States of America!
  • Posts: 1357
  • Cookies: 32
Re: Relocating stock ships/stations to submenus
« Reply #19 on: June 07, 2008, 03:13:46 PM »
I'll repeat my question another time, why choose the "destructive" way (sorry, don't know how to phrase it differently ATM) over the adapting way?

Im guessing this is to me.

Cause this is the way I want it...blame the OCD? idk lol
All hail the messiah!