Author Topic: Mission scripts  (Read 1951 times)

Offline BleHz0r

  • Posts: 9
  • Cookies: 0
Mission scripts
« on: July 19, 2010, 09:43:01 AM »
i've gotta general question. dunno if there's a tutorial on the subject, if so please point me where.

so i've got a few custom ships i wanna incorporate into SP missions. the hp's and everything else is in order. everything i wanted to replace is replaced.
now the problem is this.. i'm using p81Bop, C2Vorcha, C2Warbird, and a replacement marauder for stock ships.
galor, keldon and the fed ships just wont work. i dont know what i have to change anymore. for example in E3M2, i wanna use the prometheus for .. well the "uss prometheus" lol. and it works if i change the below to
Code: [Select]
pNebula = loadspacehelper.CreateShip("Nebula", pStarbase, "USS Prometheus", "Circling Nebula")
pNebula.ReplaceTexture("data/Models/SharedTextures/FedShips/Prometheus.tga", "ID")
pNebula = loadspacehelper.CreateShip("Prometheus", pStarbase, "USS Prometheus", "Circling Nebula")
pNebula.ReplaceTexture("data/Models/SharedTextures/FedShips/Prometheus.tga", "ID") <- delete this cuz i dont have my own texture.
now im playing my game on hard and i sort of balanced the hardpoints to damage more. so now my berkley needs to be a god ship in order to live until i get back out of the dust cloud. so i make a copy of nebula.py ship and hp files and rename them to berkeley.py and nerf it up to the 999999hitpoints on core,hull,shields, so that it's strong enough. now the problem is that when i start the mission, there's no warbird going to the dust cloud.. and when i plot a course, there's no berkeley in the dust cloud. but the game loads.. i tried the same with that "peregrine" nebula and it worked. i dont get it lol. didn't replace the nebula, so the texture should load. and is there a predisposition of sorts for the name "berkeley"?

for the other part.. E6M1.
devore is an akira class, i wanted it to be a defiant. san francisco is a galaxy, i wanted it to be a prometheus class. the venture is another galaxy and i wanted it to be a venture class.
so, changing from > to,
Code: [Select]
pSanFrancisco = loadspacehelper.CreateShip("Galaxy", pSet, "San Francisco", "SFStart")
pSanFrancisco.ReplaceTexture("data/Models/SharedTextures/FedShips/SanFrancisco.tga", "ID")
pDevore = loadspacehelper.CreateShip("Akira", pSet, "Devore", "DevoreWait")
pDevore.ReplaceTexture("Data/Models/Ships/Akira/Devore.tga", "ID")
pVenture = loadspacehelper.CreateShip("Galaxy", pSet, "Venture", "VentureWait")
pVenture.ReplaceTexture("data/Models/SharedTextures/FedShips/Venture.tga", "ID")
                               V
pSanFrancisco = loadspacehelper.CreateShip("Prometheus, pSet, "San Francisco", "SFStart")
pDevore = loadspacehelper.CreateShip("Defiant", pSet, "Devore", "DevoreWait")
pVenture = loadspacehelper.CreateShip("Venture", pSet, "Venture", "VentureWait")
it doesn't work. so now i'm wondering what else am i supposed to change. any other mission files? should i use different ship/hp names? the torpedo loadouts are basicaly the same, just increased the power on them lol.
also.. if i change a ship it has the original icon. im wondering if there's a way to change that also?

i tried all this before but never really got it down properly.
i was also always wondering how to add some more ships.. i want to and add some hideki scouts here and there and some more romulans and klingons.. and maybe torp/pulse turrets around SB12 for the fun of it xD
it just wont allow the card or fed replacements and just crashes lol. the first mission with a galor or a keldon, or a sov for that matter.. the ones with the 2bop and the sov and the smuggling ferengi krayvis one just crash.. along with every other one where a card ship is present. i just wanna know what are the things i have to change in order to get it to work..
i know i'd have to create "spawn" points for adding new ships, i dont really know exactly how the XYZ system works and what not, or how to calculate it. help on this matter would also be much appreciated :)

im learning on my own tho. so some mission scripting tut's are golden at this point.
i know im asking shitloads of questions, i'm just a bit lost and would appreciate some time and answers lol.

Offline JimmyB76

  • Posts: 6423
  • Cookies: 421
Re: Mission scripts
« Reply #1 on: July 19, 2010, 12:00:13 PM »
one error i can see right away -
Code: [Select]
pSanFrancisco = loadspacehelper.CreateShip("Prometheus, pSet, "San Francisco", "SFStart")
looks like you have too many spaces after pSanFrancisco, and also you dont have a " after Prometheus...
also, be sure that you are using the name of the ship's script (for example, it might be MVAMPrometheus) after loadspacehelper.CreateShip
also, it could be that pSanFrancisco is calling for the Galaxy Class, so scripting it as a Prometheus might cause a problem (tho i dont know, i never tried tweaking SP scripts)...
there may be many other instances in that mission's script that would have to be changed as far as changing the ship, not just those few lines you posted...

you may want to ask about these issues at BCS (bridge Commander Scripters) forums; they may or may not be able to help out...
you can find a link to BCS forums on the index page here...

Offline BleHz0r

  • Posts: 9
  • Cookies: 0
Re: Mission scripts
« Reply #2 on: July 19, 2010, 12:10:51 PM »
thanks for the reply firstly..
and yeah i noticed that like 5 minutes after i posted it here xD and prometheus is the ship name. i checked that before i even started mission editing. hmm.. i checked that. the spaces there are as it was in the original SDK/mission script. i think it was the copy paste that screwed it up here..
well all other instances i saw there that reffered to it as San Francisco were changed. not just replaced the name, but logicaly changed. so i dunno. i wanted to ask the same thing over at bcs, tho decided to first try it here if anyone still visits lol.
ill give it another shot and ask around at bcs.

EDIT.
omg omg omg. that " typo i did screwed it up. its all good now with the other ships. it works. lol. i still cant get the card ships to be replaced unfortunately.. now that i think about it, it could be an error in the torps lol.
dunno why im surprised, ive been doing this at 4 in the AM yesterday lol.
well thx again :)

Offline Mario

  • Senior Software Developer
  • Administrator
  • Posts: 2200
  • Cookies: 1707
  • Life is life
Re: Mission scripts
« Reply #3 on: July 24, 2010, 05:19:03 PM »
Please download python from python.org and use it's editor to edit mission scripts. Then errors like this will be less likely as the code is color coded...
Acta, non verba.
aka USS Sovereign

Offline BleHz0r

  • Posts: 9
  • Cookies: 0
Re: Mission scripts
« Reply #4 on: July 25, 2010, 07:33:19 AM »
did that. that wasnt even a quarter of my problem tho.