• Dev Tool - Resource Browser
    98 replies, posted
  • Avatar of Exitus
  • Alrighty, so I don't know about the rest of you devs, but I hate sorting through the GCF files to find stuff. So, I made a resource browser. It allows you to browse through all the files that are mounted in game. [b]VERSION 2[/B] [url=http://www.garrysmod.org/downloads/?a=view&id=42846][img]http://www.garrysmod.org/img/?t=dll&id=42846[/img][/url] [url=http://www.joudoki.com/downloads/rBrowser2.zip][img]http://www.joudoki.com/downloads/general-download.gif[/img][/url] Changelog: [Add] Find in files [Add] Options [Add] History for folder locations [Add] Preset examples for filters [Add] Image Viewer [Add] Folder tree on the left [Change] Text viewer greatly improved: - Line numbers toggleable - Word Wrap toggleable - Vertical and horizontal scrollbars - Copy to Data shortcut [Change] Improved material viewer - New look - RGBA modifiers for images that support it [Change] Improved Properties Viewer [Change] Improved sound player interface [Change] Improved map changer interface [Change] Browser and Text Viewer are resizeable [Fix] Address bar buggyness [Fix] Derma compatibility [img]http://www.joudoki.com/downloads/rbrowser2/rbrowser2_window.jpg[/img] Main browser [img]http://www.joudoki.com/downloads/rbrowser2/rbrowser2_textreader.jpg[/img] Text reader [img]http://www.joudoki.com/downloads/rbrowser2/rbrowser2_sound.jpg[/img] Sound player [img]http://www.joudoki.com/downloads/rbrowser2/rbrowser2_material.jpg[/img] Material viewer [img]http://www.joudoki.com/downloads/rbrowser2/rbrowser2_map.jpg[/img] Map Changer [b]VERSION 1[/b](old) [url]http://www.joudoki.com/downloads/rBrowser/rBrowser_window.jpg[/url] It allows you to browse through all available content, and at a fast rate. To give an example, my models folder has 1,223 files in it, and it takes 3 seconds to open it. That's .002 seconds per file! However, this would be much less awesome and useful if it stopped there. I've also included functionality in "readers" - there are currently ( in v1 ) a handful of readers: Text Reader: [url]http://www.joudoki.com/downloads/rBrowser/rBrowser_textreader.jpg[/url] The text reader currently supports word wrapping and vertical scrolling. Sound Player: [url]http://www.joudoki.com/downloads/rBrowser/rBrowser_soundplayer.jpg[/url] The sound player allows you to listen to sounds, and be able to change the pitch / volume to get a preview. Material Viewer: [url]http://www.joudoki.com/downloads/rBrowser/rBrowser_matviewer.jpg[/url] Map Changer: [url]http://www.joudoki.com/downloads/rBrowser/rBrowser_mapchanger.jpg[/url] I've also included an HTML viewer. With this plethora of functionality, you will never ever have to sort through those damned .gcf files again. This is all completely client side, so you can use this on any server ( for whatever reason ). ( I don't know if ScriptEnforce blocks this or not ). I've worked on this for a long time, and all code is 100% original. If you would like to borrow code or extend the functionality, please let me know :) If you are interested in adding a view ( or have a suggestion to improve one ), send me a pm, reply here, or email me. -- INSTRUCTIONS -- Download. Extract to addons/ In-game, type browser_open to open the browser. It's that simple! -- KNOWN BUGS -- - The filebrowser scrollbar is a little funky ( I recoded the scrollbar for this one, I hate how DVScrollbar works - Really large materials aren't very viewable in material viewer -- DOWNLOAD -- [url=http://www.joudoki.com/downloads/rBrowser.zip][img]http://www.joudoki.com/downloads/general-download.gif[/img][/url] [url=http://www.garrysmod.org/downloads/?a=view&id=42266][img]http://www.garrysmod.org/img/?t=dll&id=42266[/img][/url]
  • Avatar of Exitus
  • You can't edit the text, for two reasons: - You can only edit text files in the data/ folder ( you can access these outside of garrys mod anyways ) - I coded the text viewer from scratch, and it's just that - a viewer. It has no editing functionality right now. Let me know if you guys find any bugs or have any suggestions.. I worked very hard on this and am always glad to improve it to make it more useful =) Here's what I have planned for the next version: - Extension of the material viewer functionality - A Model viewer ( I'm not sure how useful this actually is, seeing as to how you can just spawn the model ) - Allow the resizing of the text viewer ( DFrame seems to lack resizing functionality at the moment ) - Better file sorting ( sort by file name, type, etc ) Also, one thing I forgot to mention, you can right click on an item to bring up a context menu to allow you to copy the location to the clipboard, open in text viewer, open in default, view properties, etc. Oh, and don't download this and expect it to look the same as mine, I'm using a custom skin =)
  • Avatar of Foda
  • I was just about to say that it should have a VTF viewer, but you already have it. Great Job!
  • Avatar of DireAvenger
  • Now, Will there be a way to search through other GCF Files? That would make it good for contraption makers too. (Finding sounds/effects)
  • Avatar of Exitus
  • [QUOTE=DireAvenger]Now, Will there be a way to search through other GCF Files? That would make it good for contraption makers too. (Finding sounds/effects)[/QUOTE] Yes, that's part of what this does. If the content is available in Garry's Mod ( whether you mounted it, downloaded it, whatever ), this will be able to find it.
  • Avatar of Exitus
  • [QUOTE=Hemuli]I'm interested to see how this finds everything :keke:[/QUOTE] Open up cl_filelib.lua. The function is [url=http://wiki.garrysmod.com/wiki/?title=File.Find]file.Find[/url]
  • Avatar of mcd1992
  • you should add text editing, a full search (be in the root then ctrl + f and search all files and folders) and image support also mabey a good web browser
  • Avatar of Ryx
  • Add a sound browser and I will deem you lua king. (Unless it already has one, in which case awesome.)
  • Avatar of Exitus
  • Erm, navigate to the sound folder? [QUOTE=mcd1992]you should add text editing, a full search (be in the root then ctrl + f and search all files and folders) and image support also mabey a good web browser[/QUOTE] Text editing wouldn't be useful at all, for two reasons: 1) You would only be able to edit text inside of the data/ directory 2) You can modify these outside of garrysmod anyways with any text editor. I agree with the full search - that's actually something I've been working on. And image support? What do you mean? What would this mean beyond what it can already do ( open and view .vtf and .vmt? )
  • Avatar of Kogitsune
  • For image support, you could always create an HTML control with the HTML being just the image, as Vicis, I think it was him, did the screenshot viewer.
  • Avatar of Exitus
  • [QUOTE=LPine]And what if we need to extract some files and edit them?[/QUOTE] I added a "Copy to Data" function in the right click context menu; however, it only works on text files ( due to limitations of file.Read and file.Write ). [QUOTE=Kogitsune]For image support, you could always create an HTML control with the HTML being just the image, as Vicis, I think it was him, did the screenshot viewer.[/QUOTE] Ah, this would make sense =) I'll see what I can do.
  • Avatar of Nev
  • You should add the ability to open text files that have tables in them in a list view or something like that. Oh and excellent work!
  • Avatar of heeyo
  • Brilliant. Finding extra sounds to use for emitters should be easier now!