Manifest Scanner(Release)
Moderators: winston, another_commander
- Stormrider
- Deadly
- Posts: 241
- Joined: Sat Jan 25, 2014 2:35 am
- Location: At work
Manifest Scanner(Release)
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:
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 .
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
Simply target a ship and the cargo space used is displayed, then use the 'n' key to display the contents of the hold:
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 .
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.
- Amah
- ---- E L I T E ----
- Posts: 486
- Joined: Tue Aug 28, 2012 8:05 pm
- Location: aboard the Laenina Crowne - Yasen-N class space freighter
- Contact:
Re: Manifest Scanner(Beta)
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
- about Amah: wiki
- noshaders versions of Griff's extra, alternate ships and accessories: discussion, wiki
- ocpc - customize the player ship: discussion, oxp repository
- Wildeblood
- ---- E L I T E ----
- Posts: 2453
- Joined: Sat Jun 11, 2011 6:07 am
- Location: Western Australia
- Contact:
Re: Manifest Scanner(Beta)
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!
}
}
*/
In your heart, you know it's flat.
- phkb
- Impressively Grand Sub-Admiral
- Posts: 4830
- Joined: Tue Jan 21, 2014 10:37 pm
- Location: Writing more OXPs, because the world needs more OXPs.
Re: Manifest Scanner(Beta)
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!
}
}
*/
- Stormrider
- Deadly
- Posts: 241
- Joined: Sat Jan 25, 2014 2:35 am
- Location: At work
Re: Manifest Scanner(Beta)
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.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'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.
Thanks phkb, I thought it worked when I tested it but I never tested it with a damaged scanner .phkb wrote:There's a small bug in the logic.
- ffutures
- ---- E L I T E ----
- Posts: 2172
- Joined: Wed Dec 04, 2013 12:34 pm
- Location: London, UK
- Contact:
Re: Manifest Scanner(Beta)
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.
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.
- Amah
- ---- E L I T E ----
- Posts: 486
- Joined: Tue Aug 28, 2012 8:05 pm
- Location: aboard the Laenina Crowne - Yasen-N class space freighter
- Contact:
Re: Manifest Scanner(Beta)
iirc the NPC annies have internally a reduced cargo hold (100t, 150, 200t ?) and just release even less on ship died.
Amah
- about Amah: wiki
- noshaders versions of Griff's extra, alternate ships and accessories: discussion, wiki
- ocpc - customize the player ship: discussion, oxp repository
- Norby
- ---- 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)
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".Amah wrote:NPC annies have internally a reduced cargo hold
- Stormrider
- Deadly
- Posts: 241
- Joined: Sat Jan 25, 2014 2:35 am
- Location: At work
Re: Manifest Scanner(Beta)
I tried adding this bit of code:
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.
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.
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.
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"});
I don't know how exactly to get those other messages to to display first and still display mine after.
Well here is a shot of a fully loaded Boa and a partially loaded Annie:ffutures wrote:Out of interest, what happens when you scan e.g. an Anaconda?
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.
You could always be a self-appointed customs agent, seems like quit a few traders are carrying illicit cargo.ffutures wrote:If I ever feel like starting a career in piracy this will definitely be on my shopping list.
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.
- Norby
- ---- 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)
Try it in missionScreenOpportunity:Stormrider wrote:my message doesn't get displayed
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;
...
- Stormrider
- Deadly
- Posts: 241
- Joined: Sat Jan 25, 2014 2:35 am
- Location: At work
Re: Manifest Scanner(Beta)
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.Norby wrote:Try it in missionScreenOpportunity:
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"});...
}
}
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)
Another OXP that I simply MUST grab when I get back to Oolite!
- Stormrider
- Deadly
- Posts: 241
- Joined: Sat Jan 25, 2014 2:35 am
- Location: At work
Re: Manifest Scanner(Beta)
I've uploaded 1.0 to the manager so it will be easy to grab.Zireael wrote:Another OXP that I simply MUST grab when I get back to Oolite!
-just changed the manifest for the manager.
Re: Manifest Scanner(Beta)
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?Stormrider wrote:I've uploaded 1.0 to the manager so it will be easy to grab.Zireael wrote:Another OXP that I simply MUST grab when I get back to Oolite!
-just changed the manifest for the manager.
- phkb
- Impressively Grand Sub-Admiral
- Posts: 4830
- Joined: Tue Jan 21, 2014 10:37 pm
- Location: Writing more OXPs, because the world needs more OXPs.
Re: Manifest Scanner(Release)
After you target a ship, I think you need to prime the Manifest Scanner with shift-N, then press "n" to activate it.