Hello! This is my first time using DevForum so sorry if I am doing anything wrong.
This plugin basically makes ModuleScript creation barely faster, but if you are lazy like me, I guess it would be useful.
Examples of what it does:
You create a module script and name it “EggHatchModule” because you are making a simulator. Normally the script will still say
local module = {}
return module
But with this it will automatically change to
local EggHatchModule = {}
return EggHatchModule
I also made it so it you name a module something ending with “data”, it will automatically set the module’s source to:
return {
}
If you name a module something ending with “init”(pretty useless), it will automatically set the module’s source to:
(function()
end)()
return true
Plugin Link: ModuleHelper - Roblox
That’s it. It is very simple and useless but its my first plugin lol.
I don’t really get the point in changing the name of the module table, the functionality is the same. But doesn’t seem too bad, well for the people who need it.
It waits for you to change the name to change it. It might be just me but I always like to make the module table name the same as the modulescript’s name lol.
This is awesome for people that sometimes are really tired or lazy just like you said. (Let’s say i’m one of them) That’s really good for a first Devforum resource. Keep up the nice work!
At the moment it’s not very helpful but maybe it could serve some use if you implemented fairly lengthy templates? For example, I work a lot with OOP and its pretty repetitive and boring to simply type in this code in each and every module i create:
local module = {};
module.__index = module;
function module.new()
local self = setmetatable({
_connections = {},
}, module);
return self;
end
function module:destroy()
for _,c in ipairs(self._connections) do
c:Disconnect();
end
table.clear(self._connections);
table.clear(self);
end
return module;
So maybe my suggestion would be to add some lengthy boilerplate templates in the plugin to make it actually helpful rather than just changing like two words in the module which is not tedious at all.