[V1.7] 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 RGB_QuickActions folder is the main folder that contains menus and actions.
Its stored in ServerStorage, and is local to the place you are currently in, which means you have to copy and paste them in different games.
image

The plugin wont break if you accidentally delete this folder, but you will need to click Reset actions in the plugin widget or undo.

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.
  • If you are using this plugin while running a game in studio, it unfortunately only works in server view, due to how loading external modules works.
  • You NEED to keep the Default menu and action folder, otherwise the plugin wont work. 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.
  • If you are struggling with anything, feel free to take a look at any of the preset actions or menus!

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.

21 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