Jump to content

How to import from other mod inside of a lua file?


Sykriss

Recommended Posts

Working on making a Hydrocraft compatibility patch for ORGM, and in the hunting luas I have inserted all of the ORGM weaponry. However, when trying to hunt with some of the guns, I absolutely never, ever actually get a kill - and I believe this is because the script isn't seeing that I have the ORGM gun in my inventory, therefore reducing the chance to zero. How would I go about importing assets from a different mod inside of a lua file? I know how to in recipe txt scripts, but I haven't been able to find solid documentation on how to do it from within a lua file. Thanks a bunch!

 

Edit: Nevermind, after trying it a few more times it seems to be working. However, the question still stands as I'm not entirely sure as to why it IS working - I'm assuming lua files can reference all items within all modules, but I have no idea if that is the correct answer. 

Link to comment
Share on other sites

Edit: Nevermind, after trying it a few more times it seems to be working. However, the question still stands as I'm not entirely sure as to why it IS working - I'm assuming lua files can reference all items within all modules, but I have no idea if that is the correct answer. 

 

Yes, lua isn't module based, if 2 mods have the same scriptname, it'll overwrite one even. but, items are all loaded in for lua to use, and lua can do anything with all items from all modules :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...