Jump to content

Adding custom console commands

Recommended Posts

  • Developer

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 = StartGlutton

Then 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
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...