Author Topic: Player Title II - Name and Title Display  (Read 34479 times)

0 Members and 1 Guest are viewing this topic.

Offline lavacano201014

  • Jr. Member
  • **
  • Posts: 83
  • Karma: 9
  • Archbishop of Cristina Scabbia worship
Player Title II - Name and Title Display
« on: July 01, 2010, 10:49:47 PM »
Regarding Developer Support
I don't come onto the Ulysses forums as much as I used to. However, if you add me on Steam (and leave a comment with your problem) I'll gladly try to help you out (though be warned I honestly haven't looked at the code in quite some time). This does not mean Player Title II development is halted. Merely paused.

Regarding GMod 13
I've received a report that it works if you rename info.txt to addon.txt.

Our good friend Lt.Smith made PlayerTitle, and maintained it up to version 1.2. It's a great addon, truly, but here's the problem: It hasn't been updated since July 2008, and Lt.Smith himself hasn't come onto these forums since August 2009.

I decided to take over the project (until such time as Lt.Smith demands it back, if he ever does).

Features:
 - MySQL and SQLite support*
 - Easily accessible to Lua (only two simple functions to know!)
 - Fades away with distance*
 - Comes prepackaged with an E2 extension

How to Use:
 - ULX commands: !title, !settitle, !mytitle.* If it's not obvious what they do, check the readme (or run ulx help <command> in console)
 - E2 Functions: E:hasTitle(), E:setTitle(), E:title(). If these aren't obvious, check the readme. Note that you must be admin to use E:setTitle() on players other than yourself.
 - Lua funcs: playerGetTitle(), playerSetTitle(). If these...you get the idea.

Known Issues:
 - Titles can't be longer than 40 characters.* I can't tell if this is a developer imposed limit to maintain a (comparatively) small DB footprint or if it causes issues somewhere, so I left it alone.
 - Differing Z coords (differing altitudes), such as Construct's ledges or Flatgrass' spawn platform, can cause the name/title display to disappear.* This is due to the trace screwing up, and can't be fixed in a way I can think of.
 - If using MySQL offsite, and there is a lot of latency between the game server and the MySQL DB, the server (and/or maybe the client? I don't use MySQL, I dunno) will freeze while the query is running.*

All items marked with * are features/limits that are in PlayerTitle 1.2.

Screenshots! (And yes, the name of the guy who executed the command is colored by his team color)

You can download the attached ZIP or use this SVN link (RECOMMENDED): http://lavacano-gmod.googlecode.com/svn/trunk/playertitleii/

I'm sorry I don't have a Release version for you guys - I kinda never backed up Release version when I first made it SVN.
« Last Edit: November 01, 2012, 12:09:44 PM by lavacano201014 »
Circle reasoning works because circle reasoning works because...

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6196
  • Karma: 394
  • Project Lead
Re: [SVN] Player Title II - Name and Title Display
« Reply #1 on: July 02, 2010, 05:01:35 AM »
Titles are probably limited to 40 characters to keep the rows in the DB a constant size, which makes database access much faster (well, for MySQL anyways, I think SQLite ignores it).

Good work! :)
Experiencing God's grace one day at a time.

Offline lavacano201014

  • Jr. Member
  • **
  • Posts: 83
  • Karma: 9
  • Archbishop of Cristina Scabbia worship
Re: [SVN] Player Title II - Name and Title Display
« Reply #2 on: July 02, 2010, 03:39:40 PM »
Titles are probably limited to 40 characters to keep the rows in the DB a constant size, which makes database access much faster (well, for MySQL anyways, I think SQLite ignores it).

That makes sense.

Quote
Good work! :)

Well, thank ya.

Also, I realized I accidentally didn't paste in the end / at my SVN link - it's fixed now, but the SVN is (currently!) no different from the ZIP.
Circle reasoning works because circle reasoning works because...

Offline Tommo1590

  • Newbie
  • *
  • Posts: 37
  • Karma: 1
Re: [SVN] Player Title II - Name and Title Display
« Reply #3 on: July 04, 2010, 07:56:51 AM »
Anyway to hide the gmod default name which shows when u look at players and only have this one show?

Thanks
Tom  :o

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 7885
  • Karma: 372
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: [SVN] Player Title II - Name and Title Display
« Reply #4 on: July 04, 2010, 10:23:23 AM »
It can be done.
Gamemode.HUDDrawTargetID
Lavacano would just need to add the feature/function.
The price one pays for pursuing any profession or calling is an intimate knowledge of its ugly side. - James Baldwin

Offline lavacano201014

  • Jr. Member
  • **
  • Posts: 83
  • Karma: 9
  • Archbishop of Cristina Scabbia worship
Re: [SVN] Player Title II - Name and Title Display
« Reply #5 on: July 04, 2010, 02:02:59 PM »
It can be done.
Gamemode.HUDDrawTargetID
Lavacano would just need to add the feature/function.

...but I like the default! D-:

Wait. What I can do is turn them off until a certain distance (like when the names are fairly fuzzed out, even when visible), then turn them on. Maybe work the titles in there as well...heck, maybe I'll even make a clientside convar for the whole thing!
Circle reasoning works because circle reasoning works because...

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 7885
  • Karma: 372
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: [SVN] Player Title II - Name and Title Display
« Reply #6 on: July 04, 2010, 08:37:24 PM »
I say method to turn on or off.
That way, you and those who like them on can leave them on.
Those who don't can turn them off. :)
The price one pays for pursuing any profession or calling is an intimate knowledge of its ugly side. - James Baldwin

Offline lavacano201014

  • Jr. Member
  • **
  • Posts: 83
  • Karma: 9
  • Archbishop of Cristina Scabbia worship
Re: [SVN] Player Title II - Name and Title Display
« Reply #7 on: July 04, 2010, 08:47:54 PM »
Here's what I was thinking with the convars (all clientside):

(Player Title: Target ID) plti_tgtid <0|1|2> (default 1):
 - 0 = Turn off target IDs completely.
 - 1 = Disable target IDs until a certain distance (defined in plti_iddist, explained later)
 - 2 = Leave target IDs on, no matter the distance.

(Player Title: ID Distance) plti_iddist (default undetermined):
 - If the target you're looking at is closer to you than the value entered in this convar, disable the target ID. Else, let it come up.
 - The default is currently undetermined, numberwise, but I will figure out what number to use with an E2 and an unsuspecting player (probably my server's SourceTV bot)
Circle reasoning works because circle reasoning works because...

Offline Buggzie

  • Newbie
  • *
  • Posts: 48
  • Karma: 2
Re: [SVN] Player Title II - Name and Title Display
« Reply #8 on: July 09, 2010, 08:05:14 AM »
Pictures please.

Offline lavacano201014

  • Jr. Member
  • **
  • Posts: 83
  • Karma: 9
  • Archbishop of Cristina Scabbia worship
Re: [SVN] Player Title II - Name and Title Display
« Reply #9 on: July 09, 2010, 09:11:00 AM »
Pictures please.

Working on it. Done! (And yes, the name of the guy who executed the command is colored by his team color)
« Last Edit: July 09, 2010, 01:22:45 PM by lavacano201014 »
Circle reasoning works because circle reasoning works because...

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6196
  • Karma: 394
  • Project Lead
Re: [SVN] Player Title II - Name and Title Display
« Reply #10 on: July 09, 2010, 02:53:04 PM »
You can use img tags to inline those, lavacano
Experiencing God's grace one day at a time.

Offline Buggzie

  • Newbie
  • *
  • Posts: 48
  • Karma: 2
Re: [SVN] Player Title II - Name and Title Display
« Reply #11 on: July 10, 2010, 01:50:43 AM »
Why has it got [BONG] in its name, lol

Offline lavacano201014

  • Jr. Member
  • **
  • Posts: 83
  • Karma: 9
  • Archbishop of Cristina Scabbia worship
Re: [SVN] Player Title II - Name and Title Display
« Reply #12 on: July 10, 2010, 12:09:16 PM »
You can use img tags to inline those, lavacano

I know, but I couldn't think of a way to organize them on the OP without the vertical one screwing with the whole thing. BBCode has no [div] tag D-:

Why has it got [BONG] in its name, lol

Whatever tag I'm wearing is based on a "What tag did I have to put on last?" basis. That's for TF2.
Circle reasoning works because circle reasoning works because...

Offline lavacano201014

  • Jr. Member
  • **
  • Posts: 83
  • Karma: 9
  • Archbishop of Cristina Scabbia worship
Re: [SVN] Player Title II - Name and Title Display
« Reply #13 on: July 31, 2010, 02:24:33 AM »
So, I have bad news, worse news, and semi-good news.

The bad news is I reformatted, and I lost my working copy of the SVN. While I can easily obtain a new one, all the changes I made to Player Title II are gone.

The worse news is the changes didn't seem to do anything on my server anyway.

The semi-good news is that might just have been because I was stupid and didn't actually upload it (opened FileZilla, got distracted by a shiny thing, thought I did it, closed FileZilla). Don't know if I did or not though, so I'll crack open the file later and make sure.
Circle reasoning works because circle reasoning works because...

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2634
  • Karma: 413
    • |G4P| Gman4President
Re: [SVN] Player Title II - Name and Title Display
« Reply #14 on: July 31, 2010, 05:44:45 AM »
This has happened to me on a few occasions. I usually just take it as a sign from the programming gods and when I re-write what I've lost it ends up being better than what I lost in the first place... usually.