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: winston, another_commander

User avatar
Wildeblood
---- E L I T E ----
---- E L I T E ----
Posts: 2319
Joined: Sat Jun 11, 2011 6:07 am
Location: Western Australia

Re: Cabins

Post by Wildeblood »

Eldon wrote:
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.
I wrote a script similar to that about a week after I discovered Oolite, but with my very limited knowledge it was very fragile. One problem I had is once those equipment items are defined with their interacting incompatibilities, if it gets shot up in combat and some equipment is lost I could be locked out of changing anything (I didn't know how to automagically manage combat damage back then). It was a real balancing act.
Eldon wrote:
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.
That doesn't work - if you define two pieces of equipment that are incompatible with each other in the shipyard file. (I know because I tried that.) You'll get a ship with either your dummy equipment or the passenger berths, but not both.
Last edited by Wildeblood on Tue Jul 26, 2011 3:15 pm, edited 1 time in total.
User avatar
Eldon
Dangerous
Dangerous
Posts: 68
Joined: Tue Jan 26, 2010 1:38 pm

Re: Cabins

Post by Eldon »

:D Ok next try,

You don't see the equipment a standard customer model comes with when you're looking to buy a ship in the shipyard, so you could just have the dummy equipment and replace it with passenger berths by script when the ship is bought. That would get you exactly the number of berths you wanted.

Having done a bit of testing with "incompatible_with_equipment" it looks like control over how many berths the ship has might be a little harder. You'd have to make the berths incompatible with the dummy equipment, making the dummy equipment incompatible with the berths wouldn't work. Which works fine, until someone else wants to do something similar, then one of the oxps breaks, probably.

On combat breakages, I'm sure I read there was going to be a way of making equipment immune to damage in 1.75 (not just autorepair). I just don't know how to find it, and the equipment.plist page on the wiki is a little out of date.
User avatar
Wildeblood
---- E L I T E ----
---- E L I T E ----
Posts: 2319
Joined: Sat Jun 11, 2011 6:07 am
Location: Western Australia

Re: Cabins

Post by Wildeblood »

Another problem you will have if you mess about with incompatible equipment is that it will work, you'll pat yourself on the back, and save the game. Then come back the next day, load the saved game and it will be broken. The incompatibility rules are enforced when loading from a saved game.
Post Reply