AttorneyOnline / akashi

C++ AO2 Server
GNU Affero General Public License v3.0
4 stars 23 forks source link

Add support for custom commands #309

Open mposs00 opened 2 years ago

mposs00 commented 2 years ago

Work for this cannot start until the API refactor has been completed. An FFI should be exposed to some interpreted language, and a library to interpret that language must be included. Perhaps Lua?

Any end user should be able to define commands that are able to modify the state of clients, areas, and servers, as well as send arbitrary packets, without recompiling the server or writing any C++.

Please share any input

Salanto commented 2 years ago

For Powershell I could write a module binding for Akashi to expose the FFI and publish it through PSGallery as it can load most C++ libs with a few tricks.

Lua is kinda an edge case, while powerful, it lacks people who know how to write for it as its syntax is a bit non-standard.

mposs00 commented 2 years ago

the problem is that there are more steps than just exposing the FFI; it needs to be done at runtime, as well as have the ability to override virtual functions and call them from C++