Page 1 of 2
Cabins
Posted: Tue Jul 26, 2011 9:25 am
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
Re: Cabins
Posted: Tue Jul 26, 2011 9:35 am
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.
Re: Cabins
Posted: Tue Jul 26, 2011 10:01 am
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 :-/
Re: Cabins
Posted: Tue Jul 26, 2011 10:03 am
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"
);
Re: Cabins
Posted: Tue Jul 26, 2011 10:14 am
by Wildeblood
Killer Wolf wrote:edit - that's odd, there were two replies to this thread and now one's vanished :-/
Odd indeed.
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.
Re: Cabins
Posted: Tue Jul 26, 2011 11:40 am
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?
Re: Cabins
Posted: Tue Jul 26, 2011 11:55 am
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.
Re: Cabins
Posted: Tue Jul 26, 2011 12:04 pm
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
Re: Cabins
Posted: Tue Jul 26, 2011 12:25 pm
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.
Re: Cabins
Posted: Tue Jul 26, 2011 12:37 pm
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?
Re: Cabins
Posted: Tue Jul 26, 2011 12:46 pm
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!
Re: Cabins
Posted: Tue Jul 26, 2011 1:28 pm
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.
Re: Cabins
Posted: Tue Jul 26, 2011 1:30 pm
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.
Re: Cabins
Posted: Tue Jul 26, 2011 1:49 pm
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.
Re: Cabins
Posted: Tue Jul 26, 2011 1:51 pm
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.