Skip to content

Modules

Basilius Sauter edited this page Apr 20, 2019 · 2 revisions

Using and Installing Modules

See Finding and Installing Modules to learn more about how to find, install, and use modules in your game setups. This article is about developing your own module.

Quickstart Guide

  1. Make a module by starting with the code in the module-project repo:
# --no-secure-http is temporarily required while we setup HTTPS on code.lot.gd
composer create-project --repository https://raw.githubusercontent.com/lotgd/packages/master/build/packages.json -s dev lotgd/module-project fancymodule

This creates a new directory, fancymodule, with some boilerplate code.

  1. Inside your module's directory, modify the composer.json file to include information specific to your module.

  2. Change the namespace, name of the file and classname of src/MyModule.php and put your code there.

  3. Finally, either push your module to GitHub and add it to our module repository at code.lot.gd or put it somewhere composer can find it for your crate. See Composer Repositories for more about how composer finds dependencies.

Clone this wiki locally