[SCR] Align ship with ecliptic

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

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

User avatar
Gazz
Posts: 13244
Joined: Fri, 13. Jan 06, 16:39
x4

[SCR] Align ship with ecliptic

Post by Gazz » Wed, 22. Oct 08, 00:31

English / Deutsch


Many spacefighterflygames have a key to align your ship with "the plane".
True 3D is very hard to display on 2D screens so most games (including X3) use basically flat sectors.

Manual Operation:
  • This script provides 1 Hotkey.
  • Allowed Targets:
    If you have one of your own objects targeted then this one will be rotated.
    If not, your own ship will be rotated.
  • Press Hotkey 1x:
    Ship is rotated and aligned with the plane of the ecliptic.
  • Press Hotkey 2x within 3 sec:
    Ship is rotated, aligned with the plane of the ecliptic, and turned "north".
  • Press Hotkey 3x within 3 sec:
    Blahblah . . . "east".
  • Press Hotkey 4x within 3 sec:
    Blahblah . . . "south".
  • Press Hotkey 5x within 3 sec:
    Blahblah . . . "west".
  • Stuff:
    • This script can be interrupted at any time with manual ship control or an autopilot command.
    • Stations do not have autopilot commands so you can not interrupt the script for them. If they appear to lock up you should leave the sector and let the script complete.
    • The turning speeds are roughly equal to the normal turning speeds of the ships.
    • It's nice if you can properly arrange your fleet for a screenshot or just don't want to fly upside down. =)
    • If you rotate or position stations it can be pretty useful if you can normalize the orientation of your own ship.
Automatic Operation:
  • With an AL Plugin you can set this to run automatically and how often.
  • As long as you or the Autopilot control the ship, nothing unusual happens.
  • After (setting) seconds of inactivity the playership will be rotated to the default orientation.

    If the speed = 0 then it will also be aligned with the plane of ecliptic.
  • That way I can conveniently fly my ship from the sector map because the controls are never reversed.

[ external image ] ZIP

Resources used:
1 Hotkey
AL Plugin

Disclaimer:
Rotating objects in the vicinity of other objects may be hazardous to their health. Gazz cannot be held liable for any loss arising directly or indirectly from the use of, or any action taken in reliance on this script.
Last edited by Gazz on Sat, 22. Oct 11, 11:48, edited 3 times in total.
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.

Khaak_Slayer
Posts: 403
Joined: Sun, 18. Apr 04, 17:04
x4

Post by Khaak_Slayer » Wed, 22. Oct 08, 01:52

Thank you very much, this will come very much in handy!
Rawr.

User avatar
corhen
Posts: 338
Joined: Thu, 16. Oct 08, 08:45
x3tc

Post by corhen » Thu, 23. Oct 08, 02:46

ok, it works ok.

it seems slow, is there a way to have it maneuver quicker?

And the voice is... edgy. Isn't the default voice generated? and if not, maybe have multiple voices (a deeper one, one more intone with the game)

Enders Wood
Posts: 15
Joined: Mon, 5. Apr 04, 16:34
x2

Post by Enders Wood » Tue, 30. Dec 08, 17:59

Hi :)

I love your script !!! ... hum... in fact, I whant to love it ^^ but I simply don't found how to use it :s

I look for all Hotkey unasigned, and nothing, I definitly can't found where to set the key :(

and I even don't know if I realy add the script.... the installer must do everything fine, many other scripts works even with my French game , but don't know why this one dont...

in other hand, how can we set it as automatic ?

thanks :)

User avatar
Gazz
Posts: 13244
Joined: Fri, 13. Jan 06, 16:39
x4

Post by Gazz » Tue, 30. Dec 08, 18:14

Enders Wood wrote:and I even don't know if I realy add the script.... the installer must do everything fine, many other scripts works even with my French game , but don't know why this one dont...
All you need to do is extract the ZIP into the TC Folder.
in other hand, how can we set it as automatic ?
As described in the first post.

AL Plugins are under Gameplay.
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.

OTAS Employee
Posts: 393
Joined: Sun, 30. Nov 08, 14:50
x3tc

Post by OTAS Employee » Tue, 30. Dec 08, 20:01

I look for all Hotkey unasigned, and nothing, I definitly can't found where to set the key
Have you activated the script editor?
If not look in the stickies.

Enders Wood
Posts: 15
Joined: Mon, 5. Apr 04, 16:34
x2

Post by Enders Wood » Tue, 30. Dec 08, 22:46

as I have specify, I have many other mod running :p so yes, Theresallbewings already done, but not sure this is what you call script editor

found the AL Plugins.... where I have :

Bounty EnhancementOff (too many gold gain lol)
MARS : Not available for AI Ships - v408 (don't know what is it/..)
MARS : BlablaBla
MARS :BlablaBla
MARS :BlablaBla

.... and that's all...nothing about Align... :(

I have delete and readd the script with the plugin manager... and copy/past files from zip too, to be sure....

I'm sure files are where they must be... but still don't found how to make it work :'(

User avatar
Gazz
Posts: 13244
Joined: Fri, 13. Jan 06, 16:39
x4

Post by Gazz » Wed, 31. Dec 08, 01:26

If scripts don't show up even though they should, maybe you downloaded the Reunion version.

There are 2 download pages.
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.

Enders Wood
Posts: 15
Joined: Mon, 5. Apr 04, 16:34
x2

Post by Enders Wood » Wed, 31. Dec 08, 02:09

Gazz wrote: There are 2 download pages.
Arg ! don't see that !!! and yes ! there is no .pck for TC version ^^

Thanks ! It work fine :) (even if a bit slow like Corhen say, but not a big deal ^^)

crimsonhaze
Posts: 1
Joined: Wed, 31. Dec 08, 01:10

Post by crimsonhaze » Wed, 31. Dec 08, 03:09

Thanks, this mod works great! :) Great tool for idle capital ships, so you can order them to point their turrets at enemy direction. Works well with MARS.

User avatar
Gazz
Posts: 13244
Joined: Fri, 13. Jan 06, 16:39
x4

Post by Gazz » Wed, 31. Dec 08, 08:54

Heh. That's a use I never thought of but yes - you can remote control your other ships to some degree. =)
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.

User avatar
klaatu
Posts: 316
Joined: Fri, 21. Nov 03, 17:23
x4

Post by klaatu » Wed, 31. Dec 08, 20:37

Strange...sometimes this script works for me and other times it doesn't. Sometimes I can press the hotkey and my ship will align with the ecliptic, or turn a direction if pressed multiple times, so it's working. But other times I press the hotkey and absolutely nothing happens. I can press the hotkey multiple times and it says "North", "East", etc. but the ship doesn't change orientation at all. I even tried manually re orientating the ship in case it was already aligned, but still nothing. I'm not absolutely sure, but it seems to start working again at some point, and I'm thinking it's when I change sectors.

Like I said, strange. Oh well, when it works it works well at least. Thanks for that.

User avatar
Gazz
Posts: 13244
Joined: Fri, 13. Jan 06, 16:39
x4

Post by Gazz » Wed, 31. Dec 08, 20:46

klaatu wrote:But other times I press the hotkey and absolutely nothing happens. I can press the hotkey multiple times and it says "North", "East", etc. but the ship doesn't change orientation at all. I even tried manually re orientating the ship in case it was already aligned, but still nothing. I'm not absolutely sure, but it seems to start working again at some point, and I'm thinking it's when I change sectors.
It's probably working as intended.

The description clearly states when or why the script is interrupted.
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.

User avatar
klaatu
Posts: 316
Joined: Fri, 21. Nov 03, 17:23
x4

Post by klaatu » Thu, 1. Jan 09, 06:26

Yep, could be. Re-reading the description, I wonder if I might have had another of my ships or stations targeted. I suppose I could have been moving one of my own stations around and not even known it! LOL.

Loky77
Posts: 110
Joined: Sun, 25. Jan 09, 09:54
x3tc

Post by Loky77 » Fri, 30. Jan 09, 09:23

Great script and nice piece of code !! :thumb_up:

May i use it in one of my script conversion ? ( i will only use the rotating part of the code )

Regards

User avatar
Gazz
Posts: 13244
Joined: Fri, 13. Jan 06, 16:39
x4

Post by Gazz » Fri, 7. Aug 09, 07:46

Bugfix.

Most likely the 2.5 patch changed the way how hotkey scripts get their automatic arguments.
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.

User avatar
ThomasAH
Posts: 147
Joined: Wed, 3. Sep 08, 10:46
x4

Post by ThomasAH » Fri, 7. Aug 09, 09:04

Gazz wrote:Most likely the 2.5 patch changed the way how hotkey scripts get their automatic arguments.
There is a 2.5 patch for TC? :)

But good that I noticed this thread. I often lost my orientation when looking at the sector map and then trying to get there manually.

Edit: I just read about 2.5-beta, so it seems intentional.

Llama
Posts: 456
Joined: Tue, 21. Aug 07, 06:59
x3tc

Post by Llama » Mon, 4. Jan 10, 11:01

I'm trying to create a tidy complex for once and this was unbelievably handy, cheers
I fly Terran for the accents

Llama
Posts: 456
Joined: Tue, 21. Aug 07, 06:59
x3tc

Post by Llama » Mon, 4. Jan 10, 11:03

I'm trying to create a tidy complex for once and this was unbelievably handy, cheers
I fly Terran for the accents

garrry34
Posts: 911
Joined: Sun, 17. Jul 05, 14:43
x3tc

Post by garrry34 » Fri, 1. Jul 11, 23:20

gazz is there anyway this could work on gates?
PhenomII X4 940 black edition
8GB DDR2
ATI HD4890
Windows 7 64bit

Post Reply

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