Developer PeterA Posted April 29, 2015 Developer Share Posted April 29, 2015 Hey everyone, I recently found out that some people didn't realize they could add their own console commands from a mod. It's as simple as adding a function to the global table. I did this for the Glutton mod to help with control the tournament's servers from the console.--in modmain.lualocal function StartGlutton() print("### StartGlutton ###") world_inst.components.GluttonGameLogic:StartGlutton()endGLOBAL.StartGlutton = StartGluttonThen I simply needed to run "StartGlutton()" from the server's console to start the game. Hopefully this information is useful for someone else in setting up their own console commands. Link to comment https://forums.kleientertainment.com/forums/topic/53323-adding-custom-console-commands/ Share on other sites More sharing options...
Silentdarkness1 Posted April 29, 2015 Share Posted April 29, 2015 (edited) Thank you, @PeterA! This ought to make it much easier for more thorough modmakers to make their own console commands for debugging purposes. Edited April 29, 2015 by Silentdarkness1 Link to comment https://forums.kleientertainment.com/forums/topic/53323-adding-custom-console-commands/#findComment-632994 Share on other sites More sharing options...
SenL Posted April 29, 2015 Share Posted April 29, 2015 Holy crap this is huge! Link to comment https://forums.kleientertainment.com/forums/topic/53323-adding-custom-console-commands/#findComment-633235 Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now