Page 1 of 3

Manifest Scanner(Release)

Posted: Wed Oct 28, 2015 4:22 pm
by Stormrider
I modified the manifest mfd code into the manifest scanner so it displays the manifest of a targeted ship.
Simply target a ship and the cargo space used is displayed, then use the 'n' key to display the contents of the hold:

Image Image
I did a fair amount of testing and it seems to be about 99.9% accurate, I did pick up a pod that had something that was not listed, but only once. The numbers for gold, platinum and gems are not always correct but sometimes there will be two pods containing these commodities so there is often more than the scanner listed. I guess some commanders are able to stash some of these commodities without adding the numbers to their manifest.

I'd like to add some more effects like a delay timer and maybe an energy drain, but I am no coder and I may never get around to it. It might also be interesting to add some AI effects, right now npcs don't respond to it in any way. I haven't got a lot of time for this right now but I wanted to get it out to the community. If anyone else is interested in adapting this have at it :D .

I have restricted it from 'safer' systems so you will only find it in anarchy-dictatorships.
Get it here:
http://wiki.alioth.net/img_auth.php/8/8 ... _1.3.2.oxz

Many thanks to spara for the original manifest mfd code.

edit: updated link

Re: Manifest Scanner(Beta)

Posted: Wed Oct 28, 2015 4:35 pm
by Amah
heh, seems only fair, since NPCs pirates always seem to know my cargo I'm carrying which they say vital for the revolution or whatever.

Re: Manifest Scanner(Beta)

Posted: Thu Oct 29, 2015 2:33 am
by Wildeblood

Code: Select all

//Remove and fine if techies at mainstation find it in communist-corprate systems\ on second thought maybe not for now
/*
	if( equipment === "EQ_RENOVATION" && system.government > 4 && stn.allegiance == "galcop" && p.equipmentStatus("EQ_MANIF_SCANNER") == "EQUIPMENT_OK" || p.equipmentStatus("EQ_MANIF_SCANNER") == "EQUIPMENT_DAMAGED")
	{

		p.removeEquipment("EQ_MANIF_SCANNER");
		player.bounty += 25; // <------------------------ Nah!


	}
}
*/
Why is this commented out, is it buggy? I think it's a good idea. I wouldn't include a fine, just remove the offending item. This would be a good place to integrate with Email System OXP, too.

Re: Manifest Scanner(Beta)

Posted: Thu Oct 29, 2015 4:43 am
by phkb
There's a small bug in the logic. It needs brackets around the "or" clause p.equipmentStatus("EQ_MANIF_SCANNER") == "EQUIPMENT_OK" || p.equipmentStatus("EQ_MANIF_SCANNER", like this:

Code: Select all

//Remove and fine if techies at mainstation find it in communist-corprate systems\ on second thought maybe not for now
/*
   if( equipment === "EQ_RENOVATION" && system.government > 4 && stn.allegiance == "galcop" && (p.equipmentStatus("EQ_MANIF_SCANNER") == "EQUIPMENT_OK" || p.equipmentStatus("EQ_MANIF_SCANNER") == "EQUIPMENT_DAMAGED"))
   {

      p.removeEquipment("EQ_MANIF_SCANNER");
      player.bounty += 25; // <------------------------ Nah!


   }
}
*/

Re: Manifest Scanner(Beta)

Posted: Thu Oct 29, 2015 3:23 pm
by Stormrider
Wildeblood wrote:
Why is this commented out, is it buggy? I think it's a good idea. I wouldn't include a fine, just remove the offending item.
I thought it was a little drastic. I haven't set it up so the player is refunded for choosing to remove the scanner so the player would be pretty limited for maintenance. I also like the way phkb handles informing the player of equipment confiscation in the smugglers oxp, but I was worried about creating a conflict with smugglers if I did the same thing.

I'll see what I can come up with. I like the idea of integration with the Email System oxp, but I am not sure I've got the technology to do that soon.
phkb wrote:
There's a small bug in the logic.
Thanks phkb, I thought it worked when I tested it but I never tested it with a damaged scanner :wink: .

Re: Manifest Scanner(Beta)

Posted: Thu Oct 29, 2015 5:58 pm
by ffutures
If I ever feel like starting a career in piracy this will definitely be on my shopping list.

Out of interest, what happens when you scan e.g. an Anaconda? Logically they shouldn't be running without several hundred tons of cargo, but I've never seen anything that big break up and release more than a few tons.

Re: Manifest Scanner(Beta)

Posted: Thu Oct 29, 2015 6:37 pm
by Amah
iirc the NPC annies have internally a reduced cargo hold (100t, 150, 200t ?) and just release even less on ship died.

Re: Manifest Scanner(Beta)

Posted: Thu Oct 29, 2015 7:23 pm
by Norby
Amah wrote:
NPC annies have internally a reduced cargo hold
250t since Oolite 1.80 and after this dicussion. In my eyes player's Annie has a built-in version of [wiki]HyperCargo[/wiki] to get the additional 500t due to the hull volume is only about double than a Boa. Moreover the wiki say: "HyperCargo is a modernised and updated version of the cargo compression system famously used on larger ships like the Anaconda".

Re: Manifest Scanner(Beta)

Posted: Fri Oct 30, 2015 6:50 pm
by Stormrider
I tried adding this bit of code:

Code: Select all

	if( equipment === "EQ_RENOVATION" && system.government > 4 && stn.allegiance == "galcop" && (p.equipmentStatus("EQ_MANIF_SCANNER") == "EQUIPMENT_OK" || p.equipmentStatus("EQ_MANIF_SCANNER") == "EQUIPMENT_DAMAGED"))
	{

		p.removeEquipment("EQ_MANIF_SCANNER");
		mission.runScreen({title: "Equipment Confiscated", message: "It appears that your Manifest Scanner has been removed ", model: "police", background: "witchbarbg.png"});
It works, but if I have a smuggling compartment installed my message doesn't get displayed and the Ironhide Armour message offering to repair damaged armour doesn't get displayed either.
I don't know how exactly to get those other messages to to display first and still display mine after.
ffutures wrote:
Out of interest, what happens when you scan e.g. an Anaconda?
Well here is a shot of a fully loaded Boa and a partially loaded Annie:
Image Image

These larger ships do drop a lot of cargo but I don't think I've ever seen more than 20 pods and ships with less than 4 or 5 tons often drop nothing but scrap metal. It seems reasonable that most of the cargo is destroyed with the ship.
ffutures wrote:
If I ever feel like starting a career in piracy this will definitely be on my shopping list.
You could always be a self-appointed customs agent, seems like quit a few traders are carrying illicit cargo. :wink:
In my own defence I must insist that all those ships were destroyed purely in the interest of testing. I mean I always picked up their escape pods, if they manage to launch in time. :twisted:

Re: Manifest Scanner(Beta)

Posted: Fri Oct 30, 2015 7:24 pm
by Norby
Stormrider wrote:
my message doesn't get displayed
Try it in missionScreenOpportunity:

Code: Select all

this.missionScreenOpportunity= function() {
    if(this._ScannerRemove) {
        this._ScannerRemove = false;
        player.ship.removeEquipment("EQ_MANIF_SCANNER");
        mission.runScreen({title: "Equipment Confiscated", message: "It appears that your Manifest Scanner has been removed ", model: "police", background: "witchbarbg.png"});
    }
}
...
   if( equipment === "EQ_RENOVATION" ...
   {
       this._ScannerRemove = true;
...

Re: Manifest Scanner(Beta)

Posted: Sat Oct 31, 2015 5:06 pm
by Stormrider
Norby wrote:
Try it in missionScreenOpportunity:
Thanks Norby that worked, but since missionScreenOpportunity doesn't fire after the purchase of a renovation on its own I had to create another message to make it fire if no other oxp ran a missionscreen after purchase.
Like this:

Code: Select all

   if( equipment === "EQ_RENOVATION" ...
   {
       this._ScannerRemove = true;
mission.runScreen({title: "Suspicious Activity", message: "It appears that some of your equipment has been tampered with.", model: "station"});
}
this.missionScreenOpportunity= function() {

	if(this._ScannerRemove) {
    	this._ScannerRemove = false;
        mission.runScreen({title: "Equipment Confiscated", message: "Your Manifest Scanner is gone!", model: "police"});...
    }
}
Maybe not the best solution but it works.

Version 0.7 now available from link at the top.
Changes:
  • *Give the player a partial refund when they remove scanner.
    *Make removal option available anywhere.
    *Confiscate scanner if maintenance overhaul purchased at Communist-Corprate systems.
    *Added messages to inform player of confiscation.

Re: Manifest Scanner(Beta)

Posted: Mon Nov 09, 2015 8:40 am
by Zireael
Another OXP that I simply MUST grab when I get back to Oolite!

Re: Manifest Scanner(Beta)

Posted: Tue Nov 10, 2015 3:51 pm
by Stormrider
Zireael wrote:
Another OXP that I simply MUST grab when I get back to Oolite!
I've uploaded 1.0 to the manager so it will be easy to grab.
-just changed the manifest for the manager.

Re: Manifest Scanner(Beta)

Posted: Wed Apr 06, 2016 4:31 am
by Bogatyr
Stormrider wrote:
Zireael wrote:
Another OXP that I simply MUST grab when I get back to Oolite!
I've uploaded 1.0 to the manager so it will be easy to grab.
-just changed the manifest for the manager.
How does it work? I've primed it and targeted a ship and I don't see any resulting display. Does that mean they have no cargo?

Re: Manifest Scanner(Release)

Posted: Wed Apr 06, 2016 4:56 am
by phkb
After you target a ship, I think you need to prime the Manifest Scanner with shift-N, then press "n" to activate it.