Module Tracker Plugin - Easily Create Dictionaries of Modules

Plugin: Module Tracker - Roblox
ModuleTracker
(Bad quality logo :neutral_face:)

Module Tracker plugin is a plugin that can change ModuleScript’s source to return a dictionary of ModuleScripts. You can think of it as converting instances to a table but only for folders and ModuleScripts.

Suppose this is your explorer:
image

There is a lot of scripts to require, so you might create a “Module Loader” which requires all modules and put them in a table. Like so:

local ModuleLoader = {}

local ModuleFolder = •••

for _, moduleScript in ModuleFolder:GetDescendants() do
	ModuleLoader[moduleScript.Name] = require(moduleScript)
end

return ModuleLoader

This works, however, the problem with this method is that intellisence or auto-complete does not work.

One way of getting around this problem is to manually type out a dictionary for all ModuleScripts. This can take a very long time, this is where the plugin comes in and do this for you:

return {
	["Server"] = {
		["Spells"] = {
			["FireSpell"] = require(script.Parent:FindFirstChild("Server"):FindFirstChild("Spells"):FindFirstChild("FireSpell"));
			["WateSpell"] = require(script.Parent:FindFirstChild("Server"):FindFirstChild("Spells"):FindFirstChild("WateSpell"));
		};
	};
	["Shared"] = {
		["TableUtility"] = {
			["Copy"] = {
				["SimpleCopy"] = require(script.Parent.Parent:FindFirstChild("ReplicatedStorage"):FindFirstChild("Shared"):FindFirstChild("TableUtility"):FindFirstChild("Copy"):FindFirstChild("SimpleCopy"));
				["DeepCopy"] = require(script.Parent.Parent:FindFirstChild("ReplicatedStorage"):FindFirstChild("Shared"):FindFirstChild("TableUtility"):FindFirstChild("Copy"):FindFirstChild("DeepCopy"));
			};
		};
	};
};

Here, “Server” and “Shared” are Directories.


This is the plugin’s UI:

  1. First, select the ModuleScript that you want to track other modules:
    image

  2. Then click Add Selection, this will add all the ModuleScripts that you have selected to the list. You will not be able to add ModuleScripts that you had already added to the tracking list.
    image

  3. You can add only add folders for directories.
    Then you will be able to add it to the tracking list by clicking the highlighted button below:
    image

  4. You ModuleScript’s code will be changed into a dictionary like so:

return {
	["Shared"] = {
		["TableUtility"] = {
			["Copy"] = {
				["SimpleCopy"] = require(script.Parent.Parent:FindFirstChild("ReplicatedStorage"):FindFirstChild("Shared"):FindFirstChild("TableUtility"):FindFirstChild("Copy"):FindFirstChild("SimpleCopy"));
				["DeepCopy"] = require(script.Parent.Parent:FindFirstChild("ReplicatedStorage"):FindFirstChild("Shared"):FindFirstChild("TableUtility"):FindFirstChild("Copy"):FindFirstChild("DeepCopy"));
			};
		};
	};
	["Server"] = {
		["Spells"] = {
			["FireSpell"] = require(script.Parent:FindFirstChild("Server"):FindFirstChild("Spells"):FindFirstChild("FireSpell"));
			["WateSpell"] = require(script.Parent:FindFirstChild("Server"):FindFirstChild("Spells"):FindFirstChild("WateSpell"));
		};
	};
};

Simply click this button to update the tracking modules:
image

If you want remove tracks or edit them you can go to the “Track List” tab:
image

By clicking the pencil icon, you can edit the directories:
image

You can get the plugin here: Module Tracker - Roblox

Limitations and Warnings:
• Will only check ModuleScripts under folders. ModuleScripts under any other instances including other ModuleScripts will be ignored.
• You cannot undo tracks.
• You cannot use two folders or modules having the same name properly, it will only work on one.

5 Likes

What I am interested in is the UI. How did you make it look so similar to other core roblox plugins?

image
image

Did you design it like that yourself or did you use some sort of library?

I designed the UI myself except for the tabs which I modified. I got the colors the Roblox Studio uses using:

settings().Studio.Theme:GetColor(Enum.StudioStyleGuideColor[•••], Enum.StudioStyleGuideModifier[•••])

In case you would like to know, I change cursor to this when they are hovering buttons:

plugin:GetMouse().Icon = "rbxasset://SystemCursors/PointingHand"