• Garry's Mod Wiki Discussion
    645 replies, posted
[QUOTE=Robotboy655;50098698]The "new" page lists all of the engine effects as generated by the engine itself, so it contains only the effects that are actually usable in-game.[/QUOTE] So the Sparkle effect isn't usable? Alright, thanks for pointing that out
[QUOTE=MPan1;50097949]I attempted to redirect them, feel free to make the redirection a bit better[/QUOTE] Done
I think we should have a page that lists all the post-processing materials available to be acquired with [url=http://wiki.garrysmod.com/page/Global/Material]Material[/url], for example: pp/colour, pp/fb, pp/texturize, and a bunch more. My recent progress would have gone a lot faster if this page existed. Does anyone know exactly they're defined? Edit: I still have no idea what decides whether a post is merged or double-posted. Edit: also don't answer that, I can probably find it myself. Edit: okay, real question though... Color() actually doesn't return a plain table ("Structure"), it returns a table with a Color metatable. This metatable has a function: ToVector. Should we move the [url=http://wiki.garrysmod.com/page/Structures/Color]Color structure[/url] page to a class page and give Color the honor of being the class that it is?
[QUOTE=Neat-Nit;50099674]I think we should have a page that lists all the post-processing materials available to be acquired with [url=http://wiki.garrysmod.com/page/Global/Material]Material[/url], for example: pp/colour, pp/fb, pp/texturize, and a bunch more. My recent progress would have gone a lot faster if this page existed. Does anyone know exactly they're defined? Edit: I still have no idea what decides whether a post is merged or double-posted. Edit: also don't answer that, I can probably find it myself.[/QUOTE] I don't think that's a good idea, you can always just make your own material with any shader.
[QUOTE=Robotboy655;50099694]I don't think that's a good idea, you can always just make your own material with any shader.[/QUOTE] I'll tell you why I do think it's a good idea. Garry's Mod's vanilla post-processing effects use these materials everywhere. This is new coders' go-to reference for how to do stuff. Most importantly, there are never any proper comments about this, usually even variable names are arbitrary: mat_FSB, mat_FB. Whatever the hell that means. If we properly document the default materials, then at least a coder can hop to the wiki and understand wtf is going on in Garry's code. Edit: and this is not some random presumption, it's something that I would have immensely benefited from just a few weeks ago. also I made an edit to my post before I saw yours, if you missed it :)
[QUOTE=Robotboy655;50099694]I don't think that's a good idea, you can always just make your own material with any shader.[/QUOTE] But having something to refer to is always nice. For example, I had to hack around with using _rt_FullFrameFB and $detail to render my weapon's scope with a multiply render mode (porting from The Hidden Source, otherwise I would've done it differently of course) but I had to dig into the leaked 07 engine to find what I needed. Most people don't have access to that / know how, so having examples would be great.
i'm just laughing at how there's literally no documentation for the jit.util functions [I]anywhere[/I] i'm trying to document them but it's hard when the jit lib source code gives me cancer and there's nothing about those functions on the official wiki
It should be documented on the shader pages, not on pages separate for each material. Then you can also list default materials that use said shader, even though that's not really necessary since you already will have examples.
[QUOTE=kaliii;50099933]i'm just laughing at how there's literally no documentation for the jit.util functions [I]anywhere[/I][/QUOTE] [URL="http://wiki.garrysmod.com/page/Category:jit"]*facepalm*[/URL] [QUOTE=kaliii;50099943]i know there are pages for them? they're not documented, all they list on those pages is both args and the return, which are sometimes wrong anyways no examples and no descriptions[/QUOTE] I looked at 2 functions and both of them had the complete documentation. Then I read your comment and looked at all the other ones, I see what you mean now :v:
[QUOTE=JasonMan34;50099935][URL="http://wiki.garrysmod.com/page/Category:jit"]*facepalm*[/URL][/QUOTE] i know there are pages for them? they're not documented, all they list on those pages is both args and the return, which are sometimes wrong anyways no examples and no descriptions
[QUOTE=Neat-Nit;50099674]Edit: okay, real question though... Color() actually doesn't return a plain table ("Structure"), it returns a table with a Color metatable. This metatable has a function: ToVector. Should we move the [url=http://wiki.garrysmod.com/page/Structures/Color]Color structure[/url] page to a class page and give Color the honor of being the class that it is?[/QUOTE] Not until the engine functions also return a metatable.
[QUOTE=Robotboy655;50099934]It should be documented on the shader pages, not on pages separate for each material.[/QUOTE] Maybe I was unclear, I meant one page to hold all of them in a table, each with a short description. 3-column table: name, shader, description.
[QUOTE=Neat-Nit;50100029]Maybe I was unclear, I meant one page to hold all of them in a table, each with a short description. 3-column table: name, shader, description.[/QUOTE] If that makes you feel better or something then go for it. I don't see any point in duplicating descriptions even more. Especially considering you yourself pointed out redundancy of doing so on the wiki.
[QUOTE=Robotboy655;50100086]If that makes you feel better or something then go for it. I don't see any point in duplicating descriptions even more. Especially considering you yourself pointed out redundancy of doing so on the wiki.[/QUOTE] I will. It's not duplicate though. A list of default materials is not documented anywhere. Edit: [url]http://wiki.garrysmod.com/page/Post-Processing_Materials[/url]
Have redirect links always been green? I've noticed in the past that some redirected link to a help page appears in green on a warning header when editing something in a specific way (can't seem to recreate it at the moment), but I could have sworn that redirect links throughout the wiki appear blue, like normal links - as they do on Wikipedia. Can we get rid of the green altogether? I don't think there's anything to gain by knowing in advance that a link will be redirected to a different wiki page.
On the (new) GMod wiki, they have always been green. You shouldn't be linking to redirect pages anyway. That's maybe why it is a different colour but I don't really know.
I know that we're not Wikipedia, but they have an endless supply of recommendations, good practices, etc on how to do a wiki. [url]https://en.wikipedia.org/wiki/Wikipedia:NOTBROKEN[/url] [quote][b]Do not "fix" links to redirects that are not broken[/b] There is usually nothing wrong with linking to redirects to articles. Some editors are tempted, upon finding a link to a redirect page, to bypass the redirect and point the link directly at the target page. While there are a limited number of cases where this is beneficial, there is otherwise no good reason to pipe links solely to avoid redirects. Doing so is generally an unhelpful, time-wasting exercise that can actually be detrimental.[/quote] Edit: [quote="Robotboy655"]Lowercase the name because bad template.[/quote]Hey, no need to throw insults around... [quote="Robotboy655"]( And because shared names are case insensitive )[/quote]Yes, that's why it does that. I figured it's the only way we have to emulate case-insensitivity in the wiki.
~New page!~ I was looking for a list of blocked RunConsoleCommand concommands and couldn't find a recent one, so I sniffed 'em out of server.dylib and created [URL="http://wiki.garrysmod.com/page/Blocked_ConCommands"]a new page[/URL]. I currently haven't put the page into any category (because it isn't really Lua Reference) so it's unsearchable in the sidebar. Perhaps we should have an "Other" category under Reference or possibly in a new heading of its own? I know that I often forget to use the search bar and these uncategorized pages may become lost.
Line 66 of [url]http://wiki.garrysmod.com/skins/garrysmod/garrysmod.js[/url] : [noparse]window.prompt("Copy to clipboard: Ctrl+C, Enter","[img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/"+ wgPageName+"]"+ [/noparse][u][b]wgPageName.replace("/",delim)[/b][/u][noparse]+"[/url]");}[/noparse] I suggest changing it to: [noparse]window.prompt("Copy to clipboard: Ctrl+C, Enter","[img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/"+wgPageName+"]"+[/noparse][u][b]document.getElementById("firstHeading").textContent[/b][/u][noparse]+"[/url]");}[/noparse] ... and never worry about [url=http://wiki.garrysmod.com/page/Template_talk:Hook]this stuff[/url] ever again. And of course, the previous few lines can be gotten rid of, as they are only there to find 'delim' which is no longer used. I've already tested it, albeit without removing the delim code. Edit: removed code tags because of failed syntax highlighting [code][noparse]window.prompt("Copy to clipboard: Ctrl+C, Enter","[img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/"+ wgPageName+"]"+document.getElementById("firstHeading").textContent+"[/url]");}[/noparse][/code] Edit: and before anyone says "don't fix what ain't broken" - [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/DCategoryList/AddItem]DCategoryList/AddItem[/url]
Is there a list of default entities that can be created via ents.Create ?
[QUOTE=JasonMan34;50119146]Is there a list of default entities that can be created via ents.Create ?[/QUOTE] [url]https://developer.valvesoftware.com/wiki/List_of_base_entities[/url] [editline]12th April 2016[/editline] There's also should be a console command that lists all of them but I can't remember it.
I've recreated the realm icon in the wiki templates in order to give it title text (mouseover text). This means that the javascript that generates a second realm icon needs to be removed. It's better off in the wiki anyway, it means that the page changes less when the javascript runs. Quote from [thread]1514443[/thread]: [QUOTE=Neat-Nit;50124088]Screw it, did it anyway. I expect robotboy or someone else to remove the javascript code that generates the one I can't touch, currently you will see two icons and the right one has title text (= mouseover text) The relevant part of the javascript that should be removed is the b variable in lines 68+69: [code]{if(!wgIsArticle)return;var b="";if($(".catlinks A").filter("A:contains(Client)").length>0){b="<span class='client'>•</span>"}else if($(".catlinks A").filter("A:contains(Server)").length>0){b="<span class='server'>•</span>"}else if($(".catlinks A").filter("A:contains(Shared)").length>0){b="<span class='shared'>•</span>"}else if($(".catlinks A").filter("A:contains(Menu)").length>0){b="<span class='menu'>•</span>"} var a=$(".function_line").html();if(a){a=a.replace('ENTITY:',"ENT:");a=a.replace('WEAPON',"SWEP");a=a.replace('( <span class="function_args"></span> )',"()");$(".function_line").html("<a href='#' onclick='copyBB();' height='12px' title='Copy BB-code to clipboard'><img src='/skins/garrysmod/link.png' width='12px' style='top: 2px;position: relative;'></a> "+ b+ a)} &#8595; {if(!wgIsArticle)return; var a=$(".function_line").html();if(a){a=a.replace('ENTITY:',"ENT:");a=a.replace('WEAPON',"SWEP");a=a.replace('( <span class="function_args"></span> )',"()");$(".function_line").html("<a href='#' onclick='copyBB();' height='12px' title='Copy BB-code to clipboard'><img src='/skins/garrysmod/link.png' width='12px' style='top: 2px;position: relative;'></a> "+ a)}[/code][/QUOTE] Edit: I'm genuinely sorry if this was a dick thing to do, but at the same time [i]this is a wiki[/i], and I damn want to make it better for everyone. My [url=#post50105278]last javascript request[/url] was completely ignored so patiently waiting is probably not gonna accomplish anything anyway.
:snip: *Facepalm* sowwy :c
[QUOTE=JasonMan34;50124556]Dunno if it's just me but server/client/shared icon is showing up twice... [IMG]http://i.imgur.com/CbdomwJ.png[/IMG] [IMG]http://i.imgur.com/I2tM6rv.png[/IMG] [IMG]http://image.prntscr.com/image/15198e98e6dc4b179780677b88a3daf5.png[/IMG][/QUOTE] If only you could read the post above yours.
:snip:
Is there a page for 'self'? If so I couldn't find one, if not - can anyone make it please? :3 (I'd make it myself if I knew what to put there :v:)
self is a Lua feature, I don't really see how we could make an article out of it.
[QUOTE=JasonMan34;50130911]Is there a page for 'self'? If so I couldn't find one, if not - can anyone make it please? :3 (I'd make it myself if I knew what to put there :v:)[/QUOTE] self is used to refer the the thing a function is from. Here are examples: [lua]SWEP.DickSize = 13 -- Inches print(SWEP.DickSize) -- Prints 13 print(self.DickSize) -- Error! self is undefined/nil. function SWEP:PrimaryAttack() print(SWEP.DickSize) -- Prints 13 print(self.DickSize) -- Prints 13 end[/lua]
[QUOTE=JasonMan34;50130911]Is there a page for 'self'? If so I couldn't find one, if not - can anyone make it please? :3 (I'd make it myself if I knew what to put there :v:)[/QUOTE] When you or define a function which is defined in a table, you can do it one of two ways: [lua] local tbl = {1,2,3,4} function tbl:DoThis1() --using a colon : print(self[1]) end function tbl.DoThis2(self) --using a period . print(self[1]) end [/lua] When you define with a colon, the first argument is invisibly set to "self". The same goes for when you call a function: [lua] -- these... tbl:DoThis1() tbl:DoThis2() -- ...are the same as these. tbl.DoThis1(tbl) tbl.DoThis2(tbl) [/lua]
This is sort of may be documented on the metatable page, since it is related.
Sorry, you need to Log In to post a reply to this thread.