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

Cabins

General discussion for players of Oolite.

Moderators: another_commander, winston

User avatar
Killer Wolf
---- E L I T E ----
---- E L I T E ----
Posts: 2266
Joined: Tue Jan 02, 2007 12:38 pm

Cabins

Post by Killer Wolf »

Soz if i'm missing something obvious but how do you stipulate a Player ship being able to have more than one passenger cabin?

tia
User avatar
Disembodied
Jedi Spam Assassin
Jedi Spam Assassin
Posts: 6882
Joined: Thu Jul 12, 2007 10:54 pm
Location: Carter's Snort

Re: Cabins

Post by Disembodied »

I think all you need to install a passenger cabin is 5 tons of free space. So if your player ship has 10 tons of cargo space, you can install one or two passenger cabins, losing 5 tons each time.
User avatar
Killer Wolf
---- E L I T E ----
---- E L I T E ----
Posts: 2266
Joined: Tue Jan 02, 2007 12:38 pm

Re: Cabins

Post by Killer Wolf »

cheers, i wasn't sure if the Shipdata was more specific. i want to a do a ship variant that can have more than one cabin and one that can't, but if it can't be differentiated via the Shipdata/whatever then i'll change my plans.

edit - that's odd, there were two replies to this thread and now one's vanished :-/
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: Cabins

Post by Smivs »

You will need to specify this in the shipyard.plist. Something like this should work.

Code: Select all

"standard_equipment" =         { 
            extras =             ( 
                "EQ_PASSENGER_BERTH",
                "EQ_PASSENGER_BERTH"
            ); 
Commander Smivs, the friendliest Gourd this side of Riedquat.
User avatar
Wildeblood
---- E L I T E ----
---- E L I T E ----
Posts: 2301
Joined: Sat Jun 11, 2011 6:07 am
Location: Western Australia

Re: Cabins

Post by Wildeblood »

Killer Wolf wrote:
edit - that's odd, there were two replies to this thread and now one's vanished :-/
Odd indeed. :wink: I was trying to say what Smivs has now said, but lazily, without the code example. If you want player ships offered in the shipyard with more than one berth already fitted, do that.
User avatar
Killer Wolf
---- E L I T E ----
---- E L I T E ----
Posts: 2266
Joined: Tue Jan 02, 2007 12:38 pm

Re: Cabins

Post by Killer Wolf »

cheers again. so to clarify, the number of times "CABIN" is listed in Shipyard limits the number of cabins you can fit, regardless of free space?
User avatar
Lone_Wolf
---- E L I T E ----
---- E L I T E ----
Posts: 546
Joined: Wed Aug 08, 2007 10:59 pm
Location: Netherlands

Re: Cabins

Post by Lone_Wolf »

Afaik adding cabins in shipyard only determines the MINIMUM cabins a ship will have when bought.
You seem to want to limit the MAXIMUM, and this can only be regulated by adjusting the cargo.
Also players can always removes cabins ..

Easiest way to get real limits seems to use a shipyard_override for the cabin, and use the worldscript playerBoughtEquipment handler to limit the number of cabins allowed on a ship.
OS : Arch Linux 64-bit - rolling release

OXPs : My user page

Retired, reachable at [email protected]
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: Cabins

Post by Smivs »

My suggestion earlier (untested but close to something that will work) will give every example two berths when 'for sale'. The maximum number is dictated by the hold space available. Each one requires 5TC, so in theory a Python can have up to 20
Commander Smivs, the friendliest Gourd this side of Riedquat.
User avatar
Killer Wolf
---- E L I T E ----
---- E L I T E ----
Posts: 2266
Joined: Tue Jan 02, 2007 12:38 pm

Re: Cabins

Post by Killer Wolf »

i have no idea about overrides or how to script that, but i've stumbled across an old Thargoid thread in Testing and Bugs that i've replied to.
User avatar
Wildeblood
---- E L I T E ----
---- E L I T E ----
Posts: 2301
Joined: Sat Jun 11, 2011 6:07 am
Location: Western Australia

Re: Cabins

Post by Wildeblood »

Killer Wolf wrote:
cheers again. so to clarify, the number of times "CABIN" is listed in Shipyard limits the number of cabins you can fit, regardless of free space?
No, you can under normal circumstances, fill the hold with passenger berths. There is no limit. But you won't normally be offered a ship configured like that in the shipyard.

But if you add it several times in the shipyard.plist file, you can be offered ships with several berths in the shipyard. I have a made a shipyard file with passenger berth repeated 4 times, and then been offered the same ship for sale with 1, 2, 3 or 4 berths already fitted. But there's usually nothing to stop you buying any ship and then buying more berths.

What is it you are trying to do? Make a passenger only ship with no cargo space? Or a ship that can only have a certain maximum of passenger berths, so it always has cargo space?
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: Cabins

Post by Smivs »

I remember when I was making the Clipper OXP I had several with multiple berths for sale at one point. I think one had as many as eight!
Commander Smivs, the friendliest Gourd this side of Riedquat.
User avatar
Eldon
Dangerous
Dangerous
Posts: 68
Joined: Tue Jan 26, 2010 1:38 pm

Re: Cabins

Post by Eldon »

Can you give the ship some dummy equipment by default, with:

Code: Select all

"incompatible_with_equipment" = "EQ_PASSENGER_BERTH";
"incompatible_with_equipment" = "EQ_PASSENGER_BERTH_REMOVAL";
That should leave you with a ship that only has the passenger berths specified in shipdata, with no way to add or remove others. I think.
User avatar
Killer Wolf
---- E L I T E ----
---- E L I T E ----
Posts: 2266
Joined: Tue Jan 02, 2007 12:38 pm

Re: Cabins

Post by Killer Wolf »

Wildeblood wrote:
What is it you are trying to do? Make a passenger only ship with no cargo space? Or a ship that can only have a certain maximum of passenger berths, so it always has cargo space?

yeah. as per the write-up for the Phantoms, the wing pods on them are supposed to be configurable : i was going to do a cargo version that could fit maybe one cabin, and a passenger variant that would have multiple cabins. if there's no way of defining that (easily?) then it's pointless doing it, so i'll cme up w/ some other variants instead.
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: Cabins

Post by Smivs »

In terms of coding, the cargo/berths will all have to be dealt with in shipdata and shipyard as if the hold is in the ship like normal, but the player can be told and can 'believe' they are pod mounted via readme and wiki etc.
If you wanted the passenger version to have say 6 berths, you will need to specify 30TC cargo capacity in shipdata and 6 berths in shipyard as extra equipment. This will give the six berths and zero available cargo space. Of course there's nothing stopping the player from selling some or all of the berths. There will be ways to achieve that if that's what you want though.
Commander Smivs, the friendliest Gourd this side of Riedquat.
User avatar
Eldon
Dangerous
Dangerous
Posts: 68
Joined: Tue Jan 26, 2010 1:38 pm

Re: Cabins

Post by Eldon »

An additional thought, if you used two bits of dummy equipment, one incompatible with cabins, the other incompatible with the ability to sell cabins, you could use a script which triggered on buying your ship and buying and selling cabins, giving you control over how many cabins the ship can have.
Post Reply