Help for getting fully workable Turrets/Front weapons/TurretCamera's ingame..

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

Moderators: Scripting / Modding Moderators, Moderators for English X Forum

Anubitus
Posts: 693
Joined: Fri, 21. Jan 05, 00:44
x4

Help for getting fully workable Turrets/Front weapons/TurretCamera's ingame..

Post by Anubitus »

hey,

i have been trying to get fully working ships ingame for a while now, and it worked, well, except for the turrets..

problem is, i can get them to shoot, but not to turn, they wont move at all..

first i tried to make my own turrets, and after that i tried to add mace's turrets to my ships, but both had the same result.. they can shoot but they wond move..

so i asked a few questions in mace's threat, but instead of hijacking his topic, ill justs create a new one especially for this problem..

i have been following this tutorial made by Killjaeden and somehow i manage to screw up.. :)

he told me to save the dummies file into UTF-8 format after i added stuff to it, but it makes my game crash to desktop for some reason.. even a vanilla dummies file makes my game crash if i open it and save it in UTF-8 format and add it to the last CAT/DAT file in my game folder.. maybe a texteditor problem or something, im not sure.. i use just regular ms notepad for it tho..

anyway, if anyone can shed some light on this issue, i d be very appreciative..

here is a part of the dummies file after i add stuff to it..

Code: Select all

SDTYPE_GUN;22;
106;GUNF_FIXED;2;GUNSTATUS_INITIAL;4291;GUNSTATUS_FIRING;4292;0;
107;GUNF_FIXED;2;GUNSTATUS_INITIAL;4293;GUNSTATUS_FIRING;4294;0;
91;GUNF_ROTATE;1;GUNSTATUS_INITIAL;4290;2;90;GUNPARTF_ROTATEALPHA;89;GUNPARTF_ROTATEALPHA|GUNPARTF_ROTATEBETA;
708;GUNF_ROTATE;1;GUNSTATUS_INITIAL;4295;2;980;GUNPARTF_ROTATEGAMMA;981;GUNPARTF_ROTATEBETA|GUNPARTF_ROTATEGAMMA;
19018;GUNF_FIXED;0;0;
19019;GUNF_FIXED;0;0;
19080;GUNF_FIXED;0;0;
19081;GUNF_FIXED;0;0;
19082;GUNF_FIXED;0;0;
19083;GUNF_FIXED;0;0;
ships\props\bigturret_dummy;GUNF_ROTATE;1;GUNSTATUS_INITIAL;ships\props\bigturret_scene;3;ships\props\bigturret_body;GUNPARTF_ROTATEALPHA;ships\props\bigturret_leftweapon;GUNPARTF_ROTATEALPHA|GUNPARTF_ROTATEBETA;ships\props\bigturret_rightweapon;GUNPARTF_ROTATEALPHA|GUNPARTF_ROTATEBETA;
ships\props\bigturret2_dummy;GUNF_ROTATE;1;GUNSTATUS_INITIAL;ships\props\bigturret2_scene;3;ships\props\bigturret_body;GUNPARTF_ROTATEALPHA;ships\props\bigturret_leftweapon;GUNPARTF_ROTATEALPHA|GUNPARTF_ROTATEBETA;ships\props\bigturret_rightweapon;GUNPARTF_ROTATEALPHA|GUNPARTF_ROTATEBETA;
ships\props\m6maingun_static;GUNF_FIXED;2;GUNSTATUS_INITIAL;ships\props\m6maingun_scene_static;GUNSTATUS_FIRING;ships\props\m6maingun_scene_moving;0;
ships\props\m3gun1d_static;GUNF_FIXED;2;GUNSTATUS_INITIAL;ships\props\m3gun1d_scene_static;GUNSTATUS_FIRING;ships\props\m3gun1d_scene_moving;0;
ships\props\m3turret1d_dummy;GUNF_ROTATE;1;GUNSTATUS_INITIAL;ships\props\m3turret1d_scene;2;ships\props\m3turret1d_body;GUNPARTF_ROTATEALPHA;ships\props\m3turret1d_weapon;GUNPARTF_ROTATEALPHA|GUNPARTF_ROTATEBETA;
ships\props\m6turret4_dummy;GUNF_ROTATE;1;GUNSTATUS_INITIAL;ships\props\m6turret4_scene;3;ships\props\m6turret4_body;GUNPARTF_ROTATEALPHA;ships\props\m6turret4_leftweapon;GUNPARTF_ROTATEALPHA|GUNPARTF_ROTATEBETA;ships\props\m6turret4_rightweapon;GUNPARTF_ROTATEALPHA|GUNPARTF_ROTATEBETA;
ships\props\gatlingf_body;GUNF_FIXED;2;GUNSTATUS_INITIAL;ships\props\gatlingf_scene_static;GUNSTATUS_FIRING;ships\props\gatlingf_scene_moving;0;
ships\props\gatlingf_body_right;GUNF_FIXED;2;GUNSTATUS_INITIAL;ships\props\gatlingf_right_scene_static;GUNSTATUS_FIRING;ships\props\gatlingf_right_scene_moving;0;
ships\props\bigturret4_dummy;GUNF_ROTATE;1;GUNSTATUS_INITIAL;ships\props\bigturret4_scene;2;ships\props\bigturret4_body;GUNPARTF_ROTATEALPHA;ships\props\bigturret4_weapon;GUNPARTF_ROTATEALPHA|GUNPARTF_ROTATEBETA;
ships\props\bigturret5_dummy;GUNF_ROTATE;1;GUNSTATUS_INITIAL;ships\props\bigturret5_scene;2;ships\props\bigturret4_body;GUNPARTF_ROTATEALPHA;ships\props\bigturret4_weapon;GUNPARTF_ROTATEALPHA|GUNPARTF_ROTATEBETA;
ships\props\Anubitus\Homeworld\Frigate_turret_dummy;GUNF_ROTATE;1;GUNSTATUS_INITIAL;ships\props\Anubitus\Homeworld\Frigate_turret_scene_barrels;3;ships\props\Anubitus\Homeworld\Frigate_turret_body;GUNPARTF_ROTATEALPHA;ships\props\Anubitus\Homeworld\Frigate_turret_barrel_bottom;GUNPARTF_ROTATEALPHA|GUNPARTF_ROTATEBETA;ships\props\Anubitus\Homeworld\Frigate_turret_barrel_bottom;GUNPARTF_ROTATEALPHA|GUNPARTF_ROTATEBETA;
ships\Killjaeden\props\MKturret_dummy;GUNF_ROTATE;1;GUNSTATUS_INITIAL;ships\props\MKturret_scene;2;ships\props\MKturret_body;GUNPARTF_ROTATEBETA;ships\props\MKturret_weapon;GUNPARTF_ROTATEALPHA|GUNPARTF_ROTATEBETA;
the two last entries are the ones i added, the first of the two is the one i made for my own costum turret, originally it didnt have any barrels as in homeworld it didnt have barrels either, it was just a square like looking turret with two black spots wich where the nozzles.. after Killjaeden told me i should try and add barrels to it wich might solve the problem, i did, but it didnt help.. sadly.. they are still there tho as they do fire with no problems..

the second of the two entries is the one that came with the turret package from mace, a very nice package with very good looking turrets i might add..
it contains a dummies file with all entries to add in your dummies file.. so thats what i did, i highlighted it and copied/pasted it right into my own dummies file.. this again didnt work tho.. no movement..

as far as i know, i have done everything the tutorial said i should do/add.. i hope a more experienced person can point out some mistakes if i made any..

thanks.. :)
Last edited by Anubitus on Wed, 8. Dec 10, 23:12, edited 2 times in total.
killerog
Posts: 3464
Joined: Fri, 28. Oct 05, 16:31
x4

Post by killerog »

Did you increase the number at the top of that section by 2 ?
Image
Anubitus
Posts: 693
Joined: Fri, 21. Jan 05, 00:44
x4

Post by Anubitus »

yes i did mate.. there are 22 entries atm..
User avatar
Killjaeden
Posts: 5366
Joined: Sun, 3. Sep 06, 18:19
x3tc

Post by Killjaeden »

When exactly does your game CTD? after starting a new game or right on loading the menu?

Remove your modified components from your gamedirectory and drop in an unmodified, not opened by you, components file (basically just extracted from the cat files) and see what happens.
[ external image ]
X-Tended TC Mod Team Veteran.
Modeller of X3AP Split Acinonyx, Split Drake, Argon Lotan, Teladi Tern. My current work:
Image
User avatar
ThalonMook
Posts: 1296
Joined: Tue, 3. Feb 04, 12:11
x4

Post by ThalonMook »

Hi,

as I made my first turret I got the same problem. I saved the Dummies and Components in UTF-8 and the game crashed.

So I took a original dummies and components and enhanced it with my entries. After this no more crashes.


*edit*
If you need I can check your files and give you a responce what is wrong.

CU Thalon
Anubitus
Posts: 693
Joined: Fri, 21. Jan 05, 00:44
x4

Post by Anubitus »

i have the strangest problem..

i have made a turret in max, i have scaled it propperly for the ship i wanna use it for, but when i import it into the ship scene in max it spawns with the original size.. no matter what i try, i cant scale it down to the size i want.. whats wrong..?

EDIT: when i reset the XForm befor i export, it goes back to its original size too..
Last edited by Anubitus on Sun, 3. Oct 10, 23:03, edited 1 time in total.
User avatar
Topcross
Posts: 180
Joined: Sat, 15. Aug 09, 03:30
x3tc

Post by Topcross »

Collapsed the object before exporting? Reset the Xform?
Anubitus
Posts: 693
Joined: Fri, 21. Jan 05, 00:44
x4

Post by Anubitus »

when i reset the XForm befor i export, it goes back to its original size too..
User avatar
ThalonMook
Posts: 1296
Joined: Tue, 3. Feb 04, 12:11
x4

Post by ThalonMook »

You must do a Reset XForm. You will find this by the Untilities in Max (The symbol with the hammer)

CU Thalon
User avatar
Topcross
Posts: 180
Joined: Sat, 15. Aug 09, 03:30
x3tc

Post by Topcross »

Anubitus wrote:when i reset the XForm befor i export, it goes back to its original size too..
collapsed it too?
Anubitus
Posts: 693
Joined: Fri, 21. Jan 05, 00:44
x4

Post by Anubitus »

yes, callapsed it too..

EDIT:this is what i do:

-select left barrel
-callapse it
-reset Xform
-select right barrel
-callapse it
-reset Xform
-select turret base
-callapse it
-reset its Xform and with this last move i do, the base goes back to its original size..
User avatar
ThalonMook
Posts: 1296
Joined: Tue, 3. Feb 04, 12:11
x4

Post by ThalonMook »

Ok,

you scale it to the size you need. Then ResetX Form. Then right click on the object and Convert to Editable Poly.

When you now export it it must have the right size.

*edit*
You dont need collapse. I never used it and all my models work perfectly.

You must do this for each object not for a group!

CU Thalon
Anubitus
Posts: 693
Joined: Fri, 21. Jan 05, 00:44
x4

Post by Anubitus »

fixed it, thanks..

another question.. :)

would it matter if i have a aft turret facing forward..?

i mean, two forward facing turrets, one using the front turret slot and another using the aft turret slot.. would that work..?
User avatar
ThalonMook
Posts: 1296
Joined: Tue, 3. Feb 04, 12:11
x4

Post by ThalonMook »

Hi,

maybe not. But you can make more than one foward turret.
If you need that the turrets work separate. In the TShips eg. 2=front 3=front 4=right 5=left 6=rear.

CU Thalon
Anubitus
Posts: 693
Joined: Fri, 21. Jan 05, 00:44
x4

Post by Anubitus »

ok, i finally got working turrets in the game..

however there are a few bugs

the big turret:

-body not showing, solved, was typo..
-one barrel is the right size while the other is way too small, i have reëxported the barrel bodys and the turret scene and now they are both small
-the barrels are not attatched to the turretbody, they can turn but they turn around their own pivot i think, so i might know what the problem is, the pivot for the barrels has to be on the same spot then the pivot of the turret body.. right..?
-the fireing nozzle is behind the barrels

the small turret:

-for the bottomturrets, the dummy is not deleted, the turret is there but is spawned through the dummy, so the turret is spawned on top of the dummy instead of the dummy being replaced by the turret
-the top turrets have another problem, the barrels can turn up and down, left and right, but they are not attatched to the body of the turret, they have their own turningpoint, same problem as with the big turret

the ship itself:

-i cant zoom in on it, its like the game thinks its a cap ship or something..
User avatar
Killjaeden
Posts: 5366
Joined: Sun, 3. Sep 06, 18:19
x3tc

Post by Killjaeden »

Anubitus wrote:-the barrels are not attatched to the turretbody, they can turn but they turn around their own pivot i think, so i might know what the problem is, the pivot for the barrels has to be on the same spot then the pivot of the turret body.. right..?
Custom turret tutorial . . . :roll:
-the fireing nozzle is behind the barrels
then make new laser parts, move forward and export to components again.
[ external image ]
X-Tended TC Mod Team Veteran.
Modeller of X3AP Split Acinonyx, Split Drake, Argon Lotan, Teladi Tern. My current work:
Image
Anubitus
Posts: 693
Joined: Fri, 21. Jan 05, 00:44
x4

Post by Anubitus »

The Rotation Center of all parts has to be the same.
All parts use their pivot to rotate around the set rotation.
that would mean that the pivots coördinates have to be the same for all parts but later on in the tut there is this
Make sure every part has it's pivot reset
if i select "reset pivot", the pivot changes place again, like for example, i have made the two barrels into one object for the time being, and ofc the pivot has to be in the centre right on top of the turret body pivot, now what happens is, when i press reset pivot that the pivot from the body goes back to the bottom of the turret while the pivot of the barrels go back to the spot where the pivot of the left barrel used to be (i added the right barrel to the left barrel)


when i export the parts as BODIES do they have to be at the 0, 0, 0 coördinates in the scene..? or can i just do it in the turret scene..?


when i add the laser parts to the weapons, does the weapon part has to be at the 0, 0, 0 spot in the scene..? or can i leave them at the spot where they are attatched to the turretbody..?
User avatar
Killjaeden
Posts: 5366
Joined: Sun, 3. Sep 06, 18:19
x3tc

Post by Killjaeden »

You set the pivots where you want to have the parts rotate (each will rotate around their own pivot). Don't forget to set the rotation of the pivot correctly.

Arrange your scene, export it.

Now, because you want to (have to) export the bodies, you have to move every part to 0/0/0 again, because otherwise they would be distorted.
which basically means, you move the hole object to 0/0/0 and rotate it to 0° 0° 0°. Reset pivot after that, to reset scaling to 100 100 100.

For the scene only position&rotation counts, not the scaling.
when i add the laser parts to the weapons, does the weapon part has to be at the 0, 0, 0 spot in the scene..? or can i leave them at the spot where they are attatched to the turretbody..?
Yes, you do that when you want to export the weapon part as body.
Move the weapon part to 000 and 0°0°0° (like described above). Then make the tiny laser parts and link them.
Do not rename your weaponpart, so that it still has it's scene name.
Export to components.txt
Otherwise you would have to edit the path in the components after that.

Now you delete the laser parts (ES skipped this step :roll: ) and export the weapon part as body. (Don't forget to make LODs and name them properly prior export)
[ external image ]
X-Tended TC Mod Team Veteran.
Modeller of X3AP Split Acinonyx, Split Drake, Argon Lotan, Teladi Tern. My current work:
Image
Anubitus
Posts: 693
Joined: Fri, 21. Jan 05, 00:44
x4

Post by Anubitus »

i dont understand why my cameras are animated in the ship scene file..

each time i export the ship scene file i get

Code: Select all

P 5; B ships\props\cameradummy; C 3; N Bships\props\cameradummy_3left; b  // idx 5
{ 0x2002;  -8214; 881; 1286;  0.250000; 0.000000; -1.000000; 0.000000;  98; 1; } // 0
{ 0x2002;  -8214; 881; 1286;  0.250000; -0.000000; -1.000000; -0.000000;  98; 2; } // 1
{ 0x2002;  -8214; 881; 1286;  0.250000; -0.000000; -1.000000; -0.000000;  98; 3; } // 2
{ 0x2002;  -8214; 881; 1286;  0.250000; -0.000000; -1.000000; -0.000000;  98; 4; } // 3
{ 0x2002;  -8214; 881; 1286;  0.250000; -0.000000; -1.000000; -0.000000;  99; 5; } // 4
{ 0x2002;  -8214; 881; 1286;  0.250000; -0.000001; -1.000000; -0.000001;  98; 6; } // 5
{ 0x2002;  -8214; 881; 1286;  0.250000; -0.000001; -1.000000; -0.000001;  98; 7; } // 6
{ 0x2002;  -8214; 881; 1286;  0.250000; 0.000000; -1.000000; -0.000000;  98; 8; } // 7
{ 0x2002;  -8214; 881; 1286;  0.250000; -0.000000; -1.000000; -0.000000;  98; 9; } // 8
{ 0x2002;  -8214; 881; 1286;  0.250000; -0.000000; -1.000000; -0.000000;  99; 10; } // 9
{ 0x2002;  -8214; 881; 1286;  0.250000; -0.000000; -1.000000; -0.000000;  98; 11; } // 10
{ 0x2002;  -8214; 881; 1286;  0.250000; -0.000000; -1.000000; -0.000000;  98; 12; } // 11
{ 0x2002;  -8214; 881; 1286;  0.250000; -0.000001; -1.000000; -0.000001;  98; 13; } // 12
{ 0x2002;  -8214; 881; 1286;  0.250000; -0.000001; -1.000000; -0.000001;  98; 14; } // 13
{ 0x2002;  -8214; 881; 1286;  0.250000; 0.000000; -1.000000; -0.000000;  99; 15; } // 14
{ 0x2002;  -8214; 881; 1286;  0.250000; -0.000000; -1.000000; -0.000000;  98; 16; } // 15
{ 0x2002;  -8214; 881; 1286;  0.250000; -0.000000; -1.000000; -0.000000;  98; 17; } // 16
{ 0x2002;  -8214; 881; 1286;  0.250000; -0.000000; -1.000000; -0.000000;  98; 18; } // 17
{ 0x2002;  -8214; 881; 1286;  0.250000; -0.000000; -1.000000; -0.000000;  98; 19; } // 18
{ 0x2002;  -8214; 881; 1286;  0.250000; -0.000001; -1.000000; -0.000001;  99; 20; } // 19
{ 0x2002;  -8214; 881; 1286;  0.250000; -0.000001; -1.000000; -0.000001;  98; 21; } // 20
{ 0x2002;  -8214; 881; 1286;  0.250000; 0.000000; -1.000000; -0.000000;  98; 22; } // 21
{ 0x2002;  -8214; 881; 1286;  0.250000; -0.000000; -1.000000; -0.000000;  98; 23; } // 22
{ 0x2002;  -8214; 881; 1286;  0.250000; -0.000000; -1.000000; -0.000000;  98; 24; } // 23
{ 0x2002;  -8214; 881; 1286;  0.250000; -0.000000; -1.000000; -0.000000;  99; 25; } // 24
{ 0x2002;  -8214; 881; 1286;  0.250000; -0.000000; -1.000000; -0.000000;  98; 26; } // 25
{ 0x2002;  -8214; 881; 1286;  0.250000; -0.000001; -1.000000; -0.000001;  98; 27; } // 26
{ 0x2002;  -8214; 881; 1286;  0.250000; -0.000001; -1.000000; -0.000001;  98; 28; } // 27
{ 0x2002;  -8214; 881; 1286;  0.250000; 0.000000; -1.000000; -0.000000;  98; 29; } // 28
{ 0x2002;  -8214; 881; 1286;  0.250000; -0.000000; -1.000000; -0.000000;  99; 30; } // 29
{ 0x2002;  -8214; 881; 1286;  0.250000; -0.000000; -1.000000; -0.000000;  98; 31; } // 30
{ 0x2002;  -8214; 881; 1286;  0.250000; -0.000000; -1.000000; -0.000000;  98; 32; } // 31
{ 0x2002;  -8214; 881; 1286;  0.250000; -0.000000; -1.000000; -0.000000;  98; 33; } // 32
{ 0x2002;  -8214; 881; 1286;  0.250000; -0.000001; -1.000000; -0.000001;  5; 34; } // 33
{ 0x2012;  0.250000; -0.000001; -1.000000; -0.000001;  -1; -1; } // 34
in the entry for every camera i have added.. i can delete it, and it still works, but does it affect the way the camera behaves..? :o
weasal11
Posts: 6
Joined: Tue, 28. Sep 10, 16:43
x4

camera

Post by weasal11 »

no it doesnt, seems to only use the first set of data, somehow your Max thinks the camera dummies are animations, but i havent seen any affect from the multitudes of placement data ingame, just that your scenefile looks massive :lol:

Return to “X³: Terran Conflict / Albion Prelude - Scripts and Modding”