Author Topic: Submenu (3.0) Problems  (Read 2693 times)

Offline Phaser

  • Star Trek Canon Authority
  • Posts: 387
  • Cookies: 231
Submenu (3.0) Problems
« on: August 22, 2006, 09:32:57 PM »
Okay, I've got problems up the wazoo with the Submenu 3.0 mod, which I just installed (I had Submenu V2 for a long time; some of the listed errors appeared in that version, too).  A list:


-The Ambassador appears outside the Ambassador Class Submenu, as well as inside (outside it appears as "Ambassador" and inside as "U.S.S. Ambassador")

-The Repulse (an Excelsior class) appears outside the Excelsior Class submenu, as well as inside (outside it appears as "Excelsior" and inside under the "TNG" submenu as "U.S.S. Repulse" and under the "Dominion Wars" submenu as "U.S.S. Repulse Refit")

- The Lakota (an Excelsior class) appears outside the Excelsior Class submenu, as well as inside (outside it appears as "Lakota" and inside under the "TNG" submenu as "U.S.S. Lakota" and under the "Dominion Wars" submenu as "U.S.S. Lakota Refit")

-The Prometheus appears as a submenu under the "Federation Ships" menu, but there isn't anything in the submenu.  This one might have been caused by me--I may have moved the MVAM ships from the "Federation Ships" menu to the "Other Ships" menu when I first installed the ship.  If that's the case, I'll move them back, hopefully solving that problem.

-The Stargate ship Odessey appears as a sub-submenu in the "Galaxy Class" submenu, and "U.S.S. Odessey" appears in this sub-submenu (it's still the Stargate ship, though).

-The Stargate "Ha'tak", "Ha'tak Refit", and "Ha'tak Upgrade" appear as sub-submenus under the "Goa'uld Ships/Bases" submenu in the Stargate Ships menu.  These sub-submenus have nothing in them.

-The Stargate ships Daedalus, Korolev, Odessey, Prometheus, and Prometheus Refit behave as though they're submenus with nothing under them (just like the Ha'tak), but they appear in the menu as a normal ships--no arrows to the left of the name (this is a minor thing, though.  If you know how to fix this, please tell me, but don't look into it too deeply.)




I was very surprised when some new ships showed up in my menu, the "U.S.S. Repulse Refit", for example.  Now, there weren't any new hardpoints in the submenu zip file, so what's the deal with these new ships?  Specifically:


-There doesn't seem to be any difference between the three Repulse ships--under the "Federation Ships" menu, the "TNG" submenu, and the Repulse Refit under the "Dominion Wars" submenu.

-There doesn't seem to be any difference between the two Lakota ships that appear in the "TNG" and "Dominion Wars" submenus, but the Lakota that appears under the "Federation Ships" menu seems to have slightly stronger shields (this is probably just my imagination, though).

I'm guessing these new ships were put there either so others could make a hardpoint for them or because this mod was meant to be installed with some other mods (if that's the case, what/which mod/mods?).



Bottom line, here's what I'd like to do:
-Get rid of the Excelsior and Ambassador Class ships that don't appear under submenus
-Fix the U.S.S. Odessey problem
-Fix the ships that appear with empty sub-submenus.

Please help.  Thanks!  (And sorry for my super-long post.  I just like to be as detailed as I can so you can get the full picture)

Offline Mark

  • Retired Administrator
  • Posts: 1930
  • Cookies: 1797
  • Site Co-Founder
    • ST Excalibur
Submenu (3.0) Problems
« Reply #1 on: August 22, 2006, 10:05:35 PM »
ok first of stock ships will always appear outside of the submenu aswell as inside, so "galaxy" will appear aswell as "uss galaxy" inside the "galaxy class" submenu.

secondly referring to the non stock ships; its not submenuv3 at fault, its the ships scripts in scrpts\custom\ships\... they simply have properties that werent activated when you only had V2 installed

if you look in submenu v3 readme there are descriptions for all this much better then i can explain however you basically want to be looking at the 'submenu' key under 'species'.

if the submenu key is set up as follows:

Code: [Select]
SubMenu = ["NX Class"]

It will just appear under the submenu "NX Class", however if it looks more like this:

Code: [Select]
SubMenu = ["NX Class", "NX01 Enterprise"]

it will appear under NX Class > NX01 Enterprise.

if you are wanting to place a non submenued ship into a submenu make sure you give it the following:

Code: [Select]
Foundation.ShipDef.NX01Enterprise = Foundation.FedShipDef(abbrev, species, { 'name': longName, 'iconName': iconName, 'shipFile': shipFile, "SubMenu": SubMenu })

hope that made some sense

BCDS

  • Guest
Submenu (3.0) Problems
« Reply #2 on: August 23, 2006, 06:11:57 AM »
Also, for stock ships, like the Galaxy, you cant choose a seperate name, i found this.

However, if you want to place it in to a seperate menu without it appearing in the normal Federation Ships then you will need to do this:
Quote


Foundation.ShipDef.Galaxy.SubMenu = "Galaxy Class"
Foundation.ShipDef.Galaxy = Foundation.FedShipDef(abbrev, species, { 'name': longName, 'iconName': iconName, 'shipFile': shipFile)


This is because StaticShipDef's suck horse....

As for the many stargate ships with menu's this is because they actually have MVAM plugins, but the plugin files for the seperate ships do not register them in the QB menu's, however, Submenu 3.0 tries to coroberate ship plugins by SubMenu definition and from a ships MVAM plugin file. This is why you get submenu's for ships that are empty.

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Submenu (3.0) Problems
« Reply #3 on: August 23, 2006, 08:16:04 AM »
@BCDS: You do realise that it will overwrite the SubMenu? Or rather, erase it. And what exactly is the problem with them? I find it a very elegant and extendable (you wouldn't have a lot of mods without it!) way.


@Phaser:
Now, SubMenu (any version) sees USS Ambassador and Ambassador as 2 diffrent ships.
I believe USS Ambassador to be a non stock ship. So it could be found in a submenu.

Every diffrent name is a diffrent ShipDef.

For example your Repulse example.
Quote from: Phaser
-The Repulse (an Excelsior class) appears outside the Excelsior Class submenu, as well as inside (outside it appears as "Excelsior" and inside under the "TNG" submenu as "U.S.S. Repulse" and under the "Dominion Wars" submenu as "U.S.S. Repulse Refit")


The "Excelsior" is a diffrent ship from the "USS Repulse", it has a diffrent name to begin with. The mod author of Excelsior didn't add a submenu, while the author of the Repulse did.



The mod doesn't generate any new ship buttons, what it does is the following:
For every race, loop
For every ship in race, follow the SubMenu and then the SubSubMenu variables and create menu's as needed.
Then (this is new in V3), it checks if the ship is a parent ship for a MVAM (in the new version it will be possible to disable this) configuration, and if it is, create and configure a menu to do this (for instance, clicking on it will make it act like a normal button, and you need 2 clicks to open it).
If it isn't a parent ship, it will check if it is a child ship (for MVAM), if it is, then check if there is a menu for the parent ship present, if there isn't one, find the parent ship and create a menu for it (in advance) and add it to it.

Now, here comes the problem. If the child ship doesn't have the same sub menu's as it's parent ship, then it won't be able to appear under the parent ship.

I think this is the case for many ships in the star gate pack.
For example, I believe a ship can launch death gliders through MVAM (correct me if I'm wrong). Now, these death gliders wouldn't appear under the Tau'ri sub menu, but under the Goa'uld menu.
If you take in respect what I said above, then the Tau'ri ship would appear as an empty menu.

Now I know this causes a lot of worries (I mean, it was mentioned clearly in the readme that this could happen), I'll see if I can make it check if it's empty, and if it is, replace it with a button. It may be a while untill anyone get's this, because of the major feature in V4 (you will be allowed to order your ships). But it isn't going to well so far (the UI isn't working with me :P).
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.

BCDS

  • Guest
Submenu (3.0) Problems
« Reply #4 on: August 24, 2006, 06:58:15 PM »
Quote from: MLeo
@BCDS: You do realise that it will overwrite the SubMenu? Or rather, erase it. And what exactly is the problem with them? I find it a very elegant and extendable (you wouldn't have a lot of mods without it!) way.

No, actually i dont realise, since its working fine for me in 2 seperate installs, while i do agree ordinarily it would overwrite, erase and or create another submenu, the method i specified above does not cause any of the afore mentioned, you may or may not know :oops: . The only problem is, as you said, "Galaxy" isnt the same as "USS Galaxy", which is why all the ShipDef specifications have to be the same, which is rather annoying.  :x

As for the "staticshipdefs" statement which i "think" your referring to in your vague and target unspecified statement, i was referring to the StaticDefs.py file in which obviously as you know the stock ships are defined, my point is that its an annoying way of doing it.  :x

Quote from: MLeo
you will be allowed to order your ships

Could you be a bit less vague, perhaps you think you've explained something but as we have no idea (me certainly for that matter at least) what your talking about, could you explain in futher detail

Offline Nebula

  • BC elder / BCC Vice Admin
  • Administrator
  • Posts: 5499
  • Cookies: 1129
  • KM - Mod Team Member & BC - Elder (2002)
    • 9th fleet HQ
Submenu (3.0) Problems
« Reply #5 on: August 24, 2006, 07:09:49 PM »
he means you can move your ships around and order them in what ever which way you want them in the menu system.
Canon is what people argue exists on ships that don't exist.

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Submenu (3.0) Problems
« Reply #6 on: August 24, 2006, 07:13:44 PM »
Quote from: BCDS
Quote from: MLeo
@BCDS: You do realise that it will overwrite the SubMenu? Or rather, erase it. And what exactly is the problem with them? I find it a very elegant and extendable (you wouldn't have a lot of mods without it!) way.

No, actually i dont realise, since its working fine for me in 2 seperate installs.

Odd, because in your first line, you assign the Galaxy to the sub menu.
Then in the next line, you overwrite the entire Galaxy definition with a new one, without the submenu.

Quote
As for the "staticshipdefs" statement which i "think" your referring to in your vague and target unspecified statement, i was referring to the StaticDefs.py file in which obviously as you know the stock ships are defined, my point is that its an annoying way of doing it.

Sorry, should have specified it.

Can you explain how it's annoying?
They should be defined somewhere, and I don't think they should be in the "Custom" directory, it would only confuse people and in the worst case, someone could delete a plugin and get a lot of problems when he/she starts SP.

Quote
Could you be a bit less vague, perhaps you think you've explained something but as we have no idea (me certainly for that matter at least) what your talking about, could you explain in futher detail

Well, for starters, all the ships are initially alphabetically orderd (instead of the first come, first served, manner up until now).
But, this is something that I'm still trying to get right, I want to give the end user the ability to order (move higher/lower in their respective level) the ships themselfs.
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.

BCDS

  • Guest
Submenu (3.0) Problems
« Reply #7 on: August 24, 2006, 07:21:39 PM »
Ah, thank you.

Offline Phaser

  • Star Trek Canon Authority
  • Posts: 387
  • Cookies: 231
Submenu (3.0) Problems
« Reply #8 on: August 25, 2006, 07:24:04 PM »
Thanks a lot, you guys!  Now that I know where the submenu-related lines of code are located I can play around with the settings.  I'll come back here if I have problems or other questions.

One other thing:  I read through the SubMenuV3Readme file before making this thread, and it didn't discuss how to modify the submenus.  And I only skimmed the Foundation_Readme since I imagine that's about Foundation rather than the Submenu mod itself.

EDIT:
MLeo, I just discovered something that might interest you, since you said you were trying to allow people to reorganize the menu any way they wish in V4:  I added the Lakota (which was just in the Federation Ships menu) to the "Excelsior Class" submenu as a lone ship (i.e., not under a sub-submenu) by changing this

Quote
#######################################################################################
#  Custom Ship Plugin                                                                 #
#  Created by BC - Mod Packager                                                       #
#  Date: 09/09/2003                                                                    #
#######################################################################################
#                                                                                     #
import Foundation
import App
#                                                                                     #
#######################################################################################
#                                                                                     #
abbrev = 'Lakota'
iconName = 'Lakota'
longName = 'Lakota (Your Version)'
shipFile = 'Lakota'
menuGroup = 'Fed Ships'
playerMenuGroup = 'Fed Ships'
species = App.SPECIES_GALAXY
#                                                                                     #
#######################################################################################
#                                                                                     #
# Mod Info.  Use this as an opportunity to describe your work in brief.  This may     #
# have use later on for updates and such.                                             #
#                                                                                     #
credits = {
   'modName': 'Lakota',
   'author': '',
   'version': '1.0',
   'sources': [ 'http://' ],
   'comments': ''
}
#                                                                                     #
#######################################################################################
#                                                                                     #
# This is the ShipDef that adds the Ship to the game... BC-Mod Packager has           #
# automatically generated the proper ShipDef Line for you.                            #
#                                                                                     #
Foundation.ShipDef.Lakota = Foundation.ShipDef(abbrev, species, { 'iconName': iconName, 'shipFile': shipFile })
#                                                                                     #
#######################################################################################
#                                                                                     #
# Uncomment these if you have TGL                                                     #
#                                                                                     #
# Foundation.ShipDef.Lakota.hasTGLName = 1
# Foundation.ShipDef.Lakota.hasTGLDesc = 1
#                                                                                     #
# Otherwise, uncomment this and type something in:                                    #
#                                                                                     #
Foundation.ShipDef.Lakota.desc = 'No Description Available'
#                                                                                     #
#######################################################################################
#                                                                                     #
# These register the ship with the QuickBattle menus.  Don't touch them!!!            #
#                                                                                     #
if menuGroup:           Foundation.ShipDef.Lakota.RegisterQBShipMenu(menuGroup)
if playerMenuGroup:     Foundation.ShipDef.Lakota.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]
#                                                                                     #
#######################################################################################


to this

Quote
#######################################################################################
#  Custom Ship Plugin                                                                 #
#  Created by BC - Mod Packager                                                       #
#  Date: 09/09/2003                                                                    #
#######################################################################################
#                                                                                     #
import Foundation
import App
#                                                                                     #
#######################################################################################
#                                                                                     #
abbrev = 'Lakota'
iconName = 'Lakota'
longName = 'Lakota (Your Version)'
shipFile = 'Lakota'
menuGroup = 'Fed Ships'
playerMenuGroup = 'Fed Ships'
SubMenu = "Excelsior Class"
species = App.SPECIES_GALAXY
#                                                                                     #
#######################################################################################
#                                                                                     #
# Mod Info.  Use this as an opportunity to describe your work in brief.  This may     #
# have use later on for updates and such.                                             #
#                                                                                     #
credits = {
   'modName': 'Lakota',
   'author': '',
   'version': '1.0',
   'sources': [ 'http://' ],
   'comments': ''
}
#                                                                                     #
#######################################################################################
#                                                                                     #
# This is the ShipDef that adds the Ship to the game... BC-Mod Packager has           #
# automatically generated the proper ShipDef Line for you.                            #
#                                                                                     #
Foundation.ShipDef.Lakota = Foundation.FedShipDef(abbrev, species, { 'name': longName, 'iconName': iconName, 'shipFile': shipFile, "SubMenu": SubMenu })
#                                                                                     #
#######################################################################################
#                                                                                     #
# Uncomment these if you have TGL                                                     #
#                                                                                     #
# Foundation.ShipDef.Lakota.hasTGLName = 1
# Foundation.ShipDef.Lakota.hasTGLDesc = 1
#                                                                                     #
# Otherwise, uncomment this and type something in:                                    #
#                                                                                     #
Foundation.ShipDef.Lakota.desc = 'No Description Available'
#                                                                                     #
#######################################################################################
#                                                                                     #
# These register the ship with the QuickBattle menus.  Don't touch them!!!            #
#                                                                                     #
if menuGroup:           Foundation.ShipDef.Lakota.RegisterQBShipMenu(menuGroup)
if playerMenuGroup:     Foundation.ShipDef.Lakota.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]
#                                                                                     #
#######################################################################################


When I did this, in addition to moving the Lakota into the "Excelsior Class" submenu located at the bottom of the "Federation Ships" menu, the entire "Excelsior Class" submenu moved up to the location where the Lakota was--right between the Freedom and the Melbourne!  So now the "Federation Ships" list is no longer in alphabetical order.  The new order is "Freedom",  "Excelsior Class",  "Melbourne".

Of course, it wasn't in alphabetical order to begin with; the "Ambassador Class", "Galaxy Class", and "Excelsior Class" submenus were located at the bottom of the "Federation Ships" menu (in that order) before I messed around, but nevertheless, this may prove useful to you.

EDIT:
I can't figure out how to straighten out this USS Odyssey (ST) vs. Odyssey (SG) mess.  Does anyone else have the same problem and if solve, have you solved it?

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Submenu (3.0) Problems
« Reply #9 on: August 26, 2006, 06:48:49 AM »
I currently can't see any reason why it would put any other ships, other than the ship it's supposed to in a submenu.

Maybe I'll release a SubMenuV3.1...


As to your stargate issue.
I think it's might be that the SNS Galaxy and the starget oddysy overwrite each other.

[EDIT] I'm currently downloading the packs, and the second is currently already in. I've taken a look at the Odyssey and it shouldn't overwrite the SNS Galaxy Odyssey.
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 El

  • Master Hardpointer
  • Retired Administrator
  • Posts: 653
  • Cookies: 123
  • Former Vice Admin
Submenu (3.0) Problems
« Reply #10 on: August 26, 2006, 08:13:41 AM »
Quote from: Phaser
Thanks a lot, you guys!  Now that I know where the submenu-related lines of code are located I can play around with the settings.  I'll come back here if I have problems or other questions.

One other thing:  I read through the SubMenuV3Readme file before making this thread, and it didn't discuss how to modify the submenus.  And I only skimmed the Foundation_Readme since I imagine that's about Foundation rather than the Submenu mod itself.

EDIT:
MLeo, I just discovered something that might interest you, since you said you were trying to allow people to reorganize the menu any way they wish in V4:  I added the Lakota (which was just in the Federation Ships menu) to the "Excelsior Class" submenu as a lone ship (i.e., not under a sub-submenu) by changing this

Quote
#######################################################################################
#  Custom Ship Plugin                                                                 #
#  Created by BC - Mod Packager                                                       #
#  Date: 09/09/2003                                                                    #
#######################################################################################
#                                                                                     #
import Foundation
import App
#                                                                                     #
#######################################################################################
#                                                                                     #
abbrev = 'Lakota'
iconName = 'Lakota'
longName = 'Lakota (Your Version)'
shipFile = 'Lakota'
menuGroup = 'Fed Ships'
playerMenuGroup = 'Fed Ships'
species = App.SPECIES_GALAXY
#                                                                                     #
#######################################################################################
#                                                                                     #
# Mod Info.  Use this as an opportunity to describe your work in brief.  This may     #
# have use later on for updates and such.                                             #
#                                                                                     #
credits = {
   'modName': 'Lakota',
   'author': '',
   'version': '1.0',
   'sources': [ 'http://' ],
   'comments': ''
}
#                                                                                     #
#######################################################################################
#                                                                                     #
# This is the ShipDef that adds the Ship to the game... BC-Mod Packager has           #
# automatically generated the proper ShipDef Line for you.                            #
#                                                                                     #
Foundation.ShipDef.Lakota = Foundation.ShipDef(abbrev, species, { 'iconName': iconName, 'shipFile': shipFile })
#                                                                                     #
#######################################################################################
#                                                                                     #
# Uncomment these if you have TGL                                                     #
#                                                                                     #
# Foundation.ShipDef.Lakota.hasTGLName = 1
# Foundation.ShipDef.Lakota.hasTGLDesc = 1
#                                                                                     #
# Otherwise, uncomment this and type something in:                                    #
#                                                                                     #
Foundation.ShipDef.Lakota.desc = 'No Description Available'
#                                                                                     #
#######################################################################################
#                                                                                     #
# These register the ship with the QuickBattle menus.  Don't touch them!!!            #
#                                                                                     #
if menuGroup:           Foundation.ShipDef.Lakota.RegisterQBShipMenu(menuGroup)
if playerMenuGroup:     Foundation.ShipDef.Lakota.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]
#                                                                                     #
#######################################################################################


to this

Quote
#######################################################################################
#  Custom Ship Plugin                                                                 #
#  Created by BC - Mod Packager                                                       #
#  Date: 09/09/2003                                                                    #
#######################################################################################
#                                                                                     #
import Foundation
import App
#                                                                                     #
#######################################################################################
#                                                                                     #
abbrev = 'Lakota'
iconName = 'Lakota'
longName = 'Lakota (Your Version)'
shipFile = 'Lakota'
menuGroup = 'Fed Ships'
playerMenuGroup = 'Fed Ships'
SubMenu = "Excelsior Class"
species = App.SPECIES_GALAXY
#                                                                                     #
#######################################################################################
#                                                                                     #
# Mod Info.  Use this as an opportunity to describe your work in brief.  This may     #
# have use later on for updates and such.                                             #
#                                                                                     #
credits = {
   'modName': 'Lakota',
   'author': '',
   'version': '1.0',
   'sources': [ 'http://' ],
   'comments': ''
}
#                                                                                     #
#######################################################################################
#                                                                                     #
# This is the ShipDef that adds the Ship to the game... BC-Mod Packager has           #
# automatically generated the proper ShipDef Line for you.                            #
#                                                                                     #
Foundation.ShipDef.Lakota = Foundation.FedShipDef(abbrev, species, { 'name': longName, 'iconName': iconName, 'shipFile': shipFile, "SubMenu": SubMenu })
#                                                                                     #
#######################################################################################
#                                                                                     #
# Uncomment these if you have TGL                                                     #
#                                                                                     #
# Foundation.ShipDef.Lakota.hasTGLName = 1
# Foundation.ShipDef.Lakota.hasTGLDesc = 1
#                                                                                     #
# Otherwise, uncomment this and type something in:                                    #
#                                                                                     #
Foundation.ShipDef.Lakota.desc = 'No Description Available'
#                                                                                     #
#######################################################################################
#                                                                                     #
# These register the ship with the QuickBattle menus.  Don't touch them!!!            #
#                                                                                     #
if menuGroup:           Foundation.ShipDef.Lakota.RegisterQBShipMenu(menuGroup)
if playerMenuGroup:     Foundation.ShipDef.Lakota.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]
#                                                                                     #
#######################################################################################


When I did this, in addition to moving the Lakota into the "Excelsior Class" submenu located at the bottom of the "Federation Ships" menu, the entire "Excelsior Class" submenu moved up to the location where the Lakota was--right between the Freedom and the Melbourne!  So now the "Federation Ships" list is no longer in alphabetical order.  The new order is "Freedom",  "Excelsior Class",  "Melbourne".

Of course, it wasn't in alphabetical order to begin with; the "Ambassador Class", "Galaxy Class", and "Excelsior Class" submenus were located at the bottom of the "Federation Ships" menu (in that order) before I messed around, but nevertheless, this may prove useful to you.



That's because the ship menu is still sorted on the Longname or Shipname, in this case 'Lakota' is between 'Freedom' and 'Melbourne'.
The lists don't 'appear' to be sorted in any particular way other than that.

I think that's what MLeo is trying to change.

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Submenu (3.0) Problems
« Reply #11 on: August 26, 2006, 10:55:32 AM »
The list is actually sorted on first come first served.:P

V4 won't be ready for some time, so I'll try and see if I can put out a V3.7 today.

It's V3.7 because V3.5 is the alphabetic sorting, and it will contain 2 fixes, one, the bMVAMMenu attribute, which if it's 0, then there won't be any MVAM menu's. And the second, which makes empty MVAM menu's normal buttons.
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 El

  • Master Hardpointer
  • Retired Administrator
  • Posts: 653
  • Cookies: 123
  • Former Vice Admin
Submenu (3.0) Problems
« Reply #12 on: August 26, 2006, 01:17:40 PM »
Quote from: MLeo
The list is actually sorted on first come first served.:P


Interesting, in my experience it always sorts on the longname and rearranges the sub-menu's accordingly.
For example I had a long name of 'Galaxy Class Type 1'
This meant the submenu for 'Galaxy Class' was placed after the Excelsior Class. (The longname being 'Exclesior Class)
When I changed the longname to '1 Galaxy Class' it immediatly moved to the top of the ship list.
When I changed it to 'Type 1 Galaxy Class' it appeared underneath the Sovereign. (longname 'Sovereign Class'

That looks to me like it sorts both numerically and then alphabetically on the longname.

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Submenu (3.0) Problems
« Reply #13 on: August 26, 2006, 06:23:32 PM »
I always had the impression it was the filename (of the plugin), oh well.

I might be able to finnish it tonight.
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 MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Submenu (3.0) Problems
« Reply #14 on: August 26, 2006, 07:51:30 PM »
Ok, it took me a little while longer than I was planning on working on it.
But see how this is working for you.

I apologize for any ordering gone wrong, this is due to TGL names.
For example, the Hybrid is listed before the Galor, this is because internally the Hybrid is listed under CardHybrid, which, of course, goes before Galor.
I may change that for a future version.

Also, if you have a ship and a menu with the same name, then the menu will be listed below the ship, this is because the menu's name get's appended with _m internally.


I guess I can redo my V4 then...
This version is way smaller and faster than ever before (except V1), and V2 (:P), but atleast it's smaller, and done more smartly than V3.


New features over V3:

Empty menu's (for whatever reason) are left out, if the menu is a MVAM parent ship, then it's converted to a button.

Alphabetic sorting based on name (before any TGL access).


If you don't want your MVAM ship to have a menu, include in the parent ship plugin (not MVAM plugin, could do that as well on request, but then for V4) the following:

Code: [Select]
Foundation.ShipDef.YourShip.bMvamMenu = 0
The 0 can also be None, but 0 is more natural for most people.

You can also include it in the {} when you created it, then it's like this:
Code: [Select]
, "bMvamMenu": 0

You don't need to turn it on (as usual).

If you want to exclude 1 (or more) MVAM sub ships, include the bMvamMenu in their respective ship plugins.


A last minute feature I thought of, if, for whatever reason, you want to exclude a ship from the menu, but still keep the ShipDef, then include the following:
Code: [Select]
Foundation.ShipDef.YourShip.__dict__["Do not display"] = 0
0 can also be None

It can also be included in the dictionary, {}.
, "Do not display": 0}




If nobody finds any problems, I shall be typing a readme and releasing it tomorrow.

[EDIT] Please redownload, fixed a slight discrepancy between the reported features and the actual code.

I think I've tested it good enough, now for the documentation and then I can send it off to BCFiles.
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 Phaser

  • Star Trek Canon Authority
  • Posts: 387
  • Cookies: 231
Submenu (3.0) Problems
« Reply #15 on: August 26, 2006, 09:53:23 PM »
Thanks, MLeo.  I'll try it out sometime soon.

About the Odyessy:  I guess I'll just have to backup my hardpoint and texture changes and reinstall both ship packs.

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Submenu (3.0) Problems
« Reply #16 on: August 27, 2006, 08:51:01 AM »
Please redownload, fixed a slight discrepancy between the reported features and the actual code.

I think I've tested it good enough, now for the documentation and then I can send it off to BCFiles.
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.