Calling my mod from another mod?
Posted: Sun Jun 01, 2014 3:48 am
Hi all, I am currently working on a mod called EndlessWaltz that basically implements tower defense features to the game.
http://i.imgur.com/OVWjCus.jpg (The wave didn't start yet so I went hunting for units with grenades to test if the kills were being counted properly.)
Being the lazy guy I am, I doubt I will actually go into creating more units/items. However I would like to make this mod available for other people to be able to hook into if they wish.
What would be the best way of doing this? From having interacted with the story elements in the campaign and trying to mix it together with this, I've come across some problems whereby any mod that registers any onevent can overwrrite my lua code. Is there a way to protect my function from being overwritten?
Also I have a few functions where the users can pass in their own arguments to set what units spawn, how much reward point(in progress) is rertrieved, what items can be bought with, how much points each type gives, etc. Is there a way user can call my functions from their mod?
Thanks in advance!
blah900
http://i.imgur.com/OVWjCus.jpg (The wave didn't start yet so I went hunting for units with grenades to test if the kills were being counted properly.)
Being the lazy guy I am, I doubt I will actually go into creating more units/items. However I would like to make this mod available for other people to be able to hook into if they wish.
What would be the best way of doing this? From having interacted with the story elements in the campaign and trying to mix it together with this, I've come across some problems whereby any mod that registers any onevent can overwrrite my lua code. Is there a way to protect my function from being overwritten?
Also I have a few functions where the users can pass in their own arguments to set what units spawn, how much reward point(in progress) is rertrieved, what items can be bought with, how much points each type gives, etc. Is there a way user can call my functions from their mod?
Thanks in advance!
blah900