(Available in PDF format)
Known Details
For simplicity, Forward/Rear/Left/Right turrets will be called Horizontal Turrets, and the Up/Down types Vertical Turrets.
Creating horizontal turrets is fairly straight forward. Once you understand the basics, all that’s needed is the creativity to making the parts that will go into the creation.
However, making vertical turrets that are meant for the Tops and Bottoms of ships requires a bit of rethinking, and redesign.
The reason this needs to be understood, is because many don’t realize the limitations X3 puts on how turrets behave, based on how they are created. For Example:
[ external image ]
Every horizontal turret is created with its base on the X/Y plane (the grid under the gun). For articulated turrets (those with multiple moving parts), the base (or socket) is usually centered on X/Y/Z coordinates 0/0/0. This means the bottom of the base is centered at 0 altitude (Z) and centered left/right (X) and forward/back (Y) on the grid.
Articulated turrets, are those designed to move when used. In the case of multipart turrets, more than 1 part can move about, based on its ‘Pivot’ definition. Pivots can be defined anywhere, but are usually meant to make the movement aesthetic to the whole.
Normal turret movement:
Base (Socket) - Usually no movement
Body - Rotation along the Z axis
Guns – Rotation along the X axis, based on their Pivot location, and rotation on the Z axis, usually to follow the Body
X3 understands this, but applies certain rules to Horizontal Turrets (see above):
Limitation of 90° Z rotation (body/guns) based on the Y axis (Facing) direction:
[ external image ]
Limitation of 90° X rotation (guns only) based on Y axis direction:
[ external image ]
These limitations are fine for turrets assigned to any of the planar orientations of the ship (Left/Right/Forward/Rear). But, it puts a serious crimp on any vertical orientation assigned turrets.
I discovered a way to beat these limitations, that X3 agrees with. Thus allowing the construction of turrets that can cover the ENTIRE 360° Z axis field, which an Up/Down turret is sorely needed to be doing.
My first attempts at this created a nasty little object, which, though it worked, behaved rather oddly based on how I perceived a turret NEEDED to behave. I have since found the error, and corrected it.
Construction
I discovered, that by altering the orientation of the turrets construction slightly, I was able to make X3 utilize it in the manner that an Up/Down turret is supposed to work in. The first task is to change the plane on which the turret is created. Instead of using the X/Y plane, we use the X/Z plane:
[ external image ]
This is achieved by rotating the base (socket) and body -90° on the X axis. Only these 2 parts need rotating. The guns, just need to be realigned with the pivot point position they had relative to the body.
You then need to align all the parts Pivot Points for this new orientation. In this instance, the socket, and body, would have their pivots set to 0/0/0 (no change really), and the guns would have their X and Y pivot points exchanged.
NOTE: do NOT rotate the pivot points themselves. This is unnecessary, and may cause you some amusing results.
On each part, use the Reset XForm utility (Reset Selected), and the Collapse Utility (Collapse Selected). This will lock this orientation of the parts and their pivot points.
Rename the parts. The original model I used was bfg2_xxxxx. So, I saved each part under bfg3_ (i.e. bfg3_socket). Before saving the guns, I suggest you create the ‘laser’ part, position and link it to the guns, and create the Components.txt entry with DBOX.
Create the bfg3_scene file for this model (sans the ‘laser’ entries). Next, create the _dummy entry (see tutorial on Weapon Dummies). Now for the important part.
Open the Dummies.txt file. Find the SDTYPE_GUN area. Increment the number by 1. Now, find the gun you used as a template (in this case ships\props\bfg2_dummy). Copy this line, and paste it below it. Change the bfg2 to bfg3 (or whatever the new gun name you chose).
Next, find all the entries that say ‘GUNPARTF_ROTATEALPHA’. Change this to ‘GUNPARTF_ROTATEGAMMA’. There will be 3 entries of this (usually). One for the body (only flag) and one for each gun (usually 2 flags, GUNPARTF_ROTATEBETA is for up/down rotation). Save the file.
Next, verify the Componets.txt file has the entries for you new gun. Verify the path, or you’ll have guns that can track, but not shoot.
Lastly, put the gun .bod files, the Dummies.txt and Components.txt files into a mod (false patch or real mod, doesn’t matter).
All you have to do next is edit a ships _scene file to use these guns. Make sure you set their rotation correctly, so their facing the right direction. For Example (bold is what needs to be set):
/Up (Top) turret
P 73; B ships\props\bfg3_dummy; C 6; N Bships\props\bfg3_dummy_6b; b
{ 0x2002; -52000; -50000; -27000; 0.250000; -1.000000; 0.000000; 0.000000; -1; -1; } // -1
/Down (Bottom) turret
P 73; B ships\props\bfg3_dummy; C 6; N Bships\props\bfg3_dummy_6b; b
{ 0x2002; -52000; -50000; -27000; 0.250000; 1.000000; 0.000000; 0.000000; -1; -1; } // -1
You can also use 3ds/GMax to create the scene for you. Just import the turret dummy, and rotate -90° for Down guns, and 90° for Up guns.
Remember to change the TShips Guns entries to utilize the new turrets.
This procedure allows the turret to have a FULL 360° rotation on the Z axis. The guns, however, will have 180° X axis rotation (horizon to horizon).
This procedure can also be applied to single part turrets, for use on Top/Bottom mounts (see DDRS Millennium Falcon as an example of a ship that NEED this). Just remember to change the rotation flags in Dummies.txt from ALPHA to GAMMA.
Have fun.
[TUTORIAL] Up/Down Turrets (with 3ds/GMax)
The place to discuss scripting and game modifications for X³: Reunion.
Moderators: Scripting / Modding Moderators, Moderators for English X Forum
1 post
• Page 1 of 1
-
- Posts: 2880
- Joined: Fri, 17. Feb 06, 04:55
[TUTORIAL] Up/Down Turrets (with 3ds/GMax)
Post by Jakesnake5 »
Perfection is in the hands of God, we bags of dirt can only do the best we can©
[ external image ]
Modders are a source of ideas to help the Game Makers improve what they have made. Cherrish them, for they are the fruit of thy labors.©
[ external image ]
Modders are a source of ideas to help the Game Makers improve what they have made. Cherrish them, for they are the fruit of thy labors.©
1 post
• Page 1 of 1
Return to “X³: Reunion - Scripts and Modding”
Jump to
- English Forums
- ↳ X4: Foundations
- ↳ X4: Foundations - Spoilers
- ↳ X4: Foundations - Technical Support
- ↳ X4: Foundations - Scripts and Modding
- ↳ Construction Community
- ↳ X Wiki Discussion
- ↳ X Rebirth Universe
- ↳ X Rebirth VR Edition
- ↳ X Rebirth - Technical Support
- ↳ X Rebirth - Scripts and Modding
- ↳ X³: Farnham's Legacy
- ↳ X³: Farnham's Legacy - Scripts and Modding
- ↳ X Trilogy Universe
- ↳ X³: Terran Conflict / Albion Prelude / Farnham's Legacy - Technical Support
- ↳ X³: Terran Conflict / Albion Prelude - Scripts and Modding
- ↳ X³: Reunion, X²: The Threat, X-T and X-BTF - Technical Support
- ↳ X³: Reunion - Scripts and Modding
- ↳ X²: The Threat - Scripts and Modding
- ↳ Creative Universe
- ↳ Off Topic English
- Deutschsprachige Foren
- ↳ X4: Foundations
- ↳ X4: Foundations - Spoilers
- ↳ X4: Foundations - Technische Unterstützung
- ↳ X4: Foundations - Scripts und Modding
- ↳ X Rebirth Universum
- ↳ X Rebirth VR Edition
- ↳ X Rebirth - Technische Unterstützung
- ↳ X Rebirth - Scripts und Modding
- ↳ X³: Farnham's Legacy
- ↳ X³: Farnham's Legacy - Scripts und Modding
- ↳ X Trilogie Universum
- ↳ X³: Terran Conflict / Albion Prelude / Farnham's Legacy - Technische Unterstützung
- ↳ X³: Terran Conflict / Albion Prelude - Scripts und Modding
- ↳ X³: Reunion, X²: Die Bedrohung, X-T und X-BTF - Technische Unterstützung
- ↳ X³: Reunion - Scripts und Modding
- ↳ X²: Die Bedrohung - Scripts und Modding
- ↳ Kreative Zone
- ↳ Off Topic Deutsch
- Forum Français
- ↳ X4: Foundations
- ↳ Support et Aide pour X4: Foundations
- ↳ Script et Modding pour X4: Foundations
- ↳ L'Univers X Rebirth
- ↳ Support et Aide pour X Rebirth
- ↳ Script et Modding pour X Rebirth
- ↳ Support et Aide pour la Trilogie X
- ↳ L'Univers de la Trilogie X
- ↳ Script et Modding pour la Trilogie X
- ↳ Off Topic Français
- Forum Italiano
- ↳ X4: Foundations
- ↳ Supporto Tecnico per X4: Foundations
- ↳ Script e Modding per X4: Foundations
- ↳ L'Universo di X Rebirth
- ↳ Script e Modding per X Rebirth
- ↳ Supporto Tecnico per X Rebirth
- ↳ L'Universo della Trilogia di X
- ↳ Script e Modding per la Trilogia di X
- ↳ Supporto Tecnico per la Trilogia di X
- ↳ Off Topic Italiano
- Polskie Fora
- ↳ Polskie / Polish X-Forum
- ↳ Polskie / Polish Off Topic
- Other Languages
- ↳ Česky / Czech X-Forum
- ↳ Dansk / Danish X-Forum
- ↳ Español / Spanish X-Forum
- ↳ Nederlands / Dutch X-Forum
- ↳ Português / Portuguese X-Forum
- ↳ Русский / Russian X-Forum
- DevNet: General
- ↳ MSCI Reference
- DevNet: X4: Foundations
- DevNet: X Rebirth
- ↳ XR - Technical Troubleshooting