Author Topic: Quickship scripting?  (Read 972 times)

Offline Alex1989

  • Posts: 25
  • Cookies: 0
Quickship scripting?
« on: November 18, 2013, 11:30:13 AM »
Is it possible to script a new ship with one of the other ships script as a template, I hope so because I have the Yamato BB model from starfox1701, I want to port it to BC ( I have his permission to do so ), Unfortunately, I do not know scripting very well, and learning would take me forever, how ever I am a beginner hardpointer, This way I hope to port the Battleship to bc very quickly. When finised I will upload it to filefront for everyone to enjoy.

Offline Phoenix Bondi

  • REMEMBER YOUR ORIGIN
  • Posts: 1294
  • Cookies: 575
  • Never Forget Your Origins
    • CHRIS JONES GAMING
Re: Quickship scripting?
« Reply #1 on: November 18, 2013, 12:00:11 PM »
thats how i do all mine, then open them in notepad++ and edit all the parts i need (basically change the names of old ship in each file to the new one)

Offline Alex1989

  • Posts: 25
  • Cookies: 0
Re: Quickship scripting?
« Reply #2 on: November 18, 2013, 12:04:02 PM »
What about the textures?

Offline Alex1989

  • Posts: 25
  • Cookies: 0
Re: Quickship scripting?
« Reply #3 on: November 18, 2013, 02:03:05 PM »
Here I post on of the scripts for example, what do I have to change besides the name, there are many things here I don't understand.


import App
import Multiplayer.SpeciesToShip

def GetShipStats():
   kShipStats = {
      "FilenameHigh": "data/Models/Ships/Kubrick_TOS/Kubrick_TOS.nif",
      "FilenameMed": "data/Models/Ships/Kubrick_TOS/Kubrick_TOS.nif",
      "FilenameLow": "data/Models/Ships/Kubrick_TOS/Kubrick_TOS.nif",
      "Name": "USS Kubrick",
      "HardpointFile": "Kubrick_TOS",
      "Species": Multiplayer.SpeciesToShip.AKIRA
    }
   return kShipStats



def LoadModel(bPreLoad = 0):
   pStats = GetShipStats()

   # Create the LOD info
   if (not App.g_kLODModelManager.Contains(pStats["Name"])):
      # Params are: File Name, PickLeafSize, SwitchOut Distance,
      # Surface Damage Res, Internal Damage Res, Burn Value, Hole Value,
      # Search String for Glow, Search string for Specular, Suffix for specular
      pLODModel = App.g_kLODModelManager.Create(pStats["Name"])
      pLODModel.AddLOD(pStats["FilenameHigh"], 10, 200.0, 15.0, 15.0, 400, 900, "_glow", None, "_specular")
      pLODModel.AddLOD(pStats["FilenameMed"],  10, 400.0, 15.0, 15.0, 400, 900, "_glow", None, "_specular")
      pLODModel.AddLOD(pStats["FilenameLow"],  10, 800.0, 15.0, 30.0, 400, 900, "_glow", None, None)

#      kDebugObj = App.CPyDebug()
      if (bPreLoad == 0):
         pLODModel.Load()
#         kDebugObj.Print("Loading " + pStats["Name"] + "\n")
      else:
         pLODModel.LoadIncremental()
#         kDebugObj.Print("Queueing " + pStats["Name"] + " for pre-loading\n")

def PreLoadModel():
   LoadModel(1)

Offline Mario

  • Senior Software Developer
  • Administrator
  • Posts: 2186
  • Cookies: 1706
  • Life is life
Re: Quickship scripting?
« Reply #4 on: November 18, 2013, 03:26:03 PM »
I was preparing to reply however at some point I noticed your additional posts which are quite frankly rude and against the forum rules FYI. I usually don't withhold knowledge from people and always happily provide assistance to anyone who asks, however in the way you presented yourself to the community with your outbursts I believe you simply don't deserve a reply from anyone in regards to your question.

Now as a staff member I'm going to tell you that your behavior is VERY rude. People who view your topic might now know a reply to your question. Secondly it has been ONLY a few hours since you opened this topic. It can take from a few hours to a few DAYS until someone who knows the answer to your question to post an answer.

Patience is a virtue and the ability to use this forum is a privilege not a right. Consider yourself warned.
Acta, non verba.
aka USS Sovereign

Offline Alex1989

  • Posts: 25
  • Cookies: 0
Re: Quickship scripting?
« Reply #5 on: November 18, 2013, 03:41:28 PM »
I was preparing to reply however at some point I noticed your additional posts which are quite frankly rude and against the forum rules FYI. I usually don't withhold knowledge from people and always happily provide assistance to anyone who asks, however in the way you presented yourself to the community with your outbursts I believe you simply don't deserve a reply from anyone in regards to your question.

Now as a staff member I'm going to tell you that your behavior is VERY rude. People who view your topic might now know a reply to your question. Secondly it has been ONLY a few hours since you opened this topic. It can take from a few hours to a few DAYS until someone who knows the answer to your question to post an answer.

Patience is a virtue and the ability to use this forum is a privilege not a right. Consider yourself warned.

I have asked in 7 different forums in a span of 2 days, and all of them refused to help, I am not saying that anyone here is refusing to help me, its that I am at my wits end trying to modify a simple script, I have tried learning Python FIVE times and failed every time I learn, I am this close to deleting and uninstalling bridge commander, with it, years of installing mods and hours of gameplay, I am sorry about the flame I posted but I am literally ripping the hair off my head because of a simple script, Just one answer: Apart from the ship names, what else do I have to change on the script, I suck at python and really considering deleting all of my bridge commander files.

Offline KrrKs

  • Posts: 461
  • Cookies: 25
Re: Quickship scripting?
« Reply #6 on: November 18, 2013, 04:02:45 PM »
Wow, calm down a bit ok?!
Additional to what Mario just wrote; questions regarding ship modding and related things are usually faster answered in the BC Modding subforum - There is also a tutorial section.
The BCSDK should also have some answers to your Questions.

I'll try to answer some but i am absolutely no expert in that field.
What about the textures?
Textures need to be in .tga format and afaik have to be in a square size of a base two exponential- say 256x256 or 1024x1024 pixels large.

thats how i do all mine, then open them in notepad++ and edit all the parts i need (basically change the names of old ship in each file to the new one)


That basically means you should alter
Quote
"FilenameHigh": "data/Models/Ships/Kubrick_TOS/Kubrick_TOS.nif",
to
Quote
"FilenameHigh": "data/Models/Ships/YourShipNameFolder/YourShipsModelFileName.nif",
And the same with -Med and -Low paths.

Quote
"Name": "USS Kubrick",
Pretty self explanatory, but i think this field is actually unused. But it doesn't hurt to alter accordingly.

Quote
"HardpointFile": "Kubrick_TOS",
HardpointFile specifies the (surprise) hardpointfile in script/ships/hardpoints which is used for this ship.

Quote
 # Params are: File Name, PickLeafSize, SwitchOut Distance,
      # Surface Damage Res, Internal Damage Res, Burn Value, Hole Value,
      # Search String for Glow, Search string for Specular, Suffix for specular
      pLODModel = App.g_kLODModelManager.Create(pStats["Name"])
      pLODModel.AddLOD(pStats["FilenameHigh"], 10, 200.0, 15.0, 15.0, 400, 900, "_glow", None, "_specular")
The important thing here is that the alpha layer of YourTextureName_glow.tga is applied as illumination while *_speculiar maps alpha layers generate reflections.
Basically you can use any shipScript while just altering the parts specifying your Ships Modelpath  +Name and Hardpoint-file.

Edit: Also flaming (or ripping your hair off) won't get you help any faster.

Offline Alex1989

  • Posts: 25
  • Cookies: 0
Re: Quickship scripting?
« Reply #7 on: November 18, 2013, 04:13:04 PM »
Wow, calm down a bit ok?!
Additional to what Mario just wrote; questions regarding ship modding and related things are usually faster answered in the BC Modding subforum - There is also a tutorial section.
The BCSDK should also have some answers to your Questions.

I'll try to answer some but i am absolutely no expert in that field.Textures need to be in .tga format and afaik have to be in a square size of a base two exponential- say 256x256 or 1024x1024 pixels large.

That basically means you should altertoAnd the same with -Med and -Low paths.
Pretty self explanatory, but i think this field is actually unused. But it doesn't hurt to alter accordingly.
HardpointFile specifies the (surprise) hardpointfile in script/ships/hardpoints which is used for this ship.
The important thing here is that the alpha layer of YourTextureName_glow.tga is applied as illumination while *_speculiar maps alpha layers generate reflections.
Basically you can use any shipScript while just altering the parts specifying your Ships Modelpath  +Name and Hardpoint-file.

Edit: Also flaming (or ripping your hair off) won't get you help any faster.

THANK YOU THANK YOU THANK YOU THANK YOU, OUT OF HUNDREDS I HAVE ASKED, YOU HAVE GIVEN ME THE HELP I NEEDED!!! :bow: :bow: :bow: :bow: :bow: :bow:

You will be credited when I release the ship!! You have my eternal gratitude!!!

Offline tiqhud

  • BCFiles File Poster
  • Posts: 1763
  • Cookies: 1067
  • San Francisco Shipyards (HPer) file manuiplater
Re: Quickship scripting?
« Reply #8 on: November 18, 2013, 04:52:43 PM »
Now you nedd to re-place placements, do you Know Mpe well enough to re-place the placements of the weapons, the engines the shield generators, you did say you were a beginner HPer gooood. :D
TiqHud
you sir, are unable to strike, the port or starboard parts of hull , of a bovine storage facility.
Canon , what people argue exists, that doesn't really  exist.
It is all the little details, that cause headaches.
"Never judge wealth with Money"
'Intelligence has Nothing to do with Politics'
it is Late, Do you know where your Towel is?

Offline Alex1989

  • Posts: 25
  • Cookies: 0
Re: Quickship scripting?
« Reply #9 on: November 18, 2013, 05:07:13 PM »
Now you nedd to re-place placements, do you Know Mpe well enough to re-place the placements of the weapons, the engines the shield generators, you did say you were a beginner HPer gooood. :D

All I have is the model, No hard points, I plan to use the Jupiter's hardpoints as a template, since the Jupiter is the closest resemblance to the Yamato, I have a basic grasp of mpe, since I can edit some aspects of hard points such as disruptor recharge, Phaser color, and torpedoes. but I can manage.