Bridge Commander Central
BC Forums => BC Scripting => Topic started by: Point-Defence on January 01, 2008, 01:18:58 PM
-
Hi all.
Ok i got me a problem,i recently downloaded the updated construct mod(by cnotsch)and im attempting to add the construct ability to other stations,(with the new plug in)well it works....sort of i added const ability to a rom star base and a tmpdrydock they both work(yay!) but they don't build were there supposed to,instead they build waayyyyyyy away from were there meant to,and i have no clue as to what file or what part of the file would need editing,tho i do got python25 so i can edit PY files if need be,tho i ain't got a clue how to open a compiled file(ill worry about that another day),so any help at all would be brill :)
thx.
srry for bad spell/grammer.
-
Well, from a bit of looking through the core (version from the KM1.0, not sure if it's the same) you can influence the position through this line:
kThis.SetTranslateXYZ(kBaseLocation.GetX() - 50.0, kBaseLocation.GetY() + 6.0, kBaseLocation.GetZ() - 4.0)This is from the RomulanOutput.py
FedDryDock.py has a similar line:
kThis.SetTranslate(pConstructionShip.GetWorldLocation())But as you can see, with SetTranslateXYZ you enter all 3 coordinates, and with SetTranslate you enter an object that holds the 3 coordinates.
You usually don't need to bother with the pyc files, all stock files are included in the SDK, and most mods release their py files (and don't bother with the pyc files).
-
yh brilliant thx MLeo,ill give it a try, and thx for the speedy reply. :)
-
Im actually using Construct 4.0 i believe KM1 is 2.0 but anyway the lines u pasted are different to the PY file lines that i created with the Const 4.0 plug in and i could only find 2 things that i think might have sum thing to do with what im trying to do(no doubt im totally wrong)i did attempt and input sum XYZ lines but it only ended up making the drydock not build at all u couldn't even bring up the construct menu,no crashes tho :P,ill keep trying to get it to work but if you hear any info witch might help in this area that'd be a great help,thx.
PD.
-
Paste the relevant section of the script here between code tags.
-
i dunno what you mean,im abit of a n00b i only tried python for the first time only a few days ago and u carnt copy/paste like normal txt so im not sure what to do,sorry.
-
You can open py files in notepad.
Although, for editing, I highly suggest using something other than notepad or wordpad or even word, notepad2 is what I use. Or PFE, or Notepad++
-
Waypoint = []
for i in range(len(Waypoints)):
vPos = App.TGPoint3()
vFwd = App.TGPoint3()
vUp = App.TGPoint3()
vPos.SetXYZ(Waypoints['PosX'], Waypoints['PosY'], Waypoints['PosZ'])
vFwd.SetXYZ(Waypoints['FwdX'], Waypoints['FwdY'], Waypoints['FwdZ'])
vUp.SetXYZ( Waypoints['UpX'] , Waypoints['UpY'] , Waypoints['UpZ']
There's 1
sConstructionLocation = pConstructionShip.GetName() + ' Constructing Location' + str(DockNumber)
kThis = App.Waypoint_Create(sConstructionLocation, sSetName, None)
kThis.SetStatic(1)
kThis.SetNavPoint(0)
kThis.SetTranslate(vPos)
There's 2
Yh thx for that,ill try to rember that,here's the 2 piece of code that i THINK might have sumthing to do with it.
-
Um, right, maybe just attach the file. :P
It's just a bit too disconnected for me to make sense of.
-
Mleo Sorry for the late reply i've bin abit busy plus my modem ran out of internet credit,i also deleted my install by mistake and i've just reinstalled everything,ill attach the file,to see if you can make any sense of it(if ur still willing to help and not too busy)thx.
-
You will have to edit these values:
{'PosX' : 20000, 'PosY' : 20000, 'PosZ' : 20000,
Since right now, it will "materialize" at position 20000, 20000, 20000 :P
-
Ok thx for the info Mleo, i manged to get the ship to build inside the ship yard my only problem is now that the saucer section and warp ncells point outside of the shipyard walls.
{'PosX' : 0.0, 'PosY' : 0.0, 'PosZ' : 0.0, 'FwdX' : 0, 'FwdY' : 0, 'FwdZ' : 0, 'UpX' : 0, 'UpY' : 0, 'UpZ' : 200},
u see that last bit UpZ' : 200}, its was originally at 0 but after changing it,it did move the ship slightly but no matter how high or low i set the numbers it stays in the same place, i now when i return it to 0 the shipyard wont construct anymore :?
does that make any sense?
(http://img80.imageshack.us/img80/4449/screenshot010yo2.th.png) (http://img80.imageshack.us/my.php?image=screenshot010yo2.png)
-
Change UpZ to 1, and now play with the PosX, PosY and PosZ, the other 6 values have to do with the orientation.
EDIT: Also, change FwdY to 1.
-
WOOOOOO i finnnaly did it(thx to you of course :D)the ship builds were its supposed to, it was the edit in ur last post that gave me the required position info that i needed.
BIG thanks Mleo :), i can now start to add the construct abilty to Klingon/borg/cardassins/romulan shipyards...yay
(http://img299.imageshack.us/img299/8121/screenshot012um9.th.png) (http://img299.imageshack.us/my.php?image=screenshot012um9.png)
see its facing the right way :P