Ship and Outfit Variants

From Naevwiki
Jump to: navigation, search

This proposal describes a system for procedurally generating variant ships and outfits based on standard ships and outfits.

Goals

  1. Present players with a wider selection of things to buy

Variants

A variant is a ship or outfit that has some or all of its stats modified and that possibly grants non-standard abilities. Variants are generated by the game at run-time, and are sold in a separate shop. In principle variants are unique, so it isn't possible to buy more than one of each. In terms of in-game logic, a variant is a ship or outfit that is being sold by a private individual who has either used it, modified it in some way, or both. A good example of a ship variant is an old, run-down freighter that is being sold by its retiring owner. The ship's performance might be inferior to that of a brand new ship of the same type, but the price might be accordingly lower. Another example is a laser cannon whose owner modified it to fire over greater distances, giving the weapon a longer effective range. The intended effect of such variants is to give the player a wider selection of ships and equipment to suit his current needs, or to obtain superior ones if he is lucky enough to come across such. Since all variants are one-off offers, variants cannot be bought in bulk. As such, visits to the variant shop should remain interesting throughout the game.

Required infrastructure

To add variants to the game, the following will be needed:

  1. Support for custom ships and outfits generated at run-time
  2. A Lua API to get raw ship and outfit information and to create a new custom ship or outfit object
  3. A new screen for planets that contains the variant shop
  4. Support for saving and loading any custom ships and outfits the player might own

Consequences

Obviously, retooling the engine to take ships and outfits from Lua is a major departure from the existing reliance on XML. It effectively creates a basis for an entirely Lua-based definition of these assets, to the point where even the base outfits may be generated with a script rather than defined in static XML. This in turn raises the question if all XML data should eventually be moved to Lua.