[SCRIPT] Dogfight Helper: Match Speed of Target, V 1.1 Released, 6/9/2006
Moderators: Moderators for English X Forum, Scripting / Modding Moderators
-
- Posts: 117
- Joined: Thu, 2. Feb 06, 05:32
[SCRIPT] Dogfight Helper: Match Speed of Target, V 1.1 Released, 6/9/2006
Update 3: Heh, we're in 2011 and I'm almost done with a PhD. How time flies. Anyway, at some point along the way, I figured out that the solution I wanted to implement would not work with the current engine. I mean, it would work for about 10 minutes, and then would crash the game due to some complexities with locking and recursion. Oh well. I have fixed the links for this plugin if anyone wants to use it standalone.
Update 2: Can't say this is the world's most popular plugin, but I'll start working on adding in the modifications.
Hello - It's now 2008! Hard to believe I wrote this script a couple of years ago. Well, time marches on. I have added a poll to determine whether you want changes/improvements to this script.
===========================================
Name: Match Speed
Version: V1.1
Author: Desert Eagle
Updated: 6/9/2006
===========================================
Description:
It's a dogfighting aid. It adds a hotkey so that you can quickly
match the speed of your target at close range (0-2K).
It is quite fun to hover ten meters behind your opponent,
just out of reach of his turret, weapons primed.
===========================================
Zip file:
http://www.travisgood.com/MatchSpeed.zip
Cycrow Installer (spk) File:
http://www.travisgood.com/MatchSpeed.spk
At the moment, English language only.
No special requirements. Should be compatible with
every script / mod out there because it doesn't use
any command slots or text files.
A reasonable effort has been made to test this software.
Your feedback is appreciated.
________________________________________________________________
Version History:
1.1 - Based on a tip from Red Spot, rebuilt the script so it only
uses one hot-key instead of two, and doesn't lock the max speed.
1.0 Beta - The first publicly available version was a proof
of concept and had a couple of minor odd behaviors.
________________________________________________________________
Background:
I developed these scripts because I view the 'Match Speed of Target'
command as a standard space genre feature; its absence from
the retail build of X3 is puzzling.
Instructions:
[If you already have version 1.0 installed,
please run the Uninstall script, and then exit X3
before installing 1.1.]
Use Cycrow's installer, or unzip the scripts directory into
the scripts directory of your Egosoft folder.
You will need to bind one hot key in order to use the script.
To do so, go to Options-->Controls (the joystick icon),
and then proceed to the Interface tab.
Scroll all the way to the bottom of the interface tab and you
will see the new command:
1) Match Speed of Targeted
Now, by pressing the "Match Speed" key, you wil set your maximum speed to the current speed of the targeted ship. Note that you may need to press the key again if your opponent changes speed. Also note that the
feature is intelligent enough to slow you down a bit if using it
would cause you to crash into the other guy. That said, hovering is
still risky business!
Un-installation:
To uninstall, run MatchSpeed.Uninstall from the scripts menu.
*******
Thanks to Egosoft and the great X3 Scripting Community, including all those who have answered my questions over the past several months.
Thanks to Red Spot for his tip for improving this script.
Shouts to Nirwin.
Update 2: Can't say this is the world's most popular plugin, but I'll start working on adding in the modifications.
Hello - It's now 2008! Hard to believe I wrote this script a couple of years ago. Well, time marches on. I have added a poll to determine whether you want changes/improvements to this script.
===========================================
Name: Match Speed
Version: V1.1
Author: Desert Eagle
Updated: 6/9/2006
===========================================
Description:
It's a dogfighting aid. It adds a hotkey so that you can quickly
match the speed of your target at close range (0-2K).
It is quite fun to hover ten meters behind your opponent,
just out of reach of his turret, weapons primed.
===========================================
Zip file:
http://www.travisgood.com/MatchSpeed.zip
Cycrow Installer (spk) File:
http://www.travisgood.com/MatchSpeed.spk
At the moment, English language only.
No special requirements. Should be compatible with
every script / mod out there because it doesn't use
any command slots or text files.
A reasonable effort has been made to test this software.
Your feedback is appreciated.
________________________________________________________________
Version History:
1.1 - Based on a tip from Red Spot, rebuilt the script so it only
uses one hot-key instead of two, and doesn't lock the max speed.
1.0 Beta - The first publicly available version was a proof
of concept and had a couple of minor odd behaviors.
________________________________________________________________
Background:
I developed these scripts because I view the 'Match Speed of Target'
command as a standard space genre feature; its absence from
the retail build of X3 is puzzling.
Instructions:
[If you already have version 1.0 installed,
please run the Uninstall script, and then exit X3
before installing 1.1.]
Use Cycrow's installer, or unzip the scripts directory into
the scripts directory of your Egosoft folder.
You will need to bind one hot key in order to use the script.
To do so, go to Options-->Controls (the joystick icon),
and then proceed to the Interface tab.
Scroll all the way to the bottom of the interface tab and you
will see the new command:
1) Match Speed of Targeted
Now, by pressing the "Match Speed" key, you wil set your maximum speed to the current speed of the targeted ship. Note that you may need to press the key again if your opponent changes speed. Also note that the
feature is intelligent enough to slow you down a bit if using it
would cause you to crash into the other guy. That said, hovering is
still risky business!
Un-installation:
To uninstall, run MatchSpeed.Uninstall from the scripts menu.
*******
Thanks to Egosoft and the great X3 Scripting Community, including all those who have answered my questions over the past several months.
Thanks to Red Spot for his tip for improving this script.
Shouts to Nirwin.
Last edited by DesertEagle on Sun, 5. Jun 11, 18:17, edited 11 times in total.
DE you dark horse you!
Fantastic, I was positively baffled by the lack of such a feature too, but it simply NEVER occured to me to make such a feature.
Am I to assume you can assign the command to a mappable key? (edit: d'oh if I had read all of your post before excitedly replying I wouldn't have needed to ask that question, please ignore)
I will certainly try this out tonight.
Thanks
Fantastic, I was positively baffled by the lack of such a feature too, but it simply NEVER occured to me to make such a feature.
Am I to assume you can assign the command to a mappable key? (edit: d'oh if I had read all of your post before excitedly replying I wouldn't have needed to ask that question, please ignore)
I will certainly try this out tonight.
Thanks
just had a looksee at your script ..
nice .. but your forgetting something ..
you do not have to build this into a loop ..
if the player has the AP on and is following something his/her ship will auto. follow at the targets speed ..
so you dont have to do anything there ..
(ooh .. just recalled .. do NOT run this when AP is on ... the result will be that your ship will eventually come to a stop and stays on AP at 0 speed untill you take action ... you can not have 2 'move commands' on 1 ship at the same time ..(perhaps build in a check if 'task 0' is in use))
now when you do not have AP on this can be a very handy tool ..!!
but you would only have to do it once ..
than the players ship will start flying that speed .. and as nothing tells it to speed up again it will stay that speed .. untill the player decides otherwise ..
now if you drop the loop .. you can also drop the 'deactivate' HK ...
G
nice .. but your forgetting something ..
you do not have to build this into a loop ..
if the player has the AP on and is following something his/her ship will auto. follow at the targets speed ..
so you dont have to do anything there ..
(ooh .. just recalled .. do NOT run this when AP is on ... the result will be that your ship will eventually come to a stop and stays on AP at 0 speed untill you take action ... you can not have 2 'move commands' on 1 ship at the same time ..(perhaps build in a check if 'task 0' is in use))
now when you do not have AP on this can be a very handy tool ..!!
but you would only have to do it once ..
than the players ship will start flying that speed .. and as nothing tells it to speed up again it will stay that speed .. untill the player decides otherwise ..
now if you drop the loop .. you can also drop the 'deactivate' HK ...
G
-
- Posts: 117
- Joined: Thu, 2. Feb 06, 05:32
aha! You picked up on the complexity involved with my little hack. What you write sounds good in terms of killing the loop. I'll have a look at modifying the script after work today to see if I can't make the code that much simpler.
Cheers,
DE.
Edit:
Done with updating. Putting up version 1.1. Stable release.
Cheers,
DE.
Edit:
Done with updating. Putting up version 1.1. Stable release.
-
- Posts: 622
- Joined: Mon, 7. Apr 03, 16:29
Just tried this script out (choosing a key for it was hard, everythings in use).
I noticed that you supplied a file with the package that I already had in my scripts directory (x2Scripts.xml or something like that), which was not any different from the version I have, did you add that file to the package in error?
Also, when activating the command, I would often be a couple of m/s off of the targets speed. And in case you think it was because the ship was altering speed, I tried it with a crate that was sitting around in space, it was moving a a speed of 0 and this command set my speed to 2.
However, this problem was not a show stopper and the command would certainly have been good enough for use in a dog fight.
Congrats on the good work.
I noticed that you supplied a file with the package that I already had in my scripts directory (x2Scripts.xml or something like that), which was not any different from the version I have, did you add that file to the package in error?
Also, when activating the command, I would often be a couple of m/s off of the targets speed. And in case you think it was because the ship was altering speed, I tried it with a crate that was sitting around in space, it was moving a a speed of 0 and this command set my speed to 2.
However, this problem was not a show stopper and the command would certainly have been good enough for use in a dog fight.
Congrats on the good work.
-
- Posts: 117
- Joined: Thu, 2. Feb 06, 05:32
Hey there Nirwin,
oops...yes, I used that file to review my scripts. I guess I left it in there by accident; I just replaced the zip package. The speed discrepancy is due to Egosoft's implementation of the 'follow' command. The other way of doing it would fix the max speed of your ship at the max speed of the other craft; it is very precise, but it requires two hotkeys, or two presses of the same hotkey, because it needs to be reset. That's what I changed between beta and release.
I tried a number of different techniques to change the 'follow' behavior, but I think it's hard coded. Fortunately, it's pretty easy to increase your speed just a tad after hitting the button if need be.
If anyone figures out a further workaround, or if you want the version with the more accurate max speed behavior back, let me know. This one works pretty well for my purposes.
Thanks for the feedback! I'm spending some quality time with the debugging library right now.
All the Best,
DE
oops...yes, I used that file to review my scripts. I guess I left it in there by accident; I just replaced the zip package. The speed discrepancy is due to Egosoft's implementation of the 'follow' command. The other way of doing it would fix the max speed of your ship at the max speed of the other craft; it is very precise, but it requires two hotkeys, or two presses of the same hotkey, because it needs to be reset. That's what I changed between beta and release.
I tried a number of different techniques to change the 'follow' behavior, but I think it's hard coded. Fortunately, it's pretty easy to increase your speed just a tad after hitting the button if need be.
If anyone figures out a further workaround, or if you want the version with the more accurate max speed behavior back, let me know. This one works pretty well for my purposes.
Thanks for the feedback! I'm spending some quality time with the debugging library right now.
All the Best,
DE
nirwin wrote:Just tried this script out (choosing a key for it was hard, everythings in use).
I noticed that you supplied a file with the package that I already had in my scripts directory (x2Scripts.xml or something like that), which was not any different from the version I have, did you add that file to the package in error?
Also, when activating the command, I would often be a couple of m/s off of the targets speed. And in case you think it was because the ship was altering speed, I tried it with a crate that was sitting around in space, it was moving a a speed of 0 and this command set my speed to 2.
However, this problem was not a show stopper and the command would certainly have been good enough for use in a dog fight.
Congrats on the good work.
Match Speed of Target:
http://forum2.egosoft.com/viewtopic.php?t=143740
Sector Takeover: http://forum2.egosoft.com/viewtopic.php?t=143524
http://forum2.egosoft.com/viewtopic.php?t=143740
Sector Takeover: http://forum2.egosoft.com/viewtopic.php?t=143524
interesting script. Will have a closer look
So far, just reading it, I think you erm lost something somewhere...
There is no "a.focusmeSTOP" in the zip
So far, just reading it, I think you erm lost something somewhere...
Code: Select all
006 [PLAYERSHIP] -> start task $TaskID with script 'a.focusmeSTOP' and prio 0: arg1=null arg2=null arg3=null arg4=null arg5=null
wondering how to reverse a reversed sleep pattern
My Scripts (English + Deutsch)
I am not impatient. I just live fast
My Scripts (English + Deutsch)
I am not impatient. I just live fast
-
- Posts: 117
- Joined: Thu, 2. Feb 06, 05:32
Hi,
it was in the beta, but not in this version. It is only referenced in the restart script, which gets passed a ref code... so since the ref code isn't passed, that task doesn't get called.
Thanks for looking! And let me know if you find other stuff.
Cheers,
DE
it was in the beta, but not in this version. It is only referenced in the restart script, which gets passed a ref code... so since the ref code isn't passed, that task doesn't get called.
Thanks for looking! And let me know if you find other stuff.
Cheers,
DE
Match Speed of Target:
http://forum2.egosoft.com/viewtopic.php?t=143740
Sector Takeover: http://forum2.egosoft.com/viewtopic.php?t=143524
http://forum2.egosoft.com/viewtopic.php?t=143740
Sector Takeover: http://forum2.egosoft.com/viewtopic.php?t=143524
-
- Posts: 36
- Joined: Thu, 29. Nov 07, 18:58
-
- Posts: 117
- Joined: Thu, 2. Feb 06, 05:32
Should I update the script?
Hey,
I noticed your message. It has been awhile since I've been on these forums. Is this a desired behavior - matching speed / angle of rotation with target?
If so, then I can definitely think of a way to implement it. I'll put a poll up on the page.
Cheers,
DE
aka
T. Good
I noticed your message. It has been awhile since I've been on these forums. Is this a desired behavior - matching speed / angle of rotation with target?
If so, then I can definitely think of a way to implement it. I'll put a poll up on the page.
Cheers,
DE
aka
T. Good
Match Speed of Target:
http://forum2.egosoft.com/viewtopic.php?t=143740
Sector Takeover: http://forum2.egosoft.com/viewtopic.php?t=143524
http://forum2.egosoft.com/viewtopic.php?t=143740
Sector Takeover: http://forum2.egosoft.com/viewtopic.php?t=143524