Extra Menu Page?

Yeah it’s definitely not that easy, but it’s possible with the plugin system. The skills/inventory sections of the menu are just pieces of UI, but they need to plug into data. The yaml files are just config files for the features, but well the engine needs to know how to use them. Creating new yaml files wouldn’t do anything, yaml is just to store settings, it’s not code.

The way most things work in narrat is that there are data stores more or less separated for each feature. Those stores keep track of data, and also can generate the save data, and reload it when you load a save. So each feature is split into its own logical area.

Then, the actual .Vue code (which is basically the UI code) mostly just displays data from those data stores, and interacts with them if needed.

So to add a relationship feature, you’d want:

  • A new UI component to display relationships (which yes would be similar to skills or something, but obviously would need different logic and layout still)
  • A data store to manage the actual data for it
  • Some new narrat commands for game scripts to interact with that new system

The plugin system can do all those things, because plugins can:

  • Add new data stores
  • Register new tabs in the menu, with their own custom UI component
  • Add new narrat commands.

The best example is the simple counter plugin example, which is a plugin that does all those things but in a very simple way. It:

  • Adds a counter-store that stores data about a counter
  • Adds a counter UI which displays the counter
  • Adds a custom command to increase the counter, so that narrat scripts can interact with it.

So it’s definitely doable, but you’d need to know how to write the code and UI for it to add the feature, which is probably more complex than what you want. It’s definitely not a matter of just copy pasting the skills system (though it would be a good source of inspiration for writing UI and data store, if you feel like trying).

Possible alternatives:

  • Just have relationships as HUD stats numbers that would be displayed by that existing system on the top of the screen
  • Manage relationships in your scripts yourself, and present them to the player in text somehow, by maybe having a button that makes them be printed out
  • have some way to see them in your game displaying it in the viewport by creating sprites and text. Relatedly, the spoon survival game I made uses sprites to display a basic sims-like mood UI, which is a similar problem. It’s a bit of work but it’s doable within the existing narrat systems without needing to add new features to the engine
2 Likes