EnglishGermanFrenchRussianPolishItalianSpanish
Log inRegister
 
Hotkey: Scan Target Asteroid or Ship (v1.2) (28/04/2009)
Post new topic Reply to topic
View previous topic :: View next topic
Author Message
clevider





Joined: 13 Feb 2008
Posts: 336 on topic
Location: Oregon, USA
Thank you for registering your game
modified
PostPosted: Sat, 8. Nov 08, 12:12    Post subject: Hotkey: Scan Target Asteroid or Ship (v1.2) (28/04/2009) Reply with quote Print

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 Wink


**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


_________________
"I'm not a pirate, I'm a privateer. Pirates destroy ships and take the contents, whereas privateers destroy ships and take the contents. It's a subtle distinction, I grant you, but it is important."

-- Sir Francis Drake appearing on Larry King Live (History Bites)


Last edited by clevider on Wed, 29. Apr 09, 06:42; edited 2 times in total
Back to top
View user's profile Send private message
Tiedyeguy





Joined: 16 Feb 2004
Posts: 1123 on topic

Thank you for registering your game
PostPosted: Thu, 20. Nov 08, 01:53    Post subject: Re: Hotkey: Scan Target Asteroid or Ship (v1.1) Reply with quote Print

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.
Realistically, another good work around for small asteroids is the "old fashioned" way: Target, 'i', *enter*, *enter*.

Back to top
View user's profile Send private message
clevider





Joined: 13 Feb 2008
Posts: 336 on topic
Location: Oregon, USA
Thank you for registering your game
modified
PostPosted: Thu, 20. Nov 08, 02:32    Post subject: Reply with quote Print

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?


_________________
"I'm not a pirate, I'm a privateer. Pirates destroy ships and take the contents, whereas privateers destroy ships and take the contents. It's a subtle distinction, I grant you, but it is important."

-- Sir Francis Drake appearing on Larry King Live (History Bites)


Last edited by clevider on Thu, 20. Nov 08, 21:11; edited 1 time in total
Back to top
View user's profile Send private message
Graxster





Joined: 14 Oct 2006
Posts: 814 on topic

Thank you for registering your game
PostPosted: Thu, 20. Nov 08, 07:24    Post subject: Reply with quote Print

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?


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:

Code:
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


I suppose that's cheating tho, lol.

-Grax

Back to top
View user's profile Send private message
clevider





Joined: 13 Feb 2008
Posts: 336 on topic
Location: Oregon, USA
Thank you for registering your game
PostPosted: Thu, 20. Nov 08, 22:55    Post subject: Reply with quote Print

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'm not a pirate, I'm a privateer. Pirates destroy ships and take the contents, whereas privateers destroy ships and take the contents. It's a subtle distinction, I grant you, but it is important."

-- Sir Francis Drake appearing on Larry King Live (History Bites)
Back to top
View user's profile Send private message
angrysquirrel





Joined: 18 Nov 2003
Posts: 266 on topic

Thank you for registering your game
PostPosted: Sun, 23. Nov 08, 09:30    Post subject: Reply with quote Print

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?t=185633&highlight=autoscanner


You could make another scanner to do that for minerals. Just fly by the rock and it gets scanned.

Back to top
View user's profile Send private message
clevider





Joined: 13 Feb 2008
Posts: 336 on topic
Location: Oregon, USA
Thank you for registering your game
PostPosted: Sun, 23. Nov 08, 18:54    Post subject: Reply with quote Print

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...


_________________
"I'm not a pirate, I'm a privateer. Pirates destroy ships and take the contents, whereas privateers destroy ships and take the contents. It's a subtle distinction, I grant you, but it is important."

-- Sir Francis Drake appearing on Larry King Live (History Bites)
Back to top
View user's profile Send private message
jiunejai





Joined: 04 Mar 2011



PostPosted: Sun, 5. Jun 11, 14:21    Post subject: Reply with quote Print

How about auto rename the target ship that player scaned to add "(Scaned)" behind it's original ship name?

as:

Terran food transporter => Terran food transporter (Scaned)

I think that will be helpful during Freight Scan Mission to find which ship player haven't scan yet.

Back to top
View user's profile Send private message
Gazz





Joined: 13 Jan 2006
Posts: 12407 on topic
Location: Bavaria
Thank you for registering your game
PostPosted: Sun, 5. Jun 11, 14:37    Post subject: Reply with quote Print

Since the scripter hasn't been around this year you might have more luck changing the script yourself.


_________________
My complete script download page. . . . . . Xai-Corp MSCI List is scripter's friend. I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.
Back to top
View user's profile Send private message Visit poster's website
jiunejai





Joined: 04 Mar 2011



PostPosted: Tue, 7. Jun 11, 14:12    Post subject: Reply with quote Print

Oooooohhhhhh!Nnnnnnoooooo!!!

It's unlucky to me, really.
I have no idea that how to write a script at all.
I can't even read the script since I don't know any script command stands for.

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic Reply to topic
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum
Control Panel
Login Data
The time now is Thu, 19. Oct 17, 11:06

All times are GMT + 2 Hours


Board Security

Copyright © EGOSOFT 1989-2017
Powered by phpBB © 2001, 2005 phpBB Group
Template created by Avatar & BurnIt!
Debug: page generation = 0.44021 seconds, sql queries = 24