[Script] JMCorp Auto Freight Scanner V5 - Updated 02/September/2007

The place to discuss scripting and game modifications for X³: Reunion.

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

JMCorp
Posts: 1422
Joined: Thu, 21. Apr 05, 21:48
x4

[Script] JMCorp Auto Freight Scanner V5 - Updated 02/September/2007

Post by JMCorp » Sun, 22. Jul 07, 21:43

JMCorp Auto Freight Scanner
Version 5
By JMCorp
Created 22/July/2007
Updated 02/September/2007


Description:

This package, brought to you by JMCorp research and development, allows for the automatic scanning of nearby ships to reveal pirates. If you have the special command software and a freight scanner on any ship, it may activate the software from the ship's Additional Ship Commands menu. Software will only scan ships if you have a license for the racial owner of the sector in which the scanning ship is in. This software goes excellently with any patrol software.




*Instructions*
Both versions are included, plain script files, and cycrow installer.

Download the file using save, to you my documents folder. Use a zip program, such as alzip to un zip the zip file into it's component parts. You will get an SPK file (cycrow installer) and three directories, the scripts, t, and readme directories. Copy these into the root of your X3 folder or use the cycrow installer.

from the Additional Ship commands menu, select activate or deactivate auto scanner. press once to activate, and once to de-activate.

*Attention* Version 5
Bug where the scanner couldn't be stopped should be fixed.
Changed the way the pirate scanner works. Now you start the regular scanner and the pirate hotkey is a toggle that disables the license check.
Commented the code a little better
Fixed the description on one of the scripts that had been copied from a different set of scripts.
Using the hotkey always starts the script in the second additional command slot. slot 11

*Attention* Version 4
Added hotkey for standard legal scanner
Added hotkey for pirate version scanner
I am pretty sure I got that pesky crash bug this time! (or maybe it was a different one)

As noted above, there is now a pirate version of the scanner available only through the hotkey. It will allow the player ship to flag all nearby ships as scanned. It will still uncover your fellow pirates! Also it will severely irritate any "friendly" ships nearby and you WILL lose rep.


*Attention* Version 3

Fix for crash bug! update immediately please.
If you kill a ship after it gets added to the list of ships to scan but before it is scanned, the script was trying to scan a null ship and it would crash the game! This is fixed.


*Attention* Version 2

Now with XTM support
changed T file to 7550
changes slot to 1247
silent version discontinued!
now under additional ship commands so it does not interrupt your current patrols!

JMCorp Auto Freight Scanner - Mirror (both plain scripts and cycrow package)

This link is for removing a crashing freight scanner on the player ship.
EndTask!
Last edited by JMCorp on Wed, 5. Sep 07, 03:07, edited 11 times in total.

HotFusion
Posts: 21
Joined: Sun, 8. Jan 06, 10:34
x3

Post by HotFusion » Sun, 22. Jul 07, 23:27

Nice! To think that I only asked about this script yesterday! A+ for fast servi ce!

It looks like the readme didn't get included in the zip archive. Nonetheless, I was able to get the software working by following the instructions in your post. So far, it has faithfully enabled the "freight" option on every ship that has passed within 4 km. I had some fun using a cheat script to plant spaceweed on police ships and them busting them for smuggling.

This drastically reduces the button clicking needed to perform a comprehensive sweep of a sector. Plot a course between the two main gates that commercial traffic is using, and then quickly review who's carrying what by using the page keys.

One suggestion: could you include some kind of notification when contraband is discovered? Even a simple warning tone would work fine. This would reduce the button clicks to almost nothing.

JMCorp
Posts: 1422
Joined: Thu, 21. Apr 05, 21:48
x4

Post by JMCorp » Mon, 23. Jul 07, 00:24

ok, dont say i didnt warn you though. i placed another version up for download that beeps when it finds illegal goods. it would drive me nuts i think because of how fast it sweeps nearby ships.

HotFusion
Posts: 21
Joined: Sun, 8. Jan 06, 10:34
x3

Post by HotFusion » Mon, 23. Jul 07, 01:13

I think I found a bug.

I keep getting mysterious "personal log" entries in my e-mail whenever this thing is turned on. Lots of mysterious entries. As in one every few seconds. If you've been running the scanner for awhile, the game will actually hang for a minute or two as it tries to process all of these new messages.

The full content of each message is as follows:

1



What does my mystery correspondant mean by this? Does the numeral one represent the loneliness he or she feels in the vastness of space? Is it a romantic overture (as in, you are the "1" for me)? Is it an AI counting up to infinity in binary numerals, going up by powers of 2?

Your readme made me laugh. While you might think that the beeping is ill-advised, I found it to be very helpful for identifying those smuggglers that don't turn pirate. The fact the it doesn't stop until you deal with the smuggler just gives you extra incentive to enforce the law.

The script is pretty robust. I was afraid that after a ship had been flagged as "scanned" that the script would stop tracking it. Nope. I tried scripting some contraband into a ship that I had just finished checking, and the beepy-beep-beep-beepy-oh-god-make-it-stop-open-the-comm-beep-beep-surrender -your-friggin-freight-now-oh-please-do-it-now-beep-beep-beepy

JMCorp
Posts: 1422
Joined: Thu, 21. Apr 05, 21:48
x4

Post by JMCorp » Mon, 23. Jul 07, 01:22

oops. hang on that's a stray debug message... lemme fix that.

JMCorp
Posts: 1422
Joined: Thu, 21. Apr 05, 21:48
x4

Post by JMCorp » Mon, 23. Jul 07, 02:22

the extra 1 in the message log has been fixed. download available.

sphr
Posts: 119
Joined: Tue, 15. Aug 06, 17:16
x4

Post by sphr » Mon, 23. Jul 07, 04:11

Just a question before downloading it later...

If it uses the piracy menu, does it mean it runs on task 1? (or the primary task, if I am wrong about the number)

If so, would it be possible to move it to a ship slot instead, such that the primary task can still be any standard or user patrol, or even the player ship itself doing other stuff? The freight scanning can be done at lower priority with a longer period to "simulate" the time to scan and process (also to prevent overloading CPU if ships are policing a lot of sectors, or turning all smugglers red together)

Just my suggestion :)
Now.... maybe those patrols I invest heavily into can finally earn some money to pay partly for their missiles/energy cells ;)

JMCorp
Posts: 1422
Joined: Thu, 21. Apr 05, 21:48
x4

Post by JMCorp » Mon, 23. Jul 07, 04:56

it doesnt run on task 0, the main task, after it starts, but it does interrupt the main task to start. you just have to re-init your patrol after you start the freight scanner. i know this is a hassle, but i dont know any way around it right now, and it's not that big a deal imo.

JMCorp
Posts: 1422
Joined: Thu, 21. Apr 05, 21:48
x4

Post by JMCorp » Wed, 25. Jul 07, 04:37

updated with XTM support and moved it to Additional ship commands to stop it interrupting task 0.

Akula87
Posts: 435
Joined: Sat, 23. Dec 06, 03:42

Post by Akula87 » Wed, 25. Jul 07, 06:18

I can't download it from your mirror.... any suggestions?

JMCorp
Posts: 1422
Joined: Thu, 21. Apr 05, 21:48
x4

Post by JMCorp » Wed, 25. Jul 07, 06:24

my appologies! link should be fixed now. let me know if you're still having issues.

Akula87
Posts: 435
Joined: Sat, 23. Dec 06, 03:42

Post by Akula87 » Wed, 25. Jul 07, 06:47

If I try to open it I get the following error " Cannot open C:\ Documents and Settings\ Garrett Craft \ Local Settings \ Temporary Internet Files \ Content IE5 \ J6CJR90T \ AFS V3 [1].zip" and if I try to save it to a folder it dosen't show up when I try to load it using the script installer...

JMCorp
Posts: 1422
Joined: Thu, 21. Apr 05, 21:48
x4

Post by JMCorp » Wed, 25. Jul 07, 15:15

Download the file using save, to you my documents folder. Use a zip program, such as alzip to un zip the zip file into it's component parts. You will get an SPK file (cycrow installer) and three directories, the scripts, t, and readme directories. Copy these into the root of your X3 folder or use the cycrow installer.

the error cannot open c:\......\afs v3[1].zip is a problem with your internet explorer, and it's sadly something i cant help with. This happens if you tell it to open instead of save from the download box.

Buck_Rogers
Posts: 1521
Joined: Mon, 20. Dec 04, 23:23
x3

Post by Buck_Rogers » Tue, 14. Aug 07, 14:13

hi JM. i wonder if you can help me?

ive had some problems with my game after installing this script

ok 1st off when i activated the script, i was in Ore Belt (i do have Argon licence) that worked fine. i then jumped to a split sector - Family Pride (i dont have a Split licence) the screen went black after the jump and remained like that. i waited about 10 minutes and still nothing. so i removed it from the script installer and reloaded it from my Ore Belt save. this seemed to cure the problem.

however. i would really like to use this script as it would save the hassle of manual scanning of passing ships. so i tried again to install it. this time when i load up i get a couple of seconds at most of movement then the game completely freezes up. ive tried waiting 10 minutes to see if it would sort itself out. that didnt work though. i tried loading the 2 saves i now had. 1 in Heretics End and the other in Paranid Prime, with the same results. so i removed it again. however this did not solve the problem this time as it still keeps freezing.

i have a feelin the problem is due to me not having the police licences for all of the races. as so far i only have the Teladi and Argon licences, but i dont have anymore saves with me in these sectors. so i may have to start again :(

unless you can shed some light on this?

thanks in advance
Buck Rogers

Vice Admiral of Shadows Haven Alliance (SHA) visit us at:
SHA Forum
Feel free to join my DID
Too often we lose sight of life's simple pleasures. Remember, when someone annoys you, it takes 42 muscles in your face to frown. But only 4 to extend your arm and slap the bugger!

JMCorp
Posts: 1422
Joined: Thu, 21. Apr 05, 21:48
x4

Post by JMCorp » Tue, 14. Aug 07, 17:52

Maverick01 wrote:hi JM. i wonder if you can help me?

ive had some problems with my game after installing this script

ok 1st off when i activated the script, i was in Ore Belt (i do have Argon licence) that worked fine. i then jumped to a split sector - Family Pride (i dont have a Split licence) the screen went black after the jump and remained like that. i waited about 10 minutes and still nothing. so i removed it from the script installer and reloaded it from my Ore Belt save. this seemed to cure the problem.

however. i would really like to use this script as it would save the hassle of manual scanning of passing ships. so i tried again to install it. this time when i load up i get a couple of seconds at most of movement then the game completely freezes up. ive tried waiting 10 minutes to see if it would sort itself out. that didnt work though. i tried loading the 2 saves i now had. 1 in Heretics End and the other in Paranid Prime, with the same results. so i removed it again. however this did not solve the problem this time as it still keeps freezing.

i have a feelin the problem is due to me not having the police licences for all of the races. as so far i only have the Teladi and Argon licences, but i dont have anymore saves with me in these sectors. so i may have to start again :(

unless you can shed some light on this?

thanks in advance
if you can get it to load even for a minute, load the game and immediately go into your ship command console and turn off the scanner. then use filebeam to upload your save game and post your link here. i'll take it and look at it when i get a chance today. i had noticed some similar behavior in a previous game myself but had thought it was another mod. thanks!

Buck_Rogers
Posts: 1521
Joined: Mon, 20. Dec 04, 23:23
x3

Post by Buck_Rogers » Wed, 15. Aug 07, 12:09

ok ill try and see what happens. although i doubt ill be able to switch it off in time as i only get about 3-5 seconds before it freezes up on me :(
Buck Rogers

Vice Admiral of Shadows Haven Alliance (SHA) visit us at:
SHA Forum
Feel free to join my DID
Too often we lose sight of life's simple pleasures. Remember, when someone annoys you, it takes 42 muscles in your face to frown. But only 4 to extend your arm and slap the bugger!

JMCorp
Posts: 1422
Joined: Thu, 21. Apr 05, 21:48
x4

Post by JMCorp » Wed, 15. Aug 07, 15:21

in the original post i added a link to a script that will kill all running processes on the player ship up to 1000 as the game loads. that will stop the freight scanner from running on your ship and crashing your game.

setup.JMC.EndTask
JMC.EndTasks

add the two scripts to your script folder, load your game and then go save it at a station. then go remove the scripts again to prevent them from killing all the running tasks on your ship every time you load a game!

i'm working on a new version of the freight scanner now. i think i figured out at least part of the lockup problem, and it has not happened again on my test system. though it was happening very rarely for me anyway. Sorry for the inconvenience friends!

JMCorp
Posts: 1422
Joined: Thu, 21. Apr 05, 21:48
x4

Post by JMCorp » Wed, 15. Aug 07, 22:29

Version 4 is out, see original post for updates.

i think i got your crash bug from the licenses.

There was a logic flaw in the way i was checking licenses. Or i should say in the way the scripts work because it should have worked the way i had it. But i've learned that not everything works in the script engine, elseif/else/end seems to be one of the broken things.

Buck_Rogers
Posts: 1521
Joined: Mon, 20. Dec 04, 23:23
x3

Post by Buck_Rogers » Thu, 16. Aug 07, 16:06

cheers JM!

ill give it a bash as soon as i can and let you know if it works. fingers crossed! :)
Buck Rogers

Vice Admiral of Shadows Haven Alliance (SHA) visit us at:
SHA Forum
Feel free to join my DID
Too often we lose sight of life's simple pleasures. Remember, when someone annoys you, it takes 42 muscles in your face to frown. But only 4 to extend your arm and slap the bugger!

Buck_Rogers
Posts: 1521
Joined: Mon, 20. Dec 04, 23:23
x3

Post by Buck_Rogers » Mon, 20. Aug 07, 12:30

JM:

i think it works now. i tested it yesterday and it seemed ok. even when i ran it and jumped to a sector that i didnt have a licence for. although i didnt try the pirate scanner :wink:

also. how do you know if its working? i tryed sitting near a gate that led to a pirate sector with the script running, but didnt turn up any pirate vessels?

just a couple of things though:

once you assign the hot key to activate the non-pirate scanner, you get the computer saying "autopilot activated". however when you press it again to switch it off, it doesnt switch off. the computer says "autopilot activated" again and the script remains active in the extra command slots on the ship. the only way to switch it off was to go to the slot and choose none.

a few suggestions:

maybe change the activating sound to something else?
fix the toggle hot key so you can switch it off if you like?
add a deactivation sound?
Buck Rogers

Vice Admiral of Shadows Haven Alliance (SHA) visit us at:
SHA Forum
Feel free to join my DID
Too often we lose sight of life's simple pleasures. Remember, when someone annoys you, it takes 42 muscles in your face to frown. But only 4 to extend your arm and slap the bugger!

Post Reply

Return to “X³: Reunion - Scripts and Modding”