Main Connecting Starting



Building: Ships

How to build a ship

Make a room, with name something like "^MHMS Illustrious^n" or whatever you chose. Give it the Ship flag. Make an "out" exit from the ship to ":ship_id" (ie the parent object of the ship, wherever it happens to be).

Give the ship the short of "in", the Exit flag, and a "link" property of itself.

Set "ship_class" on the ship to an appropriate value. ("shuttle", "scout", "corvette"), or what have you.

Make the "door" property of the ship and its out exit point to the ship.

Set the "room_name" property of the ship to whatever name the room should have. (maybe "Midsection" or "Airlock" or something)

Then build the rest of the ship and link the exits in as usual, etc. Make sure that each room has the Ship flag. and the "ship" property on each room pointing to the main ship room thing.

In that main ship room thing make "room.0" "room.1" etc point to all the rooms on the ship, (and set room.count appropriatly). This will make sure that messages about takeoff/landing/arrival get sent to the ship.

There, you have your ship. :)

Note: There are some rules which should be followed with shuttle routes:
Ships from minor ports should only go to the major port nearest them; so any port on barane or kazi should only go to the major port on Cryosphere. We already have regular shuttles between Cryosphere and Livingstone which can (due to Toshiko, and Barane's orbits) be at opposite sides of the solar system at times. And only 1 port per solar system should have ships that go into other solar systems. See info starmap.

How to make your ship start off at a dock

Don't, and I repeat - don't make it reset to a docking port/etc (or indeed make code dependent upon being in a particular one). This interacts really badly with other ships.

Instead, make it start in "space", and give it a "plan" property of "0 dockat dock_id" (eg level1_1 for the Cryosphere), also give it the StartPlan flag. This means that whenever it is resetted it will reset to space and then dock wherever it is supposed to be, hence avoiding clashes.