Ship Turrets/Guns LoF Question
Moderators: Moderators for English X Forum, Scripting / Modding Moderators
Ship Turrets/Guns LoF Question
Since I am finally trying to get off my ass and bring some ships into the X Universe (planning on X4) and it has been a long time since I poked any X games, I have some questions regarding turrets/guns in X:R.
1) Are turrets a full 360 degree by 180 degree (hemisphere) rotation/firing arc like X3/TC/AP or are/can they (be) limited in any sort of way?
2) Are fighter guns fixed position or gimballed for a small firing cone?
I am asking because I am looking at attempting to bring in a number of Homeworld 1 ships (they have fixed forward guns or limited rotation/elevation turrets) and wanting to figure out if I am going to have to tweak shapes/placements to accomadate the differences.
1) Are turrets a full 360 degree by 180 degree (hemisphere) rotation/firing arc like X3/TC/AP or are/can they (be) limited in any sort of way?
2) Are fighter guns fixed position or gimballed for a small firing cone?
I am asking because I am looking at attempting to bring in a number of Homeworld 1 ships (they have fixed forward guns or limited rotation/elevation turrets) and wanting to figure out if I am going to have to tweak shapes/placements to accomadate the differences.
Re: Ship Turrets/Guns LoF Question
First a caveat: i have zero experience modding assets. That said:
which seems to say unlimited rotation along the y-axis of the turret, and limited rotation along its x-axis so it can't fire straight outwards from its mounting.
Looks like they're defined in the asset template (the part of the asset definition that is not named *_macro.xml). Example in props_wps_ar_def_turret_s_mg which is the template used for the ubiquitous HIT/MA Turret:StormMagi wrote:1) Are turrets a full 360 degree by 180 degree (hemisphere) rotation/firing arc like X3/TC/AP or are/can they (be) limited in any sort of way?
Code: Select all
<connection name="Connection02" tags="part detail_s iklink nocollision forceoutline " parent="anim_socket">
<restrictions>
<restriction type="rotation_y"/>
</restrictions>
...
<connection name="Connection03" tags="part iklink detail_xs nocollision forceoutline " parent="detail_s_turret">
<restrictions>
<restriction type="rotation_x">
<limits>
<min value="-37.5 "/>
<max value="37.5 "/>
</limits>
</restriction>
</restrictions>
The few fixed guns i checked don't seem to have geometry and use the props_wps_invisible_weapon template. i do know that they have some traverse in practice, but can't remember if the traverse is unlimited. Don't think it is. There are weapons which appear to have geometry but, other than the player ship's weapons, they don't seem to be used? This was just a quick look, though. Didn't look at all the assets.StormMagi wrote:2) Are fighter guns fixed position or gimballed for a small firing cone?
o7 w.evans
I have more experience with 3D modeling than I do coding at this point (granted it is Inventor part fabrication). That gives me a great start in the right direction though. The -37.5 limit makes me wonder if the default turret angle is aligned @ 37.5 degrees off the z axis...
I guess I need to reinstall X:R, a godmode cheat and go poke some big ships to see how turrets react to double check the axis orientation.
I have more experience with 3D modeling than I do coding at this point (granted it is Inventor part fabrication). That gives me a great start in the right direction though. The -37.5 limit makes me wonder if the default turret angle is aligned @ 37.5 degrees off the z axis...
I guess I need to reinstall X:R, a godmode cheat and go poke some big ships to see how turrets react to double check the axis orientation.
nope, the -37.5 to 37.5 means it can fire slightly above and below its own "elevation"/X-Plane
better example would be the BB gun i guess.. i found this snippet here
This is for the HUGE Guns on the Weapon Platforms near Stations, which can only aim slightly below the platform and a bit more above it, but not much...[/code]
PS regarding the autoaim restriction on small ships it might be worth to have a look in the player Weapons, which have these iirc.. not sure if their restrictions also apply to NPC Ships though...
better example would be the BB gun i guess.. i found this snippet here
Code: Select all
<connection name="Connection18" tags="part iklink " parent="detail_s_rotator">
<restrictions>
<restriction type="rotation_x">
<limits>
<min value="-10.0 "/>
<max value="35.0 "/>
</limits>
</restriction>
</restrictions>
PS regarding the autoaim restriction on small ships it might be worth to have a look in the player Weapons, which have these iirc.. not sure if their restrictions also apply to NPC Ships though...
if not stated otherwise everything i post is licensed under WTFPL
Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter
I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help
Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter
I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help
Turret questions
I finally have a capital ship in game, and have packed it with my own turret designs, but I have a few questions about tweaking them.
1. Is it possible to get all seven barrels to fire together?
OK- after many hours! Figured this one out, made a custom bullet with multiple barrel count!
2. is it possible to have more than one bullet type in a turret?
OK- Figured this out, I can nest multiple turrets or weapons within another!
3. I noticed the rotation limits do not seem to be accurate, I tested turret rotation in 3ds max, to find the limit needed for it not to collide with the ship, when I put those + and - limits in the macro, the gun seems to go beyond, I am limiting them further at this point to compensate, was just curious about this.
OK- Getting closer on this- it appears you have offset the pivots for the parent and child. My pivots are sharing the same point, I thought angle was just angle, not location of pivot in relation to other pivot, is this correct?? and if so I will offset my pivots. I assume the child rotates around the parents pivot and not it's own in this case, the childs pivot being used just to gauge the limits?
4. Lastly can you dynamically limit a turrets rotation? ie. if the turret is 0 to 90 degrees in rotation_y limit rotation_x to +- 30 degrees, and if turret is 90 to 180 in y then limit x to 20 degrees, etc... I have turrets mounted around some unique geometry (higher on one side of turret than the other).
5. Groups? I see groups determine shield generator protection, do they effect targeting for turrets in any way? Like target sharing in group?
6. new question on bullets.
<bullet speed="2200" lifetime="3.8" range="9000" amount="1" barrelamount="2" timediff="0.1" angle="0.25" maxhits="2" ricochet="0" scale="0" attach="0"/>
I understand most of the parameters, not sure how timediff, angle, scale, and attach work. Also if you have multiple barrels should max hits match the barrel count, I notice it is less in many existing designs. Angle is the one I am most curious about! and timediff, assume this has to do with leading the target timing wise?
Thanks again, and if anyone needs help making their own turrets I would be glad to share what I have learned so far.
Archaine
PS: Is there a way to generate or edit .ani files?
1. Is it possible to get all seven barrels to fire together?
OK- after many hours! Figured this one out, made a custom bullet with multiple barrel count!
2. is it possible to have more than one bullet type in a turret?
OK- Figured this out, I can nest multiple turrets or weapons within another!
3. I noticed the rotation limits do not seem to be accurate, I tested turret rotation in 3ds max, to find the limit needed for it not to collide with the ship, when I put those + and - limits in the macro, the gun seems to go beyond, I am limiting them further at this point to compensate, was just curious about this.
OK- Getting closer on this- it appears you have offset the pivots for the parent and child. My pivots are sharing the same point, I thought angle was just angle, not location of pivot in relation to other pivot, is this correct?? and if so I will offset my pivots. I assume the child rotates around the parents pivot and not it's own in this case, the childs pivot being used just to gauge the limits?
4. Lastly can you dynamically limit a turrets rotation? ie. if the turret is 0 to 90 degrees in rotation_y limit rotation_x to +- 30 degrees, and if turret is 90 to 180 in y then limit x to 20 degrees, etc... I have turrets mounted around some unique geometry (higher on one side of turret than the other).
5. Groups? I see groups determine shield generator protection, do they effect targeting for turrets in any way? Like target sharing in group?
6. new question on bullets.
<bullet speed="2200" lifetime="3.8" range="9000" amount="1" barrelamount="2" timediff="0.1" angle="0.25" maxhits="2" ricochet="0" scale="0" attach="0"/>
I understand most of the parameters, not sure how timediff, angle, scale, and attach work. Also if you have multiple barrels should max hits match the barrel count, I notice it is less in many existing designs. Angle is the one I am most curious about! and timediff, assume this has to do with leading the target timing wise?
Thanks again, and if anyone needs help making their own turrets I would be glad to share what I have learned so far.
Archaine
PS: Is there a way to generate or edit .ani files?