Planetfall OXP

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

Moderators: winston, another_commander

User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

Will check on that, could be 1.11 is needed.

The landing speed is due to the new way of doing the station, and I'm not so worried about that. The landing without equipment didn't used to work, maybe something got messed up late on in the scripting.

Editted to add - I can see what the problem is, it's telling the difference between a one-shot timer that has run and finished successfully and one that just hasn't run at all ;)

Quick script change and then a new version methinks. Will also look at tidying up one or two other bits too.
User avatar
pagroove
---- E L I T E ----
---- E L I T E ----
Posts: 3035
Joined: Wed Feb 21, 2007 11:52 pm
Location: On a famous planet

Post by pagroove »

I have an even newer idea for expansion :D . What if some low tech planets don't have a planetary control. Well, then the commander could still land. The computer then computes a crash chance and the commander is offered to try a landing. The computer says:

Commander % calculations point out that there is a % crash chance when attempting the approach. Will you proceed?

If he succeeds everything goes as normal.

If he fails then there are 2 possibilities.

1. A crash landing on a remote continent.

The pilot is then offered to:

1: Radio a rescue team at a % price (also your ship is rescued and repaired)
2: Attempt a repair. If succeeds he is able to orbital boost but all external equipment must be left behind
3: Leave the ship behind and attempt a walk to the nearest base. At the base you get a shuttle lift back to the station. There you get the basic Cobra MK3 and a deduction of insurance costs?

2: You die
For P.A. Groove's music check
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)
Image
https://bb.oolite.space/viewtopic.php?f=4&t=13709
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

Interesting concept, but given even tech level 1 planets have stations and shuttles etc landing, not entirely in the game theme.

Of the three offers, the third one isn't possible from a script. The second one could be done, but you'd just end up trying and trying until succeeding, and losing equipment is a bit harsh. The first one is do-able but I'm not hugely keen on it.

Plus the concept of not having landing clearance is either that they get shot down or crash into traffic that does. If no planetary control, then it actually conceptually lessens the chance of either of those happening (so it'd be more likely for them to land, at least with the presumsion that no PC would mean less traffic).
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

And now the bugfix version 1.11 is available:

- = Download Planetfall v1.11 here = -
Alternatively for those who already have v1.10, below is a patch link with just the modified files (for a smaller download):

- = Download Planetfall v1.10 --> 1.11 patch file here = -
From the v1.11 readme, as I took the opportunity to tweak a couple of other things too:
  • Version 1.1 Update

  • Fixed the bug that lets you land without the modifications (thanks PAGroove!).
  • Buying the landing capability modifications now requires docking computers and extra heat shielding to already be installed.
  • Landing comms message now doesn't show up if you're not equipped for landing, and is delayed 15s after launch rather than appearing immediately when the station is in the planets vicinity.

Last edited by Thargoid on Sun Feb 08, 2009 3:05 pm, edited 1 time in total.
User avatar
pagroove
---- E L I T E ----
---- E L I T E ----
Posts: 3035
Joined: Wed Feb 21, 2007 11:52 pm
Location: On a famous planet

Post by pagroove »

Wow that was fast! :shock:
For P.A. Groove's music check
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)
Image
https://bb.oolite.space/viewtopic.php?f=4&t=13709
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

pagroove wrote:
Wow that was fast! :shock:
It was a trivial fix, once you highlighted the problem ;)

If the player hasn't got the kit, just quit the event handler that's spawning the station. Then they're kissing planet :twisted:
User avatar
pagroove
---- E L I T E ----
---- E L I T E ----
Posts: 3035
Joined: Wed Feb 21, 2007 11:52 pm
Location: On a famous planet

Post by pagroove »

Just here to say that I now happily crashed without the equipment. Good work commander Thargoid! 8)
For P.A. Groove's music check
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)
Image
https://bb.oolite.space/viewtopic.php?f=4&t=13709
User avatar
pagroove
---- E L I T E ----
---- E L I T E ----
Posts: 3035
Joined: Wed Feb 21, 2007 11:52 pm
Location: On a famous planet

Post by pagroove »

Hi thargoid,

I made a field location for Diso. how do I make sure it only appears in the Famous Planets pack and on Diso?
Do I just make a shipdata.plist in the same dir or do I have to do it in another way. I just started a bit to experiment on making my own locations.
For P.A. Groove's music check
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)
Image
https://bb.oolite.space/viewtopic.php?f=4&t=13709
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

To make it only at Diso, you need to use the conditions key within the shipdata.plist to test for the relevant galaxy number (0) and planet number (whichever Diso is).

To make sure it only appears in the Famous Planets pack, then only put it in the Famous Planets pack ;) Or put a note in the readme to say it's an add-on to FP. I don't think you can use the shipdata.plist conditions key to check for the presence of an OXP script unless it's doing something to the planet itself (changing tech level for example) which yours isn't.

I must say though that I'm not 100% sure that condition key is working fully in 1.72.1 in all cases.
User avatar
pagroove
---- E L I T E ----
---- E L I T E ----
Posts: 3035
Joined: Wed Feb 21, 2007 11:52 pm
Location: On a famous planet

Post by pagroove »

Thargoid wrote:
To make it only at Diso, you need to use the conditions key within the shipdata.plist to test for the relevant galaxy number (0) and planet number (whichever Diso is).

To make sure it only appears in the Famous Planets pack, then only put it in the Famous Planets pack ;) Or put a note in the readme to say it's an add-on to FP. I don't think you can use the shipdata.plist conditions key to check for the presence of an OXP script unless it's doing something to the planet itself (changing tech level for example) which yours isn't.

I must say though that I'm not 100% sure that condition key is working fully in 1.72.1 in all cases.
So I must make a shipdata.plist. Put that in the config directory of Famous Planets OXP. Then make a condition. MM ok I'il try. I'il report back when it works.
For P.A. Groove's music check
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)
Image
https://bb.oolite.space/viewtopic.php?f=4&t=13709
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

Either in the FP OXP or make an "add-on" OXP like my hOopy casino or Black Monks examples.

Probably the simplest way is to copy one of those, make your changes (to the entity name, screen name and roles) and add your conditions line. You can then either add that shipdata.plist entry into FP or just keep it as a separate bolt-on to save everyone having to download the whole thing again just to add that (unless you're planning on revising FP anyway).
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

A shipdata.plist something like this:

Code: Select all

{
	"planetFall_mainSurface_disoPlace" =
		{
		like_ship = "planetFall_genericSurface";
		name = "My ancestral home on Diso Prime"; 
		roles = "planetFall_mainSurface_disoPlace planetFall_mainSurface_externalOXP station(0) planetFall_surface";
		conditions = ("galaxy_number equal 0", "planet_number equal 147"); 
		};

	"planetFall_subSurface_disoPlace" =
		{
		like_ship = "planetFall_genericSurface";
		name = "My summer residence on Diso Minor"; 
		roles = "planetFall_subSurface_disoPlace planetFall_subSurface_externalOXP station(0) planetFall_surface";
		conditions = ("galaxy_number equal 0", "planet_number equal 147"); 
		};

	"planetFall_moonSurface_disoPlace" =
		{
		like_ship = "planetFall_genericSurface";
		name = "My ski chalet on the Moon"; 
		roles = "planetFall_moonSurface_disoPlace planetFall_moonSurface_externalOXP station(0) planetFall_surface";
		conditions = ("galaxy_number equal 0", "planet_number equal 147"); 
		};
}
That will add three new locations, one on Diso Prime, one on any other planets in the Diso system and one on any moons in the system. You don't of course have to add things to all three location groups if you don't want to (they're three separate entities).

Each will be spawned using the primary role "planetFall_<wherever>Surface_externalOXP", but can be individually identified by their unique role planetFall_<wherever>Surface_disoPlace. Of course change all six examples of disoPlace to whatever it is you want to add, and give them more sensible name keys ;)

Within the OXP the externalOXP role has about a 15% chance of being the spawned station, and of course how many of those that will actually appear as your Diso entry will depend on what other PlanetFall addon OXPs are installed.

Within the main OXP the primary location (capital city, colony city and colony dome iirc) each also have a 0.0001 weighted role as externalOXP just in case there are no addon OXPs installed (or when conditions disallow the addon locations). If you want your location to be more (or less) favoured than any other addon location then you can of course set a weighting factor to the role in your shipdata.plist.
User avatar
pagroove
---- E L I T E ----
---- E L I T E ----
Posts: 3035
Joined: Wed Feb 21, 2007 11:52 pm
Location: On a famous planet

Post by pagroove »

Ok,
But I also made a background image. And this only makes locations right? I've looked in the script.js file of Planet fall and there I see the references to the .png files you've made. So do I then also have to include a script.js with references to the .png I've made?

Name of the .png is: planetFall_Veersmountains.png name and its in a sub directory called images of a new link.oxp. (copied like you've said from Hoopy Casino and adapted the shidata.plist-file)

Directory structure is:

Oolite 1.72 r1814 Rev2\AddOns\PlanetFall Link - Disotest 1.0.oxp

subdirs are: Config and Images
in Config is the shipdata.plist already
in images is the imagefile planetFall_Veersmountains.png
For P.A. Groove's music check
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)
Image
https://bb.oolite.space/viewtopic.php?f=4&t=13709
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

Yes, you'll have to add a script.js in the config directory if you want the image. In your case you'll just need an equivalent of the guiScreenChanged event stuff near the bottom. You'll probably also need a missiontext.plist file as that's where the text that appears with the image comes from (the first entry in the mission.runMissionScreen command, immediately before the png referring one).

Also don't forget that it will only appear in place of things like equipment and trade screens (it's used as the background on a mission offer screen that intercepts the appearance of the relevant docked screen). It's not a background to all the screens that appear when you're docked (unless you hit the launch during mission offering bug).

If it's easier I'm happy to look over your test OXP if you can upload it somewhere I can grab a copy of it.
User avatar
pagroove
---- E L I T E ----
---- E L I T E ----
Posts: 3035
Joined: Wed Feb 21, 2007 11:52 pm
Location: On a famous planet

Post by pagroove »

Ok. I sent you a PM with the oxp link. BTW excellent idea to first have to buy shielding then the other equipment :wink: It's realistic.
For P.A. Groove's music check
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)
Image
https://bb.oolite.space/viewtopic.php?f=4&t=13709
Post Reply