Hotkey: Scan Target Asteroid or Ship (v1.2) (28/04/2009)
Moderators: Moderators for English X Forum, Scripting / Modding Moderators
Hotkey: Scan Target Asteroid or Ship (v1.2) (28/04/2009)
Scan Target Asteroid or Ship (v1.2)
Download from www.xai-corp.net
What it does
This script creates a hotkey which will cause the targeted asteroid or ship to be scanned (provided the relevant scanner is installed and the object is within scanner range). If you use the hotkey to scan an asteroid, its resource type and yield will be displayed at the bottom of the screen. For ships, a message specifying whether the contents are legal or illegal is displayed. A warning is displayed if an illegal scan is about to take place. To scan anyway, press the hotkey again within 2 seconds.
What it does not do
-The ship information screen will not be opened since the purpose of script is purely to scan for illegal wares
-Automate the search for and scanning of asteroids. There are already one or two scripts by other people for that. This is simply a hotkey for use in the ship you're currently piloting.
-Asteroid chunks and rocks (i.e., those not appearing on the gravidar or the sector map) apparently can't be scanned until something has hit them (like a laser). Until then, the game will tell the script that nothing is targeted and you'll get the "Invalid object" message. A simple work-around is to shoot the rock once. Then you'll be able to scan it. This will be corrected in a later version if I find out how.
Installing/Removing
-Install and remove using Cycrow's X-Universe Plugin Manager
-Instructions for running a script to unregister the hotkey (optional) are included in the readme. Just remember to run it BEFORE you uninstall the script
**Change Log**
v1.2
--No longer asks for confirmation if scanning in a sector from whose owner a license is not available (Pirates, Xenon, etc.). My understanding is that these scans are automatically legal in the sense that there isn't any rep loss for scanning without a license in such sectors. In X3R any ship scanned in a pirate sector might turn hostile. I don't know whether this occurs in X3TC.
V1.1
--Added warning when scanning ships w/o a license
--Removed some debugging code I had missed last time
Additional Credit
-Cycrow: for the X-Universe Plugin Manager, his basic scripting guides (here), and some details on the ship-scanning cmd
-s9ilent: for explaining how to find and trigger sound events
-The Xai Corporation: for hosting scripts and their online version of the MSCI-Handbook
-Egosoft: for creating the whole X Universe
Download from www.xai-corp.net
What it does
This script creates a hotkey which will cause the targeted asteroid or ship to be scanned (provided the relevant scanner is installed and the object is within scanner range). If you use the hotkey to scan an asteroid, its resource type and yield will be displayed at the bottom of the screen. For ships, a message specifying whether the contents are legal or illegal is displayed. A warning is displayed if an illegal scan is about to take place. To scan anyway, press the hotkey again within 2 seconds.
What it does not do
-The ship information screen will not be opened since the purpose of script is purely to scan for illegal wares
-Automate the search for and scanning of asteroids. There are already one or two scripts by other people for that. This is simply a hotkey for use in the ship you're currently piloting.
-Asteroid chunks and rocks (i.e., those not appearing on the gravidar or the sector map) apparently can't be scanned until something has hit them (like a laser). Until then, the game will tell the script that nothing is targeted and you'll get the "Invalid object" message. A simple work-around is to shoot the rock once. Then you'll be able to scan it. This will be corrected in a later version if I find out how.
Installing/Removing
-Install and remove using Cycrow's X-Universe Plugin Manager
-Instructions for running a script to unregister the hotkey (optional) are included in the readme. Just remember to run it BEFORE you uninstall the script
**Change Log**
v1.2
--No longer asks for confirmation if scanning in a sector from whose owner a license is not available (Pirates, Xenon, etc.). My understanding is that these scans are automatically legal in the sense that there isn't any rep loss for scanning without a license in such sectors. In X3R any ship scanned in a pirate sector might turn hostile. I don't know whether this occurs in X3TC.
V1.1
--Added warning when scanning ships w/o a license
--Removed some debugging code I had missed last time
Additional Credit
-Cycrow: for the X-Universe Plugin Manager, his basic scripting guides (here), and some details on the ship-scanning cmd
-s9ilent: for explaining how to find and trigger sound events
-The Xai Corporation: for hosting scripts and their online version of the MSCI-Handbook
-Egosoft: for creating the whole X Universe
Last edited by clevider on Wed, 29. Apr 09, 06:42, edited 2 times in total.
//-- ...Signature line decrypting: 1%... --\\
Re: Hotkey: Scan Target Asteroid or Ship (v1.1)
Realistically, another good work around for small asteroids is the "old fashioned" way: Target, 'i', *enter*, *enter*.clevider wrote:Scan Target Asteroid or Ship (v1.1)
Download from www.xai-corp.net
Limitations
-Asteroid chunks and rocks (i.e., those not appearing on the gravidar or the sector map) apparently can't be scanned until something has hit them. Until then, the game will tell the script that nothing is targeted and you'll get the "Invalid object" message. A simple work-around is to shoot the rock at least once. Then you'll be able to scan it. This will be corrected in a later version if I find out how.
I'd noticed that hitting 'i' popped a little description next to the target button on the sidebar, but hitting <enter> afterwards doesn't do anything in my game unless it's a full-sized asteroid (in which case it scans). For rocks, the box shows the resource type, but not the yield and this behavior is the same whether the rock has been scanned or not.
Actually, it's just occurred to me that without this hotkey I don't have any way of scanning debris. Is this just me?
Actually, it's just occurred to me that without this hotkey I don't have any way of scanning debris. Is this just me?
Last edited by clevider on Thu, 20. Nov 08, 20:11, edited 1 time in total.
//-- ...Signature line decrypting: 1%... --\\
Not sure, since I deleted all the debris out of my game. I *did* use a script to reveal all the debris content previously tho. Like so:clevider wrote:Actually, it's just occurred to me that without this hotkey I don't have any way of scanning debris. Is this just me?
Code: Select all
Arguments
sec , Var/Sector , 'Select a Sector'
001 $array.debris = find debris: sector=$sec resource=null min yield=null flags=[Find.Multiple] refobj=null num=9999 max distance=null refpos=null
002 $n = size of array $array.debris
003 while $n
004 |dec $n =
005 |$rock = $array.debris[$n]
006 |$rock -> set asteroid scanned to [TRUE]
007 end
008 return null
-Grax
Graxster, it was worth a shot but apparently neither getting the debris array nor setting them to "scanned" makes the rocks become "active" and with "get player tracking aim" returning NULL for inactive objects, I can't tell which rock in the array is the right one. Also, since the player (maybe just me? I'm still unclear on that) can't view debris yield through the game interface (i.e, by pressing 'i'), having scanned the object doesn't do them any good.
I think I'm going to post this problem in the Generic Questions thread. That seems like a more appropriate place... If I'm misunderstanding something or if anyone has any more ideas, I'd sure like to hear them though.
I think I'm going to post this problem in the Generic Questions thread. That seems like a more appropriate place... If I'm misunderstanding something or if anyone has any more ideas, I'd sure like to hear them though.
//-- ...Signature line decrypting: 1%... --\\
-
- Posts: 267
- Joined: Tue, 18. Nov 03, 00:46
Hi Clevidar!
I like your script! One thing I think would be a great addition though would be to make two scripts that autoscan the target.
So, you install the autoscanner for illegal wares and once its installed (you can use a hotkey toggle to turn it on or off) you don't have to keep pressing a key to scan the target.
Here is one I used to use for X3
JMCorp Auto Freight Scanner
http://forum.egosoft.com/viewtopic.php? ... utoscanner
You could make another scanner to do that for minerals. Just fly by the rock and it gets scanned.
I like your script! One thing I think would be a great addition though would be to make two scripts that autoscan the target.
So, you install the autoscanner for illegal wares and once its installed (you can use a hotkey toggle to turn it on or off) you don't have to keep pressing a key to scan the target.
Here is one I used to use for X3
JMCorp Auto Freight Scanner
http://forum.egosoft.com/viewtopic.php? ... utoscanner
You could make another scanner to do that for minerals. Just fly by the rock and it gets scanned.
That's an interesting idea, angrysquirrel, but since this is my first script it'll be a while before I've learned how to write (and debug) an expanded script like that. It's something to work toward, at least.
It did give me an idea on how to somewhat ameliorate the can't-scan-smaller-rocks-without-shooting-them-first bug, however...
It did give me an idea on how to somewhat ameliorate the can't-scan-smaller-rocks-without-shooting-them-first bug, however...
//-- ...Signature line decrypting: 1%... --\\
Since the scripter hasn't been around this year you might have more luck changing the script yourself.
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.
There is no sense crying over every mistake. You just keep on trying till you run out of cake.