• What Are You Working On? -- September 2012
    262 replies, posted
Since beta not to far away I decided to mess around with my chatbox again. This time I decided to add more. It looks for commands and then looks for parameters in the commands sorta like evolve but further. It also decides how many lines can your chatbox support by using some basic math. [media]http://www.youtube.com/watch?v=BBPJFALNY5k[/media] 1080p for best results.
[QUOTE=Spencer Sharkey;37598324]Find In Files / Find All (and replace!) is really useful, but there are still things that require some manual fixing That being said, a converter would be more work than it's worth.[/QUOTE] I agree with you but maybe this is a pretty stupid question but i dont know what to replace the old codes with.
[QUOTE=DJarthas;37601037]I agree with you but maybe this is a pretty stupid question but i dont know what to replace the old codes with.[/QUOTE] The basic stuff is documented [URL="https://docs.google.com/a/sf-n.com/document/d/1khSuIYrAMkqXu7wlH5YRJNwz6hOH6Xqi5lqBhE3x6gA/edit"]here[/URL] You'll want to definitely want to look at the new [B][URL="http://wiki.garrysmod.com/page/Libraries/surface/CreateFont"]Libraries/surface/CreateFont[IMG]http://wiki.garrysmod.com/favicon.ico[/IMG][/URL][/B] Anything that requires a Color argument now requires a Color table instead of unpacked arguments... so for example you used to be able to do entity:SetColor(255, 0, 255, 150), but now you must give it a color like entity:SetColor(Color(255, 0, 255, 150)). It will now also return a color. Anything that you have that's Get/SetAngle will now be Get/SetAngle[B]s[/B] to keep consistency. The datastream module was taken out, so you'll have to use the new [URL="http://wiki.garrysmod.com/page/Lua/Tutorials/Using_the_net_library"]Net Library[/URL] Most of the file functions were changed, so you can have a look at the new ones [URL="http://wiki.garrysmod.com/page/file"]here[/URL]. Or you can read up on this slightly outdated File Library documentation by garry [URL="https://docs.google.com/document/d/1CIMxhvD7UX1lJPGi_DpDmPdTcVloIDYo-6AAMQl_KCs/edit"]here[/URL], at the bottom it explains the new [b][url=http://wiki.garrysmod.com/page/Libraries/file/Find]Libraries/file/Find[img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] parameters. And probably a couple of other little things you'll find by debugging your code as you go along, you can always reference the [URL="https://docs.google.com/a/sf-n.com/document/d/1dVgp8ojkrIjxVRFADUF5uwZQiLLivHixkmV5PW5v9Fw/edit"]Complete Change List[/URL] but it's not 100% accurate. For example, spawn icons require some edits, most of the silkicons are now png materials in the icon16 folder rather than gui/silkicons, soundscripts are now added through lua rather than the file, you load pcf files through lua rather than the manifest file too. The [URL="http://wiki.garrysmod.com/page/Libraries/http"]HTTP Library[/URL] has changed
Use for sourcenet clientsided: [URL]http://pastebin.com/kw8JXYT8[/URL]
[QUOTE=Aide;37599971]Since beta not to far away I decided to mess around with my chatbox again. This time I decided to add more. It looks for commands and then looks for parameters in the commands sorta like evolve but further. It also decides how many lines can your chatbox support by using some basic math. [media]http://www.youtube.com/watch?v=BBPJFALNY5k[/media] 1080p for best results.[/QUOTE] It's very nice to have that many lines and all but that's one thing I really hate in a game is having a massively large chatbox. Did you atleast make it so you can choose how many lines you want to see other than having a giant blind spot on the left side of your screen?
[QUOTE=brandonj4;37604785]It's very nice to have that many lines and all but that's one thing I really hate in a game is having a massively large chatbox. Did you atleast make it so you can choose how many lines you want to see other than having a giant blind spot on the left side of your screen?[/QUOTE] Yep, having lines of text covering half of your screen is quite annoying at times (actually always).
[quote][img]http://filesmelt.com/dl/floors.PNG[/img][/quote] More Spacestation stuff. The map is semi editable. It took until two in the morning for me to get physics generation fast enough to edit without lagging. The visual mesh generation is still way too slow, though.
[QUOTE=Spencer Sharkey;37601153]The basic stuff is documented [URL="https://docs.google.com/a/sf-n.com/document/d/1khSuIYrAMkqXu7wlH5YRJNwz6hOH6Xqi5lqBhE3x6gA/edit"]here[/URL] You'll want to definitely want to look at the new [B][URL="http://wiki.garrysmod.com/page/Libraries/surface/CreateFont"]Libraries/surface/CreateFont[IMG]http://wiki.garrysmod.com/favicon.ico[/IMG][/URL][/B] Anything that requires a Color argument now requires a Color table instead of unpacked arguments... so for example you used to be able to do entity:SetColor(255, 0, 255, 150), but now you must give it a color like entity:SetColor(Color(255, 0, 255, 150)). It will now also return a color. Anything that you have that's Get/SetAngle will now be Get/SetAngle[B]s[/B] to keep consistency. The datastream module was taken out, so you'll have to use the new [URL="http://wiki.garrysmod.com/page/Lua/Tutorials/Using_the_net_library"]Net Library[/URL] Most of the file functions were changed, so you can have a look at the new ones [URL="http://wiki.garrysmod.com/page/file"]here[/URL]. Or you can read up on this slightly outdated File Library documentation by garry [URL="https://docs.google.com/document/d/1CIMxhvD7UX1lJPGi_DpDmPdTcVloIDYo-6AAMQl_KCs/edit"]here[/URL], at the bottom it explains the new [b][url=http://wiki.garrysmod.com/page/Libraries/file/Find]Libraries/file/Find[img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] parameters. And probably a couple of other little things you'll find by debugging your code as you go along, you can always reference the [URL="https://docs.google.com/a/sf-n.com/document/d/1dVgp8ojkrIjxVRFADUF5uwZQiLLivHixkmV5PW5v9Fw/edit"]Complete Change List[/URL] but it's not 100% accurate. For example, spawn icons require some edits, most of the silkicons are now png materials in the icon16 folder rather than gui/silkicons, soundscripts are now added through lua rather than the file, you load pcf files through lua rather than the manifest file too. The [URL="http://wiki.garrysmod.com/page/Libraries/http"]HTTP Library[/URL] has changed[/QUOTE] bookmarked that post, thanks.
[QUOTE=MadParakeet;37605376]More Spacestation stuff. The map is semi editable. It took until two in the morning for me to get physics generation fast enough to edit without lagging. The visual mesh generation is still way too slow, though.[/QUOTE] Finish that.
Not exactly GLua related but some people here wanted to use it sooo: [QUOTE=Map in a box;37606220][url]https://bitbucket.org/Somepotato/lua-web-server/overview[/url] I have a compiled version as a download. There is a bug I need to fix but for now this should work if you want to toy around with it.[/QUOTE]
[QUOTE=skar;37594634]someone should go through all of the changes in GLua (for GM13) and make a converter that you can input a script into and then takes all old deprecated functions and replaces them with the new ones, or tells you what you need to change to make it work again this way i can be lazy yet again[/QUOTE] [url]http://fangli-scripts.googlecode.com/svn/trunk/HSP/lua/HSP_GMod13.lua[/url] There you go. It will fix most of the errors. Also, it's made for HSP, so you might want to change it a bit.
[QUOTE=I am God.;37606333][url]http://fangli-scripts.googlecode.com/svn/trunk/HSP/lua/HSP_GMod13.lua[/url] There you go. It will fix most of the errors.[/QUOTE] [lua] filex = {}; filex.Append = file.Append [/lua] What? filex = file?
[QUOTE=Chessnut;37606462][lua] filex = {}; filex.Append = file.Append [/lua] What? filex = file?[/QUOTE] filex has been removed in GMod13, and some addons are still using it. file.Append does the same as filex.Append
[QUOTE=brandonj4;37604785]It's very nice to have that many lines and all but that's one thing I really hate in a game is having a massively large chatbox. Did you atleast make it so you can choose how many lines you want to see other than having a giant blind spot on the left side of your screen?[/QUOTE] Yes you can as well as the size, lines, and type of the font. The amount of lines is automatically decided by screen height.
[QUOTE=I am God.;37606705]filex has been removed in GMod13, and some addons are still using it. file.Append does the same as filex.Append[/QUOTE] What he's saying is why not do [lua]filex = file;[/lua]
[QUOTE=Disseminate;37607052]What he's saying is why not do [lua]filex = file;[/lua][/QUOTE] [url]http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/indexe67e.html[/url] filex.Append was the only filex function
off-topic, someone should make a GLua lexer for sublime-text. i don't think anyone has made a lexer for GM13 yet?
[QUOTE=skar;37607565]off-topic, someone should make a GLua lexer for sublime-text. i don't think anyone has made a lexer for GM13 yet?[/QUOTE] [url]http://www.facepunch.com/showthread.php?t=1038951[/url]
[QUOTE=Spencer Sharkey;37607606][url]http://www.facepunch.com/showthread.php?t=1038951[/url][/QUOTE] well, i'm not very bright, now am i
[img]http://puu.sh/13DZW[/img] The skin is not done yet. :) [editline]10th September 2012[/editline] You can add your tabs very easily. You add it as simple as typing [lua]AddMode(ID, Text)[/lua] and to add a entry to it, you simply do [lua]PLS:MsgAdmin(Text, ID of mode)[/lua]
[QUOTE=Persious;37608062][img]http://puu.sh/13DZW[/img] The skin is not done yet. :) [editline]10th September 2012[/editline] You can add your tabs very easily. You add it as simple as typing [lua]AddMode(ID, Text)[/lua] and to add a entry to it, you simply do [lua]PLS:MsgAdmin(Text, ID of mode)[/lua][/QUOTE] When are you going to be releasing this? It looks awesome.
I'm not realy sure yet. I've got a few bugs to fix etc.
So I opened Milkshape with the intention of making something. This is a first even though I've had the program for a while. Not Lua related... At least, not yet... [img]http://s9.postimage.org/j657c3ahb/work.png[/img] Anyone guess what it is? No? References: [img]http://images4.wikia.nocookie.net/__cb20090115023247/bludgeoningangel/images/1/19/Excalibolg.jpg[/img] [img]http://sp9.fotolog.com/photo/25/6/123/sakurachan_947/1194296882_f.jpg[/img] [editline]9th September 2012[/editline] pagestretch :< [editline]9th September 2012[/editline] [img]http://s10.postimage.org/kc6tazmu1/ohnoes.png[/img] [del]It's broken.[/del] Forgot to update groups. [editline]9th September 2012[/editline] [img]http://s14.postimage.org/9wrs74opt/works.png[/img] YES
I was going to make a UV map, but then I remembered I was lazy and it looks fine as it is. [img]http://s12.postimage.org/jgb8y2djx/done.png[/img] [editline]9th September 2012[/editline] AUTOMERGE BAWW [url]http://www.filedropper.com/excalibolg[/url]
[video=youtube;KU5z_Thz4lQ]http://www.youtube.com/watch?v=KU5z_Thz4lQ[/video] Character Loadup/Creation Demo. Not complete yet but I'm happy
[quote][img]http://filesmelt.com/dl/shittle.png[/img][/quote] I made the [URL="http://nanotrasen.com/wiki/index.php/Arrivals"]arrival shuttle[/URL] using simple editing capabilities. It lacks doors, seats, lockers, engines, proper windows, and some other crap. I probably won't be making the diagonal walls because they're used practically nowhere. I could have put a ceiling on it but figured this was better for demonstrating and comparison.
[QUOTE=Spencer Sharkey;37611111][video=youtube;KU5z_Thz4lQ]http://www.youtube.com/watch?v=KU5z_Thz4lQ[/video] Character Loadup/Creation Demo. Not complete yet but I'm happy[/QUOTE] That's hotter than your mom when she get's sexy for a [I]nigga[/I]
[b]Update #2:[/b] Ok, this thing is now as close to finished as possible as the console command now fully predicts you filepath input. There is only one thing left, and that's to override "lua_openscript_cl" but that would most likely involve external programs, and there's no way I'm doing that. [b]Update:[/b] Thanks to some help from a local wizard, I fixed a few of the issues mentioned in the "not so cool" section, including slowness and un-detailed errors. Next up legit predicted commands. Ok so, this is a fully featured sv_allowcslua "bypass", unlike that other thing I posted about. Basically it lets you run all of your normal lua files almost exactly as if there was no convavar. [b]Cool things:[/b] - Adds shorter command to run lua files from console - Adds command to run lua files from web - Over-Rides include (it's accurate to the best of my knowledge and shouldn't have issues) so you don't have to modify your main projects at all. - Auto-loads your entire autorun folder. [b]Not so cool things:[/b] - [del]A tad slower then the normal includes (especially noticeable with projects that are composed of lots of files)[/del] - [del] No path prediction for the console commands (if you guys let me know how to do it, I'll add it) [/del] - [del]Most importantly: Since it's all RunString it won't be able to tell you where your errors originated from file-wise, however, the given line numbers are correct. Seeing this, I recommend editing only one file at a time.[/del] Anyway, stick the following code into a lua file somewhere [b][u]*OTHER*[/u][/b] than /autorun/client, otherwise you'll get a very slow and painful infinite loop of death. [lua]--Override Functions function include(path, root) if (root == nil or root == "LUA_PATH" ) then path = "lua/"..path root = "GAME" elseif(root == "GAME") then path = path elseif(root == "DATA") then path = "data/"..path else path = path root = "GAME" end local fileFunction = CompileString(file.Read(path, root), path) fileFunction() print("Loaded: "..path) end function runWebFile(adress) http.Fetch(adress, function(content) RunString(content) end) print("Fetched From: "..adress) end --add con commands concommand.Add("lua_webload", function(p,c,a) runWebFile(a[1]) end) --concommand.Remove("lua_openscript_cl") function auto(command, args) args = string.sub(args,2) local files, dirs = file.Find("lua/"..args.."*", "GAME") table.Add(dirs, files) local commands = string.Explode("/", args) local str = commands[table.Count(commands)] table.foreach(dirs, function(key, value) dirs[key] = command.." "..args..string.sub(value, string.len(str) + 1) end) return dirs end concommand.Add("lua_fileload", function(p,c,a) include(a[1]) end, auto) --auto execute autorun folder local files, directories = file.Find("lua/autorun/client/*.lua","GAME") for i,v in pairs(files) do include("autorun/client/"..v) end --let user know were done chat.AddText("Bypasses Loaded!")[/lua] Next, add following line into your autoexec.cfg file (obviously change the key and path if needed). [code] bind f10 "lua_run_cl RunString(file.Read('autorun/client/Bypass.lua', LUA_PATH))" [/code] Finally, start a game and hit F10 (or whatever your bind is). The script will then do it's thing and load all your auto-run scripts. P.S. Sorry for that other thread, it was really late and I was rather pissed off....
Gimmickly code to allow C-Style throwing aka. exception handling. [lua] local throwObj function throw(obj) throwObj = obj error("throw", 0) end function try(blockA, blockB, ...) local succ, a, b, c, d, e, f = pcall(blockA, ...) if(not succ) then if(a ~= "throw") then error(a) end return blockB(throwObj, ...) end return succ, a, b, c, d, e, f end function tryNoRollback(blockA, blockB, ...) return xpcall(blockA, function(err) if(err == "throw") then return blockB(throwObj) end end) end [/lua] [editline]10th September 2012[/editline] Sample: > return try(function() throw(function() end) end, function(obj) print(obj) return 1 end) function: 0x000e9018
that's pretty cool, wizard. I can see a lot of use for that, like debugging sections of scripts without interrupting the flow of the rest of the script. also why is [noparse][lua][/lua][/noparse] insanely broken with the numbers fucking up and the boxes being extra huge? [editline]10th September 2012[/editline] found a style fix for the giant lua boxes: [code].syntaxhighlighter table td.gutter .line { text-align: right!important; padding: 0px 5px 0 1em!important; background-color: #AAA; }[/code] 0.5em broke the style for some reason, so I just made it 5px.
Sorry, you need to Log In to post a reply to this thread.