Forums » Community Projects

Cargolist Redux

12»
Jan 20, 2013 Keller link
This is a complete reimagining of Mick's Cargolist plugin which I was given permission to rewrite. It was originally developed some 2.5 years ago, but is now being made public due to popular request. (not to mention that it's become a cult classic for newbie distribution by EMS)

Cargolist is smoother, faster, runs in the background, and has many many options for scanning cargo drops in the current sector within radar range. Users can define "Scan Sets" which will scan for specific cargo items or classes of item. There are 3 different targeting policies following a scan: Switching back to the original target, switching to the first target of the newly scanned set, and a mode which scans until it finds an item fitting the set, then stops which make scans quicker at the expense of not getting the full set upon completion. All scan sets can have an optional key bind set for them, making scanning easy with a single key press. All defined scan sets have user commands dynamically defined for them, so rigging a command to a bind series or to a flightstick button is a breeze.

It's fully cooperative with Targetless, so there are no issues having both plugins installed.

Cargolist features a popup list like the original, but also features an in HUD list which intelligently displays and hides. To place, just switch on the display (type /cargolist options and click the HUD display), then open the popup (by typing /cargolist or by using a key bind you've set) and positioning the popup. The HUD display will appear in the same position.

Feel free to download and experiment.

Download Here
Jan 20, 2013 meridian link
Link is broken. Add .zip to the end
Jan 20, 2013 Pup link
Cool thanks, I'll give it a whirl.
Jan 20, 2013 Keller link
Nice catch Meridian. Shouldn't be posting when exhausted. Leads to errors.
Jan 21, 2013 meridian link
I found a few bugs with this plugin:
1) Should not allow creating a scan set with blank name. If a set with blank name is created, it cannot be deleted.

2) I did a scan then manually selected an item with presses of /NextDropItem, but as soon as I selected it, it disappeared from the list. It was still set as my target so I was able to find it despite no longer being on the list.

3) Whenever I perform a scan with /DropScan_All it changes the active scan set to All. It would be nice if it scanned all while preserving the scan set setting so that doing /DropScan after /DropScan_All uses the scan set that was previously selected.

4) Seems to miss some items occasionally that should be detected with the active scan set. Probably caused by /NextNearestPowerup being buggy rather than your plugin.

5) Seemed to cause lag after several uses, even after the scan had completed. I don't think I will be using this plug-in unless that can be fixed or mitigated somehow.

6) In-game help is very hard to read and must be outdated because it doesn't mention what some options do. You cannot use escape characters inside text denoted with double brackets [[]]. Use actual tab characters and carriage returns instead.
Jan 22, 2013 Keller link
I'll take a look.

1) Definitely a bug. Some defense code will fix that.

2) I'll have to try to recreate the bug as you're describing. Normally, I use CL in autoadvance mode and experience no problems.

3) This is by design actually. CL generates user commands for each scan set for convenience. I'll take a look to see if it's not going to break things.

4) CL doesn't use NextNearestPowerup or PreviousNearestPowerup anymore. These functions were extremely buggy, and the problem couldn't be mitigated even after many months of fiddling. What it does is to start at the bottom of the sector item list and scan upwards until it reaches either a ship or an asteroid. Dropped cargo should be on the bottom of this list. What I noticed when things seem to be getting missed is using overly ambitious or overly simplistic strings for matching against the cargo drops. It took me a little while to get the right balance. Not sure how better to explain that.

5) I've never encountered this problem, and I use this plugin constantly. Could you be more specific so I can try to recreate what you're seeing? Under what conditions were you scanning? How many constitutes "several"? If this is actually a problem and can be fixed, I'll fix it.

6) Valid point. It probably does need cleaning up. I'd experimented with it when it was done (some 2 years ago), but continued adding some features. CL likely needs a user manual too.
Jan 22, 2013 TCrusader20 link
Are you updating the download link as u make changes?
Jan 22, 2013 Keller link
I will be updating the link. Yes. On the PA website, I just attach the file to the post, but that's not possible here, so I update links. RL takes up a lot more of my time than you guys. I simply can't get to things immediately.

The fact is that despite the exhortations of some, the plugin is stable. If abused (like doing something inane as trying to set a scan set item to a blank, although that really IS an overlooked bug), any plugin is going to misbehave.

I've used it for 2.5 years without issues. I use CL with key binds and in autoadvance mode. While all the user commands were provided as a convenience, I personally don't use them.
Jan 23, 2013 Crusader8389 link
lol I wasn't trying to insinuate anything so I'm sorry if you read that into the message. I look forward to testing your new plugin as yesterday I died 2 times to the old cargolist lag!
Jan 23, 2013 Keller link
Wasn't feeling insulted. At the end of a long day, people can get a little grumpy; I apologize if I came across torqued.

The only thing to remember even with this plugin is that I still have to use the radar object to perform the scanning. That scan is run in a separate thread, so you won't experience the kind of "Blast, I have no control" kind of thing, but there will be a second or 2 when you can't lock onto anything while it's running. One thing on my list of TODOs for CL (which fortunately is very short atm) is to experiment with fully background scanning. CL already does some of this when it's updating distances in the displays. The problem however is for full scanning, I have to get a hold of the item ID (which changes constantly), and right now that's only possible through the radar object. Sadly, we don't have the equivalent of ForEachPlayer for item drops (although I've asked for one several times), which forces any scanner plugin to kludge its way through the scan.

1 other thing: while I consider it a bug, it's really only a nuisance. When in autoadvance mode (which will advance to the next scanned item in the list when you pick up the currently targeted item), if there are a lot of items with the same name in a row, sometimes CL will clear more than one item from the list when picking one up. Nothing was lost, just a quick rescan (which is why key binds are so useful) will pick everything up again.
Jan 24, 2013 vskye link
Thanks for the update! Much faster than the original. :)
Jan 24, 2013 Crusader8389 link
yea I'd say like 10x faster! also better interface, presorted by name, etc
Jan 25, 2013 Keller link
You can presort by distance too. That's always my favorite.
Jan 26, 2013 Crusader8389 link
Just to report, I got an error while turboing in a sector of bots and cargo. I didn't get a chance to read it and give you any useful info besides that because of said bots. It happened about 2 times out of 10, and I could simply click refresh again to get the list so it didn't seem to affect anything. But then again I was using it in a very stressful situation for the plugin because I know its very hard to get it to work at any speed because of the changing distances, let alone at 100m/s+
Jan 27, 2013 Keller link
Thanks. If you get the error message again, just go back into your errors.log file (in the root of the VO install folder) and find the error. All Lua errors are recorded there. I'll also see if I can recreate it on my own. CL was redesigned to make it easier to do salvage during stressful situations, so I try to be very sensitive to such things. Sometimes the radar object itself gets a little flaky under certain circumstances; if it comes down to that, we're likely stuck with living with it, but it doesn't hurt to see if we can code around it, eh? ;)
Jan 27, 2013 Crusader8389 link
Ah thanks forgot about that little number, also records the chat which is very handy :O. I used to save it every time I quit the game but then the laziness kicked in lol
Feb 15, 2013 greenwall link
wow a cargolist update! I should check this forum more often...
Jun 11, 2013 zak.wilson link
This thread has a high probability of remaining relevant. I have nothing to add, but the devs insist on autolocking threads when they haven't had a reply in a while, so I'm replying.
Jun 13, 2013 Keller link
I've fixed the reported bug about spaces. I haven't yet gotten to the feature request for creating a suite of commands which run the scan but don't switch the result to the active set. I'm thinking about that one. Probably will add it. Just not completely seeing the need for it yet, but it's not going to create problems by adding it.
Nov 05, 2013 Keller link
Bump. RL was kicking my butt for months. I'm starting to return to game and dusting off the TODO list for my supported plugins. I'll try to make an update for Cargolist soon which will include some bug fixes and some requested features.