Jojomen56's Utility Plugin [v. 2.7]

[size=2]Official release date: July 22[sup]nd[/sup], 2014[/size]

The plugin comes with built-in settings that allow you to customize its color and tweening speed (if you prefer no tweening, set the speed to 0), you can drag it to wherever you prefer, and you can set the default page for easy and quick access to your most-used feature. It also tells you whether it is up-to-date or if it requires you to update it via ROBLOX, which is neat if you’re not one to manage your plugins often.

There is a thin “description” box underneath the main GUI which tells you what your mouse is hovering on (if pertinent enough).

[center][[size=4]Jojomen56’s Utility Plugin[/size]

External Media

](http://www.roblox.com/--item?id=166459866)[/center]

Once you’ve installed the plugin if you wish to do so, you can find a

on your toolbar.

[size=4]What it Can Do[/size]

[ul]
[li]

[/li]
[li]

[size=2]These strings are printed to the output when clicked for you to copy onto your clipboard, since I cannot accomplish this.[/size][/li]
[li]Reflect models using a part (a mirror version is created)[/li]
[li]Adjust the Grip property of a tool[/li]
[li]Convert a GUI object into another (i.e. TextButton to TextLabel)[/li]
[li][b]Insert trusted assets by pasting their IDs[b][/li]
[li]Convert a script into a local script and vice-versa[/li]
[li]Set the sun’s position by clicking (Credit to Ripull)[/li]
[li]

[size=2]The scale property cannot be edited at the moment.[/size][/li]
[li]Collect every asset from the game and returns them in a single table
[size=2]Duplicates will be included for the moment and script sources are not yet searched by the function.[/size][/li]
[li]

[/li][li][size=4]NEW: [size=4]↓[/size][/size][/li][li][ul][spoiler=_G.sel(index)]

Example:

_G.sel().Color = _G.sel(2).BrickColor.Color --Note: _G.sel() == _G.sel(1)
which is equivalent to

game.Selection:Get()[1].Color = game.Selection:Get()[2].BrickColor.Color

Reason/Description:

Example:

_G.primary()

which is equivalent to

game.Selection:Get()[1].PrimaryPart = game.Selection:Get()[2]

or (what I used to do before)

_G.sel().PrimaryPart = _G.sel(2)

Reason/Description:

[/spoiler][/li]
[li]

[size=2]This new feature makes it easier for cell-by-cell building. You will notice that by moving your mouse, a selection box follows. Click a terrain cell and it will lock onto it and turn red. From there, the plugin will identifiy the three properties and synchronize the GUI display. You will then be able to change the settings and apply them.
Also: Hold SHIFT if you’re having trouble to target the cell you want. This will force the selection box upwards.[/size]
[li]

[size=2]Simply open the plugin, go to the light-bulb menu and select any object from the physical world or the explorer window. If that object contains any sort of color property (TextColor3, BrickColor, FogColor, BorderColor3, Value (Brick/Color3 Value objects) to name a few), the plugin will automatically detect them and will allow you to set the property you want, while letting you see the changes as you drag the cursor across the panel.[/size][/ul]


If you have any recommendations, constructive and non-derailing criticism or simple comments, please, do go right ahead and post them here. Also feel free to post what my plugin has helped you build as I’d love to see how useful it can be!

Note: I would like to mention that this plugin does not utilize the Http service in any way (in case you were worried, which I completely understand). You may verify the code as you wish, although I would prefer you not to take my code and make it your own (though I have no power over that).

Any and all updates will be kept to this thread and this thread only.

Cool plugin, I will be sure to use it.
Would it be possible to add more GUI related things such as easier ways to position GUI’s or something similar to GUI studio’s tools?

[quote] Cool plugin, I will be sure to use it.
Would it be possible to add more GUI related things such as easier ways to position GUI’s or something similar to GUI studio’s tools? [/quote]

That could be quite complicated, but I’ll see what I can do about that. If I do make something of the kind, I will probably just add draggable GUIs that will imitate Studio’s

, but for GUIs of course.

For the upcoming easy insert feature, perhaps allow us to save asset IDs (like with the strings) for even quicker insertion of assets we may use often? True, we can just save those IDs to the strings page, but it’s a thought.

This is really nice I love it, it has a feature I have been meaning to make my self but you beat me to it so here is a cookie * gives cookie *

some people have been asking me to create an API which allows them to easily save Models and instances with datastore, basically you make a plugin that inserts a module script and a normal script the module script containing the API code and the normal script is an example of how to use the API. If you wish to add this let me know, if not I will keep it on my to do list!

[quote] This is really nice I love it, it has a feature I have been meaning to make my self but you beat me to it so here is a cookie * gives cookie *

some people have been asking me to create an API which allows them to easily save Models and instances with datastore, basically you make a plugin that inserts a module script and a normal script the module script containing the API code and the normal script is an example of how to use the API. If you wish to add this let me know, if not I will keep it on my to do list! [/quote]

As long as the model is not a script this should be simple enough, honestly.

I’ve already suggested the below idea to Jojomen via Skype, but he’s unsure whether other developers will find it useful. Thus I post it here and ask that you guys tell us whether you’d use this function or not. Read on.

One thing I find very tedious in my projects is defining in my LocalScripts the variables for various Gui elements. By this I mean lines of code such as this:

AvDisplay = Gui:WaitForChild('Avatar Display')

What I do now is define all these values in a Module, add them to a table, and have the Module return the table. Here’s a snip of my Module code in RDR:

As you can see, I now only have to require the Module with my LocalScript and I have all those variables at my disposal. I use this method mainly to keep my LocalScript free of the 40+ lines of code I didn’t include in the image.

It is, however, very tedious going through my Gui and writing a total of 70+ lines of code to define every element I need to use in my scripts. Thus we finally arrive at my suggestion:

I suggested that Jojomen add to his plugin a feature where you select an asset (be it a ScreenGui, Model, or even Workspace), and the plugin will iterate through that asset’s children. As it iterates, it writes to the source of a ModuleScript and defines that child as a variable.

Basically, for every child, it adds to the source of a ModuleScript code such as this:

Table.AssetName = Location:WaitForChild('Asset')

…and at the end of the Module it returns the Table.

There would be a few requirements/options for this function. First, no two assets should have the same name, because as you can see the Module defines that asset as a variable with the same name as the asset.

Second, you could decide whether the variables will simply be the asset’s name, or if the variable would be comprised of all of the capital letters in the name of the asset. For instance:

ADF = Location:WaitForChild('AssetDisplayFrame')

So, after the function iterates through the asset’s children (and their children and so forth), you’d be given a ModuleScript with a source much like my image above. Of course, as Module code is run from the Module itself (and not the requiring script, thus script.Parent returns the Module’s parent), the Module would likely have to return a function which defines these values, and requiring scripts can provide as a function argument the asset through which to iterate to return these values.

If any assets do happen to have the same name, they don’t get defined, but rather a comment is added to the script (in the same location the asset would otherwise be defined) which informs the user of the name of the asset and that it wasn’t defined.

It would also be very easy to remove (or just never use) the values of objects you don’t need defined. The Module would also be easy to reference to remember what values are what (though it’d be pretty simple to figure out anyway).

In a nutshell: If you have a Gui with literally a hundred assets you need defined, you use this plugin to generate for you a Module that you can easily require to have all these assets defined in your scripts, without writing out all those definitions yourself. Just be sure to name each asset you need defined something different, and you’re good to go.

I like your plugin, it’s good.

The mirror part thing is really useful, and not confusing like some others I’ve seen.

This is a really useful plugin! One other thing I’d like to see is the ability to convert localscripts to serverscripts and vice versa.

Jojo, I have a sun moving plugin where you click the sky to move the sun to that point. Would you like to merge it with your Util?

You can keep it on your list; I don’t think I want to create that for my plugin in all honesty.

I was about to incorporate that until I realized that copy and paste does the job. I suppose I can include it. :slight_smile:
Done.

I was actually planning on making that, but then I remembered someone had already made something of the kind and I felt I would be plagiarizing. But seeing that you don’t mind, I will incorporate it. Thank you!
Done.

Wow this is very nice. Its always annoying for me to convert GUIs and scripts. Possible feature - Another annoyance I have is when I have to go through a model, and group specific bricks with a common property (That can’t be grouped simply by me dragging my mouse.) For example the body of a car is all black, but they’re not grouped together. So something like if they share the same ‘insert property here’ then group them together. -Sorry if that sounded confusing xD

I will see how many Thank-Yous you can get in sign of support, as well as TraeMan7’s suggestion above. I don’t find both these requests are useful, but if the majority of the RBXDev population (or ROBLOX in general) does, then I would be glad to make them.

Thank-you to everyone else whom I haven’t quoted for your feedback. Very appreciated!

Oh I still have to get you the code to the sun mover I have, I’ll send it to you in a PM later.

I’ve already added it - read the original post and you’ll find it in What it Can Do. It’s been there since v. 1.7. Thank you anyway!

Wait, how did you add it without me sending it? XD

He made his own :uhhh:

He made his own :uhhh:[/quote]

Jo, you might want to debounce the buttons.