PivityGmodStore

⚉ How do I create a new achievement?

Answer:


Ensure you follow these steps properly if you are creating a new achievement. Failure to do things properly will mean that your achievement won't load.

  1. Within your server, navigate to the achievements folder:

xtask/lua/achievements/*

  1. Enter/create a new folder based on the category you want the achievement to fall under

ensure the new folder name does not contain spaces or special characters.

  1. Create a new file which will store the code for your achievement

ensure the new file name does not contain spaces or special characters, and that the file ends in .lua

  1. Open the newly created file in a text editor such as Visual Studio Code, Atom, Notepad++, etc.


  1. Begin writing your new achievement. You will need to provide the proper values for your achievement, which can be copied from an existing achievement. If you need a more detailed description of what each value does; you can open the provided template file which is located in

xtask/lua/achievements/@template.lua

  1. Save the achievement file once you have finished writing the code.


  1. Restart your server, and wait for it to finish. You may then connect to your server with gmod, and activate the achievement ui by pressing the toggle key ( F7 by default ).


  1. If you are able to locate your achievement within the overall list; it has been properly loaded. You can start testing to ensure it works properly.


Can't find what you're looking for?

Contact support