Page 1 of 1

How, exactly, to start OoHaul mission?

Posted: Mon Sep 08, 2008 6:53 pm
by CmdrLUke
I have OoHaul installed, I see the OoHauler freighters around everywhere. I have YourAdHere installed, I've visited Pi-42 and the other convenience stores probably hundreds of times now, but never any offers of OoHaul contracts. I've read the mission wiki on Oohaul and I seem to have fulfilled all the requirements. What am I missing?

Posted: Tue Sep 09, 2008 10:54 am
by tinker
I have found that about 1 in 10 times that I dock at a Pi42 store I get offered an escort mission, just docking at the pI42 is enough to trigger it for me, perhaps there is some reputation check made or legal status check, I have not looked at that part of the code as it seems to work OK. I have made one alteration to the script and changed the scriptActionOnTarget to the safe version, though that would not stop the script working or even being offered.

Posted: Tue Sep 09, 2008 8:40 pm
by CmdrLUke
Thanks for the info. I have many dozens perhaps hundreds of docks by now without a single offer, so something else is probably going on.

Posted: Mon Sep 15, 2008 5:56 pm
by Dr. Nil
Hi CmdrLUke

Did you by any chance rename the Oo-Haul add-on folder?

It should have the z's (or at least one of them ;)) at the beginning in order to run its script after Your Ad Here! places the convenience station.

The mission requirements are:

* Must have rating Average or better.

* Must be docked at a Pi-42 (appears in non-anarchy systems with a population of 4 billion or more when Your Ad Here! is installed).

* Must have a good standing with the Oo-Haul corp (at least 15 jumps since turning down a contract or 20 since ditching a mission or 25 since failing).

If the requirements are fulfilled, you have 1/5 chance of being offered a mission. Oo-haul missions may be played any number of times.

The presence of a Pi-42 Clerk near the witchpoint is the hint to a mission being offered in the current system.

Posted: Tue Sep 30, 2008 6:35 am
by Commander McLane
Dr. Nil wrote:
Hi CmdrLUke

Did you by any chance rename the Oo-Haul add-on folder?

It should have the z's (or at least one of them ;)) at the beginning in order to run its script after Your Ad Here! places the convenience station.
Unfortunately that's not exactly true. The alphabet determines the order in which the OXPs are loaded by Oolite. That means that the shipdata.plist in zzzOo-Hauls will overwrite the shipdata.plist in Your Ad Here (and any other "earlier" OXP). And the planetinfo.plist will overwrite any previous planetinfo.plist. And so on.

But according to what Ahruman told us scripts are not executed in any specific order. So there is no way to let one script run after another specified script.

Posted: Tue Sep 30, 2008 9:22 am
by JensAyton
Commander McLane wrote:
But according to what Ahruman told us scripts are not executed in any specific order. So there is no way to let one script run after another specified script.
There is, in JavaScript: patching. You can fiddle with another script’s handler to make it run before yours. It does require that both the patching script and the patched script are written in JS, though (for world scripts; it’s possible to patch legacy ship scripts since they’re dispatched through JavaScript).

Code: Select all

this.name = "MyPatchingOXP";

// Make sure our shipWillLaunchFromStation() runs after OtherOXP’s shipWillLaunchFromStation.

this.actual_shipWillLaunchFromStation = function (station)
{
    // Do stuff here
}


this.startUp = function ()
{
    // Must defer this to startUp() to ensure both scripts are loaded.
    if (worldScripts["OtherOXP"])
    {
        let otherOXP = worldScripts["OtherOXP"];
        
        if (otherOXP.shipWillLaunchFromStation)
        {
            // Note use of _this_ OXP’s name as unique prefix
            otherOXP.MyPatchingOXP_original_shipWillLaunchFromStation = otherOXP.shipWillLaunchFromStation;
        }
        else
        {
            // OtherOXP has no shipWillLaunchFromStation() handler yet.
            // For simplicity, we add a do-nothing handler. A simpler
            // patched shipWillLaunchFromStation() would also be an option.
            otherOXP.MyPatchingOXP_original_shipWillLaunchFromStation = function () {}
        }
        
        // Install patched shipWillLaunchFromStation() which calls both
        // OtherOXP’s handler and our actual handler in the desired order.
        otherOXP.shipWillLaunchFromStation = function (station)
        {
            // Note: here "this" refers to otherOXP’s script
            
            // Ensure OtherOXP’s handler runs first (“tail patch”).
            // Reversing the order (a “head patch”) is also possible.
            this.MyPatchingOXP_original_shipWillLaunchFromStation(station);
            worldScripts["MyPatchingOXP"].actual_shipWillLaunchFromStation(station);
        }
    }
    else
    {
        // OtherOXP is not installed. We could just do
        // this.shipWillLaunchFromStation = this.actual_shipWillLaunchFromStation,
        // but that would make it harder for other scripts to patch this one.
        this.shipWillLaunchFromStation = function (station)
        {
            this.actual_shipWillLaunchFromStation(station);
        }
    }
    
    delete this.startUp;
}
This is sufficiently clean that several patches can be chained together with no extra effort. However, it falls apart if OtherOXP actually changes its own handlers (without patching) – a habit I strongly recommend against.

Posted: Tue Sep 30, 2008 8:42 pm
by CmdrLUke
Is there a log or a setting in an oxp to turn on loggin to see once and for all if there's something wrong in my installation? I do have Zz-Oohaul.oxp, I see OOhaul ships, and yet I have docked at Pi-42s hundreds of times and never, ever gotten a single offer of a mission. I satisfy all the requirements in the wiki.

Posted: Sun Oct 12, 2008 8:19 pm
by CmdrLUke
Well I didn't figure it out but it's "fixed" now. I installed a bunch of OXPs and as soon as I did I started seeing Pi-42 clerks (which are not the same thing as Pi-42 stores it turns out, nothing in the documentation mentions that), and I got offered a mission on my 2nd landing at a Pi-42. It was fun, definitely not boring, lots of tension every time a new yellow blip came up. It's also a good use for the new probe missile, looking ahead for trouble.

Posted: Mon Oct 13, 2008 1:16 pm
by Jason Whitelock
Do these missions get 'spiced up' at all??

I have now had 4 missions - in not too fantastic systems - and each has been a pretty sedate 'cruise' behind the oo haul ship til its docks and then no message or notification that i have been successful (just kind of assumed I have been paid)

the last mission was slightly 'more exciting' (not really) as the oo haull ship run right into the back of a deep space dredger.

Again - no notification at all that I failed !!!!!

How do i get an oohaul with some action ? DO they get harder ?

Posted: Mon Oct 13, 2008 9:14 pm
by tinker
You should get some sort of end message, like "thanks for your assistance" just before the transport docks. If you are not getting the message then I do not think the mission has ended and you probably didn't get paid.

AFAIK they do not get harder or easier it seems to be just luck as to what is around to attempt to attack the cargo ship. So far they have just been an easy income for me but I have only been offered contracts in safe systems so far.

Posted: Fri Oct 17, 2008 4:56 pm
by Dr. Nil
Hi

This expansion was created to present an alternative to zipping from planet to planet in no time. So don't expect the missions to be high paced action all the time.

But if you try to get the missions in multi government or feudal systems there should be more pirates and less police. (Pi-42 stations appear in non-anarchy systems with a population larger than 4 billion). I imagine you could get some nail biting action from escorting the haulers in systems with Little Bear's Renegade Pirates installed :lol:

As tinker wrote, you should get a thank you message if you succeed.