Garry's Mod

Garry's Mod

1,247 ratings
Material URL Tool (Beta)
4
3
3
10
5
4
2
2
3
3
3
3
2
2
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Tool
Addon Tags: Build, Fun
File Size
Posted
Updated
65.159 KB
28 Jul, 2021 @ 4:00am
5 Sep, 2021 @ 3:00am
17 Change Notes ( view )

Subscribe to download
Material URL Tool (Beta)

Description
Material URL is a tool that allows you to use images from the internet as materials! SubMaterial feature!
v0.8.3
Please be aware that the development of this addon is currently slowed/stopped because I'm studying.

If you enjoy the addon, consider supporting it by leaving a like and sharing it with your friends, and please let me know your thoughts in the comments!
You can use this tool whether it's for memeing with your friends or simply for building!

This addon is still a Beta, so there is room for improvement and there are maybe bugs. I'll gladly appreciate any feedback!

How to use it?
How to copy an image's URL: https://i.imgur.com/yUP2g7C.png
  1. Subscribe to the addon / Make sure the addon is in your server's collection
  2. Make sure it's enabled then start a game / Start your server (then connect to it)
  3. Go to the "Render" section of the tool menu and select "Material URL"
  4. Enter a URL leading to an image in the URL field, the URL must lead to a PNG/JPEG file (e.g. https://i.imgur.com/C5ilAHq.png)
  5. (Enter a name in the Material name field)
  6. Press the button named "Upload to the server"
  7. Wait for the material to upload, then select it in the list below
  8. Click on an entity with the tool to apply your material

In order to access the SubMaterial mode, select the tool and press E and R at once. The display on the toolgun should change to SubMaterial mode. You'll just have to use your scrollwheel to switch submaterials while looking at a prop.

When your material is uploaded, everyone can see it in the list and use it.
For practical reasons, materials will be named '!maturl_[given name]_[SteamID64 of the uploader]' (in the console).

By default, the URL whitelist[pastebin.com] is on. If you want to turn it off execute this command in the game host's/server's console: "sv_materialurl_whitelist 0"

Please keep in mind that all the materials uploaded on a server will be deleted when it shuts down/changes level. Ditto for single-player mode.

Features
This addon allows you to:
  • Check if a given URL leads to a valid material
  • Upload custom materials with a direct URL to a PNG/JPEG file and a custom name and material parameters
  • Apply custom materials/submaterials on entities
  • Delete your own uploaded materials from the list (admins can delete anyone's materials)
  • Copy the materials' URL from the list
  • Report materials to admins
  • Add materials you like to a favorite list
  • Duplicate and save entities that have custom materials

When pasting a duplication that contains custom materials, all the materials will be uploaded at once and the player's cooldown will be set to the server's multiplied by the number of materials the dupe uploaded.

Client Convars
  • cl_materialurl_enabled (def. 1): Enables/disables Material URL clientside
  • cl_materialurl_keepfiles (def. 0): This allows you to keep the downloaded materials upon disconnection (they won't stay uploaded, it's just the images that are kept, they're located in the garrysmod/data/materialurl_materials/ folder)
  • cl_materialurl_preview (def. 1): Enables/disables previews in the material list
  • cl_materialurl_showmine (def. 0): Only show the materials that you uploaded in the list

Server Convars
  • sv_materialurl_adminonly (def. 0): Prevents normal players from using Material URL
  • sv_materialurl_deletedisconnected (def. 1): Enables/disables the automatic deletion of disconnect players' materials
  • sv_materialurl_whitelist (def. 1): Enables/disables the URL whitelist[pastebin.com]
  • sv_materialurl_reportingenabled (def. 0): Enables/disables the reporting feature
  • sv_materialurl_limitedsize (def. 0): Enables/disables the material size limit
  • sv_materialurl_filesizelimit (def. 1000): Sets the material size limit in kilobytes
  • sv_materialurl_limitedmaterials (def. 1): Enables/disables the material limit
  • sv_materialurl_materiallimit (def. 5): Sets the material limit (each player has their own count)
  • sv_materialurl_cooldown (def. 10): Sets the cooldown in seconds between each time a player wants to upload a material

Current problems
Discord image links must not start with 'cdn.discordapp.com/attachments'. They have to start with 'media.discordapp.net/attachments' to work.

Animated pictures aren't supported. I might not add support for this, as it might be hard for people to actually upload functional animated pictures.

Please report bugs/problems in the appropriate discussion.

Future updates features
These are the features I intend to implement in future updates (suggest here):
  • Add PermaProps support
  • Add E2 support
  • Add a way to restrict a player from using Material URL (just ban 'em)
  • Quit the Beta (v1.0)

Last v0.x update changelog (Sep. 5th)
v0.8
- Added a SubMaterial feature with duplication support, with its own display on the toolgun
- Added a button to reset the material parameters in the menu

v0.8.1
- Fixed Lua errors when looking at map entities
- Fixed the toogun display not refreshing correctly in singleplayer
- Disabled the size limit by default and changed the default maximum file size to 1000 kb (see Server Convars)

v0.8.2
- Added Material X and Y offset parameters (texture translation)

v0.8.3
- Fixed a bug with the whitelist
- Added a website to the whitelist

Disclaimer
This addon allows players to upload materials from any link when the URL whitelist[pastebin.com] is off, people might use it for nefarious purposes.
Please refrain from complaining about people misbehaving with this addon on your server. If you believe something is missing, post a suggestion.
I will not be held responsible for any cases of illicit/illegal/dangerous content uploaded on your server. Use at your own risk! I highly recommend you keep the whitelist on if you're a server owner.

Please do not reupload/edit/improve this addon without my permission.

Thanks for your support!
Popular Discussions View All (5)
66
29 Aug, 2024 @ 9:39am
PINNED: Suggestions
Some1else{}
63
10 Jan @ 1:12pm
PINNED: Bug Reporting
Some1else{}
4
5 Sep, 2021 @ 4:23pm
I currently make a page on imgur.com for WAC Aircraft skins.
wolfy.hunter9111
329 Comments
Cherrie_The_Shifter ΘΔ 22 Jan @ 6:53am 
[Material URL Tool (Beta)] bad argument #4 to CreateConVar (string expected, got number)
1. unknown - lua/weapons/gmod_tool/stools/materialurl.lua:65
2. include - [C]:-1
3. unknown - gamemodes/sandbox/entities/weapons/gmod_tool/stool.lua:159
4. include - [C]:-1
5. unknown - gamemodes/sandbox/entities/weapons/gmod_tool/shared.lua:388
6. include - [C]:-1
7. unknown - gamemodes/sandbox/entities/weapons/gmod_tool/init.lua:10
[Material URL Tool (Beta)] bad argument #4 to CreateConVar (string expected, got number)
1. unknown - lua/weapons/gmod_tool/stools/materialurl.lua:65
2. include - [C]:-1

7. unknown - gamemodes/sandbox/entities/weapons/gmod_tool/cl_init.lua:11
dollm3 19 Jan @ 9:09am 
FIX THIS PLEASE bad argument #4 to CreateConVar (string expected, got number)
1. unknown - lua/weapons/gmod_tool/stools/materialurl.lua:65
2. include - [C]:-1
3. unknown - gamemodes/sandbox/entities/weapons/gmod_tool/stool.lua:154
4. include - [C]:-1
5. unknown - gamemodes/sandbox/entities/weapons/gmod_tool/shared.lua:372
6. include - [C]:-1
7. unknown - gamemodes/sandbox/entities/weapons/gmod_tool/cl_init.lua:11
deportavius 9 Jan @ 8:41am 
how do you use it on the world?
RONNIE F [JC THUGZ] 8 Jan @ 9:31pm 
I finna do some crazy shit with this tool, if you know what I mean
Exie 21 Nov, 2024 @ 1:07am 
[Material URL Tool (Beta)] bad argument #4 to CreateConVar (string expected, got number)
1. unknown - lua/weapons/gmod_tool/stools/materialurl.lua:65
2. include - [C]:-1
3. unknown - gamemodes/sandbox/entities/weapons/gmod_tool/stool.lua:154
4. include - [C]:-1
5. unknown - gamemodes/sandbox/entities/weapons/gmod_tool/shared.lua:388
6. include - [C]:-1
7. unknown - gamemodes/sandbox/entities/weapons/gmod_tool/cl_init.lua:11
Exie 21 Nov, 2024 @ 1:07am 
[Material URL Tool (Beta)] bad argument #4 to CreateConVar (string expected, got number)
1. unknown - lua/weapons/gmod_tool/stools/materialurl.lua:65
2. include - [C]:-1
3. unknown - gamemodes/sandbox/entities/weapons/gmod_tool/stool.lua:154
4. include - [C]:-1
5. unknown - gamemodes/sandbox/entities/weapons/gmod_tool/shared.lua:388
6. include - [C]:-1
7. unknown - gamemodes/sandbox/entities/weapons/gmod_tool/init.lua:10
MeeM 27 Oct, 2024 @ 8:00pm 
we need material gif addon
Hobby 2 Oct, 2024 @ 1:48pm 
when i have this addon enabled and load a save all ropes disapear. All my light bulbs are on the floor.
🐺✝13DeadFelix🖤☢ 18 Jul, 2024 @ 12:28am 
okay the URL whitelist thing makes no sense at all
🐺✝13DeadFelix🖤☢ 17 Jul, 2024 @ 10:19pm 
this addon is doing nothing but confusing me I every time I use a URL it just says not whitelisted even though it ends with PNG