[DiscordArchive] Yes, but do you need to expose the c++ function to Lua server side, or client side?
[DiscordArchive] Yes, but do you need to expose the c++ function to Lua server side, or client side?
Archived author: Foe • Posted: 2022-04-06T08:13:25.619000+00:00
Original source
Yes, but do you need to expose the c++ function to Lua server side, or client side?
Archived author: DerSandmann • Posted: 2022-04-06T08:13:39.064000+00:00
Original source
client side
Archived author: Foe • Posted: 2022-04-06T08:17:02.477000+00:00
Original source
Then you need to communicate that to the client. This means you have to use a message framework of some kind, like AIO or CSMH, unless you want to write your own addon message handler, since we can't easily use custom packets. AIO also has a C++ script called CAIO, where you can write C++ to communicate with the client AIO addon.
If you don't want to distribute the full addon code from server to client, then I suggest using CSMH as it's for communication only.
Archived author: Foe • Posted: 2022-04-06T08:17:43.706000+00:00
Original source
AIO is tailored more to sending the full addon from the server to the client
Archived author: Honey • Posted: 2022-04-06T08:22:29.154000+00:00
Original source
Ah i got that wrong,i thought it was about server side exposure.
Archived author: Foe • Posted: 2022-04-06T08:24:43.202000+00:00
Original source
He'll need to do that too unless he wants to use CAIO or his own custom c++ addon message handler
Archived author: DerSandmann • Posted: 2022-04-06T08:25:15.072000+00:00
Original source
So there's no way to extend the built in LUA functions that the client has access to? Like adding a `doStuff()` which is callable from the Client? Or is that all handled by a client side LUA processor
Archived author: Foe • Posted: 2022-04-06T08:26:47.461000+00:00
Original source
It's possible, but it's complicated and not documented at all. You would have to either modify the binary file to extend the packet handler and the internal Lua Interpreter, or do it through a custom dll that you inject. I wouldn't recommend, it's not very straight forward
Archived author: DerSandmann • Posted: 2022-04-06T08:27:14.434000+00:00
Original source
So the alternative is AIO
Archived author: Foe • Posted: 2022-04-06T08:27:22.238000+00:00
Original source
Or CSMH, yes