Page 1 of 1
Shipyard Specifics
Posted: Mon Mar 12, 2007 10:50 pm
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.
Posted: Mon Mar 12, 2007 11:37 pm
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.
Posted: Mon Mar 12, 2007 11:42 pm
by JensAyton
Don’t forget to also use the script, or multiple OXPs using that trick will break each other slightly.
Posted: Mon Mar 12, 2007 11:52 pm
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.
Posted: Tue Mar 13, 2007 6:00 am
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)...
Posted: Tue Mar 13, 2007 7:00 pm
by thirdeye77
Hehe, thanks thirdeye77 for asking the very question that I logged in to ask this morning!
Great minds think alike Wolfwood
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.....
Posted: Tue Mar 13, 2007 10:09 pm
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?
Posted: Wed Mar 14, 2007 6:20 am
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>
Posted: Thu Mar 15, 2007 9:09 pm
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.