r/BG3mods • • 1d ago

Mod Creation Help Request Help with script extender and custom lua functions

So I’m trying to make my own custom function for some subclass spells. The function would be almost identical to ChargedLightningAuraRequirment() or any of the other stack requirement functions.

How do I actually go about making a lua file with the custom function so it would actually be accessible through in the mod. Also when I go to package the mod after it’s done, will the file come with it automatically? Thanks!

1 Upvotes

1 comment sorted by

1

u/Extension-Prize2398 1d ago

I don't know if you can write a new native function if that's what you want. But you can make listener in Lua that listens for cast and handle the function ln Lua instead. This guide does go through the basics of packaging your files. https://wiki.bg3.community/Tutorials/ScriptExtender/GettingStarted