https://app.alydus.net/static/alydus/liro/banner.png
What is Liro?*
Liro is a modular Garry’s Mod gamemode base. It has been designed from the ground up for code reusability and ease of use. With Liro there is two ways to design your gamemode, you may hardcode your gamemode into a single module, or separate your gamemode functions into different modules. Separation means you may benefit from reusing the modules in the future, you could also distribute the modules to others so they may benefit from your module(s) functionality.
Contributions
Liro is a base written from scratch and is fully open source, meaning you may contribute to the development of the base. At the moment, I am looking for contributors to help make some modules that will make some useful for inclusion in the releases.
Releases
Github Repo: https://github.com/Alydus/liro
Github Releases: https://github.com/Alydus/liro/releases/
Github Latest Release: https://github.com/Alydus/liro/releases/latest
Features
A optimized recursive module loader and clean output load logs
Global functions that can be reused from the Liro base files
Simple non-obstrusive console output
No messing about with include() and AddCSLuaFile()
Global (and per module) network strings defined in config, set before module initialization.
A easy to read and feature packed config
Configurable file prefixes (per module & global) for running files in different environments (e.g. sh_, sv_, cl_)
Ability to disable/enable modules in the base config. (gamemode/liro/config.lua)
All code is mostly all fully commented, meaning the code is easy to contribute to and modify to your own needs
Outdated version warning; automatically checks GitHub releases on post-initialization
Developer hooks (e.g. liro.successfullyLoadMODULENAME)
Note: A lot of Liro’s features are optionally meaning they can be disabled in the configuration file (liro/gamemode/liro/config.lua), features can also be configured here (obviously).
Developer Hooks
liro.attemptLoadModules - Called when liro attempts to load all of the modules
liro.attemptLoad(MODULENAME) - Called when the specified module attempts to load
liro.attemptCountModules - Called when liro attempts to count all the modules
liro.successfullyCountModules - Called when liro successfully loads all the modules
liro.successfullyLoaded(MODULENAME) - Called when the specified module attempts to load (returns moduleData as vararg)
liro.successfullyLoadedModules - Called when liro has successfully loaded all modules
Known Gamemodes using Liro
. Laser Tag (Released)
. Garry’s Murder Party! (Released)
. Lobby (Unreleased)
Note: Drop me a PM if you know (or own) a gamemode that is using Liro so I can add it to the thread!
Images
It’s hard to get many images of a gamemode base, but here’s the config.
config.lua (liro/liro/gamemode/liro/config.lua)
https://app.alydus.net/static/alydus/liro/config.png
registermodule.lua (liro/liro/gamemode/modules/examplemodule/registermodule.lua)
https://app.alydus.net/static/alydus/liro/registermodule.png
Example loading console output
https://app.alydus.net/static/alydus/liro/consoleoutput.png
I’ve been working on this base for a while now, I hope it comes in useful for any of your future projects. I’ve already been using it for a few little projects of mine and it’s really inspired me to make more gamemodes since the nitty gritty gamemode tasks aren’t needed.
Please don’t hesitate to leave some constructive advice in the thread comments, I’m looking to improve this as much as I can with the help of others.