Page 1 of 1

Scoop Restrictions

Posted: Sat Mar 09, 2013 6:55 pm
by Paradox
Proposal: The ability to restrict items that can be scooped by a ship.
Purpose: This would allow role specific player/npc ships.

For example, I wanted to design a small, fast, bounty hunter ship, with the ability to capture say 3-5 fugitives at a time. This however forces me to have a ship capable of containing 3-5 cargo holds... a much bigger ship than I want. But, by restricting what can be scooped, and limiting the ship to lifepods/escapepods, it can be said those 3-5 holds are merely "cells" (assuming the pods being dumped after retrieval of course }:]). The ship can remain comparatively small, and believable, and keeps the pilots from "accidently" scooping up a couple tons of illegal drugs/guns/whatever....

It could also be used to limit ships designed for other specific jobs such as restricting mining ships to asteroid fragments only, or scavengers to cargo, but not lifepods etc.

Anyways, just an idea...

Re: Scoop Restrictions

Posted: Sat Mar 09, 2013 7:03 pm
by Smivs
I can see the appeal of this, but the problem lies in the way scooping works.
The fuel scoops 'capture' items and guide them into the ship's hold where they stay until the ship docks. Providing the item isn't too big, anything goes. Escape capsules, cargo pods and splinters are all of a similar size, so if one can be scooped, any of the others can.
So the problem really is the hold - you need one to scoop stuff and if it's big enough for one small(ish) item, it is big enough for others.
Of course there is no reason why some handwavium-inspired limitations couldn't be applied to what is scooped, and I don't see any reason why this couldn't be done one way or another.

Re: Scoop Restrictions

Posted: Sat Mar 09, 2013 9:30 pm
by cim
You can do this with the AI. Rather than use the standard scanForLoot command, call out to the ship script and use JS to scan specifically for escape pods, and if any are found, target one and call back to the AI to run performCollect.

It will technically still be able to scoop cargo other than escape pods, but since it will never actually try to do so, the chances of it accidentally picking any up are minimal.

(The Escape Pod Locator OXP has search and rescue ships which solely collect escape pods, if you want an example, though I think that uses a slightly different technique to the one I suggested above)

Re: Scoop Restrictions

Posted: Sat Mar 09, 2013 10:10 pm
by Commander McLane
This won't work for a player ship, though.

You could only work around it by checking what was scooped each time, and immediately ejecting the cargo again if it wasn't an escape pod. But the player would notice that the cargo was actually scooped and ejected.

Re: Scoop Restrictions

Posted: Sat Mar 09, 2013 10:52 pm
by cim
Commander McLane wrote:
This won't work for a player ship, though.

You could only work around it by checking what was scooped each time, and immediately ejecting the cargo again if it wasn't an escape pod. But the player would notice that the cargo was actually scooped and ejected.
Another option would be to give ejected unscoopable cargo a script that monitors entity.status, and when it changes to STATUS_BEING_SCOOPED, checks if the player is within scooping range and changes the scan class to CLASS_ROCK if so. That should stop the scooping, though it might get inefficient.