Manifest Scanner(Release)

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: another_commander, winston

User avatar
Stormrider
Deadly
Deadly
Posts: 239
Joined: Sat Jan 25, 2014 2:35 am
Location: At work

Manifest Scanner(Release)

Post 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
Last edited by Stormrider on Thu Nov 23, 2017 10:59 pm, edited 2 times in total.
Image
User avatar
Amah
---- E L I T E ----
---- E L I T E ----
Posts: 485
Joined: Tue Aug 28, 2012 8:05 pm
Location: aboard the Laenina Crowne - Yasen-N class space freighter
Contact:

Re: Manifest Scanner(Beta)

Post 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.
Amah
User avatar
Wildeblood
---- E L I T E ----
---- E L I T E ----
Posts: 2275
Joined: Sat Jun 11, 2011 6:07 am
Location: Western Australia

Re: Manifest Scanner(Beta)

Post 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.
"So anti-globalist, he's practically a flat-earther."
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4612
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Manifest Scanner(Beta)

Post 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!


   }
}
*/
User avatar
Stormrider
Deadly
Deadly
Posts: 239
Joined: Sat Jan 25, 2014 2:35 am
Location: At work

Re: Manifest Scanner(Beta)

Post 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: .
Image
User avatar
ffutures
---- E L I T E ----
---- E L I T E ----
Posts: 2121
Joined: Wed Dec 04, 2013 12:34 pm
Location: London, UK
Contact:

Re: Manifest Scanner(Beta)

Post 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.
User avatar
Amah
---- E L I T E ----
---- E L I T E ----
Posts: 485
Joined: Tue Aug 28, 2012 8:05 pm
Location: aboard the Laenina Crowne - Yasen-N class space freighter
Contact:

Re: Manifest Scanner(Beta)

Post by Amah »

iirc the NPC annies have internally a reduced cargo hold (100t, 150, 200t ?) and just release even less on ship died.
Amah
User avatar
Norby
---- E L I T E ----
---- E L I T E ----
Posts: 2577
Joined: Mon May 20, 2013 9:53 pm
Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
Contact:

Re: Manifest Scanner(Beta)

Post 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".
User avatar
Stormrider
Deadly
Deadly
Posts: 239
Joined: Sat Jan 25, 2014 2:35 am
Location: At work

Re: Manifest Scanner(Beta)

Post 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:
Image
User avatar
Norby
---- E L I T E ----
---- E L I T E ----
Posts: 2577
Joined: Mon May 20, 2013 9:53 pm
Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
Contact:

Re: Manifest Scanner(Beta)

Post 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;
...
User avatar
Stormrider
Deadly
Deadly
Posts: 239
Joined: Sat Jan 25, 2014 2:35 am
Location: At work

Re: Manifest Scanner(Beta)

Post 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.
Image
Zireael
---- E L I T E ----
---- E L I T E ----
Posts: 1396
Joined: Tue Nov 09, 2010 1:44 pm

Re: Manifest Scanner(Beta)

Post by Zireael »

Another OXP that I simply MUST grab when I get back to Oolite!
User avatar
Stormrider
Deadly
Deadly
Posts: 239
Joined: Sat Jan 25, 2014 2:35 am
Location: At work

Re: Manifest Scanner(Beta)

Post 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.
Image
Bogatyr
Deadly
Deadly
Posts: 230
Joined: Sun Feb 24, 2013 11:52 am

Re: Manifest Scanner(Beta)

Post 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?
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4612
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Manifest Scanner(Release)

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