Instance:SetSettings() / Instance:GetSettings()

Currently if you have a public model that you want to be configurable , you have to use value objects for settings so that everyone who’s not fluent in Lua can modify your model. This is not intuitive – you’d expect properties to be in the properties window, and not the explorer, as a new user. What we use is a convention, a tradition, that doesn’t make sense to anyone not familiar with it. “Why don’t they just add it to the properties window with the rest of the properties?” You’d only understand why we use this convention if you make public models yourself and know that we can’t add items to the properties window, but most content consumers are not content creators.

Ultimately what I want to be able to do with SetSettings and GetSettings is to be able to turn what’s on the left into what’s on the right:

GetSettings and SetSettings would work similarly to game.Selection:Get() and game.Selection:Set(). Instance:GetSettings() would return a table of the instance’s settings, and SetSettings() would modify that table. It’d have to be a dictionary and not an array so that properties could be stored as table[customPropertyName] = propertyValue. The benefit to using :GetSettings() and :SetSettings() in combination with Lua tables instead of adding real properties that you can modify with Instance.CustomPropertyName = newValue is that nothing hacky needs to be done on the C++ side. The properties would only be properties in name – they wouldn’t affect the instance directly, but the properties window would display any custom properties stored with SetSettings in the properties window. Integer indices and properties with inappropriate values (tables would be inappropriate, unless ROBLOX wanted to make a cool dropdown for tables) would not be displayed in the properties window, but anything that had a proper string index and valid value type would be displayed. Preferably ROBLOX would let you click a … button somewhere in the properties window and open up the settings table in a script to make it easy to add/remove “properties” without using the command bar.

Not only does this make configuring models more intuitive for content consumers, but it could be used to make everyday work easier. How many of you have wanted to re-work GUIs and add padding, better styles that can have their color changed, etc? At the time your only method of allowing people to configure those GUIs was to use a clunky GUI layered on top of the GUI you were working on, which is really bad because when you’re working on a GUI it should be the primary focus, and your view of it should not be obscured at all. With :GetSettings and :SetSettings however, you could create settings for those GUI objects, have a plugin monitor the changes, and then update your GUI when the settings of the instance changed. This would allot you the full amount of screen space available to configure your GUIs.

Properties should be located in the properties window – that’s what it was created for. This has been a minor problem for the longest time, and it’d be great if it were fixed.

1 Like

Yes please, yes. :DDD

This is somewhat similar to how Unity does custom user properties to an extent. So I support this.