Turret cockpit orientation

Need help editing the game? Check for help here!

Moderators: Darksaber, General_Trageton, Forceflow

Post Reply

Turret cockpit orientation

Rookie_One1
Lieutenant Commander
Rebel Alliance
Posts: 1398
Joined: Thu Feb 26, 2004 12:01 am

Post by Rookie_One1 » Tue Dec 17, 2019 3:46 pm

Quick question there, does anyone know how to rotate the orientation of the turret cockpits on the YT-1300 and YT2000 relative to the ships?

While i'm no good at modelling, if someone can tell me how I would like to try my hand to at the very least rotate them so that they point correctly, especially since right now the right of the cockpit point toward the front, when it should be the bottom
Rookie One, is that you?? - Ru Merleen, Rebel Spy at Imdaar Alpha
Current Holder of the Frying Pan of Death

JeremyaFr
Lieutenant Commander
XWAU Member
Posts: 1798
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Tue Dec 17, 2019 4:41 pm

Hello,
You can set the turret orientation with MXvTED or BHE.
You can also rotate the turret in the OPT itself.

Rookie_One1
Lieutenant Commander
Rebel Alliance
Posts: 1398
Joined: Thu Feb 26, 2004 12:01 am

Post by Rookie_One1 » Tue Dec 17, 2019 5:34 pm

Thanks jeremy.

Now I have to figure out how to use Arc now :)
Rookie One, is that you?? - Ru Merleen, Rebel Spy at Imdaar Alpha
Current Holder of the Frying Pan of Death

JeremyaFr
Lieutenant Commander
XWAU Member
Posts: 1798
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Tue Dec 17, 2019 5:40 pm

The arc values are used to clamp the rotation of the gunner.

Rookie_One1
Lieutenant Commander
Rebel Alliance
Posts: 1398
Joined: Thu Feb 26, 2004 12:01 am

Post by Rookie_One1 » Tue Dec 17, 2019 6:53 pm

So it would be the orient value instead ?
Rookie One, is that you?? - Ru Merleen, Rebel Spy at Imdaar Alpha
Current Holder of the Frying Pan of Death

JeremyaFr
Lieutenant Commander
XWAU Member
Posts: 1798
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Tue Dec 17, 2019 7:24 pm

From the Wiki:
Turret 1, 2 Activated defines whether or not the ship can utilize an auto/player controlled turret.
Turret 1, 2 Orient 1, 2 respectively defines what plane and axis the turret is placed on relative to the rest of the model.
Turret 1, 2 Arc 1, 2, respectively defines in a 360 degree vertical and horizontal axis the turret can rotate.

Rookie_One1
Lieutenant Commander
Rebel Alliance
Posts: 1398
Joined: Thu Feb 26, 2004 12:01 am

Post by Rookie_One1 » Tue Dec 17, 2019 10:03 pm

tried to do it, nope, not working, also need to edit the animations of the OPT and that is outside of what I can do :(
Rookie One, is that you?? - Ru Merleen, Rebel Spy at Imdaar Alpha
Current Holder of the Frying Pan of Death

User avatar
Driftwood
Lieutenant Commander
XWAU Member
Posts: 1800
Joined: Wed Oct 22, 2003 11:01 pm
Contact:

Post by Driftwood » Thu Dec 19, 2019 2:03 am

I know how to do both, but I don't really feel like writing a full tutorial right now because I'm tired so I'll just give you a few numbers and points and reference to at least start playing around with.

For instance and example, the SHU has a rear facing gunner turret so I'll use those number using MXvTED 4.1

Under the cockpit tab you'll see on the bottom left:

Turret 1 Activated: 317 (on)
Turret 1 Orient 1: 32536 (This is at the 6 o'clock position directly aft, theoretically -32536 is directly forward but it could be 0 - I don't remember)
Turret Orient 2: 0 (This should be on a flat plane rather than oriented directly up or down like the CORT)

Turret 1 Arc 1: 6000
Turret 1 Arc 2: 6000

This is a fairly sensible turret arc that allows some flexibility but limits the turret to basically somewhere between 90 and 180 degrees up/down left/right given the position of the turret and field of view. If you want a wider range of motion look at the YT series turret configurations.

Both orientations and arcs work between the following integers:
-32768 and 3267

Since there is no tool in existence yet to visually determine/edit/display the arcs and orientations you'll have to play around with it. Maybe Jeremya can make a GUI for this purpose eventually if he's up to it. Would be handy to have integrated into Optech and or opt editor I would think in the long term.

If you want to modify the opt animations for the meshes the easiest way to do this is in Optech using the transformations tool as it allows you to select the meshes you want to edit the rotation coordinates on visually. You can also see the data in Opt Editor, (usually I do the rotations in optech and open and edit in opt editor but my workflow is weird and I'm more familiar with opt editor in areas outside of mesh rotation) But editing the data from scratch there isn't ideal in my opinion since it's all numbers and I know of no way to do it intuitively.

And honestly, you just have to play with the numbers for the X/Y/Z coordinates until the mesh rotates the way it should relative to the geometry. It seems to me that each opt is different so even roughly similar opts will be entirely different for the target coordinates of any given mesh so I can't give you any numbers offhand that would help you out in figuring "the right numbers". DS did all the initial configuration for the shuttle mesh rotations and after having compared his numbers and my (failed) numbers I was able to reverse engineer "the way it works" and implement it in other opts. One of which I really need to finish the pilots of and send them to DTM for further modifications and finalization so he isn't waiting for me forever.... *sigh* maybe Christmas break I'm kind of in a motivational slump right now. Otherwise the model is complete, but that's another story and not up for public unveiling as of yet, but my point is that once you see how it works it's pretty straight forward, if not particularly "easy" to replicate once you figure it out.

For turrets you don't need to do up any text files, unless the model has S-foils or landing gear, then of course you'll need to configure your mesh rotations there also.

Go reverse engineer the YT1300 and the Shuttle gunner opts and play around with those since I've already provided a good point of reference to figure out how the numbers work relative to the facing and arc limitations.

Add me on discord if you want live help figuring this out.

EDIT: Although, I don't think you will need to alter the gunner mesh opt itself if all you want to do is change the facing direction. Obviously the gunner orientation would still be UP which would be... uh positive or negative 16384 (again don't remember which is up/down or left/right offhand.
If you do I'd just select everything and rotate it clockwise 90 degrees. I don't think you'd have to alter any of the mesh rotations offhand, but I could be wrong.

Rookie_One1
Lieutenant Commander
Rebel Alliance
Posts: 1398
Joined: Thu Feb 26, 2004 12:01 am

Post by Rookie_One1 » Thu Dec 19, 2019 3:05 pm

Thanks, but I already tried and I barely make any sense of that....i'm great at everything that is in term of numbers and variables(figured the turret orientation in mxvted before your post, that one is pure numbers), but the moment that there is a graphical element, i'm near useless :(

I can confrim Modifying the orientation also require modifying the gunner cockpit opt so that it face the good way.

and I tried to rotate the whole OPT 90 degree clockwise so that it would fit with the turret orientation, and it did not work, while the cockpit was now facing the right way when coupled with the modified orientation, animations were messed up and I barely understand how to correct the animations

EDIT :

Found how to keep the animations corrects while modifying the OPT orientation, XWAOPTEditor reorient the animation when you rotate, unlike OPTech (at least I think, cannot test it right now, at work and my remote access to my home computer do not permit me to play remotely)

Will test later and post the resuts
Rookie One, is that you?? - Ru Merleen, Rebel Spy at Imdaar Alpha
Current Holder of the Frying Pan of Death

Rookie_One1
Lieutenant Commander
Rebel Alliance
Posts: 1398
Joined: Thu Feb 26, 2004 12:01 am

Post by Rookie_One1 » Thu Dec 19, 2019 9:56 pm

sorry for the double post, simply wanted to report my test results :

It's seems to be working correctly for the top turret. Unfortunately the bottom turret cockpit seems to be inverted now position-wise, with it's top pointing toward the front of the ship. That said, it's still better than it being sideways at least.

Unless jeremy can cook us a hook that will permit us to use two different gunner cockpit on a ship (that will be basically the same OPT but rotated 180 degrees), it will remain that way it seems.

Can post the OPT and the changes needed in MXVTED for those interested (and if the project team is willing to insert it in-game in their next patch)
Rookie One, is that you?? - Ru Merleen, Rebel Spy at Imdaar Alpha
Current Holder of the Frying Pan of Death

JeremyaFr
Lieutenant Commander
XWAU Member
Posts: 1798
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Thu Dec 19, 2019 10:03 pm

Hello,

You can already do that with the mission objects hook.
# crafts turrets
The craft turrets are no longer limited to CorellianTransport2, MilleniumFalcon2, and FamilyTransport. You can now enable turrets for any craft.

Suppose that the player craft is "FlightModels\[Player].opt".

The possible involved files are:
- "FlightModels\[Player]Gunner.opt"
- "FlightModels\[Player]Gunner2.opt"
- "FlightModels\CorellianTransportGunner.opt"

To define a custom gunner opt, create a "[Player]Gunner.opt" file.
To define a second custom gunner opt, create a "[Player]Gunner2.opt" file.
To use a second gunner that is different of the first gunner, the name of the second OPT ends with "Gunner2.opt".

Rookie_One1
Lieutenant Commander
Rebel Alliance
Posts: 1398
Joined: Thu Feb 26, 2004 12:01 am

Post by Rookie_One1 » Thu Dec 19, 2019 11:22 pm

Ooohh, didn't see that brb gotta add something
Rookie One, is that you?? - Ru Merleen, Rebel Spy at Imdaar Alpha
Current Holder of the Frying Pan of Death

Rookie_One1
Lieutenant Commander
Rebel Alliance
Posts: 1398
Joined: Thu Feb 26, 2004 12:01 am

Post by Rookie_One1 » Fri Dec 20, 2019 12:09 am

Update, thanks to jeremy advice (I did not see that tidbit of info before)

Here the files(OPTs and .shp files)
https://drive.google.com/file/d/1XtnEdC ... sp=sharing

Just have to put the opt in the flightmodels folder and use MXvTED to configure them correctly. Also make sure that your hooks are updated to the latest version available

@darksaber if you want to integrate it in the next release, do so, it really feel better gunning that way :)
Rookie One, is that you?? - Ru Merleen, Rebel Spy at Imdaar Alpha
Current Holder of the Frying Pan of Death

User avatar
Darksaber

Fleet Admiral (Administrator)
Posts: 10423
Joined: Mon Jan 10, 2000 12:01 am
Contact:

Post by Darksaber » Fri Dec 20, 2019 1:20 am

Well done it works :) and the orientation is correct on either turret :)

Be careful of the falcon Shp file though it changed the shiplist.txt file so the falcon was a fighter instead of Shuttle/Light Transport
“You can please some of the people all of the time, you can please all of the people some of the time, but you can’t please all of the people all of the time”.”
- John Lydgate

Good Things Come To Those Who Wait....
Darksaber's X-Wing Station

Rookie_One1
Lieutenant Commander
Rebel Alliance
Posts: 1398
Joined: Thu Feb 26, 2004 12:01 am

Post by Rookie_One1 » Fri Dec 20, 2019 2:32 am

Weird, in my own shiplist it's a shuttle/light transport...ah well

Anyway, @DS, if you want to integrate it in the next update (of either the main patch, or the individual YT freighter patches) go ahead
Rookie One, is that you?? - Ru Merleen, Rebel Spy at Imdaar Alpha
Current Holder of the Frying Pan of Death

User avatar
Driftwood
Lieutenant Commander
XWAU Member
Posts: 1800
Joined: Wed Oct 22, 2003 11:01 pm
Contact:

Post by Driftwood » Sat Dec 21, 2019 12:46 am

Darksaber wrote:
Fri Dec 20, 2019 1:20 am
Be careful of the falcon Shp file though it changed the shiplist.txt file so the falcon was a fighter instead of Shuttle/Light Transport
Any idea why this seems to happen? Over the years I've noticed that the game will have the craft type changed randomly after first write. To fix I either change and re-write to the correct one, or change it manually in the shiplist. Is this bug due to the type of slot utilized? (if not being totally random)

Post Reply