Implement Lua API
I know that you guys are working on this project from scratch, but here is my suggestion and support for lua scripts
coming soon! and LSC tuning too!
LSC Tuning Would be a great feature
Lets wait for maybegreat48 to cook i tried but im not pro like @maybegreat48 https://github.com/Mr-X-GTA/YimMenu/commit/03c1a96b67b75d8a5b25e2e0044aadd309b078ce 🫡❤️
our patience might be rewarded <3
I'm sure this is still in the works, and I know you guys are busy with updates/patches/other open tickets. Just curious if there has been any movement with implementing the LUA API into V2? Or is this something that is going to take a while?
I'm thinking of using WebAssembly for scripting instead of Lua. What are your opinions on this?
I think WebAssembly would be a lot harder to create scripts for and will cause a lot of scripts to be released without the source code.
I'm thinking of using WebAssembly for scripting instead of Lua. What are your opinions on this?
From what I've researched it seems to be good, is there a demo/preview showing how it compares to lua?
I think WebAssembly would be a lot harder to create scripts for
I don't think anyone will be writing GTA scripts in WebAssembly unless they either hate themselves or get aroused from pain and humiliation 😅 Most will just use Rust or TS then compile down but that means no source. I guess mbg could enforce one higher-level language and expect source code then compile it into WASM on load? But why do all that instead of just using that language? Basically the issue I have with this is if people start submitting only compiled .wasm blobs then we lose transparency and the whole spirit of open source that this community is built on.
Lua is open source and human readable. Better. At all costs. Especially for gta 5 modding.
I personally don't think most people will be using WASM for scripts, and most people will be likely confused due to being used to LUA scripts. I don't think this is good for end users nor developers.
Do you want custom UIs using raw ImGui and the ability to hook arbitrary functions? Because that'll add a lot of complexity to the Lua implementation
Do you want custom UIs using raw ImGui?
That would be nice especially for those who like to introduce gameplay enhancements/rp elements to the game (wanna draw a custom fighter jet HUD? ImGui is your friend) but I agree that it'll add a lot of complexity and even double the time and effort it takes to finish the API but in the long run, it's totally worth it even for drawing the base UI of a script, you can create something totally different from the menu, which is nice. Why not start with basic bindings to get things up and running then add more stuff over time and as needed just like you guys did with the old API?
and the ability to hook arbitrary functions?
Never used that part of the old API because when it comes to actual skill-based game hacking, I'm a total monkey but I remember ShinyWasabi used that alot and released very good and useful Lua scripts so yes.
There is a Lua script prototype now. More features and documentation will be added soon
Thank you for the update, I appreciate your hard work with implementing LuaJIT inside of it. Also, it seems like a great idea to make some type of ImGui menu API inside of the LUA enviornment / sandbox.
I also think it is a great idea to make hookfunctions / hooking arbitrary functions, however, I think that is something for later. Again, thanks for your hard work
I appreciate your hard work with implementing LuaJIT inside of it.
Huh? Is it actually LuaJIT or Lua54?
I appreciate your hard work with implementing LuaJIT inside of it.
Huh? Is it actually LuaJIT or Lua54?
Yes, it is luaJIT if you look inside of the recent commits, the CMake imports specify the LuaJIT implementations rather than lua5.4 implementations.
A quick question/poll
Do you want Lua methods to look like set_invincible, setInvincible, or SetInvincible?
For more context, our class names are PascalCase in C++, and our methods also use PascalCase, but snake_case might be more idiomatic Lua. We don't use camelCase anywhere right now, but added it for completeness
This can't be changed once Lua support officially releases
A quick question/poll
Do you want Lua methods to look like
set_invincible,setInvincible, orSetInvincible?This can't be changed after Lua officially releases
I vote for setInvincible.
I vote snake case.
I vote Set_Invincible
I vote setInvincible.
A quick question/poll
Do you want Lua methods to look like
set_invincible,setInvincible, orSetInvincible? For more context, our class names are PascalCase in C++, and our methods also use PascalCase, but snake_case might be more idiomatic Lua. We don't use camelCase anywhere right now, but added it for completenessThis can't be changed once Lua support officially releases
idk anything about coding or whatever but since set invincible is winning ill vote setinvincible
I personally think setInvincible should be chosen rather than the other options because camel case is the preferred lua casing for functions and variables.
Though Lua and Python have the same human-readable syntax, coding standards should still be put into place and camel case should be chosen imo.
I am mentioning Python because snake-case was mentioned inside of this post.
I personally think setInvincible should be chosen rather than the other options because camel case is the preferred lua casing for functions and variables.
Snake case is preferred by most lua projects, not camel case
because camel case is the preferred lua casing for functions and variables
Nope. Snake case is the most commonly used naming convention for both Lua and Python. In your code you're free to use any style you want (and you should, to distinguish your user-defined variables/methods from built in ones). Lower camel case is comonly used in JS and doesn't make sense here so I recommend we either stick with the menu's style (upper camel case) or use the regular Lua style (snake case).
umm is it wrong if i ask can i use the lua menu or rather where to find the usable lua scripts
umm is it wrong if i ask can i use the lua menu or rather where to find the usable lua scripts
LUA support is still in the process of being implemented, hence the reason it's being asked which case format everyone prefers. There are no usable scripts for V2 as of yet.
umm is it wrong if i ask can i use the lua menu or rather where to find the usable lua scripts
LUA support is still in the process of being implemented, hence the reason it's being asked which case format everyone prefers. There are no usable scripts for V2 as of yet.
Aaaaaaahhhh no wonder why scripts won't work thanks for enlighten me
Aaaaaaahhhh no wonder why scripts won't work thanks for enlighten me
If you tried to run a script from legacy YimMenu then it won't work even when this API is finished because it's different which means scripts are not compatible between the two menus even if they only call a few natives. There's still room to make some kind of cross-compatibility by renaming some class methods to match the old API like run_in_callback vs run_in_fiber but that takes time and mbg has done more than enough at this point. Lua devs will have to write their own compatibility layers to detect the environment and adjust their code to work for both APIs since they already have to adjust for game versions when writing cross-compatible scripts.