[V2.1] Quick actions plugin

Icon Quick Actions Website

Quick actions


The Quick actions plugin allows you to make module scripts that you can run at any time, depending on what instance(s) you have selected. This allows you to create reusable actions to save your time.

Link: Quick actions - Roblox

Video:

How it works


When you activate the plugin, it will scan through all your selected instances.
It will also scan through all of the modules in the Menus folder.
If SelectedInstance:IsA(MenuName) then all the actions specified in that menu module will be added to a plugin dropdown menu.
Clicking on the buttons in the dropdown will require respective modules in the Actions folder.
These modules can do anything you want them to.

Plugin widget


This plugin creates a button in your PLUGINS tab on the ribbonbar.
If you click it, you will be met with a widget.

You can toggle Enabled to enable or disable the entire plugin.
You can toggle Icons to enable or disable the icons that show up in the dropdown menu (can improve performance)
You can toggle Class sorting to enable/disable class submenus. (Actions from any menu will be grouped into a submenu, with the menus name)

Select actions selects the “RGB_QuickActions” folder in ServerStorage
View action tree opens up the action tree, more info on it below.
Update built-in actions will replace all built-in actions with the most recent ones. (It will NOT add missing actions)
Add missing actions adds any menus or actions that are missing from your folder. It will NOT replace or remove existing ones.
Reset actions will completely reset all your actions and menus to the defaults.

Action tree


The action tree shows you all of your menus, submenus and actions in a list.

If you click any of them, you can see info about them, including an option to disable the clicked action/menu/submenu and to show it in the explorer.

You can press + and - on your keyboard while hovering over the menu to zoom in/out.

Please keep in mind the action tree does NOT update automatically, you need to click the Refresh button to see changes.
This applies to adding, editing, removing and manually disabling (from properties, not the action tree) any menu or action.

Main folder


The RGBUtilityStorage folder is used to store all RGB Utility plugin assets. The QuickActions folder is the folder that stores all needed assets for this specific plugin. User_(user id) is the main folder that contains menus and actions for a specific player, by user ID.
Its stored in ReplicatedStorage, and is local to the place you are currently in, which means you have to copy and paste them in different games.
image

You cannot remove these folders, except for the contents of the Actions and Menus folders. Uninstall the plugin to completely remove.

Menus


The Menus folder contains modules which are named after classes.
image
(exception is Default, do not remove it, but you can change the contents)

When you use the plugin while having an instance selected, if that menu module name is equal to the selected instance’s class name, its contents will be used in the dropdown menu that will show up.

Menus are structured like this:

local Menu = {} -- do not change


Menu.Order = 1 -- [OPTIONAL] defaults to 1, the higher the value, the lower the menu will show up on the dropdown


Menu.ClassBlacklist = { -- [OPTIONAL] blacklist, if selected instance matches any of the classes in this table, it will be ignored
	"Terrain",
}


Menu.ClassWhitelist = { -- [OPTIONAL] whitelist, only the classes in this table will be considered
	"Part",
}


-- you cannot have a whitelist AND blacklist, you can only have one of them, or neither!


function Menu.CustomCondition(obj) -- [OPTIONAL] custom condition, needs to return true or false, selected instance will be ignored if this function returns false
	
	-- example
	if obj.Name == "example" then -- only allow when instance name is "example"
		return true -- allow
	end
	
	return false -- deny
end


Menu.ActionConditions = { -- [OPTIONAL] conditions for specific actions, can be reused
	example = function()
		if math.random(1, 2) == 1 then -- only allow the action by coin toss
			return true -- allow
		end

		return false -- deny
	end,
}


Menu.Actions = { -- do not change, order of actions is the same order you will see them in the dropdown

	{ ----------------- START -----------------
		Name = "RGB_FlipParts", -- aciton token, must be unique
		Text = "Flip part", -- action description
		Icon = "rbxassetid://8666161124", -- action icon
		ActionCondition = Menu.ActionConditions.example, -- [OPTIONAL] hook up the action to the condition function
		Parameters = {example = true}, -- [OPTIONAL] add parameters to your action, so you can use the same action multiple times in a single menu, but with different results (does not work with submenus)
		SubMenu = true, -- [OPTIONAL] make a submenu instead of an action

		Actions = { -- ONLY works if SubMenu = true, structured the same way normal actions are

		}

	}, ----------------- END ------------------

} -- do not change


Menu.ClassIcon = "Part" -- [OPTIONAL] what icon to use for the action tree, since some base classes such as "BasePart" dont have icons


return Menu -- do not change

Actions


The Actions folder contains folders named after your menus.

These folders names must have the exact same name as the menus.
(exception is Default folder, do not remove it but you can change the contents)

The folders contain modules that are named after the action tokens you put in your Menus modules.
The action modules contain code that can do anything you want.
However, these modules MUST contain a function function Action.ExecuteAction() or else it will not work.

Actions are structured like this:

local Action = {} -- do not change


function Action.ExecuteAction(selectedInstances, parameters) -- do not change
	-- do anything you want here

    -- `selectedInstances` is a table of all selected instances that match the menu whitelist/blacklist and custom condition

    -- `parameters` is the "Parameters" table that you specified in the menu module
	
	-- example
	for _, obj in pairs(selectedInstances) do
		if obj:IsA("BasePart") and parameters.example == true then
			obj.BrickColor = BrickColor.Random() -- set color to random
		end
	end
end


return Action -- do not change

Gotchas


  • After first installing the plugin, you need to click Allow on the script injection permission window, restart studio, and click Reset actions
  • Unfortunately, you need to set a keybind for this plugin manually, go into FILE > Advanced > Customize Shortcuts..., search “RGB” and set “Open RGB Quick Actions” to any key you want.
  • You NEED to keep the Default menu and action folder, however, you can edit, add or disable the menus/actions.
  • The action tree does not update automatically, you need to click the Refresh button if you make any changes to menus or actions.
  • The main folder does not carry over to other places. You need to copy and paste it manually, or convert it into a package.

Please let my know if you have any questions!

Also let me know if the explanations in this topic are clear enough, Im not very good at explaining things.

25 Likes

Hey, nice plugin, but what does this mean?
image

4 Likes

So sorry about that!

ActionId’s behave different on a published plugin rather than a local one, I was not aware of that.

I fixed it now!

4 Likes

Update 1.1:


  • Added light mode support
  • Fixed “Could not find action with token …”
  • Fixed default settings
2 Likes

Update 1.2:


  • Fixed plugin breaking when custom conditions or action conditions error
  • Fixed Default menu submenus not working
  • Added new “Insert hidden parts” submenu to Default menu, with actions Insert truss, Insert wedge corner and Insert mesh part
2 Likes

very nice but the font is just so atrocious.

What font should I change it to?

1 Like

If you click on an instance in the explorer, would it be able to copy the path of the specified instance?

1 Like

Yes! Thats a premade action that works for every instance.

2 Likes

Maybe arial or gothamsemibold

Update 1.3:


  • You can now add ActionConditions to submenus
  • Fixed plugin breaking when action errors

Bonus:


I was working on a clipboard submenu, but its a bit unstable so I didnt want to add it to the presets. If you want to try it out, here it is:
Clipboard Submenu.rbxm (2.9 KB)

How it works:

  • Select part or model
  • Click Add object to clipboard to clone it into the clipboard
  • Go into the default menu
  • Go into submenu Clipboard
  • Click Insert (model) from clipboard to clone it into workspace

This allows you to copy multiple parts/models at once and insert them whenever you want. But since it adds actions dynamically, the action tree behaves weird.

1 Like

Update 1.4:


  • New menu for scaling UI components. Supported components:

    • UIGridLayout
    • UIListLayout
    • UIPadding
    • UIPageLayout
    • UITableLayout
    • UICorner
  • New actions for scaling scrolling frame canvas size

  • Removed unnecessary “Add wedge corner” action (This is now a default studio feature!)

Update 1.5:


  • New “class sorting” option
    Before: (when selecting a part)
    image
    After: (when selecting a part)
    image

  • Action tree scaling now saves

  • Fixed TileSize must have non-zero width and height. warning

  • Shared toolbar now has better functionality

2 Likes

Update 1.6:


  • New Order variable in menus. The lower the value, the higher up the menu will show up on the dropdown.
  • New selectedInstances variable in actions. This is a table of all selected instances that match the clicked menu whitelist/blacklist/custom condition. You do NOT need to use it, but its more convenient.
  • New “Update built-in actions” button. It will replace all built-in actions/menus with the most up to date ones. It will NOT add missing actions/menus
  • Renamed “Reconcile actions” to “Add missing actions”
  • Some small fixes

This is probably the last update in a while (unless there are some bugs), since there really isnt much else I can add to this.

1 Like

Update 1.7:


  • New Parameters table in actions. This allows you to use the same action multiple times, but with different results. (See Model or BasePart menu and actions for examples)
  • Converted some built-in actions to use Parameters
  • New actions:
    • Default:
      • Toggle lighting - Allows you to to see in the dark (fullbright)
      • Toggle camera light - Allows you to emit a light from your camera position
    • Lighting: (New menu)
      • Export lighting properties: Exports properties and children of lighting
    • Seat: (New menu)
      • Preview character on seat - Places a character on your seat, to see how it looks
    • Folder:
      • Import lighting properties - Imports properties and children of a lighting export
    • Model:
      • Randomize model rotation - A submenu that includes 4 actions for randomly rotating your model on X, Y or Z axes (Or all of them at once!)
  • Small UI improvements
  • New studio and website icons
  • Removed unnecessary “Group to folder” action, as its now a built-in studio feature

I was also about to remake all the action icons to look like the new studio explorer icons, but that studio update got reverted. Oh well. I will remake them once the full icon update is released though.

1 Like

Pardon for bumping, but, can you add autocompletion to scripts?
If it’s not achievable, then, as far as i remember it’s possible to make another plugin window and put the script snippet in there
I’ll explain how it works

  1. User presses a hotkey button and the menu appears
  2. In the (new?) script autocompletion dropdown user types in, for example, function
  3. A new script/plugin window appears in roblox studio, with this code:
function newFunction()
    --// do something
end

Or, if given enough time, if user types in function name that returns 1 will output this:

function name(...)
    return 1
end

Hope to see it implemented in the future!

1 Like

Update 2.0:


  • Cleaned up a LOT of code
  • Fixed yielding actions
  • Plugin is less prone to breaking now
  • Fixed edge case with Class Sorting where an empty submenu would show up
  • Fixed Seat preview and Set Camera CFrame to part CFrame
  • Actions no longer use pairs or ipairs in favor of generalized iteration

Forgot I even had this version. It was sitting in my local plugins since forever, and I guess I just didnt have time to finish it. Mostly just a big reorganization of all the code, with some fixes.

ALSO, if you were wondering, this plugin will stay completely free.

EDIT: Forgot to mention, the plugin now works in local test mode.
…but it only works with the default actions and menus.
Currently actions are stored in ServerStorage, so its impossible to use your custom ones on the client. This will be changed in the next update, along with proper team create support

1 Like

Update 2.1:


  • Changed format of storage folder
    Before:
    image
    After:
    image
    (You unfortunately need to migrate manually)

  • Full team create support (different menus and actions per user)

  • Local run mode full support

  • Storage folder, some of its contents and CoreGui config folder cannot be removed/renamed anymore for security

  • Code changes and optimizations

I kinda forgot about the icons, since I dont actually have them enabled. (they make my studio freeze for a sec, does anyone else have that issue? I dont think its the plugins fault though) I was gonna make new icons for this version, but then I noticed there is literally no way to get the current icons (other than screenshotting them, but thats jank)

I wish there was a better place for the storage folder though. Somewhere that saves in studio, but does not appear at all in published games. If only.

EDIT: Just did a small update, didnt want to make a whole post and version number for it though.

  • Added Import actions button

The button only shows up when you have a valid folder selected (One that has a Menus folder and Actions folder)
Clicking import replaces your current user folder with the one you are importing (Name changes automatically, default actions/menus get added automatically if missing)
This also works with packages, which was the main reason of adding this actually.
You can convert the new user folder into a package, but if you had an existing package (like me), it was impossible to import it properly.

2 Likes

Can you add an option to copy properties? For example, if I wanted to change a frame to a scrolling frame but keep the same properties.

wow this is awesome, i was just about to make this exact thing.

1 Like