[WIP] GalCop Missions

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

Moderators: winston, another_commander

User avatar
Milo
---- E L I T E ----
---- E L I T E ----
Posts: 462
Joined: Mon Sep 17, 2018 5:01 pm

Re: [WIP] GalCop Missions

Post by Milo »

In that case I suggest if possible to recognize also cargo in Towbar scripted cargopods or direct transfer when ship mining. Scripted cargopods have null .commodity and store the type in .$cargo (I am not sure why, perhaps it is used to represent multiple types in a single container stack?). Ship mining transfers directly when there is sufficient hold space in the player ship.
User avatar
phkb
Impressively Grand Sub-Admiral
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: [WIP] GalCop Missions

Post by phkb »

I haven't used Towbar a lot myself (and really I'm only doing maintenance on it while Norby is mia), but I was a little surprised when I saw the code in it that was gifting multiple t's of cargo during scooping. I understand the reasoning behind it (although I'm less certain I agree with breaking core-game logic to achieve it) but it does create some cross-OXP issues. I'll dive in a little deeper and see what I can do.
User avatar
Milo
---- E L I T E ----
---- E L I T E ----
Posts: 462
Joined: Mon Sep 17, 2018 5:01 pm

Re: [WIP] GalCop Missions

Post by Milo »

Minor phrase gen issue, "Slave repatriation" (type 84) mission details screen, "we can for rehabilitation" is missing a word. (lines 1800 and 1809 galcopbb_missiondetails.js, the "we can" on 1809 doesn't fit with any of the variations on line 1800; same problem with the "we can" on line 1808)
User avatar
phkb
Impressively Grand Sub-Admiral
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: [WIP] GalCop Missions

Post by phkb »

Thanks for that. Fix will be in next release.
User avatar
Milo
---- E L I T E ----
---- E L I T E ----
Posts: 462
Joined: Mon Sep 17, 2018 5:01 pm

Re: [WIP] GalCop Missions

Post by Milo »

With various OXPs that move the sun away, the missions that place a point of interest on the far side of the sun can put them quite far out. I suggest using a multiple of sun diameters past the sun instead of a multiple of distance from sun to witchpoint or planet in the formula to select the location, so it is still on the far side but not too far beyond.
dybal
---- E L I T E ----
---- E L I T E ----
Posts: 499
Joined: Mon Feb 10, 2020 12:47 pm

Re: [WIP] GalCop Missions

Post by dybal »

I scooped a escape pod and was offered a mission to retrieve stolen items from a thief, I refused using the Broadcast Comms MFD, but when I docked there was an email confirming my acceptance of the mission
User avatar
Milo
---- E L I T E ----
---- E L I T E ----
Posts: 462
Joined: Mon Sep 17, 2018 5:01 pm

Re: [WIP] GalCop Missions

Post by Milo »

I took a mission to recover a black box from interstellar space, but I can't find the derelict ship post-thargoid-battle (so if the derelict did spawn, it was destroyed before I found it, and no black box seems to be around). I did find and scoop up an escape pod, but it just gave me 1t slaves, and I think there isn't supposed to be any escape pod from the mission's derelict ship so I'm not sure where it came from. I do see in the latest.log that among the many thargoids that spawned when I emerged from witchspace, there was also a single [LogEvents] GlobalLog: Python 28181 spawned at 25 km.

Strangely, several of the thargoids sent comms messages in perfect English:

23:12:02.522 [LogEvents] GlobalLog: got message from Thargoid Warship 30486 : Take them down fast but watch for a run on the freighter…
23:12:03.007 [LogEvents] GlobalLog: got message from Thargoid Warship 4072 : This is taking too long…
23:12:03.040 [LogEvents] GlobalLog: got message from Thargoid Warship 26142 : I've got the Cobra Mark IV covered…
23:12:03.125 [LogEvents] GlobalLog: got message from Thargoid Queen 1871 : Nose! Nose! Nose!


Code: Select all

> worldScripts.GalCopBB_Missions._fromSystem // same as destination, so I'm in the right interstellar space
250

> worldScripts.GalCopBB_Missions.$getListOfMissions(true, 23) 
[{
    ID: 2537,
    stationKey: "galcop",
    source: 140,
    sourceName: "Esbeus",
    sourceGalaxy: 0,
    destination: 250,
    destinationName: "Xexedi",
    destinationGalaxy: 0,
    description: "Interstellar black box recovery",
    details: "We have discovered material relating to a vessel that was abandoned in interstellar space, somewhere between Esbeus and Xexedi, after the pilot was duty-bound to flee in an escape capsule. We need to recover the black box from the ship as information of crucial strategic importance is contained in it. We are trying to locate a captain to venture into interstellar space between Esbeus and Xexedi, find this derelict ship and recover the black box so we can act on the information.\n\nNote: Make sure your Advanced Navigation Array is set to the shortest route. You must enter interstellar space -- manually -- from either Esbeus, with your target system set to Xexedi, or from Xexedi, with your target system set to Esbeus.",
    manifestText: "Recover the black box from a derelict ship in interstellar space between Esbeus and Xexedi within 85 mins 24 secs.",
    originalManifestText: "Recover the black box from a derelict ship in interstellar space between Esbeus and Xexedi within 10 hrs 34 mins.",
    statusText: "Recover the black box from a derelict ship in interstellar space between Esbeus and Xexedi",
    payment: 571,
    penalty: 140,
    deposit: 0,
    allowPartialComplete: false,
    expiry: 180118855745.37323,
    playAcceptedSound: true,
    accepted: true,
    allowTerminate: true,
    percentComplete: 0,
    completionType: "AT_SOURCE",
    stopTimeAtComplete: false,
    completionTime: 0,
    arrivalReportText: "",
    model: "",
    modelPersonality: 0,
    spinModel: true,
    background: "",
    overlay: "",
    mapOverlay: "",
    forceLongRangeChart: false,
    markerShape: "MARKER_PLUS",
    markerColor: "redColor",
    markerScale: 1,
    additionalMarkers: [],
    disablePercentDisplay: true,
    noEmails: false,
    statusValue: "",
    customDisplayItems: [{
        heading: "To complete:",
        value: "Return to station in originating system"
    }, {
        heading: "Interstellar space target:",
        value: "**Yes**"
    }, {
        heading: "Client name:",
        value: "Lester Agdua"
    }, {
        heading: "Equipment required:",
        value: "Fuel scoops\nAdvanced Space Compass"
    }],
    customMenuItems: "",
    remoteDepositProcess: false,
    initiateCallback: "$acceptedMission",
    confirmCompleteCallback: "$confirmCompleted",
    completedCallback: "$completedMission",
    terminateCallback: "$terminateMission",
    failedCallback: "$failedMission",
    manifestCallback: "$updateManifestEntry",
    availableCallback: "$missionAvailability",
    bonusCalculationCallback: "",
    worldScript: "GalCopBB_Derelict",
    postStatusMessages: [],
    data: {
        source: "GalCopBB_Missions",
        missionType: 23,
        position: 0,
        quantity: 0,
        targetQuantity: 1,
        destroyedQuantity: 0,
        commodity: "",
        missionChain: "",
        chained: false,
        terminatePenalty: true,
        altManifest: false,
        name: "Lester Agdua",
        assassinChance: 0,
        stolenItemType: null,
        targetShipKey: null,
        targetShipName: null,
        ingredients: [],
        delivered: 0,
        expected: 0,
        origSystemID: 140,
        satelliteTypes: 0,
        destinationA: -1
    },
    acceptedDate: 180118817664.12006
}]

> a = ""; system.allShips.forEach(function(x) { a += x.dataKey.indexOf("alloy") === -1 ? (x.dataKey + "\n") : ""; }); a; // show every ship (except all the alloys floating around, there are 240 alloys and 26 other ships, those 26 are listed below)
gsagostinho_cobra_mk4_blue-PLAYER
IST_Tharglet
IST_Tharglet
IST_Tharglet
secondWave_toughTharglet
griff_tharglet-NPC
TCAT_controller0
griff_tharglet-NPC
griff_tharglet-NPC
griff_tharglet-NPC
griff_tharglet-NPC
griff_tharglet-NPC
griff_tharglet-NPC
griff_tharglet-NPC
secondWave_toughTharglet
griff_tharglet-NPC
griff_tharglet-NPC
secondWave_toughTharglet
secondWave_armouredTharglet
griff_tharglet-NPC
secondWave_stealthTharglet
griff_tharglet-NPC
TCAT_controller0
small_debris_ah
TCAT_drone
small_debris_ah
I then tried:

Code: Select all

> worldScripts.GalCopBB_Derelict.interstellarSpaceWillPopulate() 
And it spawned a new arafura nearby (total ships in system went up by 1):

Code: Select all

> system.allShips[8] // index 8 because some alloys are closer to my ship at the moment
[Ship "Arafura" position: (14183.5, 14522.5, -8719.12) scanClass: CLASS_CARGO status: STATUS_IN_FLIGHT]

> system.allShips[8].primaryRole 
gcm_derelict

> system.allShips[8].position.distanceTo(Vector3D(0,0,0)) // distance looks OK from this perspective
22092.968129210767

> system.allShips[8].script 
[Script "oolite-default-ship-script" version 1.89]

> system.allShips[8].AI 
nullAI.plist

> system.allShips[8].AIScript 
[Script "Null AI" version 1.89]

> system.allShips[8].equipment 
[[EquipmentInfo EQ_ECM "E.C.M. System"], [EquipmentInfo EQ_FUEL_SCOOPS "Fuel scoops"]]

> system.allShips[8].equipmentStatus("EQ_ESCAPE_POD") 
EQUIPMENT_UNAVAILABLE
No escape pod, but presumably it was removed by abandonShip already -- all of these checks were done with game paused. Incidentally, I just noticed line 76 of galcopbb_derelict.js is missing a semicolon at the end.

Code: Select all

> system.allShips[8].isPiloted 
false

> system.allShips[8].lightsActive 
false

> system.allShips[8].displayName 
RRS Arafura Rescue Boat (derelict)
Right, so it is abandoned...

Code: Select all

> system.allShips[8].script._missionID 
2537

> system.allShips[8].isValid 
true

> system.allShips[8].script.$gcm_hold_shipDied // undefined

> system.allShips[8].script.shipLaunchedEscapePod 
function $gcm_derelict_shipLaunchedEscapePod(pod, passengers) {
    "use strict";
    pod.remove(true);
}

> system.allShips[8].script.shipDied 
function $gcm_derelict_shipDied(whom, why) {
    "use strict";
    var gcm = worldScripts.GalCopBB_Missions;
    var bb = worldScripts.BulletinBoardSystem;
    var item = bb.$getItem(this.ship.script._missionID);
    if (item.data.missionType === 22 || item.data.missionType === 23) {
        if (gcm._debug) {
            log(this.name, "Derelict destroyed - spawning blackbox");
        }
        var bkb = this.ship.spawnOne("gcm_blackbox");
        if (bkb) {
            bkb.setScript("oolite-default-ship-script.js");
            bkb.script._missionID = item.ID;
            bkb.script._gcmSpecial = true;
            bkb.script._gcmBlackBox = true;
            item.data.targetQuantity === 0;
            if (bkb.script.shipDied &&
                bkb.script.$gcm_hold_shipDied == null) {
                bkb.script.$gcm_hold_shipDied = bkb.script.shipDied;
                bkb.script.shipDied = worldScripts.GalCopBB_Derelict.$gcm_entity_shipDied;
            }
            if (Math.random() > 0.1) {
                bkb.maxSpeed = player.ship.maxSpeed;
            } else {
                bkb.maxSpeed = Math.random() * 20;
            }
            bkb.maxThrust = 10;
            bkb.orientation = Quaternion.random();
            bkb.desiredSpeed = bb.maxSpeed;
        } else {
            log(this.name, "!!ERROR: Black box not spawned");
        }
    } else if (item.data.missionType === 24) {
        var sc = this.ship.spawnOne("gcm_specialcargo");
        if (sc) {
            sc.setScript("oolite-default-ship-script.js");
            sc.script.shipDied = gcm.$gcm_cargo_shipDied;
            sc.script._missionID = item.ID;
        } else {
            log(this.name, "!!ERROR: Special cargo not spawned");
        }
    }
}
Upon destroyed that ship, a black box was spawned along with other cargo, and upon scooping that black box, the mission status updated.

So, I'm not sure what happened originally. That Python seems to have simply vanished, and I don't know if it was spawned by the OXP or not.

I'll pause and check things right away next time I find myself on a mission like this.

A bit of unrelated feedback: the mission expiration was a bit too short for me to complete the recovery and get back to the origin station in time.
User avatar
phkb
Impressively Grand Sub-Admiral
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: [WIP] GalCop Missions

Post by phkb »

Milo wrote: Mon Jul 06, 2020 8:25 pm
Strangely, several of the thargoids sent comms messages in perfect English:
That's certainly weird, but it's not coming from GalCop missions. I suspect another Thargoid ship pack has added thargoid ship roles to one of the "pirate" roles, which would then put thargoid warships into "pirate" mode.

As for the other issues, I'm not sure. If the derelict wasn't spawned at all, you would have seen this message in your log:
!!ERROR: Derelict ship not spawned!
If you didn't, then the Python spawn event you saw in the log is probably the mission ship. If that's the case, the Thargoids are probably to blame for the destruction, and the blackbox would have floated away out of scope before you could see it.

To combat this situation, I'm doing a couple of things. First, if the player isn't the destroyer of the derelict, I'm adding some dampening to the blackbox, which should bring it to a standstill soon after being ejected from the derelict. Second, I'm upping the max energy and recharge rate of the blackbox, to make it less likely it will be destroyed by enemy fire. Not guaranteed, but less likely.

The other issue to address (possibly) is, if the player chooses to fight the Thargoids first, before finding the derelict and getting the blackbox, how do they find it again? Whenever I've fought Thargoids in interstellar space, the battle has tended to range over a large area as I use injectors to put some distance between myself and the insects to allow my shields to recharge. You can't use the space compass in interstellar space, so beacons and waypoints don't work (although I did add a workaround for the "Waypoint Here" OXP). The Range Finder is the only possibility I can think of, but feel free to jump in with your thoughts.
dybal wrote: Sun Jul 05, 2020 5:48 pm
I scooped a escape pod and was offered a mission to retrieve stolen items from a thief, I refused using the Broadcast Comms MFD, but when I docked there was an email confirming my acceptance of the mission
This will be fixed in the next release, but there will be an update to the BB System and Email system to handle the fix.
Milo wrote: Tue Jun 30, 2020 11:23 pm
With various OXPs that move the sun away, the missions that place a point of interest on the far side of the sun can put them quite far out. I suggest using a multiple of sun diameters past the sun instead of a multiple of distance from sun to witchpoint or planet in the formula to select the location, so it is still on the far side but not too far beyond.
OK, in for next release.
User avatar
Milo
---- E L I T E ----
---- E L I T E ----
Posts: 462
Joined: Mon Sep 17, 2018 5:01 pm

Re: [WIP] GalCop Missions

Post by Milo »

There was no !!ERROR line of any kind in the log. I definitely went several scammer ranges away from the origin over the course of the battle. Would the black box be removed if I was too far from it? How do cargo pods get cleaned up if not scooped?

I did use the Range Finder MFD to locate the escape pod that I mentioned in my previous post, after flying back to the origin following the Waypoint Here automatically deployed alpha waypoint. So as long as the black box is somewhere around the origin, I think it would be fine.

If the black box does get destroyed, maybe update the mission status to reflect a failure, so it doesn’t leave the player searching aimlessly.
User avatar
phkb
Impressively Grand Sub-Admiral
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: [WIP] GalCop Missions

Post by phkb »

Milo wrote: Tue Jul 07, 2020 6:33 am
If the black box does get destroyed, maybe update the mission status to reflect a failure, so it doesn’t leave the player searching aimlessly.
There should be some notification of that already, but I'll confirm.
User avatar
Milo
---- E L I T E ----
---- E L I T E ----
Posts: 462
Joined: Mon Sep 17, 2018 5:01 pm

Re: [WIP] GalCop Missions

Post by Milo »

The collect interstellar wreckage or alloys mission type seems to inconsistently recognize alloys as mission qualified. Maybe it is the ones released by destroying witchspace jammers are not being accepted, I'm not sure. The mission F5 text would benefit from additional details reflecting count turned in (if partial turn-in was done) and count currently in hold.

Edit: Maybe this was a reading comprehension failure on my part. The mission description says they want wreckage or alloys from "thargoid warships" ... is that specifically the thargoid type named warship?
Last edited by Milo on Tue Jul 07, 2020 1:16 pm, edited 1 time in total.
User avatar
Milo
---- E L I T E ----
---- E L I T E ----
Posts: 462
Joined: Mon Sep 17, 2018 5:01 pm

Re: [WIP] GalCop Missions

Post by Milo »

After completing a slave repatriation mission that required purchasing slaves from the market and turning them in through the bulletin board interface, the Market Observer OXP did not detect the removal of the slaves so it still shows ##x (the purchase price) on the F8 screen.
User avatar
Milo
---- E L I T E ----
---- E L I T E ----
Posts: 462
Joined: Mon Sep 17, 2018 5:01 pm

Re: [WIP] GalCop Missions

Post by Milo »

On a com satellite download mission, it seems to be working as designed, but the 15 minute time limit is too short to reach 4 satellites especially when two of them are over 2400 km distant (thanks to other OXPs), and the F5 mission status does not update to show an indication of passcode expiration or time remaining. Is there a way to refresh the passcode? Leave and return to the system?

Initially, I went to the wrong type of satellite (surveillance instead of communications) and it rejected the passcode, after which I remembered the mission briefing had specified comms satellites, but I think the F5 mission details are slightly ambiguous (it says "extract communication logs from # satellites" [but presumably surveillance satellites also communicate...]; I suggest instead "extract logs from # communication satellites" [specifying the type of satellite]).

Incidentally, when pressing mode or activate with Broadcast Comms primed before I got close enough to the satellite (possibly I had a telescope marker targeted instead of the actual satellite?), nothing happened. Normally, pressing mode at least cycles through some options, so it "felt" broken. I suggest adding an out-of-range console message.
User avatar
Milo
---- E L I T E ----
---- E L I T E ----
Posts: 462
Joined: Mon Sep 17, 2018 5:01 pm

Re: [WIP] GalCop Missions

Post by Milo »

For the "destroy pirates" mission type, it would be nice if causing the pilot to eject and leave the ship derelict were enough to increment the counter.
User avatar
phkb
Impressively Grand Sub-Admiral
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: [WIP] GalCop Missions

Post by phkb »

Thanks for hammering these missions! I'll add the fixes as soon as I can.
Post Reply