Jump to content

Buy command

From Galactic Empire wiki
Revision as of 00:54, 13 October 2026 by CodexBot (talk | contribs) (Link corresponding classic in-game help section)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

The BUY command purchases items from the planet a ship is orbiting.

Syntax

BUY amount item [password]

amount must be a positive number. ge-next 0.1 added the two quantity keywords:

  • ALL requests all of the selected item currently available for sale.
  • MAX requests the amount that would fill the ship's remaining cargo capacity with that item.

These are requested quantities, not partial-purchase instructions. An ALL purchase fails if the complete available stock will not fit or cannot be afforded. A MAX purchase fails if the planet lacks the calculated quantity or the player cannot afford it; the command does not automatically reduce the purchase to a smaller amount.

Examples:

BUY 1000 MEN
BUY ALL JAMMERS
BUY MAX ION
BUY 500 FOOD drowssap

Items

The command recognizes men, missiles, torpedoes, ion cannons, flux pods, food, fighters, decoys, troops, zippers, jammers, mines, gold, and spies. The usual item abbreviations are accepted.

Classic GE never added spies to the BUY help after they were introduced in 3.1b. ge-next includes spies in its help and, beginning with version 0.1, accepts SP so that both "spy" and "spies" will be recognized.

Availability and price

The ship must be orbiting a settled planet. When buying from another player's planet, the owner must have enabled sale of that item. Only inventory above the owner's reserve is available, and the buyer pays the sale price configured for that planet.

A planet's owner may buy its stored items even when they are not offered to visitors. The complete stored quantity is available to the owner, and the base item price is used. The owner still pays from personal cash into the planet's bank.

Every purchase must pass all of the following checks:

  • the requested stock is available;
  • the player has enough cash;
  • the resulting inventory fits within the ship's cargo capacity; and
  • access is permitted by the planet's trade settings.

If the planet has a trade password, it follows the item name. A planet protected for its team permits members of that team and refuses other players. ge-next also repairs stale team restrictions when the referenced team no longer exists.

At Zygor, purchases use special neutral-zone handling: the player pays and receives the goods, but Zygor's displayed stock is not depleted and its bank is not credited. ge-next may refuse Zygor service when the player's standing with Galactic Command is sufficiently poor.

Classic and ge-next

Classic accepts only a numerical quantity. ge-next 0.1 added ALL and MAX and strengthened checks for large item counts, prices, and cargo calculations. Cargo handling was comprehensively rewritten again in ge-next 0.3.1 to prevent overflow and make reports, capacity checks, and maximum-quantity calculations use the same fit rules. See Classic bug: Cargo weight overflow.

The overall trade model remains the same: a normal purchase removes stock from the planet, adds the payment to its bank, places the items aboard the ship, and deducts the cost from the player's cash. See Planet administration and Items for the wider economic system.

See also