Join us at the Oolite Anniversary Party -- London, 7th July 2024, 1pm
More details in this thread.

Shipyard Specifics

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

Moderators: winston, another_commander

Post Reply
User avatar
thirdeye77
Above Average
Above Average
Posts: 21
Joined: Sat Jul 29, 2006 8:12 pm

Shipyard Specifics

Post by thirdeye77 »

I think its time I dipped into the immense collective wisdom of the Oolite bb in search of some advice.

I want to have a ship appear only at a specific station and, if possible, no other ships at that station. Looking through some old threads it seems we can now use conditions in shipyard.plist, and this method does seem to work (although Ive not yet tried it specifically for what I am intending to achieve).

I would guess I just need to check status_string equal STATUS_DOCKED and dockedStationName_string equals whatever I call my station. Any thoughts on whether this is the best way to go about this?

Also, I can't see any way of restricting the shipyard at this station to one type of ship only. Am I missing something?

Any advice would be much appreciated and would make a wannabe OXPer very happy.
User avatar
LittleBear
---- E L I T E ----
---- E L I T E ----
Posts: 2867
Joined: Tue Apr 04, 2006 7:02 pm
Location: On a survey mission for GalCop. Ship: Cobra Corvette: Hidden Dragon Rated: Deadly.

Post by LittleBear »

Can't do it directly, but here's a workrouand im using in the new version of Assassins.oxp.

In the normal game a ship can only be bought if the tech_level of the system docked at is high enough. So you want the player to only be able to buy the ship at a specific system. Simple! Set the available tech level to 18 (an impossible condition).

Now you either replace the main station with a custom station or add an OXP custom station in a particular system, with its tech level set high enough to buy the ship. :wink:
OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits, The Galactic Almanac, Renegade Pirates can be downloaded from the Elite Wiki here.
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

Don’t forget to also use the script, or multiple OXPs using that trick will break each other slightly.
User avatar
LittleBear
---- E L I T E ----
---- E L I T E ----
Posts: 2867
Joined: Tue Apr 04, 2006 7:02 pm
Location: On a survey mission for GalCop. Ship: Cobra Corvette: Hidden Dragon Rated: Deadly.

Post by LittleBear »

Yeh, should have said. I want the player to be able to collect a Gravition Missile at the Rebel Outpost in a particlular system. So I set the Outpost's tech level to 19 and scripted it to appear only at Angeriri in G7 and then only if the mission was accepted. Script only adds this dockable entry if the mission is accepted and in this system. Script only acts on a docked at = "Rebel Outpost" and switches into the text adventure when you dock, before you can buy it. As the Rebel Outpost only appears at this mission_stage and this system, shoudn't conflict.
OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits, The Galactic Almanac, Renegade Pirates can be downloaded from the Elite Wiki here.
User avatar
Wolfwood
---- E L I T E ----
---- E L I T E ----
Posts: 735
Joined: Wed Mar 29, 2006 9:53 am
Location: Finland
Contact:

Post by Wolfwood »

Hehe, thanks thirdeye77 for asking the very question that I logged in to ask this morning! :)

And thanks to all of you others for giving the info! Maybe I can now finally finish my stupid little oxp mission (very simple, but one has to start somewhere)...
Author of Tales from the Frontier - official Elite 4 anthology.
Author of Marcan Rayger adventures - unofficial fan-fic novellas set in the Frontier universe.
User avatar
thirdeye77
Above Average
Above Average
Posts: 21
Joined: Sat Jul 29, 2006 8:12 pm

Post by thirdeye77 »

Hehe, thanks thirdeye77 for asking the very question that I logged in to ask this morning!
Great minds think alike Wolfwood :lol:

Outstanding work guys.

I've got the first ship ready to go so I will give this a serious try in the next couple of days.

Now if I can just improve my ship modelling and texturing skills..... :roll:
User avatar
thirdeye77
Above Average
Above Average
Posts: 21
Joined: Sat Jul 29, 2006 8:12 pm

Post by thirdeye77 »

I've been playing around with this for a while and I seem to be able to get it to work by adding this to shipyard.plist:

Code: Select all

<key>conditions</key>
<array>
<string>galaxy_number equal 6</string>
<string>planet_number equal 105</string>
</array>
So the ship would only be offered at Celaqula (system 106) in Galaxy 7 (just using this system as a test coz thats where I happen to be docked at the moment).

The ship appears correctly in the shipyard, and disappears when the planet_number is changed, so all seems to be working correctly. I should be able to check dockedStationName_string for the name of my custom station within shipyard.plist.

And maybe to restrict the type/amount of other ships that are offered I could drop the Tech Level of the system right down when the player docks at the custom station.

Don't you just love script-induced headaches?
User avatar
Wolfwood
---- E L I T E ----
---- E L I T E ----
Posts: 735
Joined: Wed Mar 29, 2006 9:53 am
Location: Finland
Contact:

Post by Wolfwood »

thirdeye77 wrote:
I should be able to check dockedStationName_string for the name of my custom station within shipyard.plist.
This step seems to break it for me. I think the ships that are at the shipyard are randomly selected when you enter the system and thus the condition "dockedstationname" will never be fulfilled because you will not be docked at the station at the time the ships are selected.
thirdeye77 wrote:
And maybe to restrict the type/amount of other ships that are offered I could drop the Tech Level of the system right down when the player docks at the custom station.
You can determine the tech level of the stations and ships separately, so you don't need to adjust the level with any scripts.

<key>equivalent_tech_level</key>
<integer>16</integer>
Author of Tales from the Frontier - official Elite 4 anthology.
Author of Marcan Rayger adventures - unofficial fan-fic novellas set in the Frontier universe.
User avatar
thirdeye77
Above Average
Above Average
Posts: 21
Joined: Sat Jul 29, 2006 8:12 pm

Post by thirdeye77 »

You can determine the tech level of the stations and ships separately, so you don't need to adjust the level with any scripts.
ah, so you can. Thanks for the heads-up Wolfwood. I haven't played around with stations before and haven't stumbled across that attribute on the wiki.

I'm happy to say I've got my station up and running, including a working dock at the first attempt. Just a mountain of modelling, texturing and scripting to go now.
Post Reply