Author Topic: Construct mod. help.  (Read 2769 times)

Offline Point-Defence

  • Posts: 9
  • Cookies: 0
  • -.-
Construct mod. help.
« 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.

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: Construct mod. help.
« Reply #1 on: January 01, 2008, 01:33:29 PM »
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:
Code: [Select]
        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:
Code: [Select]
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).
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 Point-Defence

  • Posts: 9
  • Cookies: 0
  • -.-
Re: Construct mod. help.
« Reply #2 on: January 01, 2008, 01:37:33 PM »
yh brilliant thx MLeo,ill give it a try, and thx for the speedy reply. :)

Offline Point-Defence

  • Posts: 9
  • Cookies: 0
  • -.-
Re: Construct mod. help.
« Reply #3 on: January 01, 2008, 02:48:28 PM »
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.

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: Construct mod. help.
« Reply #4 on: January 01, 2008, 05:02:30 PM »
Paste the relevant section of the script here between code tags.
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 Point-Defence

  • Posts: 9
  • Cookies: 0
  • -.-
Re: Construct mod. help.
« Reply #5 on: January 01, 2008, 06:05:19 PM »
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.

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: Construct mod. help.
« Reply #6 on: January 01, 2008, 06:07:18 PM »
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++
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 Point-Defence

  • Posts: 9
  • Cookies: 0
  • -.-
Re: Construct mod. help.
« Reply #7 on: January 01, 2008, 06:42:34 PM »
 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.

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: Construct mod. help.
« Reply #8 on: January 02, 2008, 10:41:09 AM »
Um, right, maybe just attach the file. :P
It's just a bit too disconnected for me to make sense of.
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 Point-Defence

  • Posts: 9
  • Cookies: 0
  • -.-
Re: Construct mod. help.
« Reply #9 on: January 07, 2008, 11:30:09 AM »
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.

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: Construct mod. help.
« Reply #10 on: January 07, 2008, 12:10:04 PM »
You will have to edit these values:
Code: [Select]
{'PosX' : 20000, 'PosY' : 20000, 'PosZ' : 20000,
Since right now, it will "materialize" at position 20000, 20000, 20000 :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.

Offline Point-Defence

  • Posts: 9
  • Cookies: 0
  • -.-
Re: Construct mod. help.
« Reply #11 on: January 07, 2008, 02:09:25 PM »
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?



Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: Construct mod. help.
« Reply #12 on: January 07, 2008, 02:25:55 PM »
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.
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 Point-Defence

  • Posts: 9
  • Cookies: 0
  • -.-
Re: Construct mod. help.
« Reply #13 on: January 07, 2008, 03:00:28 PM »
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





see its facing the right way  :P