Planetfall 2.0 (apparently)

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

Moderators: winston, another_commander

User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4777
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Planetfall 2.0 (apparently)

Post 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.
User avatar
MrFlibble
---- E L I T E ----
---- E L I T E ----
Posts: 279
Joined: Sun Feb 18, 2024 12:13 pm

Re: Planetfall 2.0 (apparently)

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

Re: Planetfall 2.0 (apparently)

Post 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
User avatar
MrFlibble
---- E L I T E ----
---- E L I T E ----
Posts: 279
Joined: Sun Feb 18, 2024 12:13 pm

Re: Planetfall 2.0 (apparently)

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

Re: Planetfall 2.0 (apparently)

Post 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?
User avatar
Cholmondely
Archivist
Archivist
Posts: 5188
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: Planetfall 2.0 (apparently)

Post by Cholmondely »

Thumbs Up!
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
User avatar
MrFlibble
---- E L I T E ----
---- E L I T E ----
Posts: 279
Joined: Sun Feb 18, 2024 12:13 pm

Re: Planetfall 2.0 (apparently)

Post by MrFlibble »

Great!
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4777
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Planetfall 2.0 (apparently)

Post by phkb »

Yay! Onward we go.
DGill
---- E L I T E ----
---- E L I T E ----
Posts: 282
Joined: Thu Jan 01, 2009 9:45 am

Re: Planetfall 2.0 (apparently)

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

Re: Planetfall 2.0 (apparently)

Post 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.
DGill
---- E L I T E ----
---- E L I T E ----
Posts: 282
Joined: Thu Jan 01, 2009 9:45 am

Re: Planetfall 2.0 (apparently)

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

Re: Planetfall 2.0 (apparently)

Post 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.
DGill
---- E L I T E ----
---- E L I T E ----
Posts: 282
Joined: Thu Jan 01, 2009 9:45 am

Re: Planetfall 2.0 (apparently)

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

Re: Planetfall 2.0 (apparently)

Post 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"
        });
    }
}
DGill
---- E L I T E ----
---- E L I T E ----
Posts: 282
Joined: Thu Jan 01, 2009 9:45 am

Re: Planetfall 2.0 (apparently)

Post by DGill »

That's great - all working now - thank you.
Post Reply