daid / EmptyEpsilon

Open source bridge simulator. Build with the SeriousProton engine.
https://daid.github.io/EmptyEpsilon/
GNU General Public License v2.0
520 stars 173 forks source link

Player ship upgrade/downgrade path scenario utility #2035

Closed Xansta closed 2 months ago

Xansta commented 7 months ago

This concept was introduced with scenario 44, Doomed Outpost. In that scenario, the player ship starts at the bottom of the upgrade path. Upgrades can be obtained at various stations. The upgrades gradually get more expensive as more powerful upgrades are procured. This utility puts all the various upgrade path details in tables. There is an upgrade path for each player ship model available. There are even upgrade paths for player ships specific to the Doomed Outpost scenario.

This concept was refined in scenario 40, Shop Til You Drop. The player ship starts at the lower end, but not at the very bottom. Upgrade and downgrade is possible. The player selects the method of upgrade. The most expensive just does the upgrade. The next most expensive does the upgrade at the cost of downgrading a different system, specified in advance. The cheapest upgrade is done by a pit droid. It has a random chance of downgrading another randomly selected system.

The utility also includes a mechanism for updating the science database with the player ship upgrade path information.

Rather than replicate this upgrade/downgrade path information in each scenario where I want to use it, I'm placing it in this utility. This reduces the number of lines of code in a scenario that might include this functionality.