Lua Resources

Looking for some resources to start script work with Grim Dawn. Let’s pretend I have no coding background. It’s been 15 years+ since I did any batch or basic work. I do have a Lua resource book and have skimmed their site. The scripts I have looked at seem pretty straight forward. You can pretty much read it like a sentence.

I’m going to dig through the TQ stuff. I’m sure the TQ vets have something stashed away :D.

Thanks

There is 0 information regarding Lua for TQ. Lua wasn’t a thing for TQ modders.

Actually dreamed about lua last night.

As far as I can tell, none of the available API is documented. The first step is to read all the scripts you can extract out of vanilla, you start to see how the devs do things. The next step, tonight’s project, is to use reflection to try to see if I can uncover all the members of the various Object, Entity, Game, etc classes. Currently, hooking a bunch of small scripts to the various triggers available in the Food (Autopickup materia) template and sending debug messages to screen with the UI.Notify() method. This is one of the more painful and time consuming aspects of modding that I have found so far. I suspect that tonight I am going to start probing this console thing (~ key) and see if I cannot start injecting lua code into the running game. But I have googled “lua reflection” and it appears at least the language supports it and we can also access metadata of C++ objects accessible in lua. Pretty sure, if we can just find a way to capture the output, we can use reflection to figure out what is defined by the API Crate developed.

But honestly, so far the best resource has been chatting with Elfe on discord.

Actually there is a tool that lets you do all this stuff with injecting and reading system commands, including error messages from the lua engine and a list of available overloads and it comes along with a script that does something similar to reflections but since the person that made it got banned here on the forum alongside his work, I’m not going to write anything about hooking Grim Dawn here.

I actually had to get my memory refreshed on this subject. The individual in question was banned for piracy issues.

Essentially, now that the game is released, we can use this forum to discuss reverse engineering and whatever we want, as long as we do not expose things that can be considered piracy (for example activation of Crucible without buying the Crucible, or even cosmetic items for that matter).