thorium-nova icon indicating copy to clipboard operation
thorium-nova copied to clipboard

Plugins

Open alexanderson1993 opened this issue 3 years ago • 0 comments

Is your feature request related to a problem? Please describe.

Based on the discussion here, and largely built around the framework used in Thorium Nova Prime. https://github.com/Thorium-Sim/thorium-nova/discussions/26

We need some way to define the content included in a Thorium Nova flight. This includes:

  • The Universe - solar systems, stars, planets, moons
  • Ship Classes - the possible types of ships that could be instantiated in the flight
  • Ship Systems - the code defines what ships systems are available, like warp engines, tractor beams, etc. The plugin defines the classes of these ship systems and what properties they posses, like Class V Warp Engines vs Class VII Warp Engines.
  • Station Themes - Originally built with CSS, which I think is still the best solution
  • Factions - nations and groups which inhabit the universe
  • Missions
  • Anything else that can be configured by the crew

This also includes any assets, like audio, images, fonts, etc that might be necessary for the above.

This issue is just about building the framework around creating plugins, but not actually creating configuration in the plugins for the above content items. That will happen in separate issues.

Describe the solution you'd like

Largely similar to the way Thorium Nova Prime worked, I think. Plugins are stored as folders in the Thorium data folder, with a separate .json file for each type of content. This would allow the most ambitious of plugin writers to manually edit if they really wanted to, but the intention is that most plugin editing happens in the Thorium UI.

So, there are a number of pieces needed:

  • [x] #58
  • [x] #59
  • [x] #60
  • [ ] #61
  • [ ] #62
  • [x] #63
  • [x] #64
  • [x] #65
  • [x] #66
  • [x] #67
  • [ ] #68
  • [x] #69

Eventual features that are not in the scope of this work, but that will be added later.:

  • Releasing plugins to a centralized plugin registry (which includes marking a version number, bundling as a zip, and uploading to thoriumsim.com)
  • Downloading plugins from the registry
  • Tracking plugin dependencies

I'll start work on this tonight (about 10 hours from now), unless there are any objections.

alexanderson1993 avatar Oct 21 '21 12:10 alexanderson1993