Author Topic: SDT and Submodel  (Read 922 times)

Offline szekeres2008

  • Posts: 116
  • Cookies: 0
  • Lt. Commander Mr. Mouse
SDT and Submodel
« on: November 13, 2008, 12:52:08 PM »
Hy everyone, I have a little problem with the Intrepid class, when I replaced the registry the of the USS Voyager with the USS Intrepid or any other Intrepid registry it works fine for the standars model, but when the enters warp the submodels do not include the registry replacements but I replaced the registry on each submodels with SDT, here is the "Custom/Ships/" file... what is wrong with it?

Code: [Select]
#######################################################################################
# U.S.S. Bellerophon NCC-74705                                                        #
#######################################################################################
abbrev = 'USSBellerophon'
iconName = 'Intrepid'
longName = 'USS Bellerophon'
shipFile = 'USSBellerophon'
menuGroup = 'Named Ships'
playerMenuGroup = 'Named Ships'
species = App.SPECIES_GALAXY
SubMenu = "Intrepid Class"
credits = {
'modName': 'USS Bellerophon',
'author': '',
'version': '1.0',
'sources': [ 'http://' ],
'comments': ''
}
Foundation.ShipDef.USSBellerophon = Foundation.FedShipDef(abbrev, species, { 'name': longName, 'iconName': iconName, 'shipFile': shipFile, "SubMenu": SubMenu })
Foundation.ShipDef.USSBellerophon.fMaxWarp = 9.985
Foundation.ShipDef.USSBellerophon.fCruiseWarp = 8.0
Foundation.ShipDef.USSBellerophon.dTechs = {'SubModel': {
        "Setup":        {
                "Body":                 "USSBellerophonNoNacelle",
                "NormalModel":          "USSBellerophon",
                "WarpModel":          "USSBellerophonWarp",
                "Hardpoints":       {
                        "Impulse Engines":  [-0.41, -1.3, -0.14],
                        "Port Impulse":  [-0.41, -1.3, -0.14],
                        "Star Impulse":  [0.41, -1.3, -0.14],
  "Warp Engines":  [-0.625, -1.1, -0.14],
                        "Port Warp":  [-0.625, -1.1, -0.14],
"Star Warp":  [0.625, -1.1, -0.14],
                       "Phaser V6":  [0.38, -1.23, -0.1735],
                       "Phaser V7":  [-0.38, -1.23, -0.1735],
                },
                "WarpHardpoints":       {
                        "Impulse Engines":  [-0.4, -1.3, -0.1],
                        "Port Impulse":  [-0.4, -1.3, 0.1],
                        "Star Impulse":  [0.4, -1.3, -0.1],
  "Warp Engines":  [-0.57, -1.1, 0.03],
                        "Port Warp":  [-0.57, -1.1, 0.03],
"Star Warp":  [0.57, -1.1, 0.03],
                       "Phaser V6":  [0.39, -1.23, -0.133],
                       "Phaser V7":  [-0.39, -1.23, -0.133],
                },
        },
               
        "Port Nacelle":     ["USSBellerophonLeftNacelle", {
                "Position":             [-0.32, -1.07, -0.144],
                "Rotation":             [0, 0, 0],
                "WarpRotation":       [0, -0.45, 0],
                "WarpPosition":       [-0.32, -1.07, -0.144],
                "WarpDuration":       150.0,
                }
        ],
       
        "Starboard Nacelle":     ["USSBellerophonRightNacelle", {
                "Position":             [0.32, -1.07, -0.144],
                "Rotation":             [0, 0, 0],
                "WarpRotation":       [0, 0.45, 0],
                "WarpPosition":       [0.32, -1.07, -0.144],
                "WarpDuration":       150.0,
                }
        ],

}}
Foundation.ShipDef.USSBellerophon.desc = 'U.S.S. Bellerophon NCC-74705'
if menuGroup:           Foundation.ShipDef.USSBellerophon.RegisterQBShipMenu(menuGroup)
if playerMenuGroup:     Foundation.ShipDef.USSBellerophon.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]

def SDTEntry(self):
retval = {"Textures": [["voyager04_glow.tga", "data/Models/SharedTextures/FedShips/Intrepid/bellerophon04_glow.tga"]]}
return retval
     
Foundation.ShipDef.USSBellerophon.__dict__["SDT Entry"] = SDTEntry
#######################################################################################
# U.S.S. Bellerophon Left Nacelle                                                     #
#######################################################################################
abbrev = 'USSBellerophonLeftNacelle'
iconName = 'Intrepid'
longName = 'USSBellerophonLeftNacelle'
shipFile = 'USSBellerophonLeftNacelle'
menuGroup = ''
playerMenuGroup = ''
species = App.SPECIES_GALAXY
credits = {
'modName': 'USSBellerophonLeftNacelle',
'author': '',
'version': '1.0',
'sources': [ 'http://' ],
'comments': ''
}
Foundation.ShipDef.USSBellerophonLeftNacelle = Foundation.FedShipDef(abbrev, species, { 'name': longName, 'iconName': iconName, 'shipFile': shipFile })
Foundation.ShipDef.USSBellerophonLeftNacelle.desc = 'No Description Available'
if menuGroup:           Foundation.ShipDef.USSBellerophonLeftNacelle.RegisterQBShipMenu(menuGroup)
if playerMenuGroup:     Foundation.ShipDef.USSBellerophonLeftNacelle.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]

def SDTEntry(self):
retval = {"Textures": [["voyager04_glow.tga", "data/Models/SharedTextures/FedShips/Intrepid/bellerophon04_glow.tga"]]}
return retval

Foundation.ShipDef.USSBellerophonLeftNacelle.__dict__["SDT Entry"] = SDTEntry
         
#######################################################################################
# U.S.S. Bellerophon No Nacelle                                                       #
#######################################################################################
abbrev = 'USSBellerophonNoNacelle'
iconName = 'Intrepid'
longName = 'USSBellerophonNoNacelle'
shipFile = 'USSBellerophonNoNacelle'
menuGroup = ''
playerMenuGroup = ''
species = App.SPECIES_GALAXY
credits = {
'modName': 'USSBellerophonNoNacelle',
'author': '',
'version': '1.0',
'sources': [ 'http://' ],
'comments': ''
}
Foundation.ShipDef.USSBellerophonNoNacelle = Foundation.FedShipDef(abbrev, species, { 'name': longName, 'iconName': iconName, 'shipFile': shipFile })
Foundation.ShipDef.USSBellerophonNoNacelle.desc = 'No Description Available'
if menuGroup:           Foundation.ShipDef.USSBellerophonNoNacelle.RegisterQBShipMenu(menuGroup)
if playerMenuGroup:     Foundation.ShipDef.USSBellerophonNoNacelle.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]

def SDTEntry(self):
retval = {"Textures": [["voyager04_glow.tga", "data/Models/SharedTextures/FedShips/Intrepid/bellerophon04_glow.tga"]]}
return retval

Foundation.ShipDef.USSBellerophonNoNacelle.__dict__["SDT Entry"] = SDTEntry
     
#######################################################################################
# U.S.S. Bellerophon Right Nacelle                                                   #
#######################################################################################
abbrev = 'USSBellerophonRightNacelle'
iconName = 'Intrepid'
longName = 'USSBellerophonRightNacelle'
shipFile = 'USSBellerophonRightNacelle'
menuGroup = ''
playerMenuGroup = ''
species = App.SPECIES_GALAXY
credits = {
'modName': 'USSBellerophonRightNacelle',
'author': '',
'version': '1.0',
'sources': [ 'http://' ],
'comments': ''
}
Foundation.ShipDef.USSBellerophonRightNacelle = Foundation.FedShipDef(abbrev, species, { 'name': longName, 'iconName': iconName, 'shipFile': shipFile })
Foundation.ShipDef.USSBellerophonRightNacelle.desc = 'No Description Available'
if menuGroup:           Foundation.ShipDef.USSBellerophonRightNacelle.RegisterQBShipMenu(menuGroup)
if playerMenuGroup:     Foundation.ShipDef.USSBellerophonRightNacelle.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]

def SDTEntry(self):
retval = {"Textures": [["voyager04_glow.tga", "data/Models/SharedTextures/FedShips/Intrepid/bellerophon04_glow.tga"]]}
return retval

Foundation.ShipDef.USSBellerophonRightNacelle.__dict__["SDT Entry"] = SDTEntry
     
#######################################################################################
# U.S.S. Bellerophon Warp                                                             #
#######################################################################################
abbrev = 'USSBellerophonWarp'
iconName = 'Intrepid'
longName = 'USSBellerophonWarp'
shipFile = 'USSBellerophonWarp'
menuGroup = ''
playerMenuGroup = ''
species = App.SPECIES_GALAXY
credits = {
'modName': 'USSBellerophonWarp',
'author': '',
'version': '1.0',
'sources': [ 'http://' ],
'comments': ''
}
Foundation.ShipDef.USSBellerophonWarp = Foundation.FedShipDef(abbrev, species, { 'name': longName, 'iconName': iconName, 'shipFile': shipFile })
Foundation.ShipDef.USSBellerophonWarp.desc = 'No Description Available'
if menuGroup:           Foundation.ShipDef.USSBellerophonWarp.RegisterQBShipMenu(menuGroup)
if playerMenuGroup:     Foundation.ShipDef.USSBellerophonWarp.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]

def SDTEntry(self):
retval = {"Textures": [["voyager04_glow.tga", "data/Models/SharedTextures/FedShips/Intrepid/bellerophon04_glow.tga"]]}
return retval

Foundation.ShipDef.USSBellerophonWarp.__dict__["SDT Entry"] = SDTEntry
Shall I put the submodels into separate files?

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: SDT and Submodel
« Reply #1 on: November 13, 2008, 01:11:08 PM »
I'm fairly sure that originally they were all in different files.

And I find it odd that Python was Ok with the fact that you have 5, the same, functions (as in names, never mind the actual code) in one file.
Did the console say anything?
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 szekeres2008

  • Posts: 116
  • Cookies: 0
  • Lt. Commander Mr. Mouse
Re: SDT and Submodel
« Reply #2 on: November 13, 2008, 01:37:55 PM »
I've just put the submodels into separate files but it did't fixed the problem, the warp configuration model still represents the origian voyager ID while the ID is replaced with the Bellerophon's ID