SELLSHIP
Keywords: SELLSHIP, SELLS
=== USER MANUAL ===
Usage: sellship <ship>
Description:
Sell a docked ship back to the shipyard for a partial refund.
The ship is disassembled, any installed modules are valued
toward the payout, and a buyer flies it away.
Prefer sellship over scrapship if the hull has any
resale value -- sell returns 50%% of the combined ship +
modules price, scrap returns nothing.
Payout Formula:
Sale price is computed as:
( base_hull_price + sum(installed_module_prices) ) / 2
- Base hull price is the purchase price from the
model catalog (buyship).
- Module prices are the shipyard catalog value of
each installed module. Every installed module contributes
its full shop price to the pre-halving total.
- The result is halved, so you always recover 50%% of
total invested cost.
Example: Scout (4,500) + 2x Deflector Mk I (5,000 each) ->
(4,500 + 10,000) / 2 = 7,250 credits.
Currency Note:
The currency line that actually credits your account is
currently commented out in the source:
// GET_QP(ch) += sellPrice; // uncomment when currency
is wired
The sale echo still prints the price, but you won't see
credits appear in your total until the currency system is
hooked up. Expect this to activate later.
Requirements:
Shipyard ........... in_shipyard(ch) must be true. Garages
don't count: "You need to be at a shipyard
to sell a ship."
Target name ........ "Sell what ship? Usage: sellship
<name>"
Ship in room ....... "No ship by that name is here."
Pilot access ....... Must own the ship or be on its pilot
list (addpilot): "That is not your
ship." Note this allows copilots to sell
-- secure your pilot list before parking
at public yards.
Docked .............. "The ship must be docked to sell
it."
What Sell Does:
When the command commits, the ship is destroyed identically
to scrapship:
- All contained objects are extracted.
- Anyone still on the ship is returned to their
start room.
- The ship is extracted; save file unlinked; global
ship list rewritten.
The only difference from scrap is the sale echo and (future)
currency payout.
Echo:
You sell <ship> for <N> credits. (you)
<n> sells a ship. A buyer inspects it and
flies it away. (room)
Sell vs Scrap vs Remove-Then-Sell:
Three ways to offload a ship, different trade-offs:
sellship ............ 50%% of hull + modules. Simplest.
Installed modules contribute to the
payout automatically.
scrapship ........... No refund. Destroys modules along
with the hull. Use only for junk ships.
remove + sell ....... removemodule every module first
(keeps them as inventory items you can
re-install or sell separately), then
sellship the now-bare hull for 50%% of
base price only.
Remove-then-sell is maximum value if you have another ship
to install modules onto or a buyer for the individual
modules.
Notes:
- Ship destruction mechanics are identical to scrapship
(see that entry for people / cargo handling).
- The payout is rounded down (integer division).
- Copilots can sell the ship. Audit your pilot list
before parking at a public shipyard.
- Non-pilot characters (random players in the room)
cannot sell the ship, even if it's docked at a public
yard.
Strategic Notes:
- If you plan to use modules elsewhere, always
removemodule first -- the 50%% tax on modules is
expensive compared to keeping the items.
- The fleet cap (3 ships for personal) makes selling
essential for upgrading hulls. You cannot buy a new ship
without clearing a slot.
- Save the name of the ship you just sold -- once the
command commits, the world record is gone and there's no
reversal.
Related Helpfiles: SCRAPSHIP, BUYSHIP, REMOVEMODULE, SHIPLIST, SHIPSTAT, ADDPILOT
=== END MANUAL ===