Page 24 of 26

Re: Planetfall 2.0 (apparently)

Posted: Tue Jun 04, 2024 1:22 am
by phkb
Version 2.8 of the main PF2 OXZ is now available. I've removed the planet rotation script and made it a separate OXP. In order to maintain it a as optional feature, the new OXP is not a requirement of PF2.

Re: Planetfall 2.0 (apparently)

Posted: Tue Jun 04, 2024 1:24 am
by MrFlibble
phkb wrote: Tue Jun 04, 2024 12:59 am
Something like this then?
Image
Looks great.

Nitpickingly OCD... '2' up a pixel (or two), round its bottom left corner a jot to balance with the rounded corner of the icon boundary.

Re: Planetfall 2.0 (apparently)

Posted: Tue Jun 04, 2024 3:55 am
by phkb
MrFlibble wrote: Tue Jun 04, 2024 1:24 am
Nitpickingly OCD... '2' up a pixel (or two), round its bottom left corner a jot to balance with the rounded corner of the icon boundary.
Any better?
Image

Re: Planetfall 2.0 (apparently)

Posted: Tue Jun 04, 2024 10:20 am
by MrFlibble
phkb wrote: Tue Jun 04, 2024 3:55 am
MrFlibble wrote: Tue Jun 04, 2024 1:24 am
Nitpickingly OCD... '2' up a pixel (or two), round its bottom left corner a jot to balance with the rounded corner of the icon boundary.
Any better?
Image
Just pulling the bottom of it up a tad has made that a lot better balanced. Better than moving the whole character up would have been

The bottom left corner of the '2' still has an oddness which jumps out at me. There appears to be a small thorn of white pointing south despite the lack of serif or any obvious aberration when zoomed.

I know it's not there, but at 1:1 I still see it. This may be an optical illusion caused by the hard corner in unavoidable proximity to the curved corner, or because the shadow ends short of west there.

Here, I've Gimp smudged/cloned that corner a bit, and for my eyes that has whacked the weirdness. Maybe I need to go to Specsavers.

Image

</pedantry>

I'm loving PF2. Even without intent to land, the planet proximity turbulence is very immersive and serves to warn if one is too close. IMO that detail would fit well as a 'default on' option in the core game.

Re: Planetfall 2.0 (apparently)

Posted: Tue Jun 04, 2024 4:53 pm
by phkb
MrFlibble wrote: Tue Jun 04, 2024 10:20 am
The bottom left corner of the '2' still has an oddness which jumps out at me. There appears to be a small thorn of white pointing south despite the lack of serif or any obvious aberration when zoomed.
Probably an artefact of the tool I used: I tried to give the "2" a bevel. Here's a version where I just give it a drop shadow, which I think is a lot closer to what you have:
Image
How's that one?

Re: Planetfall 2.0 (apparently)

Posted: Tue Jun 04, 2024 5:34 pm
by Cholmondely
Thumbs Up!

Re: Planetfall 2.0 (apparently)

Posted: Tue Jun 04, 2024 8:47 pm
by MrFlibble
Great!

Re: Planetfall 2.0 (apparently)

Posted: Tue Jun 04, 2024 9:03 pm
by phkb
Yay! Onward we go.

Re: Planetfall 2.0 (apparently)

Posted: Wed Jun 05, 2024 9:13 am
by DGill
I've added to my oxp script an F4 option after arriving at the Planetfall 2 royal court (either by directly landing or transfer by train) which takes the player to the Chancery where missions are offered. The script upon selecting F4 is:


this.shipWillDockWithStation = function(station) {

if (player.ship.docked && this.thePlayerShip.dockedStation.hasRole("planetFall2_mainSurface_FSRoyalCourt")) {
this.$initInterface(station);
}
}

That all works fine but I would like to display a message after the Plantfall2 landing confirmation screen so that the player is informed of the need to press the F4 key and select the Chancery for missions, i.e. I need my script to detect that Planetfall2 screens have finished and display my desired message - is that possible and what script command would I need to use?

Re: Planetfall 2.0 (apparently)

Posted: Thu Jun 06, 2024 9:34 am
by phkb
DGill wrote: Wed Jun 05, 2024 9:13 am
but I would like to display a message after the Plantfall2 landing confirmation screen so that the player is informed of the need to press the F4 key and select the Chancery for missions, i.e. I need my script to detect that Planetfall2 screens have finished and display my desired message - is that possible and what script command would I need to use?
There are a couple of ways you can go here.

The easiest would be to just add some text to the arrival report, telling the player what they need to do. So:

Code: Select all

    player.addMessageToArrivalReport("After landing you can visit the Chancery for missions via the F4 screen.");
You'd only need to determine when to add this report - probably wouldn't need it if the player has used the transit system, only when actually landing. So the logic you used previously would work.

Code: Select all

this.shipWillDockWithStation = function(station) {
    if (station.hasRole("planetFall2_mainSurface_FSRoyalCourt")) {
        this.$initInterface(station);
        player.addMessageToArrivalReport("After landing you can visit the Chancery for missions via the F4 screen.");
    }
}
If you want to get more fancy, you could use the "missionScreenOpportunity" world event to launch a custom mission screen that can pass on whatever information you like after the docking process has finished. Let me know if you want a code sample for this option.

Re: Planetfall 2.0 (apparently)

Posted: Thu Jun 06, 2024 9:45 am
by DGill
phkb wrote: Thu Jun 06, 2024 9:34 am

If you want to get more fancy, you could use the "missionScreenOpportunity" world event to launch a custom mission screen that can pass on whatever information you like after the docking process has finished. Let me know if you want a code sample for this option.
When I tried missionScreenOpportunity I get the mission screen with "press space" but pressing space does nothing. I have to exit the game using shift-esc. So, yes, if you can provide a code sample I would be grateful.

Re: Planetfall 2.0 (apparently)

Posted: Thu Jun 06, 2024 9:54 am
by phkb

Code: Select all

this.missionScreenOpportunity = function() {
    if (player.ship.dockedStation.hasRole("planetFall2_mainSurface_FSRoyalCourt" && !this.ShownMessage) {
        this.ShownMessage = true;
        mission.runScreen({
            title: "Chancery Missions",
            message: "For all missions pertaining to the Royal Court, please visit the Chancery, accessible via the F4 menu of your astrogation console.",
            exitScreen: "GUI_SCREEN_STATUS"
        });
    }
}
You could then reset the "this.ShowMessage" flag when you launch from the planet, so the next time you land you'd get the message again. Unless you don't want to see the message again, in which case you don't need to do anything.

Re: Planetfall 2.0 (apparently)

Posted: Thu Jun 06, 2024 1:01 pm
by DGill
Alas, it did not work. I get the planetfall2 screen. On pressing space I'm returned to the status screen. No errors in the log file. I have placed the missionScreenOpportunity function at the start of the code:

this.missionScreenOpportunity = function() {
if (player.ship.dockedStation.hasRole("planetFall2_mainSurface_FSRoyalCourt" && !this.ShownMessage)) {
this.ShownMessage = true;
mission.runScreen({
title: "Chancery Missions",
message: "For all missions pertaining to the Royal Court, please visit the Chancery, accessible via the F4 menu of your astrogation console.",
exitScreen: "GUI_SCREEN_STATUS"
});
}
}

this.startUpComplete = function() {
if (player.ship.docked) {
this.shipWillDockWithStation(player.ship.dockedStation);
}
}
this.shipWillDockWithStation = function(station) {

if (player.ship.docked && this.thePlayerShip.dockedStation.hasRole("planetFall2_mainSurface_FSRoyalCourt")) {
this.$initInterface(station);
}
}



this.$initInterface = function(station) {
station.setInterface("FeudalStates0", {
title: "Spaceport Customs Office",
category: "Contracts",
summary: "Feudal State Customs Control. All pilots are required to register their arrival at the port superintendant’s office.",
callback: this.$initPage1.bind(this)
});
}

this.$initPage1 = function (){
this.missionScreens();
};

Re: Planetfall 2.0 (apparently)

Posted: Thu Jun 06, 2024 3:38 pm
by phkb
Ah, I had a slight bug in my code. Try this version:

Code: Select all

this.missionScreenOpportunity = function () {
	if (player.ship.dockedStation.hasRole("planetFall2_mainSurface_FSRoyalCourt") && !this.ShownMessage) {
        this.ShownMessage = true;
        mission.runScreen({
            title: "Chancery Missions",
            message: "For all missions pertaining to the Royal Court, please visit the Chancery, accessible via the F4 menu of your astrogation console.",
            exitScreen: "GUI_SCREEN_STATUS"
        });
    }
}

Re: Planetfall 2.0 (apparently)

Posted: Thu Jun 06, 2024 4:16 pm
by DGill
That's great - all working now - thank you.