1. Post #1
    likes men
    Python1320's Avatar
    May 2007
    1,723 Posts
    xtermcol
    Beautiful color codes for your terminal!
    if you don't know what SRCDS or Linux is then this is not for you.



    Download: svn://svn.metastruct.org/srvaddons/unixtermcol
    Username: anon
    Password: anon
    Warning: Includes a module, but is almost foolproof implementation so no worries!

    Source
    - Included in the repository. Requires rgb2xterm and Source SDK and Garry's Headers
    TODO
    - Improve coloring?

    Credits
    Valve - Easy hooking!
    Chrisaster - EngineSpew
    Trevor Woerner - rgb2xterm


    Also don't forget to check out EPOE for more debugging fun
    Reply With Quote Edit / Delete Reply Windows 7 Finland Show Events Winner Winner x 15Friendly Friendly x 1 (list)

  2. Post #2
    Gold Banana
    Banana Lord.'s Avatar
    May 2010
    6,852 Posts
    hot, thanks baby
    Reply With Quote Edit / Delete Reply Linux United States Show Events Optimistic Optimistic x 2Friendly Friendly x 2Dumb Dumb x 1Agree Agree x 1 (list)

  3. Post #3
    TGiFallen's Avatar
    January 2010
    1,440 Posts
    I love you
    Reply With Quote Edit / Delete Reply Windows 7 Canada Show Events Friendly Friendly x 4Optimistic Optimistic x 1 (list)

  4. Post #4
    Gold Banana
    Banana Lord.'s Avatar
    May 2010
    6,852 Posts
    Just tried this on my server, works great <3
    Reply With Quote Edit / Delete Reply Windows 7 United States Show Events Optimistic Optimistic x 1Informative Informative x 1 (list)

  5. Post #5
    JustSoFaded's Avatar
    December 2011
    432 Posts
    hot, thanks baby


    Also, nice this is awesome.
    Reply With Quote Edit / Delete Reply Windows 7 United States Show Events Funny Funny x 2Optimistic Optimistic x 2 (list)

  6. Post #6
    Gold Member
    DrogenViech's Avatar
    December 2006
    832 Posts
    This addon is pure win, thank you
    Reply With Quote Edit / Delete Reply Windows 7 Germany Show Events Optimistic Optimistic x 1 (list)

  7. Post #7
    likes men
    Python1320's Avatar
    May 2007
    1,723 Posts
    Just tried this on my server, works great <3
    Woo, something that didn't break when I just tossed it there!

    [sub]PS: Didn't die while toying with the napalm although it wasn't exactly fun ;x[/sub]
    Reply With Quote Edit / Delete Reply Windows 7 Finland Show Events Optimistic Optimistic x 1Funny Funny x 1 (list)

  8. Post #8
    Gold Banana
    Banana Lord.'s Avatar
    May 2010
    6,852 Posts
    [sub]PS: Didn't die while toying with the napalm although it wasn't exactly fun ;x[/sub]
    you can firebomb shit

    how is it not fun
    Reply With Quote Edit / Delete Reply Linux United States Show Events Optimistic Optimistic x 1Agree Agree x 1 (list)

  9. Post #9
    likes men
    Python1320's Avatar
    May 2007
    1,723 Posts
    Made this beta compatible as much as I could, still need this request filled or can't recolor errors:
    http://facepunch.com/showthread.php?t=1206834
    Rate that post agree, or make and print a poster and glue it next to Garry's office or whatever to get it fixed.

    PS: The newline bug is fixed (should be) in beta only!
    Reply With Quote Edit / Delete Reply Windows 7 Finland Show Events Friendly Friendly x 1 (list)

  10. Post #10
    garry's Avatar
    September 2001
    12,435 Posts
    I'll build this into GMod13 if you want? This is what I have for it to work on the windows console:

    Reply With Quote Edit / Delete Reply Windows 7 Show Events Winner Winner x 6Agree Agree x 1 (list)

  11. Post #11
    likes men
    Python1320's Avatar
    May 2007
    1,723 Posts
    Guess integrating it wouldn't be too bad, but I still need the spew function for EPOE

  12. Post #12
    Gold Banana
    Banana Lord.'s Avatar
    May 2010
    6,852 Posts
    I'll build this into GMod13 if you want? This is what I have for it to work on the windows console:

    you kinda rock garry
    Reply With Quote Edit / Delete Reply Windows 8 United States Show Events Agree Agree x 4 (list)

  13. Post #13
    likes men
    Python1320's Avatar
    May 2007
    1,723 Posts
    Oh and also:

    "Note that not all terminals support this; if color sequences are not supported, garbage will show up."

    Disable by default if you embed it.
    Alternatively check the TERM environment variable at least.

  14. Post #14
    godlike's Avatar
    September 2010
    492 Posts
    Does this work in windows?
    Reply With Quote Edit / Delete Reply Windows 7 United States Show Events Dumb Dumb x 7Winner Winner x 2Lua King Lua King x 2Funny Funny x 1 (list)

  15. Post #15
    likes men
    Python1320's Avatar
    May 2007
    1,723 Posts
    I thought garry added colors for windows.
    If you want improvement to the terminal though use this: http://didrole.com/SourceCurses/

    Edited:

    Also, since Garry refuses to mark lua errors as SPEW_WARNING I have no way to make errors red, for now. I can always hook to lua_shared or do similar heuristic analysis I do in EPOE, but I'll still try to get Garry give us SPEW_WARNING...

  16. Post #16
    Map in a box's Avatar
    July 2009
    7,419 Posts
    You fixed enginespew for beta?

  17. Post #17
    likes men
    Python1320's Avatar
    May 2007
    1,723 Posts
    Yes, or rather pretty much recompiled with backwards_headers, look in EPOE to grab the bins or here.

    Edited:

    I did change one thing to make the EngineSpew hook not cause epic fail in any case. While you are in the spew no print or error triggers another spew.
    Reply With Quote Edit / Delete Reply Windows 7 Finland Show Events Winner Winner x 1Useful Useful x 1 (list)

  18. Post #18
    likes men
    Python1320's Avatar
    May 2007
    1,723 Posts
    Some changes

    Thanks to BlackAwps, MsgC is now finally supported (as well as it can be under ANSI colors).
    Note: Original MsgC is not called at all, but that shouldn't be a problem unless you override MsgC before this.



    Also "fixed" Garry's Mod 13 compatibility by providing autorun loader for the enum.

  19. Post #19
    likes men
    Python1320's Avatar
    May 2007
    1,723 Posts
    Updated original post!
    Due to this bug I was forced to basically recode the thing. If you use coroutines on your server I suggest you update asap.
    This module is safe once more, even more so than before and also more compatible (it only detours print in lua anymore and even that is not really required).
    I also moved to xterm color codes so there's a whopping 256 colors to choose from when printing to console screen.
    Additionally MsgC is now fully supported without any detours!

    Edited:

    If someone has troubles including the module it might be that you're running a too old glibc, that's my fault for updating my compiling machine but downgrading is almost impossible, sorry, you'll have to compile it yourself. I can try to provide some help or the makefile.
    Reply With Quote Edit / Delete Reply Windows 8 Finland Show Events Winner Winner x 2Useful Useful x 1 (list)