I'm trying to see what is possible with LUA Coding. For example I want to make it possible to have slow motion on a beam break or beam deform, when the beam breaks/deforms the speed will slow to 8x and after 4 seconds it will go back to real time. I imagine the jbeam code would looks similar to this (just a rough example) Code: ["f1","f30",{"beamDeform":"gamephyics:8x","timeDelay":"4 secounds","control":"beamDeform"}], How would I go about creating that? what LUA code would need to be looked at or added for such a thing? Also another Idea I have is that when a car reaches a certain jump height, the game goes to 100x, the camera does a spin around the vehicle, when the camera reaches 180 degress, a sound is played, when it reaches 360 degress the game goes back to real time Another Idea I call "Slow Motion Crash Feature" So what are the limits of LUA coding for this game? for example is LUA coding similar to C++ coding where basically anything is possible? If I can master LUA coding I want to get a rough idea of the types of things that are possible in game.
Lua is a full-fledged programming languages: the only limits are those of the game itself and the ways you can interact with it. I'm pretty sure that what you want to achieve is possible. That said: you're in way over your head. Your post makes it plain you have little to no programming experience: I suggest you start by learning Lua itself, and only when you can comfortable find your way in that, start to learn how to write scripts/mod for this game. With the complete lack of documentation on offer and the constantly changing landscape, that is an entire learning experience on its own.
It looks like the only limit is the games own feature set, but it sounds like the LUA programing language is always changing or being added/updated if I'm understanding you correctly? I'll start with learning LUA coding first before trying to apply it to BeamNG, starting here ---> https://www.lua.org/about.html but is BeamNG implementing its own type of LUA code or is the LUA code universal in any programming setting? For example, take someone whos an expert in LUA coding for another program, would they instantly recognize and be able to modify BeamNG LUA with ease or would they have to learn how the LUA is being used in BeamNG first? Indeed! I got these Ideas from both GTA 4 with its cinematic hidden jumps and Burnout take down, I loved the crash camera, epic work by the developers! sadly never to be seen again, I hope to change that with BeamNG no matter how many hours I have to study LUA! Also I got the beamBreak slow motion to work! That's a start
They would recognize the programming language, but the API/Libraries that any game uses is completely different from the other games. So you'd have to learn BeamNG's API. Which sadly, is not documented very well.
Ok thanks, Ill have to start learning all of these things, sounds like the API's are what BeamNG compiles/creates and then LUA coding handles them. I'm in learning mode now If its not documented well that will present a stiff road block, still I can learn LUA coding itself so when BeamNG has proper docs I'll have a headstart.
I have learned quite a bit about the BeamNG Lua, but it has taken me about 6 months to totally understand what I'm doing... lol. I learned Lua only by BeamNG's Source Code but I knew Java/JavaScript before, which helped me with learning Lua. If you have any questions I can try and help you. Good luck and hope to see awesome Lua mods from you! (if you continue learning it) Note: This might help with learning BeamNG's API, but like I said above, it is poorly documented and you don't know lua very well (I assume) so it might not help you as of right now. http://wiki.beamng.com/Lua:Reference
Gah, lua isn't an acronym, its not capitalised except at the start of the sentence. Lua or lua not LUA
Ok thanks for the link!, ive jumped right in, checking out some youtube videos on the basics, i'll post back if I run into problems