Tetra

Tetra

12M Downloads

Basic API for Integration

NightmareTwilight opened this issue ยท 5 comments

commented

Feature Request

Feature description
A basic API to allow modders to easily add tetra support for items that tetra doesn't add by itself.

How it improves the player experience
The player wouldn't have to add .json files themselves for certain items as the mod maker could do it in the mod.

Tetra synergies
It would make tetra more mod-friendly as other mods could add integration easily.

commented

Could you elaborate on what kind of functionality you'd like to see in this API?

This is what I have so far:

  • Add new modular items
  • Add new modules
  • Add new schemas
  • Add additional variants to existing module
  • Add additional outcomes to existing schema
  • Add new improvements to existing module
  • Add additional item effects
commented

I apologise in advance if I come off as arrogant or rude, I sound like that to myself as well.

These are my own suggestions:

  • I personally would like to see API separated from internals. This would make it clear when someone is touching stuff they shouldn't have to.
    • The API would be expected to be somewhat stable, as it usually goes, with breaking changes apparent from the version at least, perhaps.
    • More concretely, it would be nice for existing interfaces, such as IItemModular, to be moved into an api package, and it would be nice if the other things add-ons may add (new modules, schemas etc.) could be registered without touching internals.
  • There shouldn't be enums for things that should be expandable.
    • There don't seem to be any switch statements revolving around them from a quick search, and they seem to be around principally for serialization.
    • The ones I was thinking of were ItemEffect and Capability. The former was already mentioned, while the latter is merely in a similar situation where it has potential to be expanded.
commented

I apologise in advance if I come off as arrogant or rude, I sound like that to myself as well.

Then rewrite it before you post it.

I still don't get what you want apart from an undescript API. Is there something that's not covered by the checklist I posted in my previous comment that you need from the API?

commented

Then rewrite before you post it.

Sorry, I tried ^^

Is there something not covered...

Functionality-wise, I suppose not really. I was more hung up on implementation details.

commented

I have come across actual features that would be nice for API inclusion:

  • Attaching arbitrary data to things like ModuleVariantData.
  • Attaching Forge capabilities to modular items. <- this may already be possible with Forge's own APIs