UEVR icon indicating copy to clipboard operation
UEVR copied to clipboard

[Request] for more info regarding the UEVR Lua API

Open CYB3R-JUNKI3 opened this issue 1 year ago • 2 comments

I didn't really know how to categorize this I didn't feel comfortable labeling this as a bug as the problem is likely user error on my part.

I am extremely interested in using the Lua API to make UEVR plugins Would be possible to get more information on the UEVR Lua API in regards to setup and usage ?

I have scoured the UEVR Discord for any relevant information about the Lua API and the only useful info I could find was the following : "UEVR has no Lua API compiled into itself, it is a separate DLL that interacts with UEVR and can and has to be used in conjunction with a separate Lua environment Like UE4SS You would need to compile the lua API within UEVR first, then move it into a UE4SS mod folder, then require it from a lua script, then inject UEVR"

So far I have :

  • Cloned the latest UEVR
  • Followed the instructions to compile
  • Moved the resulting "LuaVR.dll" into a UE4SS mod folder

I then tried to do something simple from the "Lua API" UEVR Documentation, something trivial like printing version number etc.. just to make sure things were working. However, once I added (copy and pasted just to be sure) a few commands from the examples the script would not get past the second line : local LuaVR = require("LuaVR") local params = LuaVR.params Error "attempt to index a boolean value (local 'LuaVR')

As I mentioned above, this is likely user error, I am no scripting wizkid by any means but I'm simply not sure what I am doing wrong. Perhaps I didn't compile correctly ? Perhaps I'm putting the LuaVR.dll in the wrong place ? Could even be something stupid on my part, I have a habit of overthinking.

Any help or even a point in the right direction would be greatly appreciated.

CYB3R-JUNKI3 avatar May 05 '24 09:05 CYB3R-JUNKI3

https://github.com/praydog/UEVR/tree/lua-api

Not ready.

praydog avatar May 06 '24 01:05 praydog

Ah, ok, that would do it. Many thanks for the reply.

CYB3R-JUNKI3 avatar May 06 '24 08:05 CYB3R-JUNKI3

You can try the newly updated Lua API that is in the works in the PR here: https://github.com/praydog/UEVR/pull/255

You can get the lua-api branch builds from the Actions page

The one that's being worked on is far more capable than the one that was originally written about in the docs right now.

praydog avatar Jun 28 '24 14:06 praydog

Fantastic news! Many thanks for letting me know, appreciated :)

CYB3R-JUNKI3 avatar Jun 29 '24 07:06 CYB3R-JUNKI3