Cubyz icon indicating copy to clipboard operation
Cubyz copied to clipboard

Comptime Modding Framework

Open IntegratedQuantum opened this issue 6 months ago • 6 comments

As discussed in #1507

  • [ ] Automatically load list of all moddable interfaces (currently present as _list.zig) from a common (mods) folder
  • [ ] Create a registry that contains a list of trusted mods with name, author, link, and a secure hash of the source code
  • [ ] Create a launcher that automatically downloads and compiles mods from the registry when entering the world or joining a server (requires #1483)
  • [ ] Create documentation on how modding works, how to make a mod, how to add it to the registry, how to create your own registry, how to install a mod, basic rules how to avoid catching a virus

IntegratedQuantum avatar May 26 '25 15:05 IntegratedQuantum

Trivially moddable systems (just extend list of structs we are loading):

  • rotations (#1509)
  • block entities (requires changing loading code)
  • entity components
  • entity systems
  • UI
  • simple structures
  • server commands

Non-trivially moddable systems (require extending or changing the design):

  • items / tools
  • rendering

We may also consider adding more general hooks, eg. init, deinit, playerConnected, playerDisconnected, chunkLoaded, chunkSerialized to allow implementing global features, mini games or whatever.

Argmaster avatar May 27 '25 10:05 Argmaster

Non-trivially moddable systems (require extending or changing the design):

Should be tracked separately, it is outside the scope of this issue to add/design new moddable interfaces.

IntegratedQuantum avatar May 27 '25 15:05 IntegratedQuantum

Should I create It?

Argmaster avatar May 27 '25 19:05 Argmaster

Do we want to create the registry system from ground up or base it on existing protocols and tools (eg. git?)

Argmaster avatar May 27 '25 19:05 Argmaster

Should I create It?

yes, but only for those features that you actually would want yourself. We shouldn't make everything accessible to mods for no reason.

IntegratedQuantum avatar May 27 '25 19:05 IntegratedQuantum

Do we want to create the registry system from ground up or base it on existing protocols and tools (eg. git?)

Well that is something worth investigating

IntegratedQuantum avatar May 27 '25 19:05 IntegratedQuantum