Content: Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>JulienDethurens
No edit summary
>JulienDethurens
No edit summary
 
(One intermediate revision by the same user not shown)
(No difference)

Latest revision as of 17:49, 7 April 2012

Content is a data type that is closely related to a string. In fact, it is a string. Usually, a content data type is a link to a file. On some objects, setting the property that uses this value type is forbidden.

Diagram showing how links get passed.

On Roblox, the ContentFilter service causes any links to files not on one of the Roblox sites or on the trusted sites to not load. The picture on the right shows how the filter works.


How content is formatted

Content can be formatted in many ways. All of which either point to an online file or a file saved to the client's computer.

rbxasset://directoryFile/file.type

This redirects to the content folder of the client's computer.

Here's a list of directoryFiles:

rbxasset://fonts/
rbxasset://music/
rbxasset://particles/
rbxasset://sky/
rbxasset://sounds/
rbxasset://textures/
rbxasset://textures/ui/
Example
This would be the image of the button to maximize the playerlist that you see on the top of the playerlist: playerlist_small_maximize


rbxhttp://directory

This basically just adds the directory to the end of ContentProvider.BaseUrl.

Example
This would be the TBC overlay that you see on TBC members' characters: rbxhttp://images/icons/overlay_tbcOnly.png


And it would be the equivalent of this: http://www.roblox.com/images/icons/overlay_tbcOnly.png


rbxassetid://assetId

This points to a user-created asset on the site. Its much easier than typing out the entire URL but also disallows finding things like assetVersionIds.

Example
This is a rbxassetid link that points to the justice decal by ROBLOX: rbxassetid://29464013


And this is its URL equivalent: http://www.roblox.com/asset/?id=29464013


http:// and https://

This points to the exact location of something on the internet. It only works on roblox-approved sites and will raise an error if used otherwise.

Example
Here is an example of finding an asset from gametest: http://gametest.roblox.com/Asset?id=12223885